/* ===========================================================================
   AHLCHEMY — styles
   Theme: "family hearth with a pinch of alchemy" — warm, legible across the
   room and across the ages. Big type, high contrast, calm motion.
   =========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --plum: #2a1b3d;
  --plum-2: #3a2350;
  --ember: #f2b705;
  --ember-soft: #ffd15c;
  --cream: #fbf3e4;
  --ink: #20151c;
  --good: #46c26a;
  --bad: #e5484d;
  --muted: rgba(251, 243, 228, 0.6);
  --display: 'Fredoka', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .display { font-family: var(--display); }
button { font-family: var(--display); cursor: pointer; border: none; }

/* ---- shared shapes (the colour/shape "slots") ---------------------------- */
.shape { display: inline-block; }
.shape-circle   { border-radius: 50%; }
.shape-square   { border-radius: 14%; }
.shape-pill     { border-radius: 999px; }
.shape-triangle { clip-path: polygon(50% 4%, 96% 96%, 4% 96%); }
.shape-diamond  { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.shape-hexagon  { clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.shape-star     { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ===========================================================================
   TV / HOST SCREEN  (body.tv)
   =========================================================================== */
body.tv {
  min-height: 100vh;
  color: var(--cream);
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(242,183,5,.18), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(142,78,198,.22), transparent 60%),
    linear-gradient(160deg, var(--plum), #1c1228 70%);
  display: flex; flex-direction: column;
  padding: clamp(20px, 4vw, 64px);
}
.tv .brand { font-size: clamp(20px, 2.4vw, 30px); letter-spacing: .04em; color: var(--ember-soft); }
.tv .brand b { color: var(--cream); }
.tv .stage { flex: 1; display: flex; flex-direction: column; justify-content: center; }

/* lobby */
.lobby { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 72px); align-items: center; }
.joincard { text-align: center; }
.joincard .lead { font-size: clamp(18px, 2vw, 26px); color: var(--muted); }
.code {
  font-family: var(--display); font-weight: 700; letter-spacing: .12em;
  font-size: clamp(64px, 13vw, 180px); line-height: 1; color: var(--cream);
  text-shadow: 0 0 40px rgba(242,183,5,.35);
  margin: .1em 0 .15em;
}
.url { font-size: clamp(18px, 2vw, 30px); color: var(--ember-soft); }
.players-panel h3 { font-size: clamp(18px, 1.8vw, 24px); color: var(--muted); margin-bottom: .6em; text-transform: uppercase; letter-spacing: .08em; }
.player-pills { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  display: flex; align-items: center; gap: 10px;
  background: rgba(251,243,228,.08); border: 1px solid rgba(251,243,228,.14);
  padding: 10px 18px; border-radius: 999px; font-family: var(--display);
  font-size: clamp(16px, 1.6vw, 22px);
  animation: pop .25s ease;
}
.pill .grp { font-size: .7em; color: var(--ember-soft); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* big primary button (TV) */
.btn-primary {
  background: var(--ember); color: var(--ink); font-weight: 700;
  font-size: clamp(20px, 2.2vw, 30px); padding: .6em 1.6em; border-radius: 16px;
  box-shadow: 0 10px 0 #b88800; transition: transform .08s, box-shadow .08s;
}
.btn-primary:active { transform: translateY(6px); box-shadow: 0 4px 0 #b88800; }
.btn-primary:disabled { opacity: .4; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--cream); border: 2px solid rgba(251,243,228,.35); font-size: clamp(16px,1.6vw,22px); padding: .5em 1.3em; border-radius: 14px; }

/* question */
.q-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-family: var(--display); font-size: clamp(16px, 1.6vw, 22px); }
.q-prompt {
  font-family: var(--display); font-weight: 600; text-align: center;
  font-size: clamp(30px, 5vw, 76px); line-height: 1.1; margin: .4em auto; max-width: 18ch;
}
.q-prompt::before, .q-prompt::after { content: '“'; color: var(--ember); }
.q-prompt::after { content: '”'; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(12px, 1.6vw, 24px); max-width: 1100px; margin: 0 auto; width: 100%; }
.choice {
  display: flex; align-items: center; gap: 18px;
  background: rgba(251,243,228,.06); border: 2px solid rgba(251,243,228,.12);
  border-radius: 18px; padding: clamp(12px, 1.4vw, 22px);
  font-family: var(--display); font-size: clamp(22px, 2.4vw, 38px);
  transition: all .3s;
}
.choice .token { width: clamp(48px, 5vw, 78px); height: clamp(48px, 5vw, 78px); flex: none; display: grid; place-items: center; font-size: clamp(26px, 3vw, 44px); }
.choice.correct { border-color: var(--good); background: rgba(70,194,106,.16); }
.choice.dim { opacity: .35; }
.choice .tally { margin-left: auto; color: var(--ember-soft); font-size: .8em; }

.timer-ring { display: grid; place-items: center; }
.answered { color: var(--ember-soft); font-family: var(--display); font-size: clamp(18px,1.8vw,26px); text-align: center; margin-top: .8em; }

/* leaderboard / gameover */
.board { max-width: 760px; margin: 0 auto; width: 100%; }
.board .row { display: flex; align-items: center; gap: 18px; padding: 14px 22px; border-radius: 16px; margin-bottom: 12px; background: rgba(251,243,228,.06); font-family: var(--display); font-size: clamp(20px,2.2vw,32px); }
.board .row .rank { width: 1.6em; color: var(--ember-soft); }
.board .row .sc { margin-left: auto; }
.board .row.first { background: linear-gradient(90deg, rgba(242,183,5,.25), rgba(242,183,5,.05)); border: 1px solid var(--ember); }
.title-xl { font-family: var(--display); font-weight: 700; text-align: center; font-size: clamp(40px, 7vw, 110px); color: var(--ember-soft); margin-bottom: .3em; }

/* ===========================================================================
   PHONE / CONTROLLER  (body.phone)
   =========================================================================== */
body.phone {
  min-height: 100dvh; background: var(--cream); color: var(--ink);
  display: flex; flex-direction: column; padding: 16px;
  -webkit-tap-highlight-color: transparent;
}
.phone .top { font-family: var(--display); color: #8a6d2f; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.phone .center { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.phone h2 { font-size: 26px; }
.phone .muted { color: #7a6a55; }
.field {
  width: 100%; font-size: 22px; padding: 16px; border-radius: 14px;
  border: 2px solid #e3d6bd; font-family: var(--body); background: #fff;
}
.tap-btn {
  width: 100%; font-family: var(--display); font-weight: 700; font-size: 22px;
  padding: 18px; border-radius: 16px; background: var(--plum); color: var(--cream);
  box-shadow: 0 6px 0 #1a1027;
}
.tap-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #1a1027; }
.group-grid, .id-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.group-btn { padding: 22px 10px; border-radius: 16px; background: #fff; border: 2px solid #e3d6bd; font-family: var(--display); font-weight: 600; font-size: 20px; }
.group-btn .em { display: block; font-size: 34px; margin-bottom: 6px; }
.id-card { padding: 16px 8px; border-radius: 18px; background: #fff; border: 3px solid #e3d6bd; display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--display); font-weight: 600; }
.id-card .face { font-size: 46px; }

/* answer buttons — adult/teen (compact list) */
.ans-list { display: flex; flex-direction: column; gap: 12px; }
.ans-row {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border-radius: 16px; background: #fff; border: 3px solid transparent;
  font-family: var(--display); font-weight: 600; font-size: 22px; text-align: left;
}
.ans-row .face { font-size: 30px; }
.ans-row.picked { border-color: var(--plum); background: #efe6f6; }

/* answer buttons — child/senior (huge, picture-led) */
.ans-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ans-big {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 8px; border-radius: 22px; background: #fff;
  border: 4px solid transparent; font-family: var(--display); font-weight: 700; font-size: 20px;
}
.ans-big .face { font-size: 52px; line-height: 1; }
.ans-big .token { width: 38px; height: 38px; }
.ans-big.picked { border-color: var(--plum); transform: scale(1.02); }

.token { display: inline-block; }
.read-btn { width: 100%; padding: 16px; border-radius: 16px; background: var(--ember); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 22px; box-shadow: 0 6px 0 #b88800; }
.read-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b88800; }

.status-big { text-align: center; font-family: var(--display); font-weight: 700; font-size: 30px; padding: 24px; border-radius: 20px; }
.status-good { background: rgba(70,194,106,.18); color: #1f7a43; }
.status-bad  { background: rgba(229,72,77,.16); color: #b21e22; }
.status-wait { background: #fff; color: var(--plum); }

/* ===========================================================================
   ADDED IN v0.2 — doodle, hum, wager
   =========================================================================== */

/* TV: spotlight line + live drawing */
.spotlight { font-family: var(--display); color: var(--ember-soft); text-align: center; font-size: clamp(22px, 2.6vw, 40px); margin: .2em 0 .4em; }
.canvas-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.canvas-frame { background: #fff; border-radius: 20px; padding: 8px; box-shadow: 0 16px 50px rgba(0,0,0,.4); }
.canvas-frame img { display: block; width: min(46vh, 520px); height: min(46vh, 520px); object-fit: contain; border-radius: 12px; }

/* Phone: drawing pad (artist) */
.draw-wrap { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.draw-canvas { width: 100%; max-width: 340px; aspect-ratio: 1; background: #fff; border: 3px solid #e3d6bd; border-radius: 18px; touch-action: none; }

/* Phone: secret prompt card (artist / performer) */
.secret-card { width: 100%; text-align: center; background: var(--ember); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 24px; padding: 18px; border-radius: 18px; box-shadow: 0 6px 0 #b88800; }

/* Phone: bet list (kids & grandparents during the Wager) */
.bet-list { display: flex; flex-direction: column; gap: 12px; }
.bet-row { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: #fff; border: 3px solid transparent; font-family: var(--display); font-weight: 600; font-size: 22px; text-align: left; }
.bet-row .face { font-size: 32px; }
.bet-row .badge { margin-left: auto; }
.bet-row.picked { border-color: var(--plum); background: #efe6f6; }

/* ===========================================================================
   ADDED IN v0.3 — branding, version, copyright, How to Play
   =========================================================================== */

/* Logo + version in the top brand bars */
.brandlogo { width: 36px; height: 36px; border-radius: 50%; display: block; flex: none; }
.brandver  { font-family: var(--body); font-weight: 600; opacity: .65; }

.tv .brand { display: flex; align-items: center; gap: 14px; }
.tv .brand .brandver { font-size: clamp(13px, 1.1vw, 16px); }

.phone .top .brandgroup { display: flex; align-items: center; gap: 8px; }
.phone .top .brandgroup .brandver { font-size: 12px; }
.phone .top .brandlogo { width: 28px; height: 28px; }

/* Landing page logo + footer */
.home-logo { display: block; width: min(60vw, 240px); height: auto; margin: 0 auto 6px; border-radius: 24px; }
.home-footer { text-align: center; padding-top: 8px; }
.home-footer .brandver { display: inline-block; font-family: var(--display); font-weight: 600; opacity: .6; }

/* Branded copyright line (works on light & dark backgrounds) */
.copyright { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--body); font-size: 13px; opacity: .7; text-align: center; padding: 14px 0; }
.copyright img { width: 26px; height: 26px; border-radius: 50%; }

/* "How to play" text link (phone / landing) */
.howto-link { display: block; text-align: center; margin: 18px 0 4px; font-family: var(--display);
  font-weight: 600; color: var(--plum); text-decoration: underline; }
body.tv .howto-link, body.howto .howto-link { color: var(--ember-soft); }

/* How to Play page */
body.howto { min-height: 100vh; color: var(--cream); font-family: var(--body);
  padding: clamp(20px, 4vw, 48px);
  background: radial-gradient(800px 500px at 85% -10%, rgba(242,183,5,.15), transparent 60%),
              linear-gradient(160deg, var(--plum), #1c1228 70%); }
.howto-card { max-width: 760px; margin: 0 auto; }
.howto .back-link { display: inline-block; margin-bottom: 16px; color: var(--ember-soft);
  font-family: var(--display); font-weight: 600; text-decoration: none; font-size: 18px; }
.howto .logo-top { display: flex; align-items: center; gap: 18px; }
.howto .logo-top img { width: 72px; height: 72px; border-radius: 16px; flex: none; }
.howto h1 { font-family: var(--display); color: var(--ember-soft); font-size: clamp(30px, 5vw, 52px); line-height: 1.05; }
.howto h2 { font-family: var(--display); color: var(--cream); font-size: clamp(20px, 2.6vw, 28px); margin-top: 1.3em; }
.howto p, .howto li { font-size: clamp(15px, 1.8vw, 18px); line-height: 1.6; color: rgba(251,243,228,.9); }
.howto .muted { color: var(--muted); }
.howto ul { margin: .5em 0 0 1.1em; }
.howto li { margin-bottom: .4em; }
.howto .round { background: rgba(251,243,228,.06); border: 1px solid rgba(251,243,228,.12);
  border-radius: 14px; padding: 14px 18px; margin-top: 12px; }
.howto .round b { color: var(--ember-soft); font-family: var(--display); }

/* ===========================================================================
   ADDED IN v0.4 — category picker + live-draw placeholder
   =========================================================================== */
.cat-wrap { margin-top: 1.1em; text-align: left; }
.cat-title { font-family: var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: clamp(13px, 1.2vw, 16px); margin-bottom: .5em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--display); font-weight: 600; font-size: clamp(14px, 1.4vw, 18px); padding: .4em 1em; border-radius: 999px; background: rgba(251,243,228,.08); color: var(--cream); border: 2px solid rgba(251,243,228,.18); transition: transform .06s; }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--ember); color: var(--ink); border-color: var(--ember); }
.canvas-ph { width: min(46vh, 520px); height: min(46vh, 520px); display: grid; place-items: center; color: #bbb; font-family: var(--display); }

/* ===========================================================================
   ADDED IN v0.5 — Teams
   =========================================================================== */
.team-dot { border-radius: 50%; display: inline-block; flex: none; }
.team-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .5em; }
.team-chip { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 2px solid; background: rgba(251,243,228,.06); font-family: var(--display); font-size: clamp(14px, 1.4vw, 18px); }
.pill .team-dot { width: 12px; height: 12px; }

/* phone team picker */
.team-grid { display: flex; flex-direction: column; gap: 12px; }
.team-btn { display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: 18px; background: #fff; border: 4px solid #e3d6bd; font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--ink); }
.team-btn.picked { box-shadow: 0 0 0 3px var(--plum) inset; }
.team-dot-lg { width: 34px; height: 34px; border-radius: 50%; flex: none; }

/* ===========================================================================
   ADDED IN v0.6 — Family Trivia questionnaire
   =========================================================================== */
.q-list { display: flex; flex-direction: column; gap: 16px; }
.q-item { display: flex; flex-direction: column; gap: 6px; }
.q-item label { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--ink); }
.id-card .muted { font-size: 13px; }

/* ===========================================================================
   ADDED IN v1.0 — QR join, host controls, poll round
   =========================================================================== */

/* Lobby join hero: QR + code side by side (stacks on a narrow TV) */
.join-hero { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 3vw, 40px); flex-wrap: wrap; }
.join-hero img { box-shadow: 0 14px 40px rgba(0,0,0,.35); }
.join-info { text-align: left; }
.join-info .lead { font-size: clamp(16px, 1.8vw, 24px); color: var(--muted); }
.join-hero .code { font-size: clamp(48px, 9vw, 120px); margin: .05em 0; }
.join-hero .url { font-size: clamp(16px, 1.8vw, 26px); }

/* Host control row (Reveal / Pause / Skip / Next) */
.host-controls { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; margin-top: .8em; }
.timer-ring.paused { color: var(--ember-soft); opacity: .85; }

/* Poll round — live tally bars on the TV */
.poll-choices { max-width: 980px; }
.poll-choice { gap: 14px; }
.poll-choice .poll-bar { flex: 1; min-width: 70px; height: clamp(12px, 1.4vw, 18px); background: rgba(251,243,228,.12); border-radius: 999px; overflow: hidden; }
.poll-choice .poll-fill { display: block; height: 100%; background: var(--ember); border-radius: 999px; transition: width .45s ease; }
.poll-choice .tally { margin-left: 0; min-width: 1.4em; text-align: right; color: var(--ember-soft); }
.poll-choice.correct .poll-fill { background: var(--good); }

/* ===========================================================================
   ADDED IN v1.1 — child "Give me a hint" lifeline
   =========================================================================== */
.hint-btn {
  width: 100%; padding: 16px; border-radius: 16px;
  background: #fff; color: var(--plum);
  border: 3px dashed var(--ember); font-family: var(--display);
  font-weight: 700; font-size: 20px; box-shadow: 0 5px 0 rgba(242,183,5,.35);
}
.hint-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(242,183,5,.35); }

/* ===========================================================================
   ADDED IN v1.3 — Family / Bible pack toggle (light backgrounds)
   =========================================================================== */
.seg { display: flex; gap: 8px; margin-bottom: 8px; }
.seg-btn {
  flex: 1; padding: 12px; border-radius: 14px; background: #fff;
  border: 2px solid #e3d6bd; font-family: var(--display); font-weight: 700;
  font-size: 18px; color: var(--plum);
}
.seg-btn.on { background: var(--plum); color: var(--cream); border-color: var(--plum); }

/* v1.3.1 — phone top-bar controls (switch player / home) */
.me-chip {
  font: inherit; font-size: 14px; font-weight: 700; border: none; cursor: pointer;
  background: rgba(0, 0, 0, .06); color: inherit;
  padding: 6px 10px; border-radius: 999px; margin-left: 6px;
}
.me-chip:active { transform: translateY(1px); }

/* ===========================================================================
   v1.3.2 — TV fits on screen without scrolling. The large type now scales with
   vmin (so it accounts for screen HEIGHT, not just width) and the maximums and
   spacing are trimmed a bit, so the question + all answers fit a single screen.
   =========================================================================== */
body.tv { padding: clamp(12px, 2.4vmin, 40px); }
.tv .brand { font-size: clamp(18px, 2.4vmin, 28px); }
.tv .stage { min-height: 0; }
.tv .q-head { font-size: clamp(14px, 1.8vmin, 20px); }
.tv .q-prompt { font-size: clamp(26px, 4.6vmin, 56px); margin: .25em auto; line-height: 1.08; max-width: 24ch; }
.tv .choices { gap: clamp(10px, 1.4vmin, 18px); max-width: 1000px; }
.tv .choice { padding: clamp(10px, 1.4vmin, 18px); font-size: clamp(18px, 2.6vmin, 32px); gap: 14px; }
.tv .choice .token { width: clamp(40px, 4.4vmin, 64px); height: clamp(40px, 4.4vmin, 64px); font-size: clamp(22px, 2.8vmin, 36px); }
.tv .answered { font-size: clamp(16px, 2vmin, 24px); margin-top: .4em; }
.tv .spotlight { font-size: clamp(20px, 2.8vmin, 34px); margin: .15em 0 .3em; }
.tv .board .row { font-size: clamp(18px, 2.6vmin, 30px); padding: 12px 20px; margin-bottom: 10px; }

/* v1.7 — photo rounds (Guess the Baby / Where Are We?) */
.photo-stage { display: flex; justify-content: center; margin: .2em 0 .3em; }
.photo-img {
  max-height: 46vh; max-width: 92%; border-radius: 18px; object-fit: contain;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.play-photo {
  display: block; width: 100%; max-height: 38vh; object-fit: contain;
  border-radius: 14px; margin: 6px 0 10px;
}

/* v1.8 — bulk select/clear, fullscreen, reactions, wake-lock UI */

/* Select all / Clear all mini buttons in the lobby */
.chips.bulk { margin-bottom: .4em; gap: .4em; }
.chip.mini { font-size: .82em; padding: .25em .75em; opacity: .92; }

/* Fullscreen toggle (TV) */
.fs-btn {
  position: fixed; top: 10px; right: 12px; z-index: 60;
  width: 42px; height: 42px; border-radius: 11px; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--cream);
  background: rgba(251, 243, 228, .10); border: 1px solid rgba(251, 243, 228, .25);
}
.fs-btn:hover { background: rgba(251, 243, 228, .2); }

/* Floating emoji reactions on the TV */
.fx-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
.fx-emoji { position: absolute; bottom: -1.5em; will-change: transform, opacity; animation-name: fxrise; animation-timing-function: ease-out; animation-fill-mode: forwards; }
@keyframes fxrise {
  0%   { transform: translateY(0) scale(.6);     opacity: 0; }
  12%  { opacity: 1; }
  78%  { opacity: 1; }
  100% { transform: translateY(-88vh) scale(1.15); opacity: 0; }
}

/* Reaction bar on phones */
.react-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; justify-content: center; gap: .45em;
  padding: .4em .4em calc(.4em + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(28, 18, 40, .94), rgba(28, 18, 40, 0));
}
.react-btn {
  width: 2.4em; height: 2.4em; line-height: 1; font-size: 1.5rem; cursor: pointer;
  border-radius: 999px; color: var(--cream);
  background: rgba(251, 243, 228, .10); border: 1px solid rgba(251, 243, 228, .2);
  transition: transform .08s ease;
}
.react-btn:active { transform: scale(.88); }
@keyframes reactpop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.react-btn.pop { animation: reactpop .3s ease; }
.phone.has-react-bar #screen { padding-bottom: 76px; }

/* v1.8.1 — game credits */
.credits {
  display: flex; flex-direction: column; gap: 2px; align-items: center;
  margin: 10px auto 4px; opacity: .85;
}
.credit-row { display: flex; gap: .5em; align-items: baseline; font-size: clamp(12px, 1.2vw, 15px); }
.credit-role { color: var(--plum); letter-spacing: .03em; text-transform: uppercase; font-size: .82em; }
.credit-name { color: var(--ink); font-weight: 600; }
.tv .credits { margin-top: 1.1em; }
.tv .credit-row { font-size: clamp(14px, 1.4vw, 19px); }
.tv .credit-role { color: var(--ember-soft); }
.tv .credit-name { color: var(--cream); }

/* v1.10 — Draw-Off (drawing competition) */
.art-gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: .2em auto; max-width: 96%; }
.art-card { display: flex; flex-direction: column; align-items: center; }
.art-card img {
  width: clamp(120px, 22vmin, 260px); height: clamp(120px, 22vmin, 260px); object-fit: contain;
  background: #fff; border-radius: 14px; border: 3px solid rgba(251, 243, 228, .18);
}
.art-card.win img { border-color: var(--ember); box-shadow: 0 0 0 4px rgba(242, 183, 5, .35), 0 10px 30px rgba(0, 0, 0, .35); }
.art-cap { margin-top: .35em; color: var(--cream); font-size: clamp(13px, 1.4vw, 19px); font-weight: 600; text-align: center; }

/* phone voting grid */
.vote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.vote-card {
  position: relative; padding: 0; border: 3px solid rgba(251, 243, 228, .22); border-radius: 14px;
  background: #fff; cursor: pointer; overflow: hidden; aspect-ratio: 1 / 1;
}
.vote-card img { width: 100%; height: 100%; object-fit: contain; display: block; }
.vote-card.picked { border-color: var(--ember); box-shadow: 0 0 0 3px rgba(242, 183, 5, .5); }
.vote-card.mine { opacity: .6; cursor: default; }
.vote-tag {
  position: absolute; left: 6px; bottom: 6px; background: rgba(32, 21, 28, .8); color: var(--cream);
  font-size: 12px; padding: 2px 8px; border-radius: 999px;
}

/* ============================================================
   v1.12 — Never Have I Ever + Two Truths & a Lie
   ============================================================ */
/* NHIE: two big stacked buttons (have / haven't) */
.nhie-grid { grid-template-columns: 1fr; gap: 14px; }
.nhie-btn { font-size: 24px; padding: 24px 16px; justify-content: center; }

/* TTAL — author's writing screen */
.ttal-writer { display: flex; flex-direction: column; gap: 16px; margin: 8px 0 14px; }
.ttal-row { display: flex; flex-direction: column; gap: 8px; }
.lie-toggle {
  align-self: flex-start; border: 2px solid #e3d6bd; background: #fff; color: var(--ink);
  border-radius: 999px; padding: 8px 16px; font-weight: 700; font-family: var(--body); cursor: pointer;
}
.lie-toggle.on { border-color: var(--ember); background: var(--ember); color: var(--ink); box-shadow: 0 3px 0 #b88800; }

/* TTAL — long statements must wrap (phone guess + TV reveal) */
.ttal-opt { text-align: left; white-space: normal; line-height: 1.3; align-items: flex-start; }
.choice.ttal-stmt { align-items: flex-start; }
.choice.ttal-stmt span { white-space: normal; }
.tv .choice.ttal-stmt { font-size: clamp(16px, 2.2vmin, 28px); }

/* ============================================================
   v1.17 — game branding ("Ahl In") vs studio ("Ahlchemy")
   ============================================================ */
/* Home-screen hero logo (cream background) */
.game-logo { display: block; width: min(88vw, 480px); height: auto; margin: 2px auto 6px; }

/* Small "by Ahlchemy" studio badge, tucked off to the side */
.foot-version {
  text-align: center; font-family: var(--display); font-weight: 600;
  font-size: 13px; color: #7a6a55; opacity: .7; padding: 2px 0 14px;
}

/* TV top bar: game name is the star, studio is a small credit beside it */
.tv .brand .gamename { font-family: var(--display); font-weight: 700; letter-spacing: .02em;
  color: var(--cream); font-size: clamp(22px, 2.8vw, 36px); }
.tv .brand .gamename b { color: var(--ember-soft); }
.tv .brand .studio { display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 600; font-size: clamp(12px, 1.1vw, 15px); color: var(--muted); }
.tv .brand .studio .brandlogo { width: 22px; height: 22px; }

/* ============================================================
   v1.18 — phone reveal "results splash" (answer / winners / standings)
   so players who can't see the TV still get the full picture
   ============================================================ */
.rv-splash { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.rv-sec { background: #fff; border: 1px solid #ecdfca; border-radius: 14px; padding: 12px 14px; box-shadow: 0 2px 10px rgba(42,27,61,.05); }
.rv-h { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: #8a6d2f; margin-bottom: 7px; }
.rv-answer { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); line-height: 1.25; word-break: break-word; }
.rv-sub { font-size: 14px; color: #7a6a55; margin-top: 5px; line-height: 1.4; }
.rv-list { display: flex; flex-direction: column; gap: 3px; }
.rv-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 16px; color: var(--ink); padding: 4px 6px; border-radius: 8px; }
.rv-row-l { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.rv-row-v { color: #7a6a55; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.rv-row.rv-me { background: #fff3d6; }
.rv-row.rv-me .rv-row-v { color: var(--ink); font-weight: 700; }
