/* We Practice theme: trust blue + calm teal, with warm coral and sunny yellow accents. */
:root {
  color-scheme: light;
  --wp-blue: #1d4fd8;
  --wp-blue-deep: #14308f;
  --wp-teal: #0e8f8a;
  --wp-teal-soft: #d9f4ef;
  --wp-coral: #d9481f;
  --wp-coral-hover: #c23f19;
  --wp-sun: #ffc233;
  --wp-sky: #eaf2ff;

  --text-primary: #12263f;
  --text-secondary: #4a5d78;
  --text-primary-on: #ffffff;
  --text-secondary-on: #d7e3ff;
  --fill-primary: #1d4fd8;
  --fill-primary-on: #f5f9ff;
  --fill-secondary: rgb(18 38 63 / 0.55);
  --fill-tertiary: #e6effd;
  --fill-system-green: #12a579;
  --fill-system-orange: #f0731f;
  --fill-system-red: #c9303a;
  --stroke-primary: #c3d3ee;
  --stroke-secondary: #dbe5f6;
  --hover-wash: rgb(29 79 216 / 0.08);
  --hover-wash-primary-on: rgb(255 255 255 / 0.14);
  --mat-agent: rgb(255 255 255 / 0.88);
  --wp-shadow: 0 10px 34px rgb(29 79 216 / 0.14);
  --sans: "Plus Jakarta Sans", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --hero-surface: #14308f;
  --hero-text: #ffffff;
  --hero-text-muted: rgb(255 255 255 / 0.88);
  --hero-glass: rgb(255 255 255 / 0.16);
  --hero-glass-stroke: rgb(255 255 255 / 0.4);
}
html, body { color-scheme: light; }
body {
  background:
    radial-gradient(900px 500px at 105% -5%, rgb(255 194 51 / 0.22), transparent 60%),
    radial-gradient(800px 520px at -10% 8%, rgb(14 143 138 / 0.14), transparent 60%),
    linear-gradient(180deg, #f5f9ff 0%, #eef5ff 100%);
  background-attachment: fixed;
}
h1, h2, h3 { letter-spacing: -0.01em; }
.hero h1, .x-roomhead h1, .head h2 { font-weight: 800; }

/* top bar */
.x-bar { background: rgb(255 255 255 / 0.92); border-color: var(--stroke-primary); }
.x-logo { gap: 10px; font-weight: 800; font-size: 17px; color: var(--wp-blue-deep); }
.x-logoimg { width: 63px; height: 36px; background: none; padding: 0; border-radius: 0; object-fit: contain; }
.x-bar .btn { background: var(--fill-tertiary); color: var(--text-primary); border: 0; }

/* hero */
.hero, .hero:not(:has(.hero__img)) {
  background:
    radial-gradient(520px 340px at 92% 100%, rgb(255 194 51 / 0.55), transparent 70%),
    radial-gradient(480px 360px at 78% -10%, rgb(14 143 138 / 0.75), transparent 70%),
    linear-gradient(135deg, #1d4fd8 0%, #1a3fb4 48%, #0e7a86 100%);
}
.hero::after, .hero:not(:has(.hero__img))::after { background: none; }
.hero { display: grid; align-items: center; }
@media (min-width: 861px) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}
.hero__copy { max-width: none; }
.hero__eyebrow { background: rgb(255 255 255 / 0.18); font-weight: 600; }
.hero h1 { font-size: clamp(38px, 5.4vw, 58px); line-height: 1.08; }
.hero__sub { font-weight: 500; max-width: 30ch; }
.hero__logo {
  justify-self: center; align-self: center; width: min(420px, calc(100% - 32px)); margin: 16px;
  padding: 22px 26px; border-radius: 28px; background: rgb(255 255 255 / 0.96);
  box-shadow: 0 24px 60px rgb(10 25 80 / 0.35);
}
.hero__logo img { width: 100%; height: auto; }
@media (max-width: 860px) { .hero__logo { order: -1; width: min(320px, calc(100% - 32px)); margin: 20px auto 0; padding: 14px 18px; } }

/* buttons: friendly, with a gentle grow */
.x-btn { font-weight: 700; transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 200ms ease, background-color 200ms ease, opacity 160ms ease; }
.x-btn:hover { box-shadow: 0 6px 18px rgb(29 79 216 / 0.28); background: #1a45bd; }
.x-btn--ghost { background: var(--fill-tertiary); color: var(--text-primary); }
.x-btn--ghost:hover { background: #d6e4fb; box-shadow: none; }
.x-btn--danger:hover { background: #b0262f; box-shadow: 0 6px 18px rgb(201 48 58 / 0.3); }
#create-open, [data-create], #create-submit { background: var(--wp-coral); color: #fff; will-change: transform; transform-origin: center; }
#create-open:hover, [data-create]:hover, #create-submit:hover,
#create-open:focus-visible, [data-create]:focus-visible, #create-submit:focus-visible,
#create-open:active, [data-create]:active, #create-submit:active { background: var(--wp-coral-hover); transform: scale(1.08); box-shadow: 0 10px 24px rgb(217 72 31 / 0.35); }
.x-google, .x-email__submit { background: #fff; color: var(--wp-blue-deep); }
.x-google:hover, .x-email__submit:hover { background: #fff; box-shadow: 0 8px 22px rgb(10 25 80 / 0.3); }
.x-email__tabs { background: rgb(255 255 255 / 0.18); }
.x-email__tabs button[aria-selected="true"] { background: #fff; color: var(--wp-blue-deep); font-weight: 700; }
.x-email .x-input { background: rgb(255 255 255 / 0.16); border-color: rgb(255 255 255 / 0.5); }
.x-email .x-input::placeholder { color: rgb(255 255 255 / 0.85); }
.x-email__err { background: #fff1f0; color: #a3232b; }
.x-email__ok { background: #e6f8ee; color: #0d6b43; }
@media (prefers-reduced-motion: reduce) { #create-open:hover, [data-create]:hover, #create-submit:hover { transform: none; } }

/* how-it-works cards */
.cards > div { background: #fff; border: 1px solid var(--stroke-secondary); box-shadow: 0 6px 20px rgb(29 79 216 / 0.07); border-top: 5px solid var(--wp-blue); }
.cards > div:nth-child(2) { border-top-color: var(--wp-teal); }
.cards > div:nth-child(3) { border-top-color: var(--wp-sun); }
.cards h3 { font-weight: 700; color: var(--wp-blue-deep); }
.cards p { color: var(--text-secondary); }

/* lobby */
.head h2, .x-lobbyhead h2 { color: var(--wp-blue-deep); }
.x-filter { background: #fff; border-color: var(--stroke-primary); font-weight: 600; }
.x-filter[aria-pressed="true"] { background: var(--wp-teal); border-color: var(--wp-teal); color: #fff; }
.x-room { background: #fff; border: 1px solid var(--stroke-secondary); border-top: 5px solid var(--wp-blue); box-shadow: 0 6px 20px rgb(29 79 216 / 0.08);
  transition: transform 220ms ease, box-shadow 220ms ease; }
.x-room:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgb(29 79 216 / 0.16); }
.x-room:nth-child(4n+2) { border-top-color: var(--wp-teal); }
.x-room:nth-child(4n+3) { border-top-color: var(--wp-sun); }
.x-room:nth-child(4n+4) { border-top-color: var(--wp-coral); }
.x-room__topic { font-weight: 700; color: var(--text-primary); }
.x-empty { background: #fff; border-color: var(--stroke-primary); }
.pill { background: var(--wp-teal-soft); color: #075e5a; border: 0; font-weight: 600; }

/* room */
.x-person { background: #fff; border: 1px solid var(--stroke-secondary); box-shadow: 0 6px 18px rgb(29 79 216 / 0.07); }
.x-person__ring { box-shadow: 0 0 0 3px #fff, 0 0 0 3px transparent; }
.x-person.is-speaking .x-person__ring { box-shadow: 0 0 0 3px #fff, 0 0 0 calc(5px + var(--lvl, 0) * 7px) var(--fill-system-green); }
.x-person .x-av { background: var(--wp-sky); color: var(--wp-blue-deep); }
.x-person__mute { box-shadow: 0 0 0 3px #fff; }
.x-stack .x-av { box-shadow: 0 0 0 2px #fff; }
.x-mini { background: var(--fill-tertiary); font-weight: 600; }
.x-mini.is-on { background: var(--wp-teal); color: #fff; }
.x-controls { background: rgb(255 255 255 / 0.94); }
.x-chat { background: #fff; border: 1px solid var(--stroke-secondary); box-shadow: 0 6px 20px rgb(29 79 216 / 0.07); }
.x-msg__text { background: var(--fill-tertiary); }
.x-msg.is-me .x-msg__text { background: var(--wp-blue); color: #fff; }
.x-badge { background: var(--wp-coral); }

/* dialog, inputs */
.x-modal { background: #fff; }
.x-input { background: #fff; border-color: var(--stroke-primary); }
.x-input:focus { outline-color: var(--wp-blue); }
.x-opts input:checked + label { background: var(--wp-blue); border-color: var(--wp-blue); color: #fff; }
.x-notice { background: #fff6dc; color: #5a4300; }
.x-toast { background: var(--wp-blue-deep); }
.foot { color: var(--text-secondary); }
:focus-visible { outline-color: var(--wp-blue); }

/* v2: slower grow, softer (darker) surfaces, flag-coloured language chips, messages */
#create-open, [data-create], #create-submit { transition: transform 700ms ease-out, box-shadow 500ms ease, background-color 300ms ease; }
#create-open:hover, [data-create]:hover, #create-submit:hover,
#create-open:focus-visible, [data-create]:focus-visible, #create-submit:focus-visible,
#create-open:active, [data-create]:active, #create-submit:active { transform: scale(1.12); transition: transform 1800ms cubic-bezier(0.25, 0.6, 0.3, 1), box-shadow 1800ms ease, background-color 300ms ease; }

:root { --soft: #e7ecf5; --stroke-primary: #a4b6d6; --stroke-secondary: #b9c8e2; --fill-tertiary: #d2dcef; --wp-sky: #cfdcf2; --mat-agent: rgb(231 236 245 / 0.9); --text-primary: #0f2038; --text-secondary: #3b4d68; }
body {
  background:
    radial-gradient(900px 500px at 105% -5%, rgb(255 194 51 / 0.12), transparent 60%),
    radial-gradient(800px 520px at -10% 8%, rgb(14 143 138 / 0.12), transparent 60%),
    linear-gradient(180deg, #c3cfe3 0%, #b2c1db 100%);
  background-attachment: fixed;
}
.x-bar { background: rgb(228 234 244 / 0.95); }
.x-room, .x-person, .x-empty, .x-chat, .x-modal, .x-controls, .cards > div, .x-dm { background: var(--soft); }
.x-input { background: #f1f4fa; }
.hero__logo { background: #eef2f9; }
.hero, .hero:not(:has(.hero__img)) {
  background:
    radial-gradient(520px 340px at 92% 100%, rgb(255 194 51 / 0.4), transparent 70%),
    radial-gradient(480px 360px at 78% -10%, rgb(14 143 138 / 0.65), transparent 70%),
    linear-gradient(135deg, #17399f 0%, #142f88 48%, #0b5f6d 100%);
}
.x-filter { background: var(--lg, #e7ecf5); border: 2px solid var(--lc, var(--stroke-primary)); color: var(--text-primary); font-weight: 700; }
.x-filter:hover { filter: brightness(0.97); }
.x-filter[aria-pressed="true"] { background: var(--lgs, var(--wp-teal)); border-color: var(--lc, var(--wp-teal)); color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / 0.55); }
.x-filter[data-lang="All"] { --lc: #1d4fd8; --lg: linear-gradient(90deg, rgba(29,79,216,.2), rgba(14,143,138,.2)); --lgs: linear-gradient(90deg, #1d4fd8, #0e8f8a); }
.x-room { border-top-width: 6px; }
.x-mini--block { color: #8a1f27; }
.x-mini--block.is-on { background: #8a1f27; color: #fff; }
.x-mini--msg { background: var(--wp-blue); color: #fff; }
.x-msgbtn { margin-right: 6px; }

/* direct messages drawer */
.x-dm { position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(400px, 100%); display: flex; flex-direction: column; border-left: 1px solid var(--stroke-primary); box-shadow: -12px 0 40px rgb(10 25 60 / 0.3); }
.x-dm[hidden] { display: none; }
.x-dm__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--stroke-secondary); }
.x-dm__head h2 { flex: 1; margin: 0; font-size: 18px; text-align: center; color: var(--wp-blue-deep); }
.x-dm__list { display: grid; gap: 8px; padding: 16px; align-content: start; overflow: auto; }
.x-dm__friend { text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--stroke-primary); background: #f1f4fa; font: inherit; font-weight: 700; color: var(--text-primary); cursor: pointer; }
.x-dm__friend:hover { background: #fff; }
.x-dm__empty { color: var(--text-secondary); margin: 0; }
.x-dm__thread { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.x-dm__thread[hidden], .x-dm__list[hidden] { display: none; }
.x-dm__thread .x-msgs { flex: 1; overflow: auto; padding: 14px 16px; }
#dm-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--stroke-secondary); }
#dm-form .x-input { flex: 1; min-width: 0; }
@media (max-width: 560px) {
  .x-user__name { display: none; }
  .x-bar .btn { white-space: nowrap; padding: 6px 12px; font-size: 13px; min-height: 0; }
  .x-msgbtn { margin-right: 2px; }
  .x-user { gap: 6px; }
}
@media (max-width: 560px) { #user-av { display: none; } .x-logo { font-size: 15px; gap: 6px; } }

.x-confirm { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgb(8 20 45 / 0.6); }
.x-confirm[hidden] { display: none; }
.x-confirm__box { width: min(400px, 100%); padding: 24px; border-radius: 20px; background: var(--soft); box-shadow: 0 24px 60px rgb(0 0 0 / 0.4); }
.x-confirm__box p { margin: 0 0 18px; font-size: 17px; font-weight: 600; color: var(--text-primary); }
.x-confirm__btns { display: flex; gap: 10px; justify-content: flex-end; }
#dm-open .x-badge { margin-left: 4px; }

.x-mine__title { margin: 36px 0 4px; font-size: 22px; font-weight: 800; color: var(--text-primary); }
.x-mine__sub { margin: 0 0 14px; color: var(--text-secondary, #44527a); }
.x-editbtn { padding: 6px 14px; min-height: 0; font-size: 14px; }
#room-edit { margin: 6px 0; }
#room-edit { align-self: flex-start; justify-self: start; width: auto; max-width: max-content; display: inline-flex; }
.x-room__foot { flex-wrap: wrap; gap: 8px; }
.x-room__foot .x-count { margin-right: auto; }

.x-search { width: 100%; margin: 0 0 12px; }
#f-suggest { margin-top: 8px; }
#room-sound { margin: 6px 0 6px 8px; }

.x-emoji { padding: 8px 10px; border-top: 1px solid rgb(0 0 0 / 0.1); background: var(--soft); }
.x-emoji[hidden] { display: none; }
.x-emoji__row { display: flex; flex-wrap: wrap; gap: 4px; }
.x-emoji__row--stk { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgb(0 0 0 / 0.12); }
.x-emo { border: 0; background: transparent; font-size: 22px; line-height: 1; padding: 4px; border-radius: 8px; cursor: pointer; }
.x-emo:hover { background: rgb(0 0 0 / 0.08); }
.x-emo--big { font-size: 34px; }
.x-msg__sticker { font-size: 64px; line-height: 1.1; padding: 2px 6px; }
.x-msg__img { display: block; max-width: 100%; max-height: 260px; border-radius: 12px; margin-top: 4px; }
.x-chat__tool { padding: 6px 10px; min-height: 0; font-size: 18px; }
.x-hand { display: inline-block; }

.x-mini--like.is-on { background: #e11d48; color: #fff; }
#room-sound { align-self: flex-start; justify-self: start; width: auto; max-width: max-content; display: inline-flex; }

/* private messages: small popup docked bottom right */
.x-dm { top: auto; left: auto; right: 16px; bottom: 16px; width: min(340px, calc(100vw - 24px)); height: min(460px, 70vh); border: 1px solid var(--stroke-primary); border-radius: 18px; overflow: hidden; box-shadow: 0 16px 48px rgb(10 25 60 / 0.35); }
.x-dm__head { padding: 10px 12px; }
.x-dm__head h2 { font-size: 16px; }
#dm-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--stroke-secondary); }
#dm-form .x-input { min-width: 0; flex: 1; }
