@font-face { font-family: Unbounded; font-weight: 800; font-display: swap; src: url(/fonts/unbounded-latin-800-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2190-2193; }
@font-face { font-family: Unbounded; font-weight: 800; font-display: swap; src: url(/fonts/unbounded-cyrillic-800-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Vazirmatn; font-weight: 400; font-display: swap; src: url(/fonts/vazirmatn-arabic-400-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Vazirmatn; font-weight: 800; font-display: swap; src: url(/fonts/vazirmatn-arabic-800-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  color-scheme: light dark;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Vazirmatn, sans-serif;
  --display: Unbounded, Vazirmatn, "Arial Black", system-ui, sans-serif;
  --background: oklch(.965 .014 315);
  --foreground: oklch(.25 .038 305);
  --card: oklch(.994 .006 320);
  --muted: oklch(.465 .038 308);
  --border: oklch(.80 .032 315);
  --ink: oklch(.23 .045 307);
  --panel: oklch(.31 .063 306);
  --panel-foreground: oklch(.98 .012 42);
  --panel-muted: oklch(.85 .043 315);
  --panel-edge: oklch(.69 .096 307);
  --primary: oklch(.866 .087 49);
  --primary-foreground: oklch(.27 .050 40);
  --lavender: oklch(.77 .105 305);
  --secondary: oklch(.815 .095 277);
  --accent: oklch(.932 .034 306);
  --ad: oklch(.933 .021 315);
  --live: oklch(.77 .119 164);
  --opponent: oklch(.45 .145 298);
  --game-board: oklch(.51 .125 289);
  --danger-fill: oklch(.50 .174 18);
  --success: oklch(.40 .094 166);
  --danger: oklch(.50 .174 18);
  --shadow: oklch(.26 .045 310 / .14);
  --radius: .9rem;
  --pop: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(.225 .029 315);
    --foreground: oklch(.955 .015 323);
    --card: oklch(.275 .033 316);
    --muted: oklch(.78 .036 317);
    --border: oklch(.43 .052 311);
    --ink: oklch(.14 .036 309);
    --panel: oklch(.34 .072 307);
    --accent: oklch(.41 .064 308);
    --ad: oklch(.255 .031 313);
    --opponent: oklch(.84 .081 296);
    --success: oklch(.83 .097 166);
    --danger: oklch(.75 .131 16);
    --shadow: oklch(.135 .034 308 / .45);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 0 max(.75rem, env(safe-area-inset-right)) max(.75rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
  background: var(--background);
  color: var(--foreground);
  font: 400 1rem/1.45 var(--body);
  -webkit-tap-highlight-color: transparent;
}
button, select, input { font: inherit; color: inherit; }
button {
  cursor: pointer;
  min-height: 2.75rem;
  padding: .55rem 1rem;
  border: .125rem solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  font-weight: 700;
  box-shadow: 0 .1875rem 0 var(--ink);
  transition: transform .12s var(--ease-out), box-shadow .12s var(--ease-out), background .2s;
  touch-action: manipulation;
}
button:active:not(:disabled) { transform: translateY(.1875rem); box-shadow: 0 0 0 var(--ink); }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible { outline: .1875rem solid var(--lavender); outline-offset: .125rem; }
button.primary { background: var(--primary); color: var(--primary-foreground); }
button.quiet { border-color: transparent; box-shadow: none; background: transparent; text-decoration: underline; text-underline-offset: .2em; }
button.danger { background: var(--danger-fill); color: white; }
button.icon { min-width: 2.75rem; padding: 0; position: relative; }
select { min-height: 2.75rem; border: .125rem solid var(--ink); border-radius: 999px; background: var(--card); padding: 0 .75rem; font-weight: 700; }

.masthead {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  max-width: 80rem;
  width: 100%;
  margin: 0 auto;
  padding: max(.5rem, env(safe-area-inset-top)) 0 .5rem;
}
.brand { display: inline-flex; align-items: center; gap: .45rem; font: 800 1.15rem var(--display); color: inherit; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 1.6rem; height: 1.6rem; border-radius: .5rem; background: var(--primary); border: .125rem solid var(--ink); box-shadow: .1875rem .1875rem 0 var(--lavender); rotate: -8deg; }
.pill { font-size: .8rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; background: var(--accent); white-space: nowrap; }
.live-pill::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-inline-end: .35rem; border-radius: 50%; background: var(--live); animation: blink 1.6s infinite; }
.tools { display: flex; gap: .4rem; margin-inline-start: auto; }
.tools button, .tools select { box-shadow: none; }
.badge { position: absolute; top: -.3rem; inset-inline-end: -.3rem; min-width: 1.2rem; height: 1.2rem; border-radius: 999px; background: var(--secondary); color: var(--ink); font-size: .7rem; line-height: 1.2rem; animation: wobble 1.2s var(--pop) infinite; }

.layout { flex: 1; display: grid; gap: .75rem; width: 100%; max-width: 80rem; margin: 0 auto; grid-template-columns: minmax(0, 1fr) 18.75rem; min-height: 0; }
.room { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: .75rem; min-height: min(44rem, calc(100dvh - 5rem)); }
.ad-slot { min-height: 15.625rem; border-radius: var(--radius); background: var(--ad); border: .125rem dashed var(--border); overflow: hidden; align-self: start; position: sticky; top: .75rem; }
.ad-slot:not(:has(iframe))::before { content: "AD"; display: grid; place-items: center; height: 15.625rem; color: var(--muted); font: 800 .8rem var(--display); letter-spacing: .2em; }

.call {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border-radius: calc(var(--radius) * 1.5);
  background: var(--panel);
  color: var(--panel-foreground);
  border: .125rem solid var(--ink);
  box-shadow: .375rem .375rem 0 var(--lavender);
}
.call-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .75rem; }
.call-label { display: inline-flex; align-items: center; gap: .5rem; align-self: flex-start; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--panel-muted); }
#status-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--panel-muted); }
[data-state="waiting"] #status-dot, [data-state="matching"] #status-dot { background: var(--primary); animation: blink .9s infinite; }
[data-state="matched"] #status-dot { background: var(--live); box-shadow: 0 0 0 .25rem color-mix(in oklch, var(--live) 25%, transparent); }
h1 { margin: 0; font: 800 clamp(2rem, 6vw, 3.4rem)/1.02 var(--display); letter-spacing: -.035em; text-wrap: balance; }
[data-state="waiting"] h1 { background: linear-gradient(90deg, var(--panel-foreground) 30%, var(--primary) 50%, var(--panel-foreground) 70%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.2s linear infinite; }
#status { margin: 0; color: var(--panel-muted); min-height: 1.45em; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.call .actions button:not(.primary):not(.quiet) { background: transparent; color: var(--panel-foreground); border-color: var(--panel-edge); box-shadow: 0 .1875rem 0 var(--panel-edge); }
.call .actions button.quiet { color: var(--panel-muted); }
#start, #next { font-size: 1.1rem; padding-inline: 1.4rem; }
#start .arrow, #next .arrow { display: inline-block; transition: transform .2s var(--pop); }
#start:hover .arrow, #next:hover .arrow { transform: translateX(.25rem); }
[dir="rtl"] .arrow { scale: -1 1; }
[data-state="idle"] #start { animation: nudge 2.8s var(--pop) infinite 1.5s; }
.trust { margin: 0; font-size: .82rem; color: var(--panel-muted); }
[data-state="matched"] .trust { display: none; }

.orb { position: absolute; inset-inline-end: -4rem; bottom: -4rem; width: 16rem; aspect-ratio: 1; z-index: 0; pointer-events: none; }
.orb span { position: absolute; inset: 0; border-radius: 50%; opacity: .35; background: radial-gradient(circle closest-side, transparent calc(100% - .2rem), var(--panel-edge) calc(100% - .15rem), transparent); will-change: transform, opacity; backface-visibility: hidden; }
.orb span:nth-child(1) { background: var(--primary); opacity: .9; inset: 34%; border: .125rem solid var(--ink); }
.orb span:nth-child(2) { inset: 22%; }
.orb span:nth-child(3) { inset: 10%; }
.orb span:nth-child(4) { inset: 0; }
/* Rings ripple as whole layers (no scaled hairline borders) and never grow past the orb box. */
[data-state="waiting"] .orb span:is(:nth-child(2), :nth-child(3), :nth-child(4)), [data-state="matching"] .orb span:is(:nth-child(2), :nth-child(3), :nth-child(4)) { animation: ripple 2.4s var(--ease-out) infinite; }
[data-state="waiting"] .orb span:nth-child(3), [data-state="matching"] .orb span:nth-child(3) { animation-delay: .8s; }
[data-state="waiting"] .orb span:nth-child(4), [data-state="matching"] .orb span:nth-child(4) { animation-delay: 1.6s; }
[data-state="waiting"] .orb span:first-child { animation: breathe 1.4s ease-in-out infinite; }

.voice-strip { position: relative; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding: .6rem .8rem; border-radius: var(--radius); background: oklch(1 0 0 / .08); font-size: .9rem; }
.voice-strip button { min-height: 2.25rem; padding: .3rem .8rem; background: var(--primary); color: var(--primary-foreground); }
.bars { display: inline-flex; gap: .15rem; align-items: end; height: 1rem; }
.bars i { width: .2rem; height: 30%; border-radius: .1rem; background: var(--panel-muted); }
[data-voice="live"] .bars i { background: var(--primary); animation: eq .9s ease-in-out infinite; }
[data-voice="live"] .bars i:nth-child(2) { animation-delay: .15s; }
[data-voice="live"] .bars i:nth-child(3) { animation-delay: .3s; }

.wait-game { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .4rem; animation: rise .35s var(--pop); }
.pop-head { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; }
.pop-head b { color: var(--primary); font-variant-numeric: tabular-nums; }
.pop-field { position: relative; height: 9.5rem; border-radius: var(--radius); background: oklch(0 0 0 / .22); border: .125rem dashed var(--panel-edge); overflow: hidden; display: grid; place-items: center; }
.pop-field::after { content: attr(data-combo); position: absolute; top: .4rem; inset-inline-end: .6rem; font: 800 1rem var(--display); color: var(--secondary); }
.pop-dot { position: absolute; width: 2.9rem; height: 2.9rem; min-height: 0; padding: 0; translate: -50% -50%; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 .3rem color-mix(in oklch, var(--primary) 25%, transparent); }
[dir="rtl"] .pop-dot { translate: 50% -50%; }
.pop-dot.pop { animation: shrink 1.6s linear forwards; }
.pop-dot:active { transform: none; }
#pop-start { background: var(--primary); color: var(--primary-foreground); }
.wait-game small { color: var(--panel-muted); font-size: .75rem; }

.chat { display: flex; flex-direction: column; min-height: 0; border-radius: calc(var(--radius) * 1.5); background: var(--card); border: .125rem solid var(--ink); box-shadow: .375rem .375rem 0 var(--shadow); overflow: hidden; }
.chat-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; border-bottom: .125rem solid var(--border); }
h2, h3 { margin: 0; font: 800 1rem var(--display); letter-spacing: -.01em; }
.chat-bar button { min-height: 2.4rem; padding: .35rem .9rem; }
.play-games { background: var(--primary); color: var(--primary-foreground); }
.play-games.live { animation: wobble 1.8s var(--pop) infinite; }
.feed { position: relative; flex: 1; min-height: 7rem; display: flex; flex-direction: column; }
#messages { flex: 1; margin: 0; padding: .9rem; list-style: none; overflow-y: auto; display: flex; flex-direction: column; gap: .4rem; scroll-behavior: smooth; }
#messages li { max-width: 80%; padding: .5rem .8rem; border-radius: 1.1rem 1.1rem 1.1rem .3rem; background: var(--accent); overflow-wrap: anywhere; animation: bubble .28s var(--pop); align-self: flex-start; transform-origin: bottom left; }
#messages li.own { align-self: flex-end; border-radius: 1.1rem 1.1rem .3rem 1.1rem; background: var(--primary); color: var(--primary-foreground); transform-origin: bottom right; }
#messages li.system { align-self: center; max-width: 100%; background: none; color: var(--muted); font-size: .82rem; padding: .2rem; }
[dir="rtl"] #messages li { transform-origin: bottom right; }
.empty-chat { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; color: var(--muted); pointer-events: none; text-align: center; padding: 1rem; }
.empty-chat span { font-size: 2rem; animation: float 3s ease-in-out infinite; }
.empty-chat p { margin: .3rem 0 0; }
.feed:has(#messages li) .empty-chat, .chat:has(.games:not([hidden])) .empty-chat { display: none; }
.typing { display: flex; align-items: center; gap: .2rem; padding: 0 1rem .5rem; color: var(--muted); font-size: .8rem; }
.typing i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--muted); animation: hop 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; margin-inline-end: .3rem; }
.jump { position: absolute; bottom: .6rem; inset-inline-end: .8rem; min-height: 2.25rem; width: 2.25rem; padding: 0; background: var(--primary); }
.icebreakers { display: flex; gap: .4rem; padding: 0 .8rem .5rem; overflow-x: auto; scrollbar-width: none; }
.icebreakers button { flex: none; min-height: 2.25rem; padding: .3rem .8rem; font-size: .88rem; box-shadow: none; border-width: .0625rem; animation: rise .4s var(--pop) backwards; }
.icebreakers button:nth-child(2) { animation-delay: .07s; }
.icebreakers button:nth-child(3) { animation-delay: .14s; }
#composer { display: flex; gap: .5rem; padding: .6rem; border-top: .125rem solid var(--border); }
#composer input { flex: 1; min-width: 0; min-height: 2.75rem; padding: 0 1rem; border-radius: 999px; border: .125rem solid var(--border); background: var(--background); }
#composer input:focus { border-color: var(--lavender); outline: none; }
#composer button { width: 2.75rem; padding: 0; background: var(--primary); color: var(--primary-foreground); font-size: 1.2rem; }

.games { flex: none; max-height: 58%; overflow-y: auto; padding: .75rem .9rem; border-bottom: .125rem solid var(--border); background: var(--background); display: flex; flex-direction: column; gap: .55rem; animation: rise .3s var(--pop); }
.games header { display: flex; align-items: center; gap: .5rem; }
.games header .icon { margin-inline-start: auto; min-height: 2.25rem; min-width: 2.25rem; box-shadow: none; }
.scores { display: flex; align-items: center; gap: .5rem; font-size: .75rem; color: var(--muted); }
.scores span { display: inline-flex; align-items: baseline; gap: .25rem; }
.scores b { font: 800 1.1rem var(--display); color: var(--foreground); display: inline-block; }
.scores .me b { color: var(--success); }
.bump { animation: bump .35s var(--pop); }
#game-status { margin: 0; font-weight: 700; min-height: 1.45em; }
.games[data-turn] #game-status { display: inline-flex; align-self: center; align-items: center; gap: .45rem; padding: .3rem .9rem; border-radius: 999px; border: .125rem solid var(--ink); }
.games[data-turn=""] #game-status { display: block; align-self: auto; padding: 0; border: 0; }
.games[data-turn="me"] #game-status { background: var(--primary); color: var(--primary-foreground); box-shadow: .2rem .2rem 0 var(--ink); animation: nudge 1.1s ease-in-out infinite; }
.games[data-turn="them"] #game-status { background: var(--secondary); color: var(--ink); }
.games[data-turn="me"] #game-status::before, .games[data-turn="them"] #game-status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; }
.games[data-turn="me"] .board { outline: .2rem solid var(--primary); outline-offset: .35rem; border-radius: var(--radius); }
.games[data-turn="them"] .board { opacity: .55; filter: saturate(.6); }
.games .board { transition: opacity .25s, filter .25s; }
#game-status[data-tone="win"] { color: var(--success); animation: bump .5s var(--pop); }
#game-status[data-tone="loss"] { color: var(--danger); }
.picker { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.picker button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .5rem; align-items: center; text-align: start; border-radius: var(--radius); padding: .55rem .7rem; }
.picker button span { grid-row: span 2; font-size: 1.2rem; }
.picker strong { font-size: .85rem; line-height: 1.15; }
.picker small { color: var(--muted); font-size: .75rem; }
#leave-game { align-self: center; min-height: 2.25rem; }

.board { display: grid; gap: .35rem; margin-inline: auto; width: min(100%, 18rem); }
.board:empty { display: none; }
.board.ttt { grid-template-columns: repeat(3, 1fr); }
.board.ttt button { aspect-ratio: 1; border-radius: var(--radius); font: 800 1.8rem var(--display); padding: 0; box-shadow: 0 .15rem 0 var(--ink); }
[data-owner~="me"] { color: var(--success); }
[data-owner~="them"] { color: var(--opponent); }
[data-owner~="ghost"] { opacity: .45; }
.board .win { color: var(--primary-foreground); background: var(--primary); animation: bump .45s var(--pop); }
.board.c4 { grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(6, 1fr); gap: .25rem; padding: .4rem; border-radius: var(--radius); background: var(--game-board); border: .125rem solid var(--ink); position: relative; }
.board.c4 .column { grid-row: 1 / -1; z-index: 2; min-height: 0; padding: 0; border: 0; box-shadow: none; background: transparent; border-radius: .4rem; }
.board.c4.live .column:not(:disabled):hover, .board.c4 .column.ghost { background: oklch(1 0 0 / .14); }
.disc { aspect-ratio: 1; border-radius: 50%; background: var(--background); box-shadow: inset 0 .15rem 0 oklch(0 0 0 / .2); }
.disc[data-owner="me"] { background: var(--primary); }
.disc[data-owner="them"] { background: var(--secondary); }
.disc.fell { animation: fall .38s cubic-bezier(.5, 0, .75, 1.3); }
.disc.win { outline: .2rem solid var(--ink); background-blend-mode: normal; }
.board.dots { grid-template-columns: .7rem 1fr .7rem 1fr .7rem 1fr .7rem; grid-template-rows: .7rem 1fr .7rem 1fr .7rem 1fr .7rem; gap: 0; aspect-ratio: 1; width: min(100%, 15rem); }
.dot { background: var(--ink); border-radius: 50%; z-index: 1; }
.edge { min-height: 0; padding: 0; border: 0; border-radius: .3rem; box-shadow: none; background: var(--border); opacity: .35; }
.edge.h { margin: .15rem -.05rem; }
.edge.v { margin: -.05rem .15rem; }
.board.dots.live .edge:not(:disabled):hover { opacity: .9; background: var(--lavender); }
.edge[data-owner~="me"] { background: var(--success); opacity: 1; }
.edge[data-owner~="them"] { background: var(--opponent); opacity: 1; }
.edge[data-owner~="ghost"] { opacity: .55; }
.box { border-radius: .2rem; margin: .2rem; transition: background .3s; }
.box[data-owner="me"] { background: color-mix(in oklch, var(--primary) 70%, transparent); }
.box[data-owner="them"] { background: color-mix(in oklch, var(--secondary) 70%, transparent); }
.box.claimed { animation: bump .4s var(--pop); }
.board.rps { grid-template-columns: repeat(3, 1fr); }
.choice { display: flex; flex-direction: column; align-items: center; border-radius: var(--radius); padding: .5rem; font-size: .8rem; }
.choice span { font-size: 2rem; transition: transform .2s var(--pop); }
.choice:hover:not(:disabled) span { transform: scale(1.18) rotate(-8deg); }
.choice.picked { background: var(--primary); opacity: 1; }
.reveal { grid-column: 1 / -1; display: flex; justify-content: space-around; text-align: center; }
.reveal span { display: block; font-size: 2.6rem; animation: bump .5s var(--pop); }
.reveal strong { font-size: .8rem; }

.toast { position: fixed; z-index: 10; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); translate: -50% 0; max-width: calc(100% - 2rem); padding: .6rem 1rem; border-radius: 999px; background: var(--ink); color: var(--panel-foreground); font-weight: 700; border: .125rem solid var(--primary); }
.toast.show { animation: rise .35s var(--pop); }

