/* ════════════════════════════════════════════
   Masti Mandali — design system
   Calm dark surfaces, hairline borders, soft depth, one spacing scale.
   Game colours stay; they're used as solid fills, not loud gradients.
   ════════════════════════════════════════════ */
:root {
  /* Colour */
  --bg: #140b2e;
  --bg-raised: #1c1240;
  --panel: rgba(255, 255, 255, .06);        /* resting surface */
  --panel-2: rgba(255, 255, 255, .10);      /* raised / control surface */
  --panel-press: rgba(255, 255, 255, .16);
  --line: rgba(255, 255, 255, .10);         /* hairline */
  --line-strong: rgba(255, 255, 255, .20);
  --ink: #fff;
  --ink-2: rgba(255, 255, 255, .86);
  --muted: #bdb3e6;
  --ok: #22c55e;
  --ok-ink: #4ade80;
  --bad: #ef4444;
  --bad-ink: #ff7b7b;
  --hot: #ff4d8d;
  --gold: #ffc93c;
  --violet: #a78bfa;
  --on-light: #1d0f45;

  /* Shape */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --radius: var(--r-lg);

  /* Spacing (4-pt scale) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;

  /* Depth: a hairline highlight on top, a soft shadow below */
  --hi: inset 0 1px 0 rgba(255, 255, 255, .08);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .22), 0 4px 14px rgba(0, 0, 0, .16);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .22), 0 14px 34px rgba(0, 0, 0, .26);
  --sheen: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 55%);

  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --fast: .16s;
  --med: .28s;

  /* Type: Nunito for headings and game titles, Noto Sans for everything else; Hindi falls back to Noto Sans Devanagari. */
  --font-display: 'Nunito', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Noto Sans', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-family: var(--font-body);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  background:
    radial-gradient(120% 55% at 50% -12%, rgba(91, 52, 196, .45) 0, transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .4; cursor: not-allowed; }
input { font: inherit; }
h3 { margin: var(--s6) 0 var(--s2); font-size: 17px; font-weight: 600; letter-spacing: -.1px; }
p { line-height: 1.5; }
b, strong { font-weight: 600; }

/* Keyboard focus: one clear ring everywhere, never on tap. */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: inherit; }

.screen { max-width: 720px; margin: 0 auto; padding: var(--s2) var(--s4) var(--s10); }
.center {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: calc(100vh - 84px); gap: var(--s4);
}
.muted { color: var(--muted); }
.small { font-size: 14px; }
.warn { color: #fca5a5; }

/* Screen change: a short, quiet fade-up (added by render() when the screen changes). */
#app.enter > * { animation: enter var(--med) var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Navigation bar ── */
.top {
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: var(--s2);
  max-width: 720px; margin: 0 auto; padding: var(--s3) var(--s4) var(--s1);
}
.top h2 { margin: 0; text-align: center; font-size: 19px; font-weight: 800; letter-spacing: -.2px; line-height: 1.2; }
.icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--panel-2); box-shadow: var(--hi);
  font-size: 18px; display: grid; place-items: center;
  transition: transform var(--fast) var(--ease), background var(--fast);
}
.icon:active { transform: scale(.92); background: var(--panel-press); }

