/* Sunday-comics style (Thanksgiving is the default theme; others are at the end of this file): flat colors, hand-inked outlines, a lavender-to-gold evening sky,
   white "tablecloth" cards and hand-lettered type. Background art: scripts/make-scene.py. */
@font-face {
  font-family: "Luckiest Guy";
  src: url("/fonts/luckiest-guy.woff2") format("woff2");
  font-display: swap;
}

:root {
  /* ink and paper */
  --ink: #1b1b1b;
  --cloth: #fffdf6;
  --muted: #5d5650;
  /* evening sky */
  --dusk: #5f5596;
  --lavender: #9a74a6;
  --peach: #e5a07a;
  --gold: #f6c766;
  --moon: #fde23a;
  /* autumn colors (also the four answer-tile colors) */
  --pumpkin: #e57d26;
  --berry: #c8452d;
  --night: #1f5fa6;
  --grass: #6f9a2e;
  --sunny: #f6c624;
  --chip-a: #f9d9a8;
  --chip-b: #cfe3a8;
  /* minigames: the Shot O'Clock backdrop and the Roulette Time red */
  --shot-dark: #4a1f3f;
  --alarm: #e3262f;
  /* lines and shapes */
  --line: 3.5px solid var(--ink);
  --hand: 18px 6px 16px 7px / 7px 16px 6px 18px; /* slightly uneven corners, like inked by hand */
  --hand-sm: 12px 5px 11px 6px / 6px 11px 5px 12px;
  --lift: 4px 5px 0 var(--ink);
  --title: "Luckiest Guy", "Comic Sans MS", "Chalkboard SE", cursive;
  --text: var(--title); /* one font for everything: the same lettering as the SWEET OR BITTER? logo (public/fonts/luckiest-guy.woff2) */
  --zigzag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='20' viewBox='0 0 40 20'%3E%3Crect width='40' height='20' fill='%23f6c624'/%3E%3Cpath d='M0 6 10 15 20 6 30 15 40 6' fill='none' stroke='%231b1b1b' stroke-width='4'/%3E%3C/svg%3E");
  font-family: var(--text);
  font-size: 19px;
}

* { box-sizing: border-box; }
b, strong, h1, h2, h3, h4, h5, h6, th { font-weight: 400; } /* the lettering has no bold: a browser-made bold would smear it */
html, body { margin: 0; min-height: 100%; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--dusk);
}

/* The comic scene behind everything. A fixed layer, since phones ignore fixed backgrounds. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--dusk) url("/images/scene.svg") center bottom / cover no-repeat;
}

main { position: relative; z-index: 1; }

/* ---------- falling leaves ---------- */
.leaves { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.leaf {
  position: absolute;
  top: -60px;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  background: center / contain no-repeat;
  animation:
    leaf-fall var(--fall) linear var(--delay) infinite,
    leaf-sway var(--sway) ease-in-out var(--delay) infinite alternate;
}
@keyframes leaf-fall { to { translate: var(--drift) calc(100vh + 120px); } }
@keyframes leaf-sway { from { rotate: -40deg; } to { rotate: 40deg; } }
.leaf-0 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23e8892b' stroke='%231b1b1b' stroke-width='5' stroke-linejoin='round' d='M50 4 58 26 74 16 70 38 92 34 80 52 94 60 70 66 74 80 54 72 52 96 48 96 46 72 26 80 30 66 6 60 20 52 8 34 30 38 26 16 42 26Z'/%3E%3C/svg%3E"); }
.leaf-1 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23c8452d' stroke='%231b1b1b' stroke-width='5' stroke-linejoin='round' d='M50 4 58 26 74 16 70 38 92 34 80 52 94 60 70 66 74 80 54 72 52 96 48 96 46 72 26 80 30 66 6 60 20 52 8 34 30 38 26 16 42 26Z'/%3E%3C/svg%3E"); }
.leaf-2 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23f2b130' stroke='%231b1b1b' stroke-width='5' d='M50 6C78 22 88 52 50 94 12 52 22 22 50 6Z'/%3E%3Cpath stroke='%231b1b1b' stroke-width='4' d='M50 14V96'/%3E%3C/svg%3E"); }
.leaf-3 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23d9692a' stroke='%231b1b1b' stroke-width='5' d='M50 6C78 22 88 52 50 94 12 52 22 22 50 6Z'/%3E%3Cpath stroke='%231b1b1b' stroke-width='4' d='M50 14V96'/%3E%3C/svg%3E"); }

/* ---------- comic panels: white tablecloth cards with inked edges ---------- */
.card, .q-header, .vote-head, .joined-card, .answers-in, .wait, .place, .me-bar {
  background: var(--cloth);
  color: var(--ink);
  border: var(--line);
  border-radius: var(--hand);
  box-shadow: var(--lift);
}
.card { position: relative; padding: 42px 28px 28px; }
.q-header, .vote-head, .joined-card { position: relative; }
/* zigzag trim across the top of the main panels */
.card::before, .q-header::before, .vote-head::before, .joined-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 20px;
  background: var(--zigzag) repeat-x left center / 40px 20px;
  border-bottom: var(--line);
  border-radius: 15px 3px 0 0 / 4px 13px 0 0;
}

.narrow { width: min(430px, calc(100vw - 32px)); margin: 0 auto; }
.center { text-align: center; }
.center-page { display: grid; place-items: center; padding: 16px; }
.center-page .card, .player form.card { text-align: center; }
.stack { display: grid; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.error { color: var(--berry); margin: 0; font-size: 1.1rem; }

/* ---------- lettering ---------- */
.logo, .q-text, .game-code, .timer, .mini-timer, .winner-line, .points, .wait h2, .outcome h2,
.answers-in strong, .player-count, .quiz-badge, .subtitle, .chip, .vote-hint, .step-name, .step-votes, .step-place,
.place, .me-bar, .vote-btn, .btn, .picker-q, .intro-label, .intro-text, .intro-count,
.shot-banner, .shot-sub, .shot-title, .roulette-name, .shot-status, .shot-skip, .shot-tag, .shot-chip,
.boo-pick, .rt-title, .rt-sub, .rt-onspot, .rt-verdict, .rt-answer, .rt-seg-name,
.discuss-title, .discuss-word, .discuss-sub, .discuss-rank, .discuss-name, .discuss-timer, .discuss-hint,
.finale-sub, .finale-now-text, .finale-word {
  font-family: var(--title);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.logo {
  margin: 0 0 6px;
  font-size: 2.7rem;
  color: var(--sunny);
  -webkit-text-stroke: 2.5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 3px 4px 0 var(--ink);
  rotate: -2deg;
}
.small-logo { font-size: 2.1rem; }
.subtitle {
  display: table;
  margin: 6px 0 2px;
  padding: 7px 16px 3px;
  font-size: 1.35rem;
  background: var(--cloth);
  border: var(--line);
  border-radius: var(--hand-sm);
  rotate: 1.5deg;
}
.tagline { display: table; margin: 10px 0 0; font-size: 1.35rem; color: var(--cloth); text-shadow: 0 2px 0 var(--ink), 0 0 6px rgba(27, 27, 27, 0.6); }
.card .subtitle, .card .tagline { margin-inline: auto; }
.card .tagline { color: var(--muted); text-shadow: none; }
.lobby-side .subtitle { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.lobby-side .tagline { font-size: clamp(1.25rem, 1.9vw, 1.7rem); margin-bottom: 16px; }

/* ---------- buttons: flat color, inked, thicker bottom line like a pressed key ---------- */
.btn {
  display: inline-block;
  padding: 10px 24px 7px;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--cloth);
  border: var(--line);
  border-bottom-width: 7px;
  border-radius: var(--hand-sm);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.08s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px) rotate(-1deg); }
.btn:active:not(:disabled) { transform: translateY(3px); border-bottom-width: 4px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: auto; }
.btn.big { width: 100%; padding: 14px 16px 10px; font-size: 1.35rem; background: var(--pumpkin); color: var(--cloth); }
.btn.secondary { background: var(--night); color: var(--cloth); }
.btn.big, .btn.secondary { -webkit-text-stroke: 1.2px var(--ink); paint-order: stroke fill; }
.btn.ghost { background: var(--cloth); }
/* The full-screen and sound buttons: two small icons together in the bottom right. */
.corner-bar { position: fixed; bottom: 12px; right: 14px; z-index: 5; display: flex; gap: 8px; }
.has-mascot .corner-bar { right: calc(clamp(130px, 13vw, 200px) + clamp(16px, 3vw, 44px)); }
.corner { display: grid; place-items: center; width: 44px; height: 40px; padding: 0 0 2px; font-size: 1.2rem; line-height: 1; border-bottom-width: 5px; }
.corner.needs-tap { animation: corner-pulse 1.1s ease-in-out infinite alternate; }
@keyframes corner-pulse { from { transform: scale(1); } to { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .corner.needs-tap { animation: none; } }
.small-btn { margin-top: 14px; padding: 6px 16px 3px; font-size: 0.95rem; }

.input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--text);
  font-size: 1.35rem;
  text-align: center;
  color: var(--ink);
  background: #fff;
  border: var(--line);
  border-radius: var(--hand-sm);
}
textarea.input { resize: none; text-align: left; line-height: 1.25; }
.input:focus { outline: 3px dashed var(--night); outline-offset: 3px; }
.code-input { text-transform: uppercase; letter-spacing: 0.3em; font-family: var(--title); }

.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 18px 0 12px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 3px dotted var(--ink); opacity: 0.35; }
main.card > .btn.big { margin-top: 16px; }

.picker { margin-top: 16px; }
.picker-q { margin: 0 0 12px; font-size: 1.3rem; }
.picker-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.btn.big.pick { padding: 18px 8px 13px; font-size: 1.5rem; }
.btn.big.pick:nth-child(odd) { background: var(--berry); rotate: -2deg; }
.btn.big.pick:nth-child(even) { background: var(--night); rotate: 2deg; }
.corner-login { position: fixed; top: 12px; right: 12px; z-index: 5; padding: 6px 16px 3px; font-size: 1.1rem; text-decoration: none; }
.name-hint { margin: 0; text-align: center; font-size: 1.15rem; }
/* A small tooltip-style note that explains a minigame round (see explain() in common.js). */
.explain {
  position: relative;
  margin: 0;
  padding: 6px 16px;
  max-width: min(40rem, 88vw);
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  line-height: 1.3;
  text-align: center;
  color: var(--ink);
  background: var(--cloth);
  border: var(--line);
  border-radius: var(--hand-sm);
  box-shadow: 3px 4px 0 var(--ink);
}
.explain::before { /* the little pointer on top, like a tooltip */
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 16px;
  height: 16px;
  background: var(--cloth);
  border-left: var(--line);
  border-top: var(--line);
  transform: translateX(-50%) rotate(45deg);
}
.explain-bottom { position: fixed; left: 200px; right: 200px; bottom: 3vh; z-index: 6; margin-inline: auto; width: fit-content; max-width: calc(100vw - 400px); } /* leaves the corners (and the optional mascot) free */
.player .explain { margin-top: 14px; font-size: 1.05rem; }
.btn.big.pick { overflow: hidden; text-overflow: ellipsis; }

.offline, .toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 6px 16px;
  font-size: 1.1rem;
  background: var(--cloth);
  border: var(--line);
  border-radius: 999px;
}
.offline { top: 12px; }
.toast { bottom: 20px; }

/* the four answer colors */
.rust { background: var(--berry); }
.pumpkin { background: var(--pumpkin); }
.mustard { background: var(--night); }
.olive { background: var(--grass); }

/* ---------- big screen ---------- */
.host main { min-height: 100vh; padding: clamp(16px, 3vw, 40px) clamp(16px, 3vw, 40px) 120px; }

.mascot { position: fixed; right: clamp(8px, 2vw, 32px); bottom: 4px; width: clamp(130px, 13vw, 200px); z-index: 2; pointer-events: none; }

.lobby {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
  max-width: 1300px;
  margin: 0 auto;
}
.join-panel { text-align: center; rotate: -1.5deg; }
.join-panel p { margin: 6px 0; font-size: 1.15rem; }
.join-panel .muted { color: var(--muted); }
.qr { padding: 6px; background: #fff; border: var(--line); border-radius: var(--hand-sm); }
.qr svg { display: block; width: 100%; height: auto; }
.join-panel .game-code { font-size: 2.8rem; letter-spacing: 0.15em; color: var(--berry); }
.lobby-side .logo { margin-bottom: 10px; font-size: clamp(2.8rem, 5.5vw, 5rem); line-height: 1; }
.quiz-badge {
  display: table;
  margin: 8px 0 4px;
  padding: 7px 16px 3px;
  font-size: 1.3rem;
  color: var(--cloth);
  background: var(--night);
  border: var(--line);
  border-radius: var(--hand-sm);
  -webkit-text-stroke: 1px var(--ink);
  paint-order: stroke fill;
  rotate: -1.5deg;
}

.joined-card { padding: 34px 20px 20px; margin: 14px 0 22px; max-width: 760px; }
.player-count { margin: 0 0 14px; font-size: 1.4rem; }
.joined-empty { margin: 0; font-size: 1.35rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px 5px 12px;
  font-size: 1.3rem;
  background: var(--sunny);
  border: var(--line);
  border-radius: var(--hand-sm);
  animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.6, 1);
}
.chip:nth-child(3n + 2) { background: var(--chip-a); }
.chip:nth-child(3n) { background: var(--chip-b); }
.chip:nth-child(odd) { rotate: -2deg; }
.chip:nth-child(even) { rotate: 2deg; }

.chip.away { opacity: 0.45; }
.chip-name { min-width: 0; }
.chip-kick { margin-left: 8px; padding: 0 7px; font: inherit; font-size: 0.8em; line-height: 1.3; cursor: pointer; color: inherit; background: rgba(255, 255, 255, 0.55); border: 2px solid currentColor; border-radius: 50%; opacity: 0.7; }
.chip-kick:hover, .chip-kick:focus-visible { opacity: 1; background: #fff; }
.lobby-side .btn.big { max-width: 420px; background: var(--grass); }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }

.q-fit { display: grid; gap: clamp(16px, 2.2vw, 26px); zoom: var(--fit, 1); } /* zoomed out by fitToScreen in host.js when the screen is too small for everything */
.question, .results, .final { display: grid; gap: clamp(16px, 2.2vw, 26px); max-width: 1400px; margin: 0 auto; }
.q-header { padding: 32px 28px 14px; text-align: center; }
.q-count { font-size: 1.1rem; color: var(--muted); }
.q-text { margin: 2px 0 0; font-size: clamp(1.8rem, 3.6vw, 3.2rem); line-height: 1.1; }