dialog { width: min(28rem, calc(100% - 2rem)); max-height: min(36rem, 85dvh); border: .125rem solid var(--ink); border-radius: calc(var(--radius) * 1.3); background: var(--card); color: var(--foreground); box-shadow: .375rem .375rem 0 var(--lavender); padding: 1.1rem; }
dialog[open] { animation: rise .3s var(--pop); }
dialog::backdrop { background: oklch(.17 .048 309 / .55); }
dialog header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
#report-form { display: flex; flex-direction: column; gap: .7rem; }
#reason { border-radius: var(--radius); }
.hint, .history-empty { color: var(--muted); font-size: .85rem; }
.past { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.past li { padding: .7rem; border-radius: var(--radius); background: var(--background); border: .0625rem solid var(--border); }
.past-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; font-size: .82rem; color: var(--muted); }
.past-tools { display: flex; gap: .35rem; }
.past-tools button, .past-tools select, .profile { min-height: 2.25rem; padding: .25rem .75rem; font-size: .82rem; box-shadow: none; }
.past-tools button.hot { background: var(--secondary); animation: wobble 1.4s var(--pop) infinite; }
.profile { display: inline-flex; align-items: center; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); font-weight: 700; text-decoration: none; border: .125rem solid var(--ink); }
.tag { font-size: .75rem; font-weight: 700; color: var(--danger); align-self: center; }
.wants { margin: .4rem 0 0; font-weight: 700; color: var(--opponent); }
.transcript { margin: .5rem 0 0; display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; }
.transcript span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transcript span.own { color: var(--foreground); text-align: end; }