/* ── Home: large title ── */
.hero { position: relative; text-align: left; padding: var(--s6) 0 var(--s2); }
.hero h1 {
  font-size: clamp(36px, 10.5vw, 56px); margin: 0; line-height: 1.02; letter-spacing: -1.2px;
  background: linear-gradient(90deg, #ffc93c, #ff4d8d 45%, #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: var(--s2) 0 0; color: var(--muted); font-size: 15px; }

/* ── Game cards ── */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); margin: var(--s4) 0 var(--s5); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); gap: var(--s4); } }
.card {
  position: relative;
  background: var(--sheen), color-mix(in srgb, var(--c) 86%, var(--bg));
  border-radius: var(--r-lg); padding: var(--s4); min-height: 144px;
  text-align: left; display: flex; flex-direction: column; gap: var(--s1);
  box-shadow: var(--hi), var(--shadow-1);
  transition: transform var(--fast) var(--ease), filter var(--fast);
}
.card:active { transform: scale(.965); filter: brightness(.94); }
.card .em { font-size: 34px; line-height: 1.1; margin-bottom: auto; padding-bottom: var(--s3); }
.card b { font-size: 18px; font-weight: 800; letter-spacing: -.2px; line-height: 1.2; }
.card small { font-size: 13px; opacity: .86; line-height: 1.35; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 12px 22px; border-radius: 999px; font-size: 17px; font-weight: 600; letter-spacing: -.1px;
  transition: transform var(--fast) var(--ease), filter var(--fast), background var(--fast), opacity var(--fast);
}
.btn:active:not(:disabled) { transform: scale(.97); filter: brightness(.92); }
.primary { background: var(--hot); color: #fff; box-shadow: var(--hi), 0 6px 18px rgba(255, 77, 141, .28); }
.ghost { background: var(--panel-2); box-shadow: var(--hi); }
.ghost:active:not(:disabled) { background: var(--panel-press); }
.good { background: var(--ok); box-shadow: var(--hi), var(--shadow-1); }
.bad { background: var(--bad); box-shadow: var(--hi), var(--shadow-1); }
.big { width: 100%; max-width: 420px; min-height: 56px; font-size: 19px; padding: 14px 20px; }
.btn.sm { min-height: 40px; font-size: 15px; padding: 8px 18px; }
.row { display: flex; gap: var(--s3); flex-wrap: wrap; justify-content: center; }
.row .btn { flex: 1 1 160px; }
.stack { display: flex; flex-direction: column; gap: var(--s3); width: 100%; align-items: center; }
.link { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(189, 179, 230, .5); padding: var(--s2); font-size: 15px; }
.link.inline { padding: 0; }
.foot { text-align: center; margin-top: var(--s3); }

/* ── Chips ── */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  min-height: 36px; padding: 7px 15px; border-radius: 999px; font-size: 15px;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line);
  transition: background var(--fast), color var(--fast), transform var(--fast) var(--ease);
}
.chip:active { transform: scale(.95); }
.chip.on { background: #fff; color: var(--on-light); box-shadow: var(--shadow-1); font-weight: 600; }

/* ── Panels / how to play ── */
.how, .panel {
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--r-lg); padding: var(--s4) var(--s5); margin-top: var(--s4);
}
.how b { font-size: 15px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
.how ol { margin: var(--s2) 0 0; padding-left: 20px; }
.how li { margin: 6px 0; color: var(--ink-2); line-height: 1.45; }
.how li::marker { color: var(--muted); }
.panel h3 { margin-top: var(--s1); }

.list { display: flex; flex-direction: column; gap: var(--s2); margin: var(--s3) 0; }
.field {
  display: flex; align-items: center; gap: var(--s3);
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-md); padding: 4px 6px 4px 14px;
  transition: box-shadow var(--fast);
}
.field input { flex: 1; min-width: 0; background: none; border: 0; color: var(--ink); font-size: 17px; padding: 10px 0; outline: none; }
.field input::placeholder { color: rgba(189, 179, 230, .6); }
.field:focus-within { box-shadow: inset 0 0 0 1.5px var(--violet), 0 0 0 4px rgba(167, 139, 250, .18); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.icon.x { width: 34px; height: 34px; font-size: 14px; background: transparent; box-shadow: none; color: var(--muted); }

/* ── Scores ── */
.scores { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: center; margin-top: var(--s3); }
.score {
  display: flex; align-items: center; gap: var(--s2);
  padding: 6px 14px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px;
  transition: box-shadow var(--med) var(--ease);
}
.score b { font-size: 17px; }
.score.cur { box-shadow: inset 0 0 0 1.5px var(--c), 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }

.board { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: var(--s2); }
.board .line {
  display: flex; align-items: center; gap: var(--s3); padding: 14px 18px; border-radius: var(--r-md);
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: 19px;
}
.board .line b { margin-left: auto; font-size: 24px; }
.board .line.win { box-shadow: inset 0 0 0 1.5px var(--gold); background: rgba(255, 201, 60, .10); }

/* ── Turn / pass screens ── */
.turn {
  font-size: clamp(32px, 9vw, 52px); font-weight: 700; line-height: 1.1; letter-spacing: -.6px;
  color: var(--c, #fff);
}
.pass { font-size: 19px; color: var(--muted); }
.name { font-size: clamp(38px, 11vw, 62px); font-weight: 700; line-height: 1.08; letter-spacing: -.8px; }

.secret {
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  padding: var(--s8) var(--s6); border-radius: 28px; width: 100%; max-width: 420px;
  background: var(--sheen), #4f62e8; box-shadow: var(--hi), var(--shadow-2);
  animation: rise var(--med) var(--ease) both;
}
.secret b { font-size: clamp(32px, 9vw, 50px); line-height: 1.1; letter-spacing: -.5px; }
.secret.imp { background: var(--sheen), #d63a74; font-size: 52px; }
.secret.imp b { font-size: clamp(26px, 7vw, 38px); }
.secret small { font-size: 15px; opacity: .88; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── Countdown ── */
.count.pop { font-size: 150px; font-weight: 700; line-height: 1; margin: 0; letter-spacing: -4px; }
.pop { animation: pop .5s var(--ease); }
@keyframes pop { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Timer bar ── */
.bar { width: 100%; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .10); overflow: hidden; }
.bar::after {
  content: ''; display: block; height: 100%; transform-origin: left; border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--hot));
  animation: shrink var(--d) linear forwards;
}
.bar.paused::after { animation-play-state: paused; }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.timer { font-size: 60px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.timer.low { color: var(--bad-ink); animation: pop .4s; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0; text-transform: uppercase; letter-spacing: 1.6px; }
.big-word { font-size: clamp(36px, 10vw, 80px); font-weight: 700; line-height: 1.08; letter-spacing: -.8px; overflow-wrap: anywhere; }
.emojis { font-size: clamp(60px, 17vw, 112px); line-height: 1.15; letter-spacing: 4px; }
.answer { font-size: clamp(26px, 7vw, 42px); font-weight: 700; color: var(--gold); letter-spacing: -.4px; }

/* ── 5 in 5 counter ── */
.counter {
  width: 100%; max-width: 420px; padding: var(--s5); border-radius: var(--r-lg);
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line);
  display: flex; flex-direction: column; align-items: center; gap: var(--s3);
  transition: transform var(--fast) var(--ease), background var(--fast);
}
.counter:active { transform: scale(.98); background: var(--panel-2); }
.pips { display: flex; gap: var(--s3); }
.pip { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .3); transition: background var(--fast), box-shadow var(--fast), transform var(--med) var(--spring); }
.pip.on { background: var(--gold); box-shadow: none; transform: scale(1.1); }

/* ── Heads Up / Act It Out full-screen play ── */
.word-play { position: fixed; inset: 0; background: var(--bg); transition: background .15s; user-select: none; -webkit-user-select: none; }
.word-play.flash-ok { background: #15803d; }
.word-play.flash-pass { background: #b91c1c; }
.word-play .bar { position: absolute; top: 0; left: 0; border-radius: 0; z-index: 3; }
.hud {
  position: absolute; top: 10px; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; font-size: 19px; font-weight: 600; pointer-events: none;
}
.hud .icon { pointer-events: auto; }
.hud .t { font-size: 32px; min-width: 60px; text-align: center; font-variant-numeric: tabular-nums; }
.hud .t.low { color: var(--bad-ink); }
.halves { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; }
.half {
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding-bottom: max(26px, env(safe-area-inset-bottom)); font-size: 44px; font-weight: 700; line-height: 1;
}
.half small { font-size: 15px; font-weight: 500; margin-top: 6px; opacity: .8; }
.half.pass { background: linear-gradient(to right, rgba(239, 68, 68, .2), transparent 75%); }
.half.ok { background: linear-gradient(to left, rgba(34, 197, 94, .2), transparent 75%); }
.word-wrap {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 70px 24px 110px; text-align: center; gap: 10px;
}
.word-wrap small { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1.6px; }
.headsup .big-word { font-size: clamp(42px, 12vw, 104px); }

.results { width: 100%; max-width: 440px; display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; }
.results span { padding: 5px 12px; border-radius: 999px; font-size: 15px; }
.results .y { background: rgba(34, 197, 94, .18); color: #bbf7d0; }
.results .n { background: rgba(239, 68, 68, .14); text-decoration: line-through; opacity: .75; }

/* ── Trivia ── */
.q-card { width: 100%; max-width: 560px; text-align: left; }
.q-text { font-size: clamp(21px, 5.4vw, 28px); font-weight: 600; line-height: 1.28; letter-spacing: -.3px; margin: var(--s3) 0 var(--s4); }
.opt {
  display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left;
  min-height: 56px; padding: 12px 16px; margin: var(--s2) 0; border-radius: var(--r-md); font-size: 17px;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line);
  transition: background var(--fast), box-shadow var(--fast), transform var(--fast) var(--ease);
}
.opt:active:not(:disabled) { transform: scale(.98); background: var(--panel-2); }
.opt .k {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, .10); font-weight: 700; font-size: 15px;
}
.opt:disabled { opacity: .5; cursor: default; }
.opt.right { background: var(--ok); box-shadow: none; opacity: 1; animation: settle var(--med) var(--spring); }
.opt.wrong { background: var(--bad); box-shadow: none; opacity: 1; animation: shake .35s; }
.opt.right .k, .opt.wrong .k { background: rgba(0, 0, 0, .18); }
@keyframes settle { 50% { transform: scale(1.02); } }
.banner {
  display: inline-block; padding: 5px 14px; border-radius: 999px; font-weight: 700; font-size: 15px;
  background: var(--c); color: var(--on-light); white-space: nowrap; flex: none;
}
.steal { margin-top: 6px; }

/* ── Confetti ── */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 10; }
.confetti i {
  position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ── Phone-app feel ── */
html, body { overscroll-behavior: none; }
body { touch-action: manipulation; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
button, .chip, .card { user-select: none; -webkit-user-select: none; }

.tilt-hint {
  position: absolute; left: 50%; bottom: max(84px, calc(env(safe-area-inset-bottom) + 70px)); transform: translateX(-50%);
  z-index: 3; pointer-events: none; white-space: nowrap;
  padding: 7px 14px; border-radius: 999px; font-size: 14px;
  background: rgba(0, 0, 0, .35); color: var(--muted);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.tilt-hint.on { color: #fff; }

/* Phone turned sideways (Heads Up on the forehead) */
@media (orientation: landscape) and (max-height: 520px) {
  .word-wrap { padding: 48px 110px 40px; }
  .big-word, .headsup .big-word { font-size: clamp(30px, min(10vw, 17vh), 96px); }
  .half { padding-bottom: 14px; font-size: 34px; }
  .tilt-hint { bottom: 12px; }
  .center { min-height: calc(100vh - 70px); gap: 10px; }
  .count.pop { font-size: 110px; }
}

/* ── Grouped lists (Word Lists, Settings) ── */
.list-row {
  display: flex; align-items: center; gap: var(--s4); width: 100%; text-align: left;
  min-height: 64px; padding: 12px 16px; border-radius: var(--r-md); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line);
  transition: background var(--fast), transform var(--fast) var(--ease);
}
.list-row:active { background: var(--panel-2); transform: scale(.985); }
.list-row .em { font-size: 28px; }
.list-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row b { font-size: 17px; font-weight: 600; }
.list-row small { color: var(--muted); font-size: 14px; }
.list-row .chev { font-size: 24px; color: var(--muted); opacity: .7; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--gold); color: var(--on-light); vertical-align: middle; letter-spacing: .2px; }

.count { font-size: 17px; font-weight: 600; margin: var(--s4) 0 var(--s3); }
.tools { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s1) 0 var(--s2); }
.pickrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s3); color: var(--muted); }
.pickrow input {
  width: 74px; padding: 8px 10px; border-radius: var(--r-sm); font-size: 16px; text-align: center;
  background: var(--panel); color: var(--ink); border: 0; box-shadow: inset 0 0 0 1px var(--line);
}
.addform { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s3); }
.addform input, .addform textarea, .search {
  width: 100%; padding: 12px 14px; border-radius: var(--r-md); font: inherit; font-size: 16px; resize: vertical;
  background: var(--panel); color: var(--ink); border: 0; box-shadow: inset 0 0 0 1px var(--line); outline: none;
  transition: box-shadow var(--fast);
}
.addform input:focus, .addform textarea:focus, .search:focus, .pickrow input:focus { box-shadow: inset 0 0 0 1.5px var(--violet), 0 0 0 4px rgba(167, 139, 250, .18); }
#addMsg { margin: 0 0 10px; color: #86efac; }
#addMsg.warn { color: #fca5a5; }
.search { margin-top: var(--s4); }