.q-middle { display: grid; grid-template-columns: 1fr minmax(0, 3fr) 1fr; align-items: center; gap: 20px; }
.timer {
  justify-self: center;
  display: grid;
  place-items: center;
  width: clamp(84px, 9vw, 140px);
  aspect-ratio: 1;
  padding-top: 0.12em;
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
  background: var(--moon);
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--lift);
}
.timer.urgent { background: var(--berry); color: var(--cloth); animation: wobble 0.5s infinite alternate; }
@keyframes wobble { from { transform: rotate(-6deg) scale(1.04); } to { transform: rotate(6deg) scale(1.1); } }
.q-image {
  justify-self: center;
  width: 100%;
  max-height: 42vh;
  object-fit: cover;
  background: #fff;
  border: 8px solid var(--cloth);
  outline: var(--line);
  border-radius: 6px;
  box-shadow: 7px 8px 0 var(--ink);
  rotate: -1.5deg;
}
.q-image.empty { aspect-ratio: 16 / 9; }
.answers-in { justify-self: center; display: grid; padding: 10px 18px 8px; text-align: center; font-size: 1.15rem; rotate: 2deg; }
.answers-in strong { font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1; color: var(--night); }

.shape { font-size: 1.2em; line-height: 1; -webkit-text-stroke: 0; }
.skip { justify-self: center; }

.winner-line {
  margin: 0;
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  color: var(--cloth);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink);
}
.winner-line strong {
  display: inline-block;
  margin-left: 8px;
  padding: 8px 20px 4px;
  color: var(--ink);
  background: var(--moon);
  border: var(--line);
  border-radius: var(--hand-sm);
  box-shadow: var(--lift);
  -webkit-text-stroke: 0;
  text-shadow: none;
  rotate: -3deg;
}
.vote-hint {
  justify-self: center;
  margin: 0;
  padding: 12px 30px 8px;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  background: var(--moon);
  border: var(--line);
  border-radius: var(--hand-sm);
  box-shadow: var(--lift);
  rotate: -1.5deg;
  animation: hint-bob 1.6s ease-in-out infinite alternate;
}
@keyframes hint-bob { from { transform: translateY(0); } to { transform: translateY(-6px); } }