.celebrate .call { animation: jolt .55s var(--pop); }
.celebrate .call::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 20% 30%, var(--primary) 0 .35rem, transparent .4rem), radial-gradient(circle at 75% 20%, var(--secondary) 0 .3rem, transparent .35rem),
    radial-gradient(circle at 60% 75%, var(--lavender) 0 .4rem, transparent .45rem), radial-gradient(circle at 35% 80%, var(--primary) 0 .25rem, transparent .3rem),
    radial-gradient(circle at 88% 60%, var(--secondary) 0 .35rem, transparent .4rem);
  animation: burst .9s var(--ease-out) forwards; }

@media (max-width: 60rem) {
  .layout { grid-template-columns: 1fr; }
  .ad-slot { position: static; min-height: 6.25rem; }
  .ad-slot:not(:has(iframe))::before { height: 6.25rem; }
}
@media (max-width: 47.99rem) {
  body { padding-inline: max(.5rem, env(safe-area-inset-left)); }
  .room { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: calc(100dvh - 4.25rem - env(safe-area-inset-top)); min-height: 30rem; gap: .5rem; }
  .call { padding: 1rem 1.1rem; gap: .6rem; }
  .masthead .pill#stats { display: none; }
  [data-state="matched"] .call, [data-state="ended"] .call { padding: .6rem .8rem; flex-direction: row; align-items: center; flex-wrap: wrap; }
  [data-state="matched"] h1, [data-state="matched"] .orb, [data-state="ended"] .orb, [data-state="matched"] #status { display: none; }
  [data-state="matched"] .call-body { flex-direction: row; align-items: center; flex-wrap: wrap; flex: 1; gap: .5rem; }
  [data-state="ended"] h1 { font-size: 1.5rem; }
  [data-state="matched"] .voice-strip { margin: 0; flex-basis: 100%; padding: .35rem .6rem; }
  [data-state="matched"] .actions { margin-inline-start: auto; }
  [data-state="matched"] .actions button { min-height: 2.4rem; padding: .3rem .85rem; }
  [data-state="idle"] .chat, [data-state="starting"] .chat { display: none; }
  [data-state="waiting"] .chat, [data-state="matching"] .chat { display: none; }
  [data-state="idle"] .room, [data-state="starting"] .room, [data-state="waiting"] .room, [data-state="matching"] .room { height: auto; grid-template-rows: auto; min-height: 0; }
  [data-state="idle"] .call, [data-state="waiting"] .call { min-height: max(24rem, calc(100dvh - 13rem)); justify-content: center; }
  .orb { width: 12rem; }
  .board { width: min(100%, 15rem); }
  .board.dots { width: min(100%, 13rem); }
}