.items { display: flex; flex-direction: column; gap: 6px; margin-top: var(--s3); }
.item {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px;
  border-radius: var(--r-sm); background: var(--panel); box-shadow: inset 0 0 0 1px transparent; transition: opacity var(--fast), box-shadow var(--fast);
}
.item[hidden] { display: none; }
.item.off { opacity: .45; }
.item.speaking { box-shadow: inset 0 0 0 1.5px var(--gold); opacity: 1; }
.item label { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s3); padding: 8px 0; cursor: pointer; line-height: 1.3; }
.item input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--hot); flex: none; }
.item span { overflow-wrap: anywhere; }
.em-sm { font-size: 22px; margin-right: 4px; }
.icon.say { width: 36px; height: 36px; font-size: 16px; background: transparent; box-shadow: none; flex: none; }
.big-word .icon.say, .answer .icon.say, .q-text .icon.say { display: inline-grid; vertical-align: middle; background: var(--panel-2); }

/* ── Share ── */
.share-row { display: flex; gap: var(--s3); align-items: center; justify-content: center; flex-wrap: wrap; width: 100%; max-width: 440px; }
.btn.wa { flex: 1 1 220px; background: #25d366; color: #06301a; box-shadow: var(--hi), 0 6px 18px rgba(37, 211, 102, .22); }

/* ── Game session (host + QR join) ── */
.session-pill {
  display: block; margin: var(--s2) auto var(--s1); padding: 9px 18px; border-radius: 999px;
  background: rgba(34, 197, 94, .12); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .45); font-weight: 500; font-size: 15px;
  transition: transform var(--fast) var(--ease);
}
.session-pill:active { transform: scale(.97); }
.qr { width: min(270px, 76vw); aspect-ratio: 1; background: #fff; border-radius: var(--r-lg); padding: var(--s4); display: grid; place-items: center; box-shadow: var(--shadow-2); }
.qr svg { width: 100%; height: auto; display: block; }
.code { font-size: 42px; font-weight: 700; letter-spacing: 10px; color: var(--gold); font-variant-numeric: tabular-nums; }
.code-input { text-transform: uppercase; letter-spacing: 6px; font-size: 26px !important; font-weight: 600; }
.panel.wide { width: 100%; max-width: 480px; text-align: left; }
.notice { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-md); padding: 10px 14px; margin: 6px 0; color: var(--ink-2); }
.center-text { text-align: center; }
.member { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: 8px 12px; background: var(--panel); border-radius: var(--r-md); animation: rise var(--med) var(--ease) both; }
.member.me { box-shadow: inset 0 0 0 1.5px var(--gold); }
.member .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #7c4dde; font-weight: 600; }
.member .grow { flex: 1; min-width: 0; font-size: 17px; }
.member small { font-size: 12px; font-weight: 600; color: var(--on-light); background: var(--gold); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.stage { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: var(--s3); padding: var(--s5) var(--s4); border-radius: var(--r-lg); background: var(--panel); box-shadow: inset 0 0 0 1px rgba(255, 77, 141, .4); }
.stage[hidden] { display: none; }
.stage .opt { cursor: default; }
.opt.picked { background: rgba(255, 201, 60, .16); box-shadow: inset 0 0 0 1.5px var(--gold); }
.answers { margin-top: var(--s4); display: flex; flex-direction: column; gap: 6px; }
.answers h3 { margin: 0 0 4px; }
.ans { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.ans .rank { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); font-size: 13px; font-weight: 600; }
.ans b { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ans .pickk { font-weight: 700; }
.ans .ms { color: var(--muted); font-size: 14px; min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.ans.ok { background: rgba(34, 197, 94, .14); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .6); }
.ans.no { background: rgba(239, 68, 68, .1); box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .45); }

/* Team pickers (Teams & Players, host session screen) */
.tdots { display: flex; gap: 4px; flex: none; }
.tdot { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--c); background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; transition: background var(--fast), transform var(--fast) var(--ease); }
.tdot:active { transform: scale(.9); }
.tdot.on { background: var(--c); color: var(--on-light); }
.tm { font-size: 12px; font-weight: 600; color: var(--on-light); background: var(--c); border-radius: 999px; padding: 2px 9px; flex: none; }
.myteam { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 20px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1.5px var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); font-size: 17px; }
.myteam b { color: var(--c); }
.myteam small { font-size: 13px; opacity: .8; }