/* top-3 podium: 2nd on the left, 1st in the middle, 3rd on the right */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: clamp(10px, 2vw, 24px); min-height: 40vh; margin: 0; padding: 0; list-style: none; }
.step { display: grid; justify-items: center; gap: 6px; width: clamp(150px, 20vw, 260px); min-width: 0; animation: step-up 0.6s cubic-bezier(0.3, 1.4, 0.6, 1) both; }
.step.rank-1 { order: 2; }
.step.rank-2 { order: 1; animation-delay: 0.2s; }
.step.rank-3 { order: 3; animation-delay: 0.4s; }
.step-name { max-width: 100%; padding: 6px 16px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(1.3rem, 2.4vw, 2rem); background: var(--cloth); border: var(--line); border-radius: var(--hand-sm); box-shadow: var(--lift); }
.step-votes { font-size: clamp(1.1rem, 1.8vw, 1.5rem); color: var(--cloth); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.step-block { display: grid; place-items: center; width: 100%; border: var(--line); border-bottom: 0; border-radius: 14px 8px 0 0 / 8px 14px 0 0; box-shadow: 4px 4px 0 var(--ink); }
.step-place { font-size: clamp(2rem, 4vw, 3.4rem); color: var(--cloth); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.place-1 .step-block { height: 26vh; background: var(--moon); }
.place-2 .step-block { height: 18vh; background: var(--pumpkin); }
.place-3 .step-block { height: 12vh; background: var(--berry); }
@keyframes step-up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.btn.big.next { justify-self: center; width: auto; padding-inline: 40px; background: var(--grass); }

.final { max-width: 760px; justify-items: center; text-align: center; }
.final .logo { font-size: clamp(3rem, 6vw, 4.6rem); }
.leaderboard { display: grid; gap: 14px; width: 100%; margin: 0; padding: 0; list-style: none; }
.place { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 12px 20px 8px; font-size: 1.4rem; }
.place:nth-child(odd) { rotate: -0.6deg; }
.place:nth-child(even) { rotate: 0.6deg; }
.place.p1 { background: var(--moon); font-size: 1.9rem; }
.place.p2 { background: #dfe6ee; }
.place.p3 { background: #f2b27a; }
.lb-name { overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }

/* Read-the-question moment: the question fills the big screen in a comic speech balloon */
.intro {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(14px, 2.5vh, 28px);
  padding: 40px clamp(20px, 6vw, 90px);
  text-align: center;
  background: linear-gradient(180deg, var(--dusk) 0%, var(--lavender) 40%, var(--peach) 72%, var(--gold) 100%);
  animation: intro-in 0.45s cubic-bezier(0.3, 1.4, 0.6, 1);
}
.intro-label { margin: 0; padding: 8px 24px 4px; font-size: clamp(1.2rem, 2.4vw, 2rem); background: var(--sunny); border: var(--line); border-radius: var(--hand-sm); rotate: -2deg; }
.intro-text {
  position: relative;
  max-width: 20ch;
  margin: 0 0 22px;
  padding: clamp(24px, 4vh, 44px) clamp(28px, 4vw, 56px);
  font-size: clamp(2rem, min(6vw, 9vh), 5.6rem); /* also limited by the screen's height, so long questions fit a short screen */
  line-height: 1.05;
  background: var(--cloth);
  border: 5px solid var(--ink);
  border-radius: 48% 52% 50% 50% / 46% 50% 50% 54%; /* speech balloon */
  animation: intro-text 0.7s 0.1s both cubic-bezier(0.3, 1.5, 0.5, 1);
}
.intro-text::after { /* balloon tail */
  content: "";
  position: absolute;
  bottom: -34px;
  left: 30%;
  width: 46px;
  height: 46px;
  background: var(--cloth);
  border-right: 5px solid var(--ink);
  border-bottom: 5px solid var(--ink);
  transform: skewX(-25deg) rotate(35deg);
}
.intro-count { display: grid; place-items: center; width: clamp(70px, 8vw, 110px); aspect-ratio: 1; padding-top: 0.1em; font-size: clamp(2rem, 4vw, 3.2rem); background: var(--moon); border: 4px solid var(--ink); border-radius: 50%; }
.intro-bar { width: min(640px, 80vw); height: 22px; overflow: hidden; background: var(--cloth); border: var(--line); border-radius: 999px; }
.intro-bar-fill { height: 100%; background: var(--pumpkin); transform-origin: left; animation: intro-bar linear forwards; }
.intro-hint { margin: 0; font-size: clamp(1.2rem, 2vw, 1.6rem); color: var(--ink); }
@media (max-height: 800px) { /* smaller screens (like a 1280x720 laptop): keep every intro screen, tooltip included, on screen */
  .intro { gap: 8px; padding-block: 16px; }
}
@keyframes intro-in { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
@keyframes intro-text { from { opacity: 0; transform: scale(0.4) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes intro-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 760px) {
  .lobby { grid-template-columns: 1fr; }
  .q-middle { grid-template-columns: 1fr 1fr; }
  .q-middle .q-image { grid-column: 1 / -1; grid-row: 1; }
  .mascot { display: none; }
  .host main { padding-bottom: 72px; }
}

/* ---------- phone ---------- */
.player main { display: flex; flex-direction: column; min-height: 100vh; padding: max(16px, env(safe-area-inset-top)) 16px calc(92px + env(safe-area-inset-bottom)); } /* room at the bottom for the take-the-shot bar */
.player main > .card { margin: auto; }
.me-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 4px 16px; font-size: 1.2rem; }
.me-right { display: flex; align-items: center; gap: 8px; }
.sound-btn { padding: 4px 6px; font-size: 1.05rem; line-height: 1; cursor: pointer; background: var(--cloth); border: var(--line); border-radius: var(--hand-sm); }
.me-score { padding: 2px 12px 0; background: var(--moon); border: var(--line); border-radius: var(--hand-sm); }

.wait, .outcome { width: 100%; margin: auto; padding: 24px; text-align: center; font-size: 1.25rem; }
.wait h2, .outcome h2 { margin: 0 0 8px; font-size: 2.4rem; }
.wait h2 { color: var(--cloth); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.outcome { color: var(--cloth); border: var(--line); border-radius: var(--hand); box-shadow: var(--lift); rotate: -1deg; }
.outcome h2, .outcome .points { -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.outcome.win { background: var(--grass); }
.outcome.lose { background: var(--berry); }
.outcome.final-me { background: var(--cloth); color: var(--ink); }
.outcome.final-me .points { color: var(--sunny); text-shadow: 3px 3px 0 var(--ink); }
.points { margin: 8px 0; font-size: 3.4rem; }
.shot-chip { display: inline-block; margin: 0 0 10px; padding: 6px 14px 2px; font-size: 1.1rem; color: var(--cloth); background: var(--berry); border: var(--line); border-radius: var(--hand-sm); box-shadow: var(--lift); -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; rotate: -2deg; }
.outcome.shot-me { display: grid; justify-items: center; gap: 14px; background: var(--berry); }
.outcome.shot-me .shot-glass { font-size: 4.4rem; }
.shot-btn { width: 100%; font-size: 1.6rem; background: var(--moon); color: var(--ink); }
.look-up-eyes { font-size: 3.4rem; line-height: 1; animation: look-up 0.9s ease-in-out infinite alternate; }
@keyframes look-up { from { transform: translateY(4px); } to { transform: translateY(-8px); } }

/* joining on a phone: the name card and the "You're in!" card are golden */
.player form.card, .player .wait { background: linear-gradient(170deg, var(--moon) 0%, var(--gold) 100%); }
.player form.card .muted, .player .wait .muted { color: var(--ink); }

.vote { display: grid; gap: 14px; padding-top: 16px; }
.vote-head { display: flex; align-items: center; gap: 12px; padding: 30px 12px 10px 16px; }
/* with a long list of names the question and the timer stay in view while the page scrolls */
.player .vote-head { position: sticky; top: 0; z-index: 3; }
.vote-q { flex: 1; margin: 0; font-size: 1.45rem; line-height: 1.15; }
.mini-timer { flex: 0 0 auto; display: grid; place-items: center; width: 54px; height: 54px; padding-top: 0.12em; font-size: 1.5rem; background: var(--moon); border: var(--line); border-radius: 50%; }
.vote-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.vote-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px 12px;
  font-size: 1.45rem;
  text-align: left;
  color: var(--cloth);
  border: var(--line);
  border-bottom-width: 7px;
  border-radius: var(--hand-sm);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  cursor: pointer;
  transition: transform 0.08s;
}
.vote-btn:active { transform: translateY(3px); border-bottom-width: 4px; }
.vote-btn span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-list.written .vote-btn span:nth-child(2) { white-space: normal; overflow-wrap: anywhere; line-height: 1.15; } /* a written multiple-choice answer wraps instead of running off the screen */
.vote-q { min-width: 0; overflow-wrap: anywhere; }
.vote-btn.picked { outline: 4px dashed var(--ink); outline-offset: 4px; rotate: -1deg; }
.vote-btn.dim { opacity: 0.45; }
.check { font-size: 1.5rem; }
.vote > .muted { margin: 0; padding: 6px 12px; font-size: 1.15rem; text-align: center; color: var(--ink); background: var(--cloth); border: var(--line); border-radius: var(--hand-sm); }

@media (prefers-reduced-motion: reduce) {
  .leaves { display: none; }
  .chip, .timer.urgent, .intro, .intro-text, .look-up-eyes,
  .shot-banner, .shot-title, .shot-glass, .roulette-name, .rt-title, .finale-dots, .liquid::before, .liquid .bub { animation: none; }
}

/* ---------- Shot O'Clock ---------- */
/* The "SHOT O'CLOCK!" slam over the question (2.8s, then it fades to show the question). --into carries a redraw on. */
.so-slam {
  position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 2vh;
  pointer-events: none;
  background: radial-gradient(circle at 50% 55%, var(--berry) 0%, var(--shot-dark) 75%);
  animation: so-overlay 2.8s linear both;
  animation-delay: calc(var(--into, 0ms) * -1);
}
@keyframes so-overlay { 0%, 82% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.so-glass { font-size: clamp(5rem, 18vw, 13rem); line-height: 1; filter: drop-shadow(0 0 22px #ff8a1f); animation: so-glass 2.8s both; animation-delay: calc(var(--into, 0ms) * -1); }
.so-glass .ico { vertical-align: 0; }
@keyframes so-glass {
  0% { transform: translateY(-60vh) rotate(-40deg) scale(0.6); opacity: 0; }
  14% { transform: translateY(2vh) rotate(8deg) scale(1.1); opacity: 1; }
  20% { transform: translateY(-3vh) rotate(-4deg) scale(1); }
  26% { transform: none; }
  60% { transform: rotate(-6deg) scale(1.06); }
  72%, 100% { transform: rotate(6deg) scale(1.1); }
}
.so-words {
  margin: 0; padding: 0.1em 0.5em 0; font-size: clamp(2.6rem, 9vw, 7.4rem); color: var(--moon); background: var(--ink);
  border: 5px solid var(--moon); border-radius: var(--hand-sm); box-shadow: 8px 9px 0 var(--pumpkin); rotate: -3deg;
  text-shadow: 0 0 14px #ff8a1f; animation: so-words 2.8s both; animation-delay: calc(var(--into, 0ms) * -1);
}
@keyframes so-words {
  0%, 18% { opacity: 0; transform: scale(3) rotate(10deg); }
  30% { opacity: 1; transform: scale(0.94); }
  36%, 100% { opacity: 1; transform: none; }
}
.shot-tag { display: inline-block; margin-left: 12px; padding: 3px 12px 0; font-size: 0.95rem; color: var(--cloth); background: var(--berry); border: var(--line); border-radius: var(--hand-sm); -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }
.shot-intro { background: linear-gradient(180deg, var(--shot-dark) 0%, var(--berry) 45%, var(--pumpkin) 80%, var(--gold) 100%); }
.shot-banner {
  margin: 0;
  padding: 10px 30px 4px;
  font-size: clamp(2rem, 5vw, 4.4rem);
  color: var(--moon);
  background: var(--ink);
  border: 4px solid var(--moon);
  border-radius: var(--hand-sm);
  box-shadow: 6px 7px 0 var(--berry);
  rotate: -3deg;
  animation: shot-flash 0.5s steps(2, jump-none) infinite alternate;
}
@keyframes shot-flash { from { color: var(--moon); } to { color: var(--pumpkin); } }
.shot {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(14px, 2.6vh, 30px);
  min-height: 78vh;
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
}
.shot-sub, .shot-status, .shot-skip {
  margin: 0;
  font-size: clamp(1.3rem, 2.6vw, 2.2rem);
  color: var(--cloth);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink);
}
.shot-skip { font-size: clamp(1rem, 1.8vw, 1.4rem); }
.roulette {
  display: grid;
  place-items: center;
  width: min(760px, 88vw);
  padding: clamp(18px, 3vh, 34px) 20px;
  background: var(--cloth);
  border: 5px solid var(--ink);
  border-radius: var(--hand);
  box-shadow: 8px 9px 0 var(--ink);
}
.roulette-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 1.1;
  color: var(--berry);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  animation: roulette-pop 0.12s ease-out;
}
.roulette-name.flip-b { color: var(--night); animation-name: roulette-pop-b; }
@keyframes roulette-pop { from { transform: translateY(-30%) scale(0.9); } to { transform: none; } }
@keyframes roulette-pop-b { from { transform: translateY(-30%) scale(0.9); } to { transform: none; } }
.shot-title {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 1.05;
  color: var(--cloth);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--ink);
  animation: shot-slam 0.6s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.shot-name { max-width: 90vw; padding: 8px 30px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); background: var(--moon); border: 5px solid var(--ink); border-radius: var(--hand-sm); box-shadow: 7px 8px 0 var(--ink); -webkit-text-stroke: 0; text-shadow: none; rotate: -3deg; }
@keyframes shot-slam { from { opacity: 0; transform: scale(2.4) rotate(8deg); } to { opacity: 1; transform: none; } }
.shot-glass { font-size: clamp(4rem, 10vw, 8rem); line-height: 1; animation: shot-wiggle 0.7s ease-in-out infinite alternate; }
@keyframes shot-wiggle { from { transform: rotate(-12deg); } to { transform: rotate(12deg) translateY(-8px); } }
.shot.done .shot-glass { animation: shot-slam 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }

/* ---------- themes ----------
   Thanksgiving is the default look (the :root colors above). Each theme below swaps the colors,
   the background scene (scripts/make-scene.py), the trim and the falling decorations. The theme
   is picked on the homepage only and comes from the game itself (data-theme on <html>). */
/* christmas: snowy night, candy-cane trim, red and green */
[data-theme="christmas"] { --shot-dark: #0b1d33; --alarm: #d62828; --dusk: #1d3557; --lavender: #35598f; --peach: #8fb3d9; --gold: #e6f0fa; --moon: #ffd84a; --pumpkin: #e0a526; --berry: #c8312f; --night: #1f5fa6; --grass: #2f8f4e; --sunny: #ffd84a; --chip-a: #f7c8c4; --chip-b: #c9e7cf; --zigzag: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='20'%20viewBox='0%200%2040%2020'%3E%3Crect%20width='40'%20height='20'%20fill='%23e8463d'/%3E%3Cpath%20d='M0%206%2010%2015%2020%206%2030%2015%2040%206'%20fill='none'%20stroke='%231b1b1b'%20stroke-width='4'/%3E%3C/svg%3E"); }
[data-theme="christmas"] body::before { background-image: url("/images/scene-christmas.svg"); }
[data-theme="christmas"] .leaf-0 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Cg%20fill='none'%20stroke='%231b1b1b'%20stroke-width='11'%20stroke-linecap='round'%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(0%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(60%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(120%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(180%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(240%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(300%2050%2050)'/%3E%3C/g%3E%3Cg%20fill='none'%20stroke='%23ffffff'%20stroke-width='5'%20stroke-linecap='round'%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(0%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(60%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(120%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(180%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(240%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(300%2050%2050)'/%3E%3C/g%3E%3C/svg%3E"); }
[data-theme="christmas"] .leaf-1 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Ccircle%20cx='50'%20cy='50'%20r='26'%20fill='%23fff'%20stroke='%231b1b1b'%20stroke-width='6'/%3E%3C/svg%3E"); }
[data-theme="christmas"] .leaf-2 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Cpath%20fill='%23ffd84a'%20stroke='%231b1b1b'%20stroke-width='5'%20stroke-linejoin='round'%20d='M50%206%2062%2038%2096%2038%2068%2058%2079%2092%2050%2072%2021%2092%2032%2058%204%2038%2038%2038Z'/%3E%3C/svg%3E"); }
[data-theme="christmas"] .leaf-3 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Cg%20fill='none'%20stroke='%231b1b1b'%20stroke-width='11'%20stroke-linecap='round'%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(0%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(60%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(120%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(180%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(240%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(300%2050%2050)'/%3E%3C/g%3E%3Cg%20fill='none'%20stroke='%23d8ecff'%20stroke-width='5'%20stroke-linecap='round'%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(0%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(60%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(120%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(180%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(240%2050%2050)'/%3E%3Cpath%20d='M50%2050%20L50%208%20M50%2024%20L40%2014%20M50%2024%20L60%2014'%20transform='rotate(300%2050%2050)'/%3E%3C/g%3E%3C/svg%3E"); }
/* halloween: purple night, orange moon, bats and ghosts */
[data-theme="halloween"] { --shot-dark: #12061f; --alarm: #ff3d2e; --dusk: #1e1033; --lavender: #3d1f5c; --peach: #7a3b8f; --gold: #f28c28; --moon: #ffb23f; --pumpkin: #f2711c; --berry: #7b2cbf; --night: #2b2b38; --grass: #5e9e2f; --sunny: #ff9f1c; --chip-a: #f9c99a; --chip-b: #d7c0f0; --zigzag: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='20'%20viewBox='0%200%2040%2020'%3E%3Crect%20width='40'%20height='20'%20fill='%23f2711c'/%3E%3Cpath%20d='M0%206%2010%2015%2020%206%2030%2015%2040%206'%20fill='none'%20stroke='%231b1b1b'%20stroke-width='4'/%3E%3C/svg%3E"); }
[data-theme="halloween"] body::before { background-image: url("/images/scene-halloween.svg"); }
[data-theme="halloween"] .leaf-0 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Cpath%20fill='%232a1a3a'%20stroke='%231b1b1b'%20stroke-width='4'%20stroke-linejoin='round'%20d='M50%2038%2044%2026%2040%2038%20C30%2026%2016%2024%204%2034%20C14%2038%2016%2046%2012%2056%20C22%2050%2030%2054%2034%2064%20C40%2056%2046%2056%2050%2064%20C54%2056%2060%2056%2066%2064%20C70%2054%2078%2050%2088%2056%20C84%2046%2086%2038%2096%2034%20C84%2024%2070%2026%2060%2038%2056%2026Z'/%3E%3Ccircle%20cx='45'%20cy='42'%20r='2.5'%20fill='%23ffd84a'/%3E%3Ccircle%20cx='55'%20cy='42'%20r='2.5'%20fill='%23ffd84a'/%3E%3C/svg%3E"); }
[data-theme="halloween"] .leaf-1 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Cpath%20fill='%23fffdf6'%20stroke='%231b1b1b'%20stroke-width='5'%20stroke-linejoin='round'%20d='M20%2092%20V44%20C20%2022%2034%208%2050%208%2066%208%2080%2022%2080%2044%20V92%20L70%2082%2060%2092%2050%2082%2040%2092%2030%2082Z'/%3E%3Ccircle%20cx='40'%20cy='42'%20r='6'%20fill='%231b1b1b'/%3E%3Ccircle%20cx='60'%20cy='42'%20r='6'%20fill='%231b1b1b'/%3E%3Cellipse%20cx='50'%20cy='62'%20rx='6'%20ry='8'%20fill='%231b1b1b'/%3E%3C/svg%3E"); }
[data-theme="halloween"] .leaf-2 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Cpath%20fill='%23f2711c'%20stroke='%231b1b1b'%20stroke-width='5'%20stroke-linejoin='round'%20d='M50%204%2058%2026%2074%2016%2070%2038%2092%2034%2080%2052%2094%2060%2070%2066%2074%2080%2054%2072%2052%2096%2048%2096%2046%2072%2026%2080%2030%2066%206%2060%2020%2052%208%2034%2030%2038%2026%2016%2042%2026Z'/%3E%3C/svg%3E"); }
[data-theme="halloween"] .leaf-3 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Cpath%20fill='%237b2cbf'%20stroke='%231b1b1b'%20stroke-width='5'%20stroke-linejoin='round'%20d='M50%206C78%2022%2088%2052%2050%2094%2012%2052%2022%2022%2050%206Z'/%3E%3Cpath%20stroke='%231b1b1b'%20stroke-width='4'%20d='M50%2014V96'/%3E%3C/svg%3E"); }
/* spring: blue morning sky, blossoms and tulips */
[data-theme="spring"] { --shot-dark: #7a2e5a; --alarm: #e8304f; --dusk: #5fb4ef; --lavender: #9fd6fb; --peach: #ffd6e8; --gold: #fff1c1; --moon: #ffe066; --pumpkin: #f9a03f; --berry: #e5579a; --night: #5b7fde; --grass: #4fae4f; --sunny: #ffd23f; --chip-a: #ffd3e6; --chip-b: #cdeec9; --zigzag: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='20'%20viewBox='0%200%2040%2020'%3E%3Crect%20width='40'%20height='20'%20fill='%23ff8fc0'/%3E%3Cpath%20d='M0%206%2010%2015%2020%206%2030%2015%2040%206'%20fill='none'%20stroke='%231b1b1b'%20stroke-width='4'/%3E%3C/svg%3E"); }
[data-theme="spring"] body::before { background-image: url("/images/scene-spring.svg"); }
[data-theme="spring"] .leaf-0 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Cpath%20fill='%23ffb3d1'%20stroke='%231b1b1b'%20stroke-width='5'%20d='M50%208%20C76%2026%2076%2070%2050%2092%2024%2070%2024%2026%2050%208Z'/%3E%3Cpath%20d='M50%2030%20V80'%20stroke='%231b1b1b'%20stroke-width='3'%20opacity='.5'/%3E%3C/svg%3E"); }
[data-theme="spring"] .leaf-1 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Ccircle%20cx='50'%20cy='28'%20r='18'%20fill='%23fff4f8'%20stroke='%231b1b1b'%20stroke-width='5'%20transform='rotate(0%2050%2050)'/%3E%3Ccircle%20cx='50'%20cy='28'%20r='18'%20fill='%23fff4f8'%20stroke='%231b1b1b'%20stroke-width='5'%20transform='rotate(72%2050%2050)'/%3E%3Ccircle%20cx='50'%20cy='28'%20r='18'%20fill='%23fff4f8'%20stroke='%231b1b1b'%20stroke-width='5'%20transform='rotate(144%2050%2050)'/%3E%3Ccircle%20cx='50'%20cy='28'%20r='18'%20fill='%23fff4f8'%20stroke='%231b1b1b'%20stroke-width='5'%20transform='rotate(216%2050%2050)'/%3E%3Ccircle%20cx='50'%20cy='28'%20r='18'%20fill='%23fff4f8'%20stroke='%231b1b1b'%20stroke-width='5'%20transform='rotate(288%2050%2050)'/%3E%3Ccircle%20cx='50'%20cy='50'%20r='12'%20fill='%23ffd84a'%20stroke='%231b1b1b'%20stroke-width='5'/%3E%3C/svg%3E"); }
[data-theme="spring"] .leaf-2 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Cpath%20fill='%23ffd9e8'%20stroke='%231b1b1b'%20stroke-width='5'%20d='M50%208%20C76%2026%2076%2070%2050%2092%2024%2070%2024%2026%2050%208Z'/%3E%3Cpath%20d='M50%2030%20V80'%20stroke='%231b1b1b'%20stroke-width='3'%20opacity='.5'/%3E%3C/svg%3E"); }
[data-theme="spring"] .leaf-3 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Cpath%20fill='%237cc66b'%20stroke='%231b1b1b'%20stroke-width='5'%20stroke-linejoin='round'%20d='M50%206C78%2022%2088%2052%2050%2094%2012%2052%2022%2022%2050%206Z'/%3E%3Cpath%20stroke='%231b1b1b'%20stroke-width='4'%20d='M50%2014V96'/%3E%3C/svg%3E"); }
/* summer: bright beach day, big sun, ocean */
[data-theme="summer"] { --shot-dark: #0a4f7a; --alarm: #ff2e3b; --dusk: #1e8fe0; --lavender: #4fb3ff; --peach: #9ee3ff; --gold: #fff2b3; --moon: #ffd23f; --pumpkin: #ff9f1c; --berry: #ff5a5f; --night: #0f9aa6; --grass: #2fbf71; --sunny: #ffd23f; --chip-a: #ffd0c2; --chip-b: #bdf0dc; --zigzag: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='20'%20viewBox='0%200%2040%2020'%3E%3Crect%20width='40'%20height='20'%20fill='%232ec4d6'/%3E%3Cpath%20d='M0%206%2010%2015%2020%206%2030%2015%2040%206'%20fill='none'%20stroke='%231b1b1b'%20stroke-width='4'/%3E%3C/svg%3E"); }
[data-theme="summer"] body::before { background-image: url("/images/scene-summer.svg"); }
[data-theme="summer"] .leaf-0 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Cpath%20fill='%23ffd84a'%20stroke='%231b1b1b'%20stroke-width='5'%20stroke-linejoin='round'%20d='M50%204%20C54%2038%2062%2046%2096%2050%2062%2054%2054%2062%2050%2096%2046%2062%2038%2054%204%2050%2038%2046%2046%2038%2050%204Z'/%3E%3C/svg%3E"); }
[data-theme="summer"] .leaf-1 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Ccircle%20cx='50'%20cy='50'%20r='40'%20fill='%23bfefff'%20fill-opacity='.7'%20stroke='%231b1b1b'%20stroke-width='5'/%3E%3Cpath%20d='M30%2038%20C34%2028%2042%2024%2050%2022'%20fill='none'%20stroke='%23fff'%20stroke-width='7'%20stroke-linecap='round'/%3E%3C/svg%3E"); }
[data-theme="summer"] .leaf-2 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Crect%20x='30'%20y='14'%20width='40'%20height='72'%20rx='8'%20fill='%23ff5a5f'%20stroke='%231b1b1b'%20stroke-width='5'%20transform='rotate(20%2050%2050)'/%3E%3C/svg%3E"); }
[data-theme="summer"] .leaf-3 { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3E%3Crect%20x='30'%20y='14'%20width='40'%20height='72'%20rx='8'%20fill='%232fbf71'%20stroke='%231b1b1b'%20stroke-width='5'%20transform='rotate(20%2050%2050)'/%3E%3C/svg%3E"); }
[data-theme="christmas"] .leaf { animation-name: leaf-fall, snow-sway; }
[data-theme="halloween"] .leaf-0 { animation-name: leaf-fall, bat-flap; }
[data-theme="summer"] .leaf-1 { animation-name: leaf-fall, snow-sway; }
@keyframes snow-sway { from { rotate: -12deg; } to { rotate: 12deg; } }
@keyframes bat-flap { from { scale: 1 1; rotate: -10deg; } to { scale: 0.7 1.05; rotate: 10deg; } }

/* homepage theme picker */
.theme-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 8px; margin: 0 0 18px; }
.theme-pick { display: grid; justify-items: center; gap: 2px; min-width: 76px; padding: 8px 10px 5px; font: inherit; font-size: 0.95rem; line-height: 1.1; color: var(--ink); background: var(--cloth); border: var(--line); border-radius: var(--hand-sm); cursor: pointer; }
.theme-pick .theme-icon { font-size: 1.7rem; line-height: 1.1; }
.theme-pick[aria-checked="true"] { background: var(--moon); box-shadow: var(--lift); transform: translateY(-3px) rotate(-2deg); }
.theme-pick:focus-visible { outline: 3px solid var(--night); outline-offset: 2px; }

/* ---------- Roulette Time ---------- */
.rt {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(12px, 2.2vh, 26px);
  min-height: 78vh;
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
}
/* the big red title bounces in, then keeps bouncing */
.rt-title {
  margin: 0;
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 1;
  color: var(--alarm);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-shadow: 6px 7px 0 var(--ink);
  animation: rt-bounce-in 0.9s cubic-bezier(0.3, 1.6, 0.5, 1) both, rt-bounce 0.7s ease-in-out 0.9s infinite alternate;
}
.rt-title.small { font-size: clamp(2rem, 4.6vw, 3.6rem); text-shadow: 4px 5px 0 var(--ink); }
@keyframes rt-bounce-in {
  0% { transform: scale(0) rotate(-14deg); }
  55% { transform: scale(1.25) rotate(5deg); }
  75% { transform: scale(0.9) rotate(-2deg); }
  100% { transform: none; }
}
@keyframes rt-bounce { from { translate: 0 0; } to { translate: 0 -16px; } }
.rt-sub, .rt-onspot, .rt-verdict {
  margin: 0;
  font-size: clamp(1.3rem, 2.6vw, 2.2rem);
  color: var(--cloth);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink);
}
.rt-chips { justify-content: center; }
.rt-chips .chip { font-size: clamp(1.2rem, 2.2vw, 1.8rem); }
.rt-onspot { display: grid; justify-items: center; gap: 8px; font-size: clamp(1.8rem, 4vw, 3.4rem); animation: shot-slam 0.6s cubic-bezier(0.3, 1.6, 0.5, 1); }
.rt-wheel { width: min(52vh, 78vw); height: auto; overflow: visible; }
.rt-seg { stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; transition: opacity 0.4s; }
.rt-seg.rust { fill: var(--berry); }
.rt-seg.pumpkin { fill: var(--pumpkin); }
.rt-seg.mustard { fill: var(--night); }
.rt-seg.olive { fill: var(--grass); }
.rt-seg.dim { opacity: 0.35; }
.rt-seg-name { font-size: 30px; fill: var(--cloth); stroke: var(--ink); stroke-width: 5px; paint-order: stroke fill; }
.rt-hub { fill: var(--cloth); stroke: var(--ink); stroke-width: 5; }
.rt-pointer { fill: var(--moon); stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }
.rt-q { width: min(1100px, 100%); text-align: left; }
.rt-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: min(1100px, 100%); margin: 0; padding: 0; list-style: none; }
.rt-answer {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 20px 10px;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  text-align: left;
  color: var(--cloth);
  border: var(--line);
  border-radius: var(--hand-sm);
  box-shadow: var(--lift);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  transition: opacity 0.4s, transform 0.4s;
}
.rt-letter { display: grid; place-items: center; flex: 0 0 auto; width: 1.7em; aspect-ratio: 1; padding-top: 0.1em; color: var(--ink); background: var(--cloth); border: var(--line); border-radius: 50%; -webkit-text-stroke: 0; }
.rt-answer.right { outline: 6px solid var(--moon); outline-offset: 3px; transform: scale(1.04) rotate(-1deg); }
.mc-answers { margin: 14px auto; }
.mc-count { margin-left: auto; padding-left: 0.6em; }
.rt-answer.wrong-pick { opacity: 0.55; text-decoration: line-through 4px; }
.rt-answer.dim { opacity: 0.35; }
.rt-verdict { padding: 10px 26px 6px; border: var(--line); border-radius: var(--hand-sm); box-shadow: var(--lift); animation: shot-slam 0.6s cubic-bezier(0.3, 1.6, 0.5, 1); }
.rt-verdict.win { background: var(--grass); }
.rt-verdict.lose { background: var(--alarm); }
.rt-chip { background: var(--alarm); }
@media (max-width: 760px) { .rt-answers { grid-template-columns: 1fr; } }

/* ---------- the finale ---------- */
.final.wide { max-width: 1200px; }
.finale-sub {
  margin: 0;
  font-size: clamp(1.3rem, 2.6vw, 2.2rem);
  color: var(--cloth);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink);
}
.finale-list .place { animation: step-up 0.5s cubic-bezier(0.3, 1.4, 0.6, 1) both; }
.finale-list .place:nth-child(2) { animation-delay: 0.1s; }
.finale-list .place:nth-child(3) { animation-delay: 0.2s; }
.finale-list .place:nth-child(n + 4) { animation-delay: 0.3s; }
.finale-list.cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.finale-intro { background: radial-gradient(ellipse at 50% 40%, var(--dusk) 0%, var(--shot-dark) 70%); }
.finale-intro-text { margin: 0; font-size: clamp(2.4rem, 6.5vw, 5.6rem); line-height: 1.1; color: var(--cloth); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--ink); animation: finale-pulse 1s ease-in-out infinite alternate; }
@keyframes finale-pulse { from { scale: 1; } to { scale: 1.05; } }
.finale-now { animation: none; background: linear-gradient(180deg, var(--shot-dark) 0%, var(--dusk) 60%, var(--shot-dark) 100%); }
.finale-now-text {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  line-height: 1.1;
  color: var(--cloth);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--ink);
  animation: shot-slam 0.8s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.finale-dots { display: inline-block; animation: finale-dots 1.2s steps(6, end) infinite; overflow: hidden; vertical-align: bottom; white-space: nowrap; }
@keyframes finale-dots { from { width: 0; } to { width: 2.6em; } }
/* the screen goes black and each word fills about 60% of it */
.finale-words { padding: 0; background: #000; animation: none; }
.finale-word-stage { position: relative; display: grid; place-items: center; width: 100vw; height: 100vh; }
.finale-word {
  position: absolute;
  font-size: min(15vw, 38vh); /* about 60% of the screen width */
  line-height: 1;
  color: var(--alarm);
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 10px 10px 0 var(--ink);
  opacity: 0;
  animation: finale-word ease-out both;
}
@keyframes finale-word {
  0% { opacity: 0; transform: scale(0.2) rotate(-10deg); }
  22% { opacity: 1; transform: scale(1.2) rotate(4deg); }
  40% { opacity: 1; transform: scale(1) rotate(0); }
  75% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.5); }
}
.finale-losers .logo { color: var(--alarm); }
.finale-now-text, .finale-word-stage { position: relative; z-index: 60; } /* above the curtains and the liquid */
.finale-word { color: var(--cloth); }
.finale-losers .finale-list .place { animation-delay: 0.5s; } /* the list steps up as the curtains open */
.finale-losers .finale-list .place:nth-child(2) { animation-delay: 0.6s; }
.finale-losers .finale-list .place:nth-child(3) { animation-delay: 0.7s; }
.finale-losers .finale-list .place:nth-child(n + 4) { animation-delay: 0.8s; }
/* the loser screen's background (public/js/fireworks.js): a night sky with fireworks and drifting confetti, behind the list */
.fw-back { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(ellipse at 50% 100%, #2c1a52, #0a0618 75%); }
.fw-back canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fw-bit { position: absolute; top: -4vh; width: 0.9vw; height: 1.6vw; opacity: 0.75; animation: fw-fall linear infinite; }
@keyframes fw-fall { to { transform: translateY(112vh) rotate(720deg); } }
.finale-losers > :not(.fw-back):not(.dress) { position: relative; z-index: 1; }
.fw-bit.fw-shape { width: 2.6vw; height: 2.6vw; font-size: 2.6vw; background: none; opacity: 0.9; }
@media (prefers-reduced-motion: reduce) { .fw-bit { display: none; } }
/* the finale's stage dressing (public/js/curtains.js): red curtains, then amber liquid, then both leave */
.dress { position: fixed; inset: 0; z-index: 40; overflow: hidden; pointer-events: none; }
.curtain { position: absolute; top: 0; bottom: 0; width: 51%; background: repeating-linear-gradient(90deg, #7d0f1e 0 5%, #a8182c 5% 10%, #8f1224 10% 15%); box-shadow: inset 0 -8vh 10vh rgba(0, 0, 0, 0.4); }
.curtain.cl { left: 0; border-right: 0.8vw solid var(--gold); transform: translateX(-101%); }
.curtain.cr { right: 0; border-left: 0.8vw solid var(--gold); transform: translateX(101%); }
.dress-now .curtain, .dress-words .curtain, .dress-losers .curtain { transform: none; }
.dress-winners .curtain { animation: curtain-in-l 0.9s cubic-bezier(0.7, 0, 0.3, 1) both; }
.dress-winners .cr { animation-name: curtain-in-r; }
.dress-losers .curtain { animation: curtain-out-l 1.1s cubic-bezier(0.7, 0, 0.3, 1) both; }
.dress-losers .cr { animation-name: curtain-out-r; }
@keyframes curtain-in-l { from { transform: translateX(-101%); } to { transform: none; } }
@keyframes curtain-in-r { from { transform: translateX(101%); } to { transform: none; } }
@keyframes curtain-out-l { from { transform: none; } to { transform: translateX(-101%); } }
@keyframes curtain-out-r { from { transform: none; } to { transform: translateX(101%); } }
.liquid { position: absolute; inset: 0; background: linear-gradient(#f2a93b, #cf7a1c 45%, #8a3d0c); transform: translateY(calc(100% + 5vw)); }
.liquid::before { content: ""; position: absolute; left: 0; right: 0; top: -3.4vw; height: 3.6vw; background: radial-gradient(circle at 50% 100%, #f2a93b 58%, transparent 60%) 0 0 / 7vw 3.6vw repeat-x; animation: liquid-wave 2.2s linear infinite; }
.dress-words .liquid { animation: liquid-up 1.2s cubic-bezier(0.5, 0, 0.3, 1) both; }
.dress-losers .liquid { transform: none; animation: liquid-down 1.2s cubic-bezier(0.6, 0, 0.6, 1) both; }
@keyframes liquid-up { from { transform: translateY(calc(100% + 5vw)); } to { transform: none; } }
@keyframes liquid-down { from { transform: none; } to { transform: translateY(calc(100% + 5vw)); } }
@keyframes liquid-wave { to { background-position-x: 7vw; } }
.liquid .bub { position: absolute; bottom: -4vw; width: 2vw; height: 2vw; border-radius: 50%; border: 0.3vw solid rgba(255, 245, 210, 0.75); animation: liquid-bubble 2.6s ease-in infinite; }
.liquid .b1 { left: 12%; } .liquid .b2 { left: 30%; width: 3vw; height: 3vw; animation-delay: 0.8s; } .liquid .b3 { left: 52%; animation-delay: 1.5s; }
.liquid .b4 { left: 71%; width: 2.6vw; height: 2.6vw; animation-delay: 0.4s; } .liquid .b5 { left: 88%; animation-delay: 1.1s; }
@keyframes liquid-bubble { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-62vw); opacity: 0; } }
/* Revenge Round: the choices slam onto the screen one by one */
.boo-evil { background: radial-gradient(ellipse at 50% 115%, #9b0d0d 0%, #4a0000 38%, #070000 78%); animation: boo-breathe 2.2s ease-in-out infinite alternate; }
@keyframes boo-breathe { from { filter: brightness(0.8); } to { filter: brightness(1.3); } }
.boo.boo-evil { position: fixed; inset: 0; z-index: 4; overflow: auto; animation: none; background: radial-gradient(ellipse at 50% 35%, #c21a1a 0%, #7a0808 42%, #250000 92%); } /* brighter than the intro, so the names are easy to read */
.boo.boo-evil .rt-title { color: #ffd23f; font-size: clamp(3rem, 7vw, 6rem); }
.boo.boo-evil .boo-pick .victim { color: #ffe14a; }
.boo.boo-evil .rt-sub, .boo.boo-evil .shot-status { color: #ffd9d2; }
.boo-intro { overflow: hidden; padding: 0; }
.boo-embers { position: absolute; inset: 0; pointer-events: none; }
.boo-embers span { position: absolute; bottom: -4vh; width: 10px; height: 10px; border-radius: 50%; background: #ff6a1f; box-shadow: 0 0 12px 5px rgba(255, 60, 0, 0.75); opacity: 0; animation: boo-rise linear infinite; }
@keyframes boo-rise { 0% { opacity: 0; transform: translate(0, 0) scale(1); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--drift), -115vh) scale(0.3); } }
.boo-lightning { position: absolute; inset: 0; background: #ffd0d0; opacity: 0; pointer-events: none; animation: boo-lightning 2.6s linear infinite; }
@keyframes boo-lightning { 0%, 8%, 14%, 100% { opacity: 0; } 9% { opacity: 0.55; } 10% { opacity: 0.05; } 11% { opacity: 0.4; } }
.boo-stage { position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(8px, 3vw, 48px); }
.boo-words { display: grid; justify-items: center; gap: 5vh; }
.boo-word { font-size: min(17vw, 30vh); line-height: 1; color: #ff1c1c; -webkit-text-stroke: 6px #000; paint-order: stroke fill; text-shadow: 0 0 34px #ff0000, 10px 10px 0 #000; opacity: 0; animation: rt-word-in 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both, boo-shake 0.09s linear infinite alternate; }
@keyframes boo-shake { from { translate: -4px 2px; rotate: -1.2deg; } to { translate: 4px -2px; rotate: 1.2deg; } }
.boo-face { font-size: min(14vw, 26vh); filter: drop-shadow(0 0 24px #ff0000); animation: boo-sway 1.1s ease-in-out infinite alternate; }
.boo-face.right { animation-delay: -0.55s; }
@keyframes boo-sway { from { transform: translateY(-2vh) rotate(-8deg); } to { transform: translateY(2vh) rotate(8deg) scale(1.08); } }
.boo { display: grid; justify-items: center; align-content: center; gap: clamp(12px, 2.4vh, 26px); min-height: 100vh; padding: 24px clamp(16px, 4vw, 60px); text-align: center; }
.boo-picks { display: grid; gap: clamp(10px, 2vh, 22px); margin: 0; padding: 0; list-style: none; width: min(960px, 94vw); }
.boo-pick { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0.5em; font-size: clamp(1.4rem, 3.2vw, 2.6rem); color: var(--cloth); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.boo-pick .victim { font-size: 1.7em; color: var(--alarm); -webkit-text-stroke-width: 4px; text-shadow: 5px 5px 0 var(--ink); }
.boo-pick.fresh .victim { animation: shot-slam 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
/* the black screen the big moments fade through (public/js/transition.js) */
.veil { position: fixed; inset: 0; z-index: 60; background: #000; opacity: 0; pointer-events: none; }
/* Roulette Time: a white flash, then a black screen with ROULETTE / TIME! slamming in at about
   60% of the screen's width, for as long as public/audio/roulette-intro.mp3 */
.rt-intro { padding: 0; background: #000; animation: none; }
.rt-words { display: grid; justify-items: center; gap: 3vh; }
.rt-word {
  font-size: min(16vw, 28vh); /* ROULETTE spans about 60% of the width */
  line-height: 1;
  color: var(--alarm);
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 10px 10px 0 var(--ink);
  opacity: 0;
  animation: rt-word-in 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both, rt-word-pulse 0.5s ease-in-out infinite alternate;
}
.rt-burst { position: absolute; inset: 0; background: #fff; opacity: 0; animation: rt-burst 0.5s ease-out; }
@keyframes rt-word-in {
  0% { opacity: 0; transform: scale(0.2) rotate(-10deg); }
  60% { opacity: 1; transform: scale(1.2) rotate(4deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes rt-word-pulse { from { scale: 1; } to { scale: 1.04; } }
@keyframes rt-burst { 0% { opacity: 0.95; } 100% { opacity: 0; } }
.btn.big.home-btn { justify-self: center; width: auto; padding-inline: 40px; color: var(--cloth); background: var(--night); }
@media (prefers-reduced-motion: reduce) {
  /* without animation, show "Take! That! Shot!" all at once instead of one by one */
  .finale-word-stage { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3em; height: auto; }
  .finale-word { position: static; opacity: 1; animation: none; font-size: clamp(3rem, 10vw, 8rem); }
  .rt-word, .boo-word { opacity: 1; animation: none; }
  .rt-burst, .boo-lightning, .boo-embers { display: none; }
  .boo-evil, .boo-face { animation: none; }
}

/* ---------- Discussion round ---------- */
.discuss-bg { background: radial-gradient(ellipse at 50% 120%, #2a9fb0 0%, #2b3f9a 42%, #140b3f 88%); color: #fff; }
.discuss-intro { overflow: hidden; padding: 0; }
.discuss { position: fixed; inset: 0; z-index: 4; overflow: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(6px, 1.6vh, 14px); padding: 16px clamp(16px, 5vw, 80px); text-align: center; }
.discuss > * { position: relative; z-index: 1; }
.discuss-bubbles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.discuss-bubbles span { position: absolute; bottom: -12vh; opacity: 0; filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.45)); animation: discuss-rise linear infinite; }
.discuss-bubbles.soft span { font-size: 3rem; filter: none; }
.discuss-bubbles.soft { opacity: 0.35; }
@keyframes discuss-rise {
  0% { transform: translate(0, 0) rotate(-8deg) scale(0.8); opacity: 0; }
  12% { opacity: 0.9; }
  50% { transform: translate(var(--sway), -58vh) rotate(8deg) scale(1); }
  88% { opacity: 0.9; }
  100% { transform: translate(calc(var(--sway) * -0.6), -125vh) rotate(-8deg) scale(1.1); opacity: 0; }
}
.discuss-beam { position: absolute; top: -10vh; width: 46vw; height: 130vh; background: linear-gradient(180deg, rgba(255, 244, 190, 0.5), rgba(255, 244, 190, 0) 78%); clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); transform-origin: 50% 0; animation: discuss-sweep 3.6s ease-in-out infinite alternate; pointer-events: none; }
.discuss-beam.left { left: 4vw; --from: -22deg; --to: 10deg; }
.discuss-beam.right { right: 4vw; --from: 22deg; --to: -10deg; animation-delay: -1.8s; }
@keyframes discuss-sweep { from { transform: rotate(var(--from)); } to { transform: rotate(var(--to)); } }
.discuss-stage { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: clamp(8px, 3vw, 48px); }
.discuss-words { display: grid; justify-items: center; gap: 0.02em; }
.discuss-word { font-size: min(11.5vw, 20vh); line-height: 1; color: #ffe14a; -webkit-text-stroke: 5px #14123a; paint-order: stroke fill; text-shadow: 8px 8px 0 #14123a, 0 0 30px rgba(255, 225, 74, 0.55); opacity: 0; animation: rt-word-in 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both, discuss-bob 1.6s ease-in-out 1.4s infinite alternate; }
@keyframes discuss-bob { from { translate: 0 0; } to { translate: 0 -1.2vh; } }
.discuss-face { font-size: min(12vw, 22vh); filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5)); animation: discuss-talk 0.7s ease-in-out infinite alternate; }
.discuss-face.right { animation-delay: -0.35s; }
@keyframes discuss-talk { from { transform: rotate(-9deg) scale(0.96); } to { transform: rotate(9deg) scale(1.06); } }
.discuss-title { margin: 0; font-size: clamp(2rem, 6vh, 4rem); color: #ffe14a; -webkit-text-stroke: 3px #14123a; paint-order: stroke fill; text-shadow: 4px 4px 0 #14123a; }
.discuss-sub { margin: 0; max-width: 40ch; font-size: clamp(1.1rem, 2.6vh, 1.7rem); color: #fff; }
.discuss-hint { margin: 0; font-size: 1.1rem; color: #bfe9f0; letter-spacing: 0.03em; }
.discuss-ring { --p: 0; position: relative; display: grid; place-items: center; width: clamp(110px, 21vh, 210px); aspect-ratio: 1; border-radius: 50%; background: conic-gradient(#ffe14a calc((1 - var(--p)) * 360deg), rgba(255, 255, 255, 0.2) 0); box-shadow: 0 0 28px rgba(255, 225, 74, 0.4); }
.discuss-ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #1c1a5e; }
.discuss.voting .discuss-ring { animation: discuss-pulse 0.9s ease-in-out infinite alternate; }
@keyframes discuss-pulse { from { transform: scale(1); } to { transform: scale(1.06); } }
.discuss-timer { position: relative; z-index: 1; width: auto; aspect-ratio: auto; padding: 0; font-size: clamp(2rem, 6.4vh, 4.2rem); color: #fff; background: none; border: 0; box-shadow: none; }
.discuss-timer.urgent { background: none; color: #ff8a8a; }
.discuss-votes { color: var(--ink); rotate: 0deg; }
.discuss-list-wrap { flex: 1 1 0; min-height: 0; width: min(1500px, 94vw); display: flex; align-items: center; overflow: auto; } /* scrolls only as a last resort, so the rows never run under the button */
.discuss-list { --cols: 1; --row-h: 40px; --fs: 20px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: var(--row-h); gap: 6px; width: 100%; margin: auto 0; }
.discuss-player { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 12px; font-size: var(--fs); line-height: 1; color: var(--ink); background: var(--cloth); border: 3px solid var(--ink); border-radius: var(--hand-sm); box-shadow: 3px 3px 0 var(--ink); opacity: 0; animation: discuss-pop 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.discuss-player.top { background: #ffe14a; animation: discuss-pop 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) both, discuss-glow 1.2s ease-in-out 0.6s infinite alternate; }
.discuss-player.away { opacity: 0.55; }
.discuss-rank { display: grid; place-items: center; flex: none; min-width: 1.6em; aspect-ratio: 1; padding-top: 0.1em; background: var(--ink); color: var(--cloth); border-radius: 50%; font-size: 0.85em; }
.discuss-name { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discuss-shots { font-size: 0.9em; white-space: nowrap; }
@keyframes discuss-pop { from { opacity: 0; transform: translateY(14px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes discuss-glow { from { box-shadow: 3px 3px 0 var(--ink), 0 0 0 rgba(255, 225, 74, 0); } to { box-shadow: 3px 3px 0 var(--ink), 0 0 22px rgba(255, 225, 74, 0.9); } }
.discuss-mini { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 5px; max-height: 38vh; overflow: auto; }
.discuss-mini li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 12px; font-size: 1.05rem; background: var(--cloth); border: 2.5px solid var(--ink); border-radius: var(--hand-sm); }
.discuss-shots-tag { margin-left: auto; padding-left: 8px; font-size: 0.8em; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .discuss-bubbles, .discuss-beam, .discuss-face, .discuss-word, .discuss-player, .discuss-ring { animation: none; }
  .discuss-word, .discuss-player { opacity: 1; }
}

/* ---------- "Take the shot for them" (phone, bottom right) ---------- */
.take-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); min-height: 64px; background: var(--cloth); border-top: var(--line); }
.take-bar[hidden] { display: none; }
.take-btn { flex: none; display: grid; justify-items: center; gap: 3px; padding: 6px 16px 4px; font: inherit; line-height: 1.25; color: var(--cloth); background: var(--berry); border: var(--line); border-radius: var(--hand-sm); box-shadow: 2px 3px 0 var(--ink); cursor: pointer; }
.take-btn span { font-size: 1.1rem; }
.take-btn small { font-size: 0.8rem; opacity: 0.9; }
.take-btn:disabled { color: #6f6f6f; background: #d3d0c8; border-color: #8a8a8a; box-shadow: none; cursor: not-allowed; }
.take-tip { position: relative; margin: 0 10px 0 0; min-width: 0; padding: 6px 12px; font-size: 1rem; line-height: 1.2; text-align: center; color: var(--ink); background: var(--sunny); border: 3px solid var(--ink); border-radius: var(--hand-sm); animation: take-tip-bob 0.9s ease-in-out infinite alternate; }
.take-tip::after { content: ""; position: absolute; right: -9px; top: 50%; width: 12px; height: 12px; background: var(--sunny); border-right: 3px solid var(--ink); border-top: 3px solid var(--ink); transform: translateY(-50%) rotate(45deg); }
@keyframes take-tip-bob { from { transform: translateX(0); } to { transform: translateX(-5px); } }
@media (prefers-reduced-motion: reduce) { .take-tip { animation: none; } }
.discuss.crowded { gap: 4px; padding-top: 10px; padding-bottom: 10px; }
.discuss.crowded .discuss-ring { width: clamp(64px, 11vh, 96px); }
.discuss.crowded .discuss-ring::before { inset: 7px; }
.discuss.crowded .discuss-timer { font-size: clamp(1.1rem, 3.2vh, 1.8rem); }
.discuss.crowded .discuss-sub, .discuss.crowded .discuss-hint { display: none; }
.discuss.crowded .discuss-title { font-size: clamp(1.4rem, 4vh, 2.4rem); }

/* ---------- many players: the lobby names and the finale lists fit the screen ---------- */
.lobby.crowded { grid-template-columns: minmax(200px, 250px) 1fr; gap: clamp(12px, 2vw, 28px); max-width: none; align-items: stretch; height: calc(100vh - 150px); }
.lobby.crowded .join-panel .game-code { font-size: 2rem; }
.lobby.crowded .join-panel { padding-inline: 14px; }
.lobby.crowded .join-panel { align-self: start; }
.lobby.crowded .lobby-side { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.lobby.crowded .lobby-side { align-items: flex-start; }
.lobby.crowded .lobby-side .tagline, .lobby.crowded .lobby-side .subtitle { display: none; }
.lobby.crowded .quiz-badge { margin: 2px 0 0; padding: 4px 12px 2px; font-size: 1.05rem; }
.lobby.crowded .joined-card { align-self: stretch; }
.lobby.crowded .lobby-side .btn.big { padding-block: 10px 6px; }
.lobby.crowded .lobby-side .logo { font-size: clamp(2rem, 4.5vw, 3.4rem); }
.lobby.crowded .joined-card { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; max-width: none; margin: 8px 0 10px; padding: 26px 14px 12px; }
.lobby.crowded .player-count { margin-bottom: 8px; }
.chips-wrap { flex: 1 1 0; min-height: 0; overflow: auto; display: flex; align-items: flex-start; }
.chips.fit { --cols: 1; --row-h: 36px; --fs: 18px; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: var(--row-h); gap: 6px; width: 100%; }
.chips.fit .chip { gap: 6px; min-width: 0; padding: 0 8px; font-size: var(--fs); line-height: 1; rotate: 0deg; animation: none; }
.chips.fit .chip-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips.fit .chip-kick { flex: none; margin-left: auto; padding: 0 5px; font-size: 0.75em; }
.final.wide { display: flex; flex-direction: column; align-items: center; height: calc(100vh - 150px); }
.final.wide .logo { font-size: clamp(2rem, 6vh, 3.6rem); }
.final.wide > * { flex: none; }
.finale-list-wrap { flex: 1 1 0 !important; min-height: 0; width: 100%; display: flex; align-items: center; overflow: auto; }
.finale-list-wrap .leaderboard { --cols: 1; --row-h: 48px; --fs: 24px; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: var(--row-h); gap: 8px; margin: auto 0; }
.finale-list-wrap .place, .finale-list-wrap .place.p1 { grid-template-columns: 1.8em minmax(0, 1fr) auto; gap: 8px; padding: 0 14px; font-size: var(--fs); line-height: 1; rotate: 0deg; }
.finale-list-wrap .lb-name { min-width: 0; }
.shot-banner { margin-bottom: 8px; }
.mini-timer.wide { width: auto; min-width: 3.2em; aspect-ratio: auto; padding-inline: 10px; border-radius: 999px; white-space: nowrap; } /* "0:20" is wider than "20" */

/* ---------- the default look: a blue and orange gradient ---------- */
/* Only the background changes: no scene and no falling decorations. No colors are set here, so the minigames'
   animations and slides (which use the base colors) look exactly the same as in every other look. */
[data-theme="gradient"] body::before { background: linear-gradient(155deg, #1c4fd0 0%, #2f84ee 38%, #ff9a3c 78%, #ff8a1f 100%); }
[data-theme="gradient"] .leaves { display: none; }

/* ---------- fire around the edges of a Shot O'Clock round ---------- */
.shot-fire { position: relative; isolation: isolate; }
.fire { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; filter: blur(0.7px); } /* a canvas painted by fire.js; the slight blur smooths the stair-steps of its small cells */

/* ---------- one lettering for every minigame slide, with a twist for each game ---------- */
/* Everything on the slides that introduce a game uses the same fonts as the MINIGAME logo and the questions
   (the title font). Each game then dresses it up its own way, always keeping the words easy to read. */
.rt-word, .boo-word, .finale-intro-text, .explain, .explain strong, .intro-hint, .shot-hint {
  font-family: var(--title);
  font-weight: 400;
  letter-spacing: 0.04em;
}
.explain { font-size: clamp(0.95rem, 1.3vw, 1.2rem); line-height: 1.35; }

/* Roulette Time: a casino. Green felt under a spotlight, red velvet curtains with gold trim, a valance of blinking
   gold lights and a big roulette wheel turning behind everything, with cards, chips and dice drifting down. The
   lettering is polished gold; the wheel is red and black with gold; the answers are poker chips. Light text goes on
   dark colors and dark text on gold, so everything stays easy to read. */
.rt { position: relative; isolation: isolate; }
.casino { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #04281a; }
.rt-intro .casino { z-index: 0; }
.casino-felt { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, #14925a 0%, #0b6a40 36%, #05341f 78%, #031c10 100%); }
.casino-felt::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 15px), repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 15px); }
.casino-wheel { position: absolute; left: 50%; top: 50%; width: 92vh; margin: -46vh 0 0 -46vh; opacity: 0.2; }
.casino-wheel svg { display: block; width: 100%; height: auto; }
.cw-spin { transform-box: view-box; transform-origin: 100px 100px; animation: rt-spin 90s linear infinite; }
@keyframes rt-spin { to { transform: rotate(360deg); } }
.casino-beam { position: absolute; top: 0; left: 50%; width: 80vw; height: 100%; margin-left: -40vw; background: linear-gradient(180deg, rgba(255, 244, 200, 0.3), rgba(255, 244, 200, 0.04) 85%); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); animation: casino-sway 7s ease-in-out infinite alternate; }
@keyframes casino-sway { from { transform: translateX(-3vw); } to { transform: translateX(3vw); } }
.casino-curtain { position: absolute; top: 0; bottom: 0; width: 12vw; background: repeating-linear-gradient(90deg, #5a0710 0 1.1vw, #a3131f 1.1vw 2.5vw, #7b0c17 2.5vw 3.4vw); }
.casino-curtain.left { left: 0; border-right: 0.6vmin solid #d9a521; box-shadow: inset -1.6vw 0 2.4vw rgba(0, 0, 0, 0.6), 0.8vmin 0 2vmin rgba(0, 0, 0, 0.6); }
.casino-curtain.right { right: 0; border-left: 0.6vmin solid #d9a521; box-shadow: inset 1.6vw 0 2.4vw rgba(0, 0, 0, 0.6), -0.8vmin 0 2vmin rgba(0, 0, 0, 0.6); }
.casino-rail { position: absolute; left: 0; right: 0; bottom: 0; height: 8vh; background: linear-gradient(180deg, #4a2610 0%, #1f0e05 100%); border-top: 0.8vmin solid #d9a521; box-shadow: 0 -1vmin 2.4vmin rgba(0, 0, 0, 0.55); }
.casino-valance { position: absolute; top: 0; left: 0; right: 0; height: 9vh; display: flex; background: linear-gradient(180deg, #5a0710, #8a0f1b); box-shadow: 0 1vmin 2vmin rgba(0, 0, 0, 0.55); }
.casino-valance span { flex: 1; height: 100%; border-radius: 0 0 50% 50% / 0 0 40% 40%; background: linear-gradient(180deg, #a3131f, #6a0a14); border-bottom: 0.7vmin solid #d9a521; border-inline: 1px solid rgba(217, 165, 33, 0.5); }
.casino-bulbs span { position: absolute; top: 9.6vh; width: 1.5vmin; height: 1.5vmin; margin-left: -0.75vmin; border-radius: 50%; background: #fff3b0; box-shadow: 0 0 1.4vmin 0.5vmin #ffc928; animation: casino-blink 1s steps(1) infinite; }
@keyframes casino-blink { 0% { opacity: 1; } 50% { opacity: 0.25; } }
.casino-floaters span { position: absolute; top: -10vh; animation: casino-fall linear infinite; }
.cf-glyph { font-size: 4.6vmin; color: #fff; text-shadow: 0 0 1vmin rgba(0, 0, 0, 0.6); opacity: 0.55; }
.cf-glyph.red { color: #e0314a; }
.cf-chip { width: 5.6vmin; height: 5.6vmin; border-radius: 50%; border: 0.9vmin dashed #fff; box-shadow: inset 0 0 0 0.5vmin rgba(0, 0, 0, 0.35), 0 0 1vmin rgba(0, 0, 0, 0.6); }
.cf-chip.chip-red { background: #c8102e; }
.cf-chip.chip-black { background: #1a1a1a; }
.cf-chip.chip-green { background: #12a150; }
.cf-chip.chip-blue { background: #1c4fa8; }
@keyframes casino-fall { from { transform: translateY(0) rotate(0); } to { transform: translateY(120vh) rotate(var(--spin, 360deg)); } }
.rt-words { position: relative; z-index: 1; }
.rt-burst { z-index: 2; }
.rt-intro { background: none; }
/* polished gold lettering with a dark red outline and a warm glow, like a casino sign */
.rt-word, .rt-title, .rt-title.small {
  color: transparent;
  background: linear-gradient(180deg, #fff6c4 0%, #ffd84a 34%, #d99a14 50%, #ffe78a 64%, #b9760a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 5px #4a0710;
  paint-order: stroke fill;
  text-shadow: none;
  filter: drop-shadow(0 6px 0 #2a0408) drop-shadow(0 0 20px rgba(255, 200, 60, 0.55));
}
.rt-title.small { -webkit-text-stroke: 4px #4a0710; filter: drop-shadow(0 4px 0 #2a0408) drop-shadow(0 0 16px rgba(255, 200, 60, 0.5)); }
.rt .rt-sub, .rt .rt-onspot { color: #fff3c4; -webkit-text-stroke: 2px #1b0a04; paint-order: stroke fill; text-shadow: 3px 3px 0 #1b0a04, 0 0 14px rgba(255, 200, 60, 0.5); }
.rt .rt-verdict { color: #fff; -webkit-text-stroke: 2px #1b0a04; border: 4px solid #d9a521; text-shadow: 3px 3px 0 #1b0a04; }
.rt .rt-verdict.win { background: #12a150; box-shadow: 0 0 24px rgba(255, 216, 74, 0.7), var(--lift); }
.rt .rt-verdict.lose { background: #b3122a; box-shadow: 0 0 24px rgba(255, 216, 74, 0.5), var(--lift); }
.rt .rt-q { border-color: #d9a521; box-shadow: 0 0 22px rgba(255, 216, 74, 0.6), 5px 6px 0 #1b0a04; }
.rt .timer { color: #fff; background: #b3122a; border: 4px dashed #fff; box-shadow: 0 0 0 4px #b3122a, 0 0 20px rgba(255, 216, 74, 0.7); }
.rt .rt-answer { color: #fff; -webkit-text-stroke: 1.5px #1b0a04; paint-order: stroke fill; border: 4px solid #d9a521; }
.rt .rt-answer.rust { background: #b3122a; }
.rt .rt-answer.pumpkin { background: #1a1a1a; }
.rt .rt-answer.mustard { background: #1c4fa8; }
.rt .rt-answer.olive { background: #12a150; }
.rt .rt-answer.right { outline: 6px solid #ffe14a; box-shadow: 0 0 34px #ffe14a, var(--lift); }
.rt-wheel { filter: drop-shadow(0 0 2vmin rgba(255, 216, 74, 0.45)); }
.rt .rt-seg { stroke: #d9a521; }
.rt .rt-seg.rust, .rt .rt-seg.mustard { fill: #b3122a; }
.rt .rt-seg.pumpkin, .rt .rt-seg.olive { fill: #161616; }
.rt .rt-seg-name { fill: #fff; }
.rt .rt-hub { fill: #d9a521; stroke: #4a0710; }
.rt .rt-pointer { fill: #ffe14a; stroke: #4a0710; }
.rt-intro .explain { color: #fff3c4; background: #05341f; border-color: #d9a521; box-shadow: 0 0 16px rgba(255, 216, 74, 0.5); }
.rt-intro .explain::before { background: #05341f; border-color: #d9a521; }

/* Revenge Round: haunted. Blood-red lettering that wobbles as if it were melting, with a ghostly glow, drifting
   fog and a black outline so it stays readable. */
.boo-word {
  font-size: min(13vw, 26vh); /* "REVENGE" is longer than the old word, so a little smaller */
  color: #d10000;
  -webkit-text-stroke: 8px #000;
  paint-order: stroke fill;
  text-shadow: 0 0 22px #ff1a1a, 0 0 50px #7a0000;
  filter: url(#haunt) drop-shadow(0 0 10px rgba(255, 26, 26, 0.7));
}
.boo-fog { position: absolute; left: -20%; right: -20%; bottom: -12%; height: 58%; z-index: 0; background: radial-gradient(ellipse at 30% 62%, rgba(255, 255, 255, 0.2), transparent 62%), radial-gradient(ellipse at 72% 72%, rgba(255, 220, 220, 0.16), transparent 64%); filter: blur(16px); animation: boo-fog 9s ease-in-out infinite alternate; pointer-events: none; }
@keyframes boo-fog { from { transform: translateX(-4%); } to { transform: translateX(5%); } }
.boo-intro .explain { color: #ffd9d2; background: #1a0000; border-color: #c21a1a; box-shadow: 3px 4px 0 #5c0000; }
.boo-intro .explain::before { background: #1a0000; border-color: #c21a1a; }

/* Discussion round: the yellow lettering stays (its twist is the spotlights and the floating speech bubbles). */

/* Shot O'Clock: the banner burns. */
.shot-intro .shot-banner { text-shadow: 0 0 10px #ff8a1f, 0 0 24px #e8304f; }

/* Question Time (a player writes a question): a neon "on air" sign. */
.neon-sign {
  color: #fff;
  background: #0d0a2b;
  border: 4px solid #ff4fd8;
  text-shadow: 0 0 8px #ff4fd8, 0 0 22px #ff4fd8, 0 0 44px #8b5cff;
  box-shadow: 0 0 18px #ff4fd8, inset 0 0 14px rgba(255, 79, 216, 0.5), 6px 7px 0 #3b0a66;
  animation: neon-flicker 3.2s linear infinite;
}
@keyframes neon-flicker { 0%, 19%, 21%, 62%, 64%, 100% { opacity: 1; } 20%, 63% { opacity: 0.55; } }

/* The finale: gold for the winners. */
.finale-intro-text { color: #ffe14a; text-shadow: 6px 6px 0 var(--ink), 0 0 30px rgba(255, 225, 74, 0.55); }
@media (prefers-reduced-motion: reduce) { .cw-spin, .casino-beam, .casino-bulbs span, .casino-floaters span, .boo-fog, .neon-sign { animation: none; } }

/* the colored dot next to a player's name (see playerDot in common.js) */
.dot { display: inline-block; flex: none; width: 0.8em; height: 0.8em; border-radius: 50%; background: var(--dot, #888); border: 2px solid var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
.name-with-dot { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }

/* "How to play" slides on the big screen */
.guide { min-height: 100vh; box-sizing: border-box; padding: 3vh 4vw 12vh; display: flex; flex-direction: column; align-items: center; gap: 2vh; }
.guide-label { margin: 0; padding: 8px 24px 4px; font-size: clamp(1.2rem, 2.2vw, 1.8rem); background: var(--sunny); border: var(--line); border-radius: var(--hand-sm); rotate: -2deg; }
.guide-body { flex: 1; min-height: 0; width: 100%; max-width: 1200px; display: flex; align-items: center; justify-content: center; gap: 5vw; }
.guide-device { position: relative; flex: none; height: 60vh; border: var(--line); border-radius: 22px; background: var(--cloth); box-shadow: var(--lift); overflow: hidden; }
.guide-device.phone { aspect-ratio: 390 / 844; }
.guide-device.screen { aspect-ratio: 16 / 9; height: auto; width: min(52vw, 100vh * 0.9); }
.guide-shot { display: block; width: 100%; height: 100%; object-fit: cover; }
.guide-mark { position: absolute; box-sizing: border-box; border: 5px solid var(--alarm); border-radius: 14px; box-shadow: 0 0 0 3px #fff, 0 0 18px rgba(227, 38, 47, 0.8); animation: guide-pulse 1.3s ease-in-out infinite; pointer-events: none; }
@keyframes guide-pulse { 50% { transform: scale(1.04); opacity: 0.55; } }
.guide-icon { font-size: 14vh; }
.guide-copy { max-width: 34vw; min-width: 260px; padding: 3vh 2vw; background: var(--cloth); border: var(--line); border-radius: var(--hand); box-shadow: var(--lift); }
.guide-title { margin: 0 0 1.5vh; font-family: var(--title); font-weight: 400; font-size: clamp(1.6rem, 3vw, 3rem); line-height: 1.1; }
.guide-text { margin: 0; font-size: clamp(1.1rem, 1.7vw, 1.7rem); line-height: 1.35; }
.guide-nav { display: flex; align-items: center; gap: 3vw; }
.guide-dots { display: flex; gap: 10px; }
.guide-dots .dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--ink); background: var(--cloth); }
.guide-dots .dot.on { background: var(--sunny); transform: scale(1.3); }
.guide-skip { position: fixed; left: 16px; bottom: 16px; font: inherit; font-size: 1rem; padding: 6px 12px; background: var(--cloth); border: var(--line); border-radius: var(--hand-sm); cursor: pointer; }
@media (max-width: 800px) { .guide-body { flex-direction: column; gap: 2vh; } .guide-copy { max-width: 90vw; } .guide-device { height: 34vh; } }
@media (prefers-reduced-motion: reduce) { .guide-mark { animation: none; } }

/* the winners podium */
.podium-stage { position: fixed; inset: 0; z-index: 4; box-sizing: border-box; padding: 3vh 4vw 3vh; display: flex; flex-direction: column; align-items: center; gap: 1vh; overflow: hidden; background: radial-gradient(ellipse at 50% 0%, #3a3f8f, #14163a 70%); }
.podium-title { margin: 0; z-index: 2; font-size: clamp(2.2rem, 5.5vw, 5rem); color: var(--cloth); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 5px 6px 0 var(--ink); }
.beam { position: absolute; top: -10vh; width: 22vw; height: 120vh; transform-origin: top center; background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0)); animation: beam-sway 5s ease-in-out infinite alternate; pointer-events: none; }
.beam.b0 { left: 4vw; --a: -16deg; } .beam.b1 { left: 28vw; --a: -3deg; animation-delay: -1.5s; } .beam.b2 { left: 52vw; --a: 6deg; animation-delay: -3s; } .beam.b3 { left: 74vw; --a: 16deg; animation-delay: -4s; }
@keyframes beam-sway { from { transform: rotate(var(--a)); } to { transform: rotate(calc(var(--a) * -0.6)); } }
.podium { z-index: 2; flex: 1; min-height: 0; width: 100%; max-width: 1000px; display: flex; align-items: flex-end; justify-content: center; gap: 2vw; }
.podium-col { flex: 1; max-width: 300px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.podium-who { text-align: center; opacity: 0; animation: podium-pop 0.5s cubic-bezier(0.3, 1.5, 0.6, 1) both; margin-bottom: 1vh; }
.podium-crown { font-size: clamp(1.6rem, 4.5vh, 3.4rem); line-height: 1; animation: finale-pulse 0.8s ease-in-out infinite alternate; }
.podium-name { display: block; font-family: var(--title); font-weight: 400; font-size: clamp(1.1rem, 2.5vw, 2.3rem); line-height: 1.05; color: var(--cloth); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); overflow-wrap: break-word; word-break: normal; }
.podium-score { display: inline-block; font-style: normal; margin-top: 4px; padding: 0 14px; font-size: clamp(1.1rem, 2vw, 1.7rem); background: var(--cloth); border: var(--line); border-radius: 10px; }
.podium-block { width: 100%; display: grid; place-items: start center; padding-top: 1.5vh; box-sizing: border-box; border: 4px solid var(--ink); border-radius: 10px 10px 0 0; box-shadow: 5px 6px 0 var(--ink); font-family: var(--title); font-size: clamp(2rem, 5vw, 4.5rem); color: var(--cloth); -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; transform-origin: bottom; animation: podium-rise 0.7s cubic-bezier(0.3, 1.3, 0.5, 1) both; }
.pc1 .podium-block { height: 30vh; background: linear-gradient(100deg, #8a5a00 0%, #f9e27a 18%, #d4a017 38%, #fff3b0 52%, #c58a0a 70%, #f6d65a 86%, #8a5a00 100%); }
.pc2 .podium-block { height: 21vh; background: linear-gradient(100deg, #6b7480 0%, #f4f7fa 18%, #aab3bd 38%, #ffffff 52%, #8e98a4 70%, #e3e8ed 86%, #6b7480 100%); }
.pc3 .podium-block { height: 15vh; background: linear-gradient(100deg, #6a3410 0%, #f0b27a 18%, #b8672a 38%, #ffd9b0 52%, #9a521c 70%, #e3a06a 86%, #6a3410 100%); }
@keyframes podium-rise { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@keyframes podium-pop { from { transform: translateY(20px) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.podium-main { z-index: 2; flex: 1; min-height: 0; width: 100%; display: flex; align-items: stretch; justify-content: center; gap: 2vw; }
.podium-main .podium { flex: 1 1 0; min-width: 0; max-width: none; width: auto; }
.podium-main.solo .podium { max-width: 1000px; }
.podium.slide { animation: podium-slide 0.9s cubic-bezier(0.5, 0, 0.2, 1) both; } /* starts centered (as if the list were not there), then slides left */
@keyframes podium-slide { from { transform: translateX(calc(var(--rest-w, 34vw) / 2)); } to { transform: none; } }
.podium-rest { flex: none; width: var(--rest-w, 34vw); min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 1vh; overflow: auto; animation: podium-rest-in 0.8s cubic-bezier(0.3, 1.1, 0.5, 1) both; }
@keyframes podium-rest-in { from { opacity: 0; transform: translateX(12vw); } to { opacity: 1; transform: none; } }
.podium-rest-title { margin: 0; text-align: center; font: 400 clamp(1.2rem, 2.4vw, 2rem)/1 var(--title); color: var(--cloth); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.podium-rest .leaderboard:not(.cols) { gap: 6px; }
.podium-rest .place { padding: 4px 16px 2px; font-size: 1.15rem; rotate: 0deg; }
.podium-rest .finale-list-wrap { flex: 1 1 0 !important; }
.podium-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 3; animation: podium-flash 0.6s ease-out forwards; } /* "forwards" only: with "both" the white start of the flash would show during the whole delay */
@keyframes podium-flash { 0% { opacity: 0.9; } 100% { opacity: 0; } }
.confetti-layer { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.confetti { position: absolute; top: -4vh; width: 12px; height: 20px; border-radius: 2px; opacity: 0; animation: confetti-fall linear infinite; }
.confetti.c0 { background: var(--sunny); } .confetti.c1 { background: var(--alarm); } .confetti.c2 { background: var(--night); } .confetti.c3 { background: var(--grass); } .confetti.c4 { background: var(--pumpkin); } .confetti.c5 { background: #fff; }
.confetti.shape { width: 30px; height: 30px; font-size: 30px; background: none; border-radius: 0; }
@keyframes confetti-fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(112vh) rotate(720deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .beam, .confetti, .podium-crown, .podium-flash { animation: none; } .confetti-layer, .podium-flash { display: none; } .podium-who, .podium-block, .podium-rest, .podium.slide { animation: none; opacity: 1; } }

/* Revenge Round: lightning, shaking, a jump-scare, and tombstones for the picks */
.boo-bolt { position: absolute; top: 0; width: 14vw; height: 70vh; background: #fff; opacity: 0; pointer-events: none; filter: drop-shadow(0 0 14px #ff5a5a) drop-shadow(0 0 40px #ff0000); clip-path: polygon(52% 0, 30% 38%, 48% 38%, 22% 100%, 74% 46%, 54% 46%, 80% 0); animation: boo-lightning 2.6s linear infinite; }
.boo-bolt.b1 { left: 14%; }
.boo-bolt.b2 { right: 12%; transform: scaleX(-1); animation-delay: -0.15s; }
.boo-stage { animation: boo-quake 2.6s linear infinite; }
@keyframes boo-quake { 0%, 8%, 14%, 100% { translate: 0 0; } 9% { translate: -14px 8px; } 10% { translate: 12px -10px; } 11% { translate: -9px 6px; } 12% { translate: 6px -4px; } 13% { translate: -3px 2px; } }
.boo-scare { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: #b00000; opacity: 0; pointer-events: none; animation: boo-scare 0.9s ease-out both; }
.boo-scare span { font-size: 100vmin; line-height: 1; filter: drop-shadow(0 0 60px #000); }
@keyframes boo-scare { 0% { opacity: 0; transform: scale(0.1); } 10% { opacity: 1; transform: scale(0.8); } 35% { opacity: 1; transform: scale(1.15); } 100% { opacity: 0; transform: scale(1.6); } }
.boo-rows { display: grid; gap: clamp(12px, 3vh, 30px); margin: 0; padding: 0; list-style: none; width: min(1100px, 94vw); }
.boo-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 0.6fr) minmax(0, 1fr); align-items: center; gap: 12px; }
.boo-booer { justify-self: end; text-align: right; font-size: clamp(1.6rem, 3.6vw, 3rem); color: var(--cloth); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); overflow-wrap: anywhere; }
.boo-line { height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, #6b1111 0 14px, transparent 14px 26px); }
.boo-line.lit { background: #ff3b30; box-shadow: 0 0 10px 2px #ff3b30, 0 0 30px 8px rgba(255, 40, 20, 0.7); animation: boo-line-glow 1.2s ease-in-out infinite alternate; }
@keyframes boo-line-glow { from { opacity: 0.7; } to { opacity: 1; } }
.tomb { justify-self: start; min-width: min(300px, 30vw); max-width: 100%; box-sizing: border-box; padding: clamp(14px, 3vh, 28px) 20px clamp(10px, 2vh, 18px); display: grid; justify-items: center; gap: 2px; text-align: center; background: linear-gradient(100deg, #5b5f66, #9aa0a8 40%, #6d7279 75%, #4a4e54); border: 4px solid #17181a; border-radius: 50% 50% 6px 6px / 38% 38% 6px 6px; box-shadow: 5px 6px 0 #000, 0 0 26px rgba(255, 50, 30, 0.45); }
.tomb-rip { font-size: clamp(0.9rem, 1.6vw, 1.3rem); letter-spacing: 0.15em; color: #2c2f33; }
.tomb-name { font-family: var(--title); font-weight: 400; font-size: clamp(1.5rem, 3.4vw, 2.8rem); line-height: 1.05; color: #f2f2f2; -webkit-text-stroke: 2px #17181a; paint-order: stroke fill; text-shadow: 2px 3px 0 #17181a; overflow-wrap: anywhere; }
.tomb.empty { opacity: 0.55; filter: saturate(0.5); animation: tomb-wait 1.6s ease-in-out infinite alternate; }
@keyframes tomb-wait { from { translate: 0 0; } to { translate: 0 -5px; } }
.boo-row.fresh .tomb { animation: tomb-rise 0.7s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.boo-row.fresh .boo-line { animation: boo-line-flash 0.7s ease-out both; }
@keyframes tomb-rise { from { transform: translateY(40px) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes boo-line-flash { from { filter: brightness(3); } to { filter: none; } }
@media (prefers-reduced-motion: reduce) { .boo-bolt, .boo-scare, .boo-stage, .tomb.empty, .boo-line.lit, .boo-row.fresh .tomb, .boo-row.fresh .boo-line { animation: none; } .boo-bolt, .boo-scare { display: none; } }

/* the icon set (public/js/icons.js) */
.ico-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1em; height: 1em; vertical-align: -0.14em; overflow: visible; flex: none; filter: drop-shadow(0.045em 0.065em 0 var(--ink)); }
.i * { stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.i .wedge { stroke-linecap: butt; }
.i .nostroke { stroke: none !important; }
.i .f-y { fill: #f6c624; } .i .f-m { fill: #fde23a; } .i .f-o { fill: #e57d26; } .i .f-r { fill: #c8452d; } .i .f-b { fill: #1f5fa6; }
.i .f-g { fill: #6f9a2e; } .i .f-w { fill: #fffdf6; } .i .f-k { fill: #1b1b1b; } .i .f-s { fill: #aab3bd; } .i .f-p { fill: #5f5596; }
.i .f-n { fill: none; } .i .f-br { fill: #8a5a2b; } .i .f-tan { fill: #d9a05b; } .i .f-pu { fill: #8d6bd0; } .i .f-sk { fill: #f2b98a; } .i .f-pkl { fill: #f7b6a6; }
.i .f-red { fill: #e3262f; } .i .f-pk { fill: #ec6aa0; } .i .f-a { fill: #e0891a; } .i .f-sd { fill: #7d838c; }
.i .thin { stroke-width: 2.4; }
.i .hl { stroke: #fffdf6; stroke-width: 3; }
.i .sx0 { stroke:#1b1b1b;stroke-width:8 }
.i .sx1 { stroke:#e3262f;stroke-width:3.6 }
.i .sx2 { stroke:#1f5fa6 }
.i .sx3 { stroke:#fffdf6;stroke-width:2 }
.i .sx4 { stroke:#fffdf6 }
.i .sx5 { stroke:#c8452d;stroke-width:15;stroke-dasharray:7.66 7.66 }
.i .sx6 { stroke:#fffdf6;stroke-width:15;stroke-dasharray:7.66 7.66;stroke-dashoffset:-7.66 }
.i .sx7 { stroke:#f6c624;stroke-width:2.4 }
.i .sx8 { stroke:#5b3a17 }
.i .sx9 { stroke:#1b1b1b;stroke-width:5;stroke-linecap:butt }
.i .sx10 { stroke:#1b1b1b;stroke-width:10 }
.i .sx11 { stroke:#a8732f;stroke-width:5 }
.i .sx12 { stroke:#1b1b1b;stroke-width:13 }
.i .sx13 { stroke:#6f9a2e;stroke-width:7 }
.i .sx14 { stroke:#e3262f;stroke-width:7 }
.i .sx15 { stroke:#1f5fa6;stroke-width:7 }
.i .sx16 { stroke:#1b1b1b;stroke-width:15 }
.i .sx17 { stroke:#e3262f;stroke-width:9 }

/* the haunted house behind the Revenge Round intro */
.boo-house { position: absolute; left: 50%; bottom: -3vh; width: min(120vh, 100vw); translate: -50% 0; transform-origin: 50% 80%; animation: boo-dolly 6.5s cubic-bezier(0.5, 0, 0.9, 0.6) both; pointer-events: none; }
.boo-house svg { display: block; width: 100%; height: auto; overflow: visible; }
@keyframes boo-dolly { from { transform: scale(0.85); } to { transform: scale(2.6); } }
.boo-house .hh-moon { fill: #f2e8b8; filter: drop-shadow(0 0 14px rgba(255, 240, 170, 0.8)); }
.boo-house .hh-crater { fill: #d6c98e; }
.boo-house .hh-tree path { fill: none; stroke: #0b0204; stroke-width: 5; stroke-linecap: round; }
.boo-house .hh-ground { fill: #0b0204; }
.boo-house .hh-house * { fill: #14060a; stroke: #4a1016; stroke-width: 1.6; stroke-linejoin: round; }
.boo-house .hh-trim path { fill: none; stroke: #2c0b10; stroke-width: 2; }
.boo-house .hh-win * { fill: #ffb42a; stroke: #1a0608; stroke-width: 2; filter: drop-shadow(0 0 5px #ff9a00); animation: hh-flicker 3.2s steps(1) infinite; }
.boo-house .hh-win *:nth-child(2n) { animation-delay: -0.9s; } .boo-house .hh-win *:nth-child(3n) { animation-delay: -1.7s; } .boo-house .hh-win *:nth-child(5n) { animation-delay: -2.4s; }
@keyframes hh-flicker { 0%, 100% { opacity: 1; } 12% { opacity: 0.35; } 18% { opacity: 1; } 55% { opacity: 0.8; } 60% { opacity: 0.25; } 66% { opacity: 1; } }
.boo-house .hh-bars path { fill: none; stroke: #1a0608; stroke-width: 2; }
.boo-house .hh-door { fill: #e3262f; stroke: #1a0608; stroke-width: 2; filter: drop-shadow(0 0 8px #ff2a1a); }
.boo-house .hh-step { fill: #14060a; stroke: #4a1016; stroke-width: 1.4; }
.boo-house .hh-fence path { fill: #14060a; stroke: #4a1016; stroke-width: 1.2; }
.boo-doorlight { position: absolute; left: 50%; top: 52%; width: 14vmin; height: 14vmin; margin: -7vmin 0 0 -7vmin; border-radius: 50%; background: radial-gradient(circle, #fff6d0 0%, #ff4a2a 45%, #b00000 80%); opacity: 0; pointer-events: none; z-index: 5; animation: boo-doorlight 1.1s ease-in both; }
@keyframes boo-doorlight { 0% { opacity: 0; transform: scale(0.2); } 20% { opacity: 1; } 100% { opacity: 1; transform: scale(16); } }
.boo-bat { position: absolute; left: -10vw; font-size: 7vmin; pointer-events: none; animation: boo-bat-fly 9s linear infinite; }
.boo-bat:nth-of-type(2) { font-size: 5vmin; animation-duration: 11s; } .boo-bat:nth-of-type(3) { font-size: 9vmin; animation-duration: 8s; }
@keyframes boo-bat-fly { 0% { transform: translate(0, 0) rotate(-6deg); } 25% { transform: translate(30vw, -4vh) rotate(6deg); } 50% { transform: translate(60vw, 3vh) rotate(-6deg); } 75% { transform: translate(90vw, -3vh) rotate(6deg); } 100% { transform: translate(120vw, 2vh) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .boo-house, .boo-bat, .boo-house .hh-win * { animation: none; } .boo-doorlight { display: none; } }

/* the Discussion round's "time to vote" animation */
.discuss-transition .vote-pulse { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.discuss-transition .vote-pulse span { grid-area: 1 / 1; width: 20vmin; height: 20vmin; border-radius: 50%; border: 0.8vmin solid rgba(255, 225, 74, 0.8); opacity: 0; animation: vote-pulse 2.4s ease-out infinite; }
.discuss-transition .vote-pulse span:nth-child(2) { animation-delay: 0.8s; } .discuss-transition .vote-pulse span:nth-child(3) { animation-delay: 1.6s; }
@keyframes vote-pulse { 0% { opacity: 0.9; transform: scale(0.4); } 100% { opacity: 0; transform: scale(5.5); } }
.discuss-transition .intro-bar { position: absolute; left: 50%; bottom: 14vh; translate: -50% 0; width: min(560px, 70vw); z-index: 1; }
@media (prefers-reduced-motion: reduce) { .discuss-transition .vote-pulse span { animation: none; } }
.look-up-eyes, .shot-glass { display: flex; justify-content: center; gap: 0.1em; margin-bottom: 0.18em; }
.look-up-eyes .ico, .shot-glass .ico { vertical-align: 0; }
.boo-redwash { position: absolute; inset: 0; z-index: 5; background: #c21a1a; opacity: 0; pointer-events: none; animation: boo-redwash 0.6s ease-in both; }
@keyframes boo-redwash { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .boo-redwash { display: none; } }
@media (prefers-reduced-motion: reduce) { .dress { display: none; } }

/* ---------- the vote recap (public/js/recap.js): one slide per round, a card per person picked, a speech bubble per voter ---------- */
.recap { position: fixed; inset: 0; z-index: 4; container-type: size; overflow: hidden; background: linear-gradient(180deg, var(--dusk) 0%, var(--lavender) 40%, var(--peach) 72%, var(--gold) 100%); font-family: var(--title); color: var(--cloth); }
.recap * { box-sizing: border-box; }
.rc-tag { position: absolute; left: 2.4cqw; top: 1.4cqh; z-index: 3; font-family: var(--text); font-size: 1.5cqw; background: var(--cloth); color: var(--ink); border: 0.3cqw solid var(--ink); border-radius: 1cqw; padding: 0.1cqw 0.9cqw; }
.rc-ctl { position: absolute; right: 2.4cqw; top: 1.2cqh; z-index: 3; display: flex; gap: 1cqw; }
.rc-ctl .btn { font-size: 1.5cqw; padding: 0.35cqw 1.3cqw; }
.rc-q { position: absolute; left: 5cqw; right: 5cqw; top: 8cqh; margin: 0; text-align: center; font-weight: 400; font-size: var(--qs, 5cqw); line-height: 1.1; color: var(--cloth); -webkit-text-stroke: 0.3cqw var(--ink); paint-order: stroke fill; }
.rc-empty { position: absolute; left: 0; right: 0; top: 55cqh; margin: 0; text-align: center; font-size: 3cqw; color: var(--ink); }
.rc-cols { position: absolute; left: 3cqw; right: 3cqw; top: var(--ct, 39cqh); bottom: 2cqh; display: flex; gap: calc(1.2cqw * var(--s, 1)); justify-content: center; }
.rc-col { flex: 1 1 0; min-width: 0; max-width: 15cqw; display: flex; flex-direction: column; align-items: center; }
.recap.choice .rc-col { max-width: 22cqw; }
.rc-col.singles { flex: 3 1 0; max-width: none; }
.rc-col.wide { flex: 2.2 1 0; max-width: none; }
.rc-col.wide .rc-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0.8cqw; }
.rc-face { position: relative; width: 100%; background: var(--cloth); color: var(--ink); border: 0.35cqw solid var(--ink); border-radius: 1.4cqw 0.5cqw 1.3cqw 0.6cqw; box-shadow: 0.35cqw 0.45cqw 0 var(--ink); padding: calc(1.2cqw * var(--s, 1)) 0.3cqw; margin-bottom: calc(1.6cqh + 0.8cqw); text-align: center; font-size: calc(2.4cqw * var(--s, 1)); line-height: 1; }
.recap.choice .rc-face { font-size: calc(1.8cqw * var(--s, 1)); }
.rc-face small { display: block; margin-top: 0.4cqh; font-family: var(--text); font-size: calc(1.8cqw * var(--s, 1)); color: var(--muted); white-space: nowrap; }
.rc-col.win .rc-face { background: var(--sunny); }
.rc-nm { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recap.choice .rc-nm { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.rc-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(var(--nh, 6cqh) * 0.3 + 0.9cqw); width: 100%; }
.rc-col.singles .rc-stack { display: flex; flex-wrap: wrap; align-content: flex-start; gap: calc(0.9cqw + 0.8cqh) 0.8cqw; }
.rc-v { position: relative; display: flex; align-items: center; height: var(--nh, 6cqh); padding: 0 0.4cqw; background: #fff; color: var(--ink); border: 0.3cqw solid var(--ink); border-radius: 1.6cqw; font-family: var(--text); font-size: min(1.9cqw, calc(var(--nh, 6cqh) * 0.55)); line-height: 1.1; }
.rc-v::before { content: ""; position: absolute; top: -0.72cqw; left: 1.3cqw; width: 0.9cqw; height: 0.9cqw; background: #fff; border-left: 0.3cqw solid var(--ink); border-top: 0.3cqw solid var(--ink); rotate: 45deg; }
.rc-col.singles .rc-v { width: auto; max-width: 100%; flex: none; height: min(var(--nh, 6cqh), 4.4cqh); font-size: min(1.7cqw, calc(min(var(--nh, 6cqh), 4.4cqh) * 0.5)); }
.rc-tx { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recap .dot { width: min(1.5cqw, calc(var(--nh, 6cqh) * 0.4)); height: min(1.5cqw, calc(var(--nh, 6cqh) * 0.4)); margin-right: 0.6cqw; border-width: 0.25cqw; vertical-align: middle; }
.recap.crowd .dot { display: none; }
.rc-burst { position: absolute; left: 50%; bottom: calc(100% + 0.5cqh); translate: -50% 0; z-index: 2; width: max(4cqw, calc(6cqw * var(--s, 1))); aspect-ratio: 1; display: grid; place-items: center; background: var(--sunny); color: var(--ink); font-family: var(--title); font-size: max(0.9cqw, calc(1.3cqw * var(--s, 1))); line-height: 1; clip-path: polygon(50% 0, 61% 20%, 82% 10%, 80% 34%, 100% 40%, 84% 58%, 98% 78%, 74% 78%, 70% 100%, 52% 84%, 32% 100%, 28% 78%, 2% 80%, 16% 58%, 0 38%, 22% 34%, 20% 10%, 40% 20%); animation: rc-pop 0.5s both; }
.pop-in { animation: rc-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.recap.settled .pop-in { animation: none; }
@keyframes rc-pop { from { transform: translateY(-14cqh) scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
.finale-losers .recap-btn { background: var(--sunny); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .pop-in, .rc-burst { animation: none; } }
.btn.big.recap-btn { justify-self: center; width: auto; padding-inline: 40px; }

/* the closing "Thanks for playing!" slide of the recap */
.recap.thanks { display: grid; place-content: center; justify-items: center; gap: 6cqh; text-align: center; }
.rc-thanks { margin: 0; font-size: 11cqw; line-height: 1.05; color: var(--moon); -webkit-text-stroke: 0.5cqw var(--ink); paint-order: stroke fill; text-shadow: 0.6cqw 0.8cqw 0 var(--ink); animation: shot-slam 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.rc-ctl-thanks { position: static; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2cqw; }
@media (prefers-reduced-motion: reduce) { .so-slam { display: none; } .rc-thanks { animation: none; } }

/* ---------- the home page opening: the title floats down from the top to the middle of an empty screen, then the page fades in ---------- */
.home-title {
  position: fixed; left: 50%; top: 50%; z-index: 6; margin: 0; width: max-content; max-width: 92vw; text-align: center; pointer-events: none;
  translate: -50% -50%; font-size: clamp(2.8rem, 10vw, 7rem); line-height: 1; text-wrap: balance;
  animation: home-float 4s both;
}
/* It drifts down slowly and lands in the middle at 3 seconds, in step with the first 3 seconds of the intro song
   (public/audio/intro-song.mp3), bobs once, and has faded away completely by 4 seconds; only then does the page fade
   in (home-reveal below), so the two never overlap. */
@keyframes home-float {
  0% { transform: translateY(-75vh); opacity: 0; animation-timing-function: cubic-bezier(0.3, 0.5, 0.4, 1); }
  10% { opacity: 1; }
  75% { transform: translateY(0); animation-timing-function: ease-in-out; }
  82% { transform: translateY(-1.2vh); animation-timing-function: ease-in-out; }
  88% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(0); opacity: 0; }
}
.home-intro .card, .home-intro .corner-bar, .home-intro .corner-login { animation: home-reveal 0.8s ease 4s both; }
@keyframes home-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .home-title { display: none; }
  .home-intro .card, .home-intro .corner-bar, .home-intro .corner-login { animation: none; }
}

/* ---------- the logo's two colors: SWEET is bright pink and BITTER? is neon green, tuned for each look ----------
   Only the logo reads these; no other color on the platform changes. */
:root { --sweet: #ff3d9a; --bitter: #39ff14; }
[data-theme="thanksgiving"] { --sweet: #ff5a8a; --bitter: #9dff3a; }
[data-theme="christmas"] { --sweet: #ff5fa8; --bitter: #2dff6e; }
[data-theme="halloween"] { --sweet: #ff3dcb; --bitter: #7dff1a; }
[data-theme="spring"] { --sweet: #ff4fa3; --bitter: #4dff6a; }
[data-theme="summer"] { --sweet: #ff3e8f; --bitter: #35ff6a; }
.logo .sweet { color: var(--sweet); }
.logo .bitter { color: var(--bitter); }

/* ---------- the colors of the people who join the lobby: they follow the theme ----------
   Blue & Orange and Thanksgiving set nothing here, so they keep the original yellow, peach and green. */
.joined-card .chip { background: var(--lobby-1, var(--sunny)); }
.joined-card .chip:nth-child(3n + 2) { background: var(--lobby-2, var(--chip-a)); }
.joined-card .chip:nth-child(3n) { background: var(--lobby-3, var(--chip-b)); }
[data-theme="christmas"] { --lobby-1: #f0766e; --lobby-2: #8fd19e; --lobby-3: #eef6ff; }
[data-theme="halloween"] { --lobby-1: #ff9a3c; --lobby-2: #c9a0f0; --lobby-3: #b6ec6a; }
[data-theme="spring"] { --lobby-1: #ffb3d1; --lobby-2: #d9c2ff; --lobby-3: #bff0c8; }
[data-theme="summer"] { --lobby-1: #7fe3ea; --lobby-2: #ff9f8a; --lobby-3: #ffe27a; }

/* the x2 button beside "Take their shot": the room votes to make a shot a double */
.dbl-btn { background: var(--sunny); color: var(--ink); min-width: 74px; }
.dbl-btn span { font-size: 1.5rem; line-height: 1; }
.dbl-btn:disabled { color: #6f6f6f; background: #d3d0c8; }