@keyframes blink { 50% { opacity: .35; } }
@keyframes shimmer { to { background-position: -250% 0; } }
@keyframes nudge { 50% { transform: scale(1.06); } }
@keyframes ripple { from { transform: scale(.55); opacity: .75; } to { transform: scale(1); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(1.12); } }
@keyframes nudge { 0%, 88%, 100% { transform: none; } 92% { transform: translateY(-.25rem) rotate(-2deg); } 96% { transform: translateY(0) rotate(1deg); } }
@keyframes bubble { from { transform: scale(.6); opacity: 0; } }
@keyframes rise { from { transform: translateY(.6rem) scale(.97); opacity: 0; } }
@keyframes bump { 40% { transform: scale(1.3); } }
@keyframes wobble { 0%, 70%, 100% { transform: none; } 80% { transform: rotate(-6deg) scale(1.06); } 90% { transform: rotate(5deg); } }
@keyframes hop { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-.3rem); } }
@keyframes float { 50% { transform: translateY(-.35rem) rotate(-6deg); } }
@keyframes eq { 50% { height: 100%; } }
@keyframes shrink { from { transform: scale(1); } to { transform: scale(0); } }
@keyframes fall { from { transform: translateY(calc(var(--fall, 1) * -115%)); } }
@keyframes jolt { 30% { transform: scale(1.03) rotate(-.6deg); } 60% { transform: scale(.99) rotate(.4deg); } }
@keyframes burst { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *:not(.pop-dot), *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.ad-slot iframe { display: block; border: 0; width: 100%; height: 100%; min-height: inherit; }