/* ── Solo brain games ── */
.section-title { margin: var(--s8) 0 var(--s1); font-size: 22px; letter-spacing: -.3px; }
.lvl-tag { display: block; margin: 0 auto var(--s2); padding: 4px 10px; text-align: center; color: var(--muted); font-size: 14px; }
.lvl-tag u { text-underline-offset: 3px; text-decoration-color: rgba(189, 179, 230, .5); }
.ladder { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin: var(--s5) 0 var(--s2); }
.ladder span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.ladder .past { background: rgba(74, 222, 128, .18); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .6); color: #fff; }
.ladder .now { background: var(--gold); box-shadow: 0 0 0 4px rgba(255, 201, 60, .18); color: var(--on-light); font-weight: 700; transform: scale(1.14); }
.solo-stats { display: flex; gap: var(--s5); justify-content: center; align-items: baseline; font-size: 15px; color: var(--muted); margin: var(--s3) 0; }
.solo-stats b { color: var(--ink); font-size: 21px; font-variant-numeric: tabular-nums; }
.solo-stats b.low { color: var(--bad-ink); }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

.mem { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: var(--s2); width: 100%; max-width: 420px; margin: 6px auto; }
.mcard { aspect-ratio: 1; border-radius: var(--r-md); background: var(--sheen), #6b5cf0; box-shadow: var(--hi), var(--shadow-1); font-size: clamp(26px, 8vw, 40px); display: grid; place-items: center; transition: background var(--med) var(--ease), transform var(--med) var(--spring), box-shadow var(--med); }
.mcard:active { transform: scale(.95); }
.mcard span { opacity: 0; transform: scale(.6); transition: opacity var(--fast), transform var(--med) var(--spring); }
.mcard.up { background: #fff; transform: scale(1.03); }
.mcard.up span { opacity: 1; transform: none; }
.mcard.done { background: rgba(74, 222, 128, .22); box-shadow: none; transform: none; }
.mcard.done span { opacity: 1; transform: none; }

.pads { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: var(--s3); width: 100%; max-width: 340px; margin: var(--s3) auto; }
.pad { aspect-ratio: 1; border-radius: var(--r-lg); background: var(--sheen), var(--c); opacity: .32; box-shadow: var(--hi); transition: opacity .1s, transform .12s var(--ease), box-shadow .12s; }
.pad.lit { opacity: 1; transform: scale(1.04); box-shadow: 0 0 28px color-mix(in srgb, var(--c) 60%, transparent); }
.pad.hint { opacity: 1; outline: 3px solid #fff; outline-offset: 2px; }

.slots { display: flex; gap: 4px; justify-content: center; margin: var(--s4) 0 var(--s3); }
.slot { width: 32px; height: 46px; border-bottom: 2px solid var(--line-strong); font-size: 26px; font-weight: 700; display: grid; place-items: center; transition: border-color var(--fast), color var(--fast); }
.slots.ok .slot { color: var(--ok-ink); border-color: var(--ok-ink); }
.slots.no { animation: shake .4s; }
.slots.no .slot { color: var(--bad-ink); }
.tiles { display: flex; gap: var(--s2); justify-content: center; flex-wrap: wrap; margin: 6px 0 var(--s5); }
.tile { width: 46px; height: 54px; border-radius: var(--r-sm); background: var(--sheen), var(--gold); color: var(--on-light); font-size: 25px; font-weight: 700; box-shadow: var(--hi), var(--shadow-1); transition: transform var(--fast) var(--ease), opacity var(--fast); }
.tile:active:not(:disabled) { transform: scale(.92); }
.tile:disabled { opacity: .18; box-shadow: none; transform: scale(.94); }

.sdk { display: grid; grid-template-columns: repeat(var(--n), 1fr); width: 100%; max-width: 380px; margin: var(--s2) auto; border: 2px solid rgba(255, 255, 255, .85); border-radius: var(--r-sm); overflow: hidden; }
.sc { aspect-ratio: 1; display: grid; place-items: center; font-size: clamp(22px, 7vw, 32px); color: var(--gold); background: rgba(255, 255, 255, .03); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background var(--fast); }
.sc.given { color: #fff; font-weight: 700; }
.sc.br { border-right: 2px solid rgba(255, 255, 255, .85); }
.sc.bb { border-bottom: 2px solid rgba(255, 255, 255, .85); }
.sc.rel { background: rgba(255, 255, 255, .08); }
.sc.sel { background: rgba(255, 201, 60, .28); }
.sc.wrong { animation: shake .4s; background: rgba(239, 68, 68, .45); }
.numpad { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: var(--s2); width: 100%; max-width: 380px; margin: var(--s3) auto; }
.numpad button { min-height: 52px; border-radius: var(--r-md); font-size: 23px; font-weight: 700; background: var(--panel-2); box-shadow: var(--hi); transition: transform var(--fast) var(--ease), background var(--fast); }
.numpad button:active { transform: scale(.94); background: var(--panel-press); }

/* Word from Clues */
.clues { list-style: none; padding: 0; margin: var(--s3) auto; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: var(--s2); text-align: left; }
.clues li { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-md); padding: 10px 14px; font-size: 16px; }
.clues li.new { box-shadow: inset 0 0 0 1.5px rgba(255, 201, 60, .8); animation: slidein .4s var(--ease); }
@keyframes slidein { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.clues li.locked { color: var(--muted); font-size: 14px; background: transparent; box-shadow: none; opacity: .7; }
.field.shake { animation: shake .4s; box-shadow: inset 0 0 0 1.5px var(--bad-ink); }
.wrongs { min-height: 1.2em; color: #fca5a5; margin: 6px 0; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.wrongs s { text-decoration-color: rgba(252, 165, 165, .7); }

/* Daily Mystery Word: the one featured card on Home */
.daily-banner {
  display: flex; align-items: center; gap: var(--s3); width: 100%; margin: var(--s3) 0 0; padding: 14px 16px; text-align: left;
  border-radius: var(--r-lg); background: var(--sheen), linear-gradient(120deg, #139c90, #5457d6);
  box-shadow: var(--hi), var(--shadow-1);
  transition: transform var(--fast) var(--ease), filter var(--fast);
}
.daily-banner:active { transform: scale(.98); filter: brightness(.95); }
.daily-banner .em { font-size: 26px; width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; background: rgba(255, 255, 255, .16); flex: none; }
.daily-banner b { display: block; font-size: 17px; letter-spacing: -.2px; }
.daily-banner small { display: block; font-size: 13.5px; opacity: .9; margin-top: 1px; }
.daily-banner .go { margin-left: auto; font-size: 24px; opacity: .8; }
.marks { font-size: 38px; letter-spacing: 6px; margin: var(--s2) 0; }
.center-chips { justify-content: center; margin: 6px 0; }
/* Daily: attempt circles and letter boxes */
.tries { display: flex; gap: var(--s3); justify-content: center; margin: 10px 0 2px; }
.try { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ok-ink); transition: background var(--med) var(--ease), box-shadow var(--med), transform var(--med) var(--spring); }
.try.used { background: var(--bad); box-shadow: none; transform: scale(.9); }
.lboxes { position: relative; display: flex; gap: var(--s3); justify-content: center; cursor: text; margin: 6px 0 2px; }
.lword { display: flex; gap: 5px; }
.lbox {
  width: var(--bw); height: calc(var(--bw) * 1.2); display: grid; place-items: center; font-size: calc(var(--bw) * .58); font-weight: 700;
  border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: box-shadow var(--fast), background var(--fast), color var(--fast);
}
.lbox.filled { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); background: var(--panel-2); animation: type-in .18s var(--spring); }
.lbox.cur { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 4px rgba(255, 201, 60, .16); }
@keyframes type-in { from { transform: scale(.86); } to { transform: none; } }
.lboxes.no { animation: shake .4s; }
.lboxes.no .lbox { box-shadow: inset 0 0 0 1.5px var(--bad-ink); }

/* ── Home: settings, continue card, Party/Solo segmented control, role choice ── */
.hero .gear { position: absolute; top: calc(var(--s6) + 2px); right: 0; font-size: 18px; }
.hero:has(.gear) { padding-right: 52px; }
.continue {
  display: flex; align-items: center; gap: var(--s3); width: 100%; margin: var(--s3) 0 0; padding: 12px 14px 12px 16px; text-align: left;
  border-radius: var(--r-lg); background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent);
  transition: transform var(--fast) var(--ease), background var(--fast);
}
.continue:active { transform: scale(.98); background: color-mix(in srgb, var(--c) 22%, transparent); }
.continue .em { font-size: 30px; }
.continue .grow { flex: 1; min-width: 0; }
.continue small { display: block; font-size: 13px; color: var(--muted); }
.continue b { display: block; font-size: 18px; letter-spacing: -.2px; }
.continue .go { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 14px; flex: none; box-shadow: var(--shadow-1); }
.tabs { display: flex; gap: 2px; margin: var(--s6) 0 var(--s2); padding: 3px; border-radius: 14px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--line); }
.tab { flex: 1; min-height: 38px; border-radius: 11px; font-size: 16px; font-weight: 700; color: var(--muted); transition: background var(--med) var(--ease), color var(--med), box-shadow var(--med); }
.tab.on { background: #fff; color: var(--on-light); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 3px 10px rgba(0, 0, 0, .15); }
.roles { display: flex; flex-direction: column; gap: var(--s3); margin: var(--s3) 0 var(--s4); }
.role {
  display: flex; align-items: center; gap: var(--s4); padding: var(--s5) var(--s4); text-align: left; border-radius: var(--r-lg);
  background: var(--sheen), color-mix(in srgb, var(--c) 82%, var(--bg)); box-shadow: var(--hi), var(--shadow-1);
  transition: transform var(--fast) var(--ease), filter var(--fast);
}
.role:active { transform: scale(.98); filter: brightness(.94); }
.role .em { font-size: 32px; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); flex: none; }
.role b { display: block; font-size: 19px; letter-spacing: -.2px; }
.role small { display: block; font-size: 14px; opacity: .9; line-height: 1.4; margin-top: 2px; }
.lvl-badge { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, .24); border-radius: 999px; padding: 3px 8px; letter-spacing: .3px; }

/* ── Session: away players, reconnecting, QR scanner ── */
.member small.away { background: rgba(255, 255, 255, .12); color: var(--muted); }
.notice.reconnect { box-shadow: inset 0 0 0 1px rgba(255, 201, 60, .6); color: #ffe08a; }
.scan { position: relative; width: 100%; max-width: 360px; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-2); }
.scan video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid var(--gold); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .4); }
.q-card .emojis { text-align: center; font-size: clamp(56px, 16vw, 100px); }

/* ── Display type (Nunito): headings, game titles, big words, codes, timers, letter tiles ── */
h1, h2, h3, .section-title, .card b, .role b, .continue b, .daily-banner b, .tab,
.turn, .name, .count, .timer, .big-word, .answer, .q-text, .code, .secret b,
.board .line b, .score b, .lbox, .slot, .tile, .sc, .numpad button,
.solo-stats b, .ladder span, .lvl-badge, .opt .k, .banner {
  font-family: var(--font-display);
}
.hero h1 { font-weight: 900; }
h2, h3, .top h2, .section-title, .card b, .role b, .continue b, .daily-banner b, .tab, .q-text { font-weight: 800; }
.turn, .name, .count.pop, .timer, .big-word, .answer, .secret b, .code, .lbox, .slot, .tile, .numpad button { font-weight: 900; }
.sc { font-weight: 700; } .sc.given { font-weight: 900; }

/* ── Word games with their own keyboard (Word from Clues, Daily Mystery Word, Word Builder) ──
   Fills the screen exactly: clues shrink and scroll, the boxes and keys always show. */
.wp { display: flex; flex-direction: column; height: calc(100dvh - env(safe-area-inset-top)); }
.wp > * { flex: none; }
.wp > .wp-body { flex: 1; }
.wp > .top { width: 100%; }
.wp .top h2 { font-size: clamp(17px, 5vw, 19px); }
.wp-body {
  min-height: 0; overflow: hidden; width: 100%; max-width: 720px; margin: 0 auto; padding: var(--s1) var(--s4) 0;
  display: flex; flex-direction: column; align-items: center; gap: var(--s2); text-align: center;
}
.wp-body > * { flex: none; }
.wp-body p { margin: 0; }
.wp-body .chips { margin: 0; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; justify-content: safe center; padding-bottom: 2px; scrollbar-width: none; }
.wp-body .chips::-webkit-scrollbar { display: none; }
.wp-body .chips .chip { flex: none; }
.wp-body .clues { position: relative; flex: 0 1 auto; min-height: 0; overflow-y: auto; margin: 0 auto; gap: 6px; padding: 2px 0; scrollbar-width: none; }
.wp-body .clues::-webkit-scrollbar { display: none; }
.wp-body .clues li { flex: none; padding: 9px 14px; font-size: 15.5px; border-radius: 14px; }
.wp-body .clues li.locked { padding: 4px 14px; font-size: 13.5px; }
.wp-body .wrongs { margin: 0; font-size: 14px; }
.wp-body .lboxes { margin: auto 0 0; }
.wp-stats { display: flex; align-items: center; justify-content: center; gap: var(--s4); flex-wrap: wrap; margin: 2px 0; }
.wp-stats .tries { margin: 0; gap: var(--s2); }
.wp-stats .try { width: 16px; height: 16px; }
.btn.xs { min-height: 32px; padding: 5px 12px; font-size: 13.5px; }
.lbox.given { color: var(--muted); background: transparent; box-shadow: none; outline: 1.5px dashed var(--line-strong); outline-offset: -1.5px; }
.lboxes.ok .lbox { box-shadow: inset 0 0 0 1.5px var(--ok-ink); color: var(--ok-ink); background: rgba(74, 222, 128, .1); }
.lboxes.missed .lbox { box-shadow: inset 0 0 0 1.5px var(--bad-ink); color: #fca5a5; }

/* On-screen keyboard: keycaps with a soft bottom edge, like a phone keyboard. */
.kbd { width: 100%; max-width: 560px; margin: 0 auto; padding: var(--s1) 4px calc(var(--s2) + env(safe-area-inset-bottom)); }
.krow { display: flex; justify-content: center; gap: 6px; margin-top: var(--s2); }
.key {
  flex: 1 1 0; max-width: 50px; height: clamp(42px, 6.4dvh, 54px); border-radius: 9px;
  background: rgba(255, 255, 255, .17); box-shadow: 0 1px 0 rgba(0, 0, 0, .35);
  font-family: var(--font-display); font-weight: 800; font-size: 19px;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
  transition: background .08s, transform .08s;
}
.key:active { background: rgba(255, 255, 255, .34); transform: scale(.94); }
.key.wide { flex-grow: 1.6; max-width: 84px; font-size: 15px; background: rgba(255, 255, 255, .09); }
.key.go { background: var(--hot); opacity: .45; transition: opacity var(--med) var(--ease), background .08s, transform .08s; }
.key.go.ready { opacity: 1; }

/* Word Builder in the one-screen layout: slots and tiles sit low, near your thumbs. */
.wp-body .slots { margin: auto 0 4px; }
.wp-body .tiles { margin: 4px 0 6px; }
.made { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 28px; }
.made-word { padding: 3px 10px; border-radius: 999px; font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--ok-ink); background: rgba(74, 222, 128, .12); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .35); animation: rise var(--med) var(--ease) both; }
.wb-actions { display: flex; gap: var(--s2); justify-content: center; width: 100%; max-width: 560px; margin: 0 auto; padding: var(--s1) var(--s3) calc(var(--s3) + env(safe-area-inset-bottom)); }
.wb-actions .btn { flex: 1; padding-left: 6px; padding-right: 6px; }

/* Pointer devices: a gentle lift on hover. */
@media (hover: hover) and (pointer: fine) {
  .card:hover, .role:hover, .daily-banner:hover { filter: brightness(1.06); }
  .ghost:hover, .chip:not(.on):hover, .list-row:hover, .opt:not(:disabled):hover, .icon:hover { background: var(--panel-2); }
  .key:hover { background: rgba(255, 255, 255, .24); }
}

/* Respect "Reduce motion": keep the feedback, drop the movement. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .bar::after { animation-duration: var(--d) !important; }
  .confetti { display: none; }
}

/* ── Start-up animation (2s): figures gather from the corners, the card drops in, the group huddles ── */
#splash {
  position: fixed; inset: 0; z-index: 100; background: var(--bg); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s6);
  animation: splash-out .3s var(--ease) 1.7s forwards;
}
/* The page underneath stays still while the splash is up, so no scroll bar flashes at the edge. */
html:has(#splash), html:has(#splash) body { overflow: hidden; scrollbar-width: none; }
html:has(#splash)::-webkit-scrollbar { display: none; }
.splash-art { position: relative; width: min(58vw, 240px); aspect-ratio: 1; animation: huddle .4s var(--ease) 1.2s; }
.sp { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; animation: gather .65s var(--spring) forwards; }
.sp-y { --from: translate(-34%, -34%) rotate(-14deg); animation-delay: .08s; }
.sp-p { --from: translate(34%, -34%) rotate(14deg); animation-delay: .18s; }
.sp-c { --from: translate(34%, 34%) rotate(-14deg); animation-delay: .28s; }
.sp-u { --from: translate(-34%, 34%) rotate(14deg); animation-delay: .38s; }
.sp-w { animation: card-in .5s var(--spring) .8s forwards; }
/* The name waits for Nunito (index.html adds .ready), so it never shows in a stand-in font. */
.splash-name {
  margin: 0; font-family: 'Nunito', var(--font-display); font-weight: 900; font-size: 26px; letter-spacing: -.4px;
  opacity: 0;
}
#splash.ready .splash-name { animation: name-in .45s var(--ease) var(--name-at, 1s) forwards; }
@keyframes gather { from { opacity: 0; transform: var(--from) scale(.7); } 45% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: scale(0) rotate(-90deg); } to { opacity: 1; transform: none; } }
@keyframes huddle { 50% { transform: scale(1.06); } }
@keyframes name-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }

/* ── Trivia open question: the host gives the point ── */
.awards { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; width: 100%; }
.btn.award { background: var(--panel-2); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, transparent); }
.btn.award.suggest { box-shadow: inset 0 0 0 2px var(--c), 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.btn.award.on { background: var(--c); color: var(--on-light); box-shadow: var(--hi), var(--shadow-1); animation: settle var(--med) var(--spring); }

/* ── Floating team scores on players' phones ── */
.score-float {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: var(--s2); overflow-x: auto; justify-content: safe center;
  max-width: 720px; margin: 0 auto; padding: var(--s2) var(--s4) var(--s3);
  background: linear-gradient(var(--bg) 60%, transparent);
  scrollbar-width: none;
}
.score-float::-webkit-scrollbar { display: none; }
.score-float[hidden] { display: none; }
.sf-pill {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 5px 8px 5px 12px;
  border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap;
  background: rgba(28, 18, 64, .78); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1);
  transition: transform var(--fast) var(--ease);
}
.sf-pill:active { transform: scale(.95); }
.sf-pill .dot { width: 9px; height: 9px; }
.sf-pill b { min-width: 26px; padding: 1px 7px; border-radius: 999px; text-align: center; font-family: var(--font-display); font-weight: 900; font-size: 16px; font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .1); }
.sf-pill.mine { box-shadow: inset 0 0 0 1.5px var(--c), var(--shadow-1); }
.sf-pill.mine b { background: var(--c); color: var(--on-light); }
.sf-pill.bump b { animation: bump .7s var(--spring); }
@keyframes bump { 35% { transform: scale(1.4); background: var(--gold); color: var(--on-light); } }
