:root {
  --ink: #12061f;
  --ink-2: #1e0c33;
  --ink-3: #2c1449;
  --pink: #ff2d8a;
  --gold: #ffc83d;
  --cyan: #2de2ff;
  --red: #ff3b3b;
  --green: #3dff9a;
  --text: #fbefff;
  --muted: #b9a3cf;
  --line: rgba(255, 255, 255, 0.12);
  --display: "Bungee", "Impact", system-ui, sans-serif;
  --body: "Outfit", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--ink); color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
input { font: inherit; }
.hidden { display: none !important; }

/* avatars */
.av { width: var(--s); height: var(--s); flex: 0 0 var(--s); border-radius: 50%; display: inline-block; overflow: hidden; box-shadow: 0 0 0 3px var(--ring), 0 6px 18px rgba(0, 0, 0, .45); background: var(--ring); position: relative; }
.av svg, .av img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* type */
.logo { font-family: var(--display); line-height: .9; letter-spacing: .01em; color: var(--gold); text-shadow: 0 0 18px rgba(255, 200, 61, .55), 4px 4px 0 var(--pink); }
.logo b { color: var(--pink); text-shadow: 0 0 18px rgba(255, 45, 138, .6), 4px 4px 0 #6b0f3c; font-weight: 400; }
.kicker { font-family: var(--display); font-size: 14px; letter-spacing: .14em; color: var(--pink); text-transform: uppercase; }
.muted { color: var(--muted); }

/* buttons */
.btn { background: var(--pink); color: #fff; font-family: var(--display); font-size: 20px; padding: 16px 22px; border-radius: 14px; box-shadow: 0 6px 0 #9b0f52, 0 10px 30px rgba(255, 45, 138, .35); transition: transform .08s, box-shadow .08s, opacity .2s; letter-spacing: .02em; }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 #9b0f52; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.gold { background: var(--gold); color: #2a1300; box-shadow: 0 6px 0 #a87400, 0 10px 30px rgba(255, 200, 61, .3); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); font-family: var(--body); font-weight: 700; font-size: 16px; }
.btn.block { width: 100%; }

/* ======================= PHONE ======================= */
.phone { max-width: 520px; margin: 0 auto; min-height: 100%; padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.phone header { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.phone header .logo { font-size: 26px; text-shadow: 2px 2px 0 var(--pink); }
.phone header .logo b { text-shadow: 2px 2px 0 #6b0f3c; }
.phone header .who { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; color: var(--muted); }
.field input { background: var(--ink); border: 2px solid var(--ink-3); border-radius: 12px; padding: 14px; color: var(--text); font-size: 20px; outline: none; }
.field input:focus { border-color: var(--pink); }
.field input.code { font-family: var(--display); font-size: 34px; letter-spacing: .3em; text-transform: uppercase; text-align: center; }
.err { color: var(--red); font-weight: 700; min-height: 1.2em; }
h2 { font-family: var(--display); font-weight: 400; margin: 0; font-size: 26px; line-height: 1.05; }
h3 { margin: 0; font-size: 18px; }
.chars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.chars button { background: none; padding: 4px; border-radius: 50%; position: relative; min-width: 0; }
.chars button .av { width: 100%; height: auto; aspect-ratio: 1; flex: none; }
.chars button[aria-pressed="true"] .av { box-shadow: 0 0 0 4px var(--gold), 0 0 22px var(--gold); }
.chars button:disabled { opacity: .25; }
.charinfo { display: flex; gap: 14px; align-items: center; }
.charinfo p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { text-align: left; background: var(--ink-3); border-radius: 14px; padding: 16px; font-size: 18px; font-weight: 700; border: 2px solid transparent; }
.opt[aria-pressed="true"] { border-color: var(--gold); background: #3d1d0a; }
.progress { height: 8px; background: var(--ink-3); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--gold)); transition: width .3s; }
.row { display: flex; gap: 10px; align-items: center; }
.row.spread { justify-content: space-between; }
.waitlist { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { background: var(--ink-3); padding: 6px 12px; border-radius: 99px; font-size: 14px; font-weight: 700; }
.role { border-radius: 20px; padding: 18px; text-align: center; cursor: pointer; user-select: none; }
.role.culprit { background: linear-gradient(135deg, #5a0018, #b0002d); box-shadow: 0 0 40px rgba(255, 59, 59, .35); }
.role.innocent { background: linear-gradient(135deg, #0b3a4a, #0f6b6b); }
.role.covered { background: var(--ink-3); }
.role h2 { font-size: 30px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.person { background: var(--ink-3); border-radius: 16px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; border: 2px solid transparent; text-align: center; }
.person[aria-pressed="true"] { border-color: var(--gold); background: #3d1d0a; }
.timer { font-family: var(--display); font-size: 44px; color: var(--gold); text-align: center; }
.timer.low { color: var(--red); animation: pulse .5s infinite alternate; }
.reacts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.reacts button { font-size: 44px; padding: 22px 0; border-radius: 20px; background: var(--ink-3); }
.reacts button span { display: block; font-size: 15px; font-family: var(--display); margin-top: 6px; }
.reacts button:active { transform: scale(.94); }
.bigq { font-size: 22px; font-weight: 800; line-height: 1.25; }
textarea { width: 100%; background: var(--ink); color: var(--text); border: 2px solid var(--ink-3); border-radius: 12px; padding: 12px; font: inherit; font-size: 16px; resize: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--red); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; z-index: 50; max-width: 90vw; }
.photoBtn { display: flex; gap: 8px; }
.photoBtn label { flex: 1; }

/* ======================= TV ======================= */
.tv { position: fixed; inset: 0; overflow: hidden; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #0d0418; }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, rgba(10, 2, 20, .75) 100%); }
.stage { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 3vh 3vw calc(3vh + 84px); gap: 2vh; pointer-events: none; }
.stage > * { pointer-events: auto; }
.tv .glass { background: rgba(18, 6, 31, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 24px; }
.tv-top { display: flex; align-items: center; gap: 2vw; }
.tv-top .logo { font-size: clamp(28px, 4vw, 64px); }
.roomcode { margin-left: auto; text-align: right; padding: 12px 22px; }
.roomcode small { display: block; font-weight: 700; color: var(--muted); font-size: clamp(12px, 1.1vw, 18px); }
.roomcode b { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4.4vw, 80px); letter-spacing: .12em; color: var(--gold); line-height: 1; }
.tv-main { flex: 1; display: flex; gap: 2vw; min-height: 0; }
.tv-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2.4vh; min-width: 0; }
.tv-side { width: min(30vw, 460px); padding: 20px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; scrollbar-width: none; }
.tv-side > * { flex-shrink: 0; }
.tv h1 { font-family: var(--display); font-weight: 400; margin: 0; font-size: clamp(30px, 5vw, 90px); line-height: .95; text-shadow: 0 6px 30px rgba(0, 0, 0, .6); }
.tv .lead { font-size: clamp(18px, 2vw, 34px); font-weight: 700; max-width: 60vw; line-height: 1.25; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.tv-players { display: flex; flex-wrap: wrap; justify-content: center; gap: 2vw; padding: 20px 26px; }
.tv-player { display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 800; font-size: clamp(14px, 1.3vw, 22px); position: relative; }
.tv-player .tick { position: absolute; top: -6px; right: -6px; background: var(--green); color: #002a12; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; box-shadow: 0 0 14px var(--green); }
.tv-player.off { opacity: .35; }
.clue { background: rgba(255, 200, 61, .08); border-left: 4px solid var(--gold); padding: 12px 14px; border-radius: 10px; font-size: clamp(14px, 1.15vw, 19px); line-height: 1.35; animation: slidein .6s both; }
.clue.seen { animation: none; }
.clue b { color: var(--gold); font-family: var(--display); font-weight: 400; font-size: .8em; display: block; letter-spacing: .1em; margin-bottom: 4px; }
.crime-title { font-family: var(--display); color: var(--red); font-size: clamp(30px, 5vw, 92px); line-height: .95; text-shadow: 0 0 30px rgba(255, 59, 59, .7), 4px 4px 0 #3a0010; }
.tape { background: repeating-linear-gradient(-45deg, #ffd400 0 30px, #111 30px 60px); color: #111; font-family: var(--display); font-size: clamp(16px, 1.6vw, 28px); padding: 10px 40px; transform: rotate(-2deg); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.tape span { background: #ffd400; padding: 2px 14px; }
.faceoff { display: flex; align-items: center; justify-content: center; gap: 4vw; }
.faceoff .who { display: flex; flex-direction: column; align-items: center; gap: 12px; font-weight: 800; font-size: clamp(16px, 1.6vw, 28px); }
.faceoff .who small { font-family: var(--display); font-size: .6em; color: var(--pink); letter-spacing: .12em; }
.vs { font-family: var(--display); font-size: clamp(30px, 4vw, 70px); color: var(--gold); }
.question { font-size: clamp(22px, 2.6vw, 46px); font-weight: 800; max-width: 62vw; line-height: 1.2; padding: 22px 30px; }
.ring { --p: 1; width: clamp(90px, 9vw, 150px); aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--p) * 360deg), rgba(255, 255, 255, .08) 0); display: grid; place-items: center; position: relative; }
.ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--ink); }
.ring span { position: relative; font-family: var(--display); font-size: clamp(30px, 3.4vw, 60px); color: var(--gold); }
.ring.low { --gold: var(--red); animation: pulse .5s infinite alternate; }
.meter { display: flex; gap: 22px; font-family: var(--display); font-size: clamp(18px, 1.8vw, 30px); }
.floaters { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.floaters span { position: absolute; bottom: -60px; font-size: 56px; animation: float 2.6s ease-out forwards; }
.controls { position: absolute; right: 3vw; bottom: 3vh; display: flex; gap: 12px; align-items: center; }
.controls .hint { color: var(--muted); font-weight: 700; font-size: 14px; }
.tally { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.4vw; }
.tally .tv-player .votes { font-family: var(--display); color: var(--gold); font-size: 1.3em; }
.verdict { font-family: var(--display); font-size: clamp(40px, 7vw, 130px); line-height: .9; }
.verdict.busted { color: var(--pink); text-shadow: 0 0 40px var(--pink), 6px 6px 0 #4a0022; animation: slam .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.verdict.escaped { color: var(--cyan); text-shadow: 0 0 40px var(--cyan), 6px 6px 0 #003a44; animation: slam .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.scores { display: flex; flex-direction: column; gap: 8px; }
.scores .row { font-weight: 800; font-size: clamp(14px, 1.2vw, 20px); }
.scores .pts { margin-left: auto; font-family: var(--display); color: var(--gold); }
.scores .gain { color: var(--green); font-size: .85em; }
.splash { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4vh; text-align: center; padding: 20px; }
.splash .logo { font-size: clamp(60px, 11vw, 200px); }
.splash p { font-size: clamp(16px, 1.6vw, 26px); font-weight: 700; max-width: 760px; text-shadow: 0 2px 10px #000; }
.flash { display: none; }
.flash.on { opacity: 1; transition: opacity .25s; }
.cinema::before, .cinema::after { content: ""; position: absolute; left: 0; right: 0; height: 11vh; background: #000; z-index: 5; animation: bars .8s both; }
.cinema::before { top: 0; } .cinema::after { bottom: 0; }
.caption { position: absolute; left: 0; right: 0; bottom: 14vh; text-align: center; font-family: var(--display); font-size: clamp(18px, 2.4vw, 42px); color: var(--gold); text-shadow: 0 2px 16px #000; z-index: 6; animation: fadein 1s both; }
.audiorow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; font-weight: 700; }
.audiorow label { cursor: pointer; }
.chip { background: var(--ink-3); border-radius: 99px; padding: 8px 14px; }

@keyframes pulse { to { opacity: .55; transform: scale(1.04); } }
@keyframes slidein { from { opacity: 0; transform: translateX(30px); } }
@keyframes float { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-80vh) scale(1.3) rotate(20deg); opacity: 0; } }
@keyframes slam { from { transform: scale(3); opacity: 0; } }
@keyframes bars { from { height: 0; } }
@keyframes fadein { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; } }

/* fallback backdrop when the 3D mansion can't load */
.no3d .tv { background: radial-gradient(ellipse at 50% 120%, #ff2d8a55, transparent 60%), radial-gradient(ellipse at 20% 0%, #2de2ff33, transparent 50%), linear-gradient(#12061f, #2a0b3d); }

/* ======================= full-body figures ======================= */
.fig { position: relative; display: inline-block; height: var(--h); width: calc(var(--h) * 120 / 280); flex: none; filter: drop-shadow(0 10px 14px rgba(0,0,0,.5)); }
.fig svg { width: 100%; height: 100%; display: block; }
.fig-face { position: absolute; left: 21%; top: 3%; width: 58%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 2px solid #170c08; }
.fig.dim { filter: brightness(.35) grayscale(.6); }

/* ======================= TV: big moments ======================= */
.blackout { position: absolute; inset: 0; background: #000; z-index: 20; display: grid; place-items: center; pointer-events: none; animation: blackout 3.2s ease-in-out forwards; }
.blackout span { font-family: var(--display); color: #fff; font-size: clamp(30px, 4vw, 70px); letter-spacing: .2em; opacity: 0; animation: fadein 1s .5s forwards, fadeout .6s 2.2s forwards; }
@keyframes blackout { 0%, 70% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes fadeout { to { opacity: 0; } }
.seq > * { animation: rise .7s cubic-bezier(.2,.9,.3,1.2) both; }
.seq > *:nth-child(1) { animation-delay: 2.9s; } .seq > *:nth-child(2) { animation-delay: 3.4s; } .seq > *:nth-child(3) { animation-delay: 4.4s; } .seq > *:nth-child(4) { animation-delay: 5.4s; }
@keyframes rise { from { opacity: 0; transform: translateY(40px) scale(.96); } }
.type { overflow: hidden; white-space: nowrap; border-right: .08em solid var(--red); max-width: 0; animation: typing 1.6s steps(28, end) 3.4s forwards, caret .7s step-end 3.4s 4; }
@keyframes typing { to { max-width: 100%; } }
@keyframes caret { 50% { border-color: transparent; } }
.side-in { animation: sidein .8s cubic-bezier(.2,.9,.3,1) both; }
@keyframes sidein { from { opacity: 0; transform: translateX(60px); } }
.warn { font-size: 13px; color: #ffb4b4; font-weight: 700; border-top: 1px solid var(--line); padding-top: 10px; }
.clue.fake { border-left-color: var(--red); background: rgba(255,59,59,.12); }
.clue.fake b::after { content: "  · PLANTED"; color: var(--red); }

.face2 { display: flex; align-items: flex-end; justify-content: center; gap: 3vw; }
.face2 .who { display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 800; font-size: clamp(16px, 1.5vw, 26px); text-shadow: 0 2px 10px #000; }
.face2 .who small { font-family: var(--display); font-size: .6em; color: var(--pink); letter-spacing: .12em; }
.face2 .L { animation: fromleft .7s cubic-bezier(.2,.9,.3,1.1) both; }
.face2 .R { animation: fromright .7s cubic-bezier(.2,.9,.3,1.1) both; }
.face2 .mid { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 40px; }
.slam { animation: slam .45s .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes fromleft { from { opacity: 0; transform: translateX(-40vw) rotate(-8deg); } }
@keyframes fromright { from { opacity: 0; transform: translateX(40vw) rotate(8deg); } }
.stamp { font-family: var(--display); color: var(--red); border: .12em solid var(--red); padding: .1em .4em; border-radius: 10px; transform: rotate(-8deg); font-size: clamp(28px, 4vw, 70px); text-shadow: 0 0 20px rgba(255,59,59,.5); animation: stampin .4s cubic-bezier(.2,1.6,.4,1) both; background: rgba(20,0,0,.45); }
@keyframes stampin { from { transform: rotate(-8deg) scale(3); opacity: 0; } }

.evidence-card { perspective: 900px; }
.evidence-card .question { animation: flipin .8s cubic-bezier(.2,.9,.3,1) both; transform-origin: center; }
@keyframes flipin { from { transform: rotateX(90deg); opacity: 0; } }

/* police lineup */
.lineup { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 1.6vw; padding: 26px 34px 14px; border-radius: 18px;
  background: repeating-linear-gradient(to top, rgba(255,255,255,.14) 0 2px, transparent 2px 28px), linear-gradient(#20232c, #14161c); border: 1px solid var(--line); }
.lineup .slot { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; animation: rise .6s both; }
.lineup .slot:nth-child(2) { animation-delay: .08s; } .lineup .slot:nth-child(3) { animation-delay: .16s; } .lineup .slot:nth-child(4) { animation-delay: .24s; } .lineup .slot:nth-child(5) { animation-delay: .32s; } .lineup .slot:nth-child(6) { animation-delay: .4s; } .lineup .slot:nth-child(7) { animation-delay: .48s; } .lineup .slot:nth-child(8) { animation-delay: .56s; } .lineup .slot:nth-child(9) { animation-delay: .64s; } .lineup .slot:nth-child(10) { animation-delay: .72s; }
.lineup .num { font-family: var(--display); background: #f2f2f2; color: #111; padding: 2px 10px; border-radius: 4px; font-size: clamp(12px, 1vw, 18px); }
.lineup .nm { font-weight: 800; font-size: clamp(12px, 1.1vw, 18px); }
.lineup .tick { position: absolute; top: 4px; right: -6px; background: var(--green); color: #002a12; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; box-shadow: 0 0 14px var(--green); }
.lineup .votes { font-family: var(--display); color: var(--gold); font-size: clamp(14px, 1.4vw, 24px); }
.lineup .slot.culprit .fig { filter: drop-shadow(0 0 24px var(--pink)) drop-shadow(0 10px 14px rgba(0,0,0,.5)); }

/* alibi reel */
.alibi-show { display: flex; align-items: center; gap: 3vw; }
.bubble { position: relative; background: #fffaf0; color: #1a1010; border-radius: 26px; padding: 26px 34px; font-size: clamp(20px, 2.4vw, 42px); font-weight: 800; max-width: 52vw; line-height: 1.2; box-shadow: 0 16px 40px rgba(0,0,0,.45); animation: pop .5s cubic-bezier(.2,1.6,.4,1) both; }
.bubble::before { content: ""; position: absolute; left: -22px; top: 46%; border: 14px solid transparent; border-right: 22px solid #fffaf0; }
.bubble small { display: block; font-size: .5em; color: #7a5a6a; margin-top: 10px; font-weight: 700; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.dots { display: flex; gap: 8px; } .dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.25); } .dots i.on { background: var(--gold); }

.scorebar { height: 12px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 4px; }
.scorebar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--gold)); width: 0; animation: grow 1.2s .3s cubic-bezier(.2,.9,.3,1) forwards; }
@keyframes grow { to { width: var(--w); } }
.scores .row { flex-wrap: wrap; }
.scores .row .scorebar { flex-basis: 100%; }

/* ======================= phone polish ======================= */
.phone main, .phone > * { animation: rise .35s ease-out both; }
.phone .fig { --h: 150px; }
.pill.pleaded { background: var(--red); }
.btn.danger { background: #d4243f; box-shadow: 0 6px 0 #7a0f22, 0 10px 30px rgba(212,36,63,.35); }
.btn.dark { background: #2a1a3a; box-shadow: 0 6px 0 #120a1a; }
.plant { border: 2px dashed var(--red); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.counter { text-align: right; font-size: 13px; color: var(--muted); }
.hero-fig { display: flex; justify-content: center; margin: -6px 0 -10px; }
@media (prefers-reduced-motion: reduce) { .type { max-width: none; border: 0; } }

/* survey overlay: see-through so the dancing shows */
.survey-box { background: rgba(18, 6, 31, .28); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); border: 1px solid rgba(255,255,255,.18); border-radius: 22px; padding: 16px 26px; display: flex; flex-direction: column; gap: 10px; align-items: center; text-shadow: 0 2px 10px rgba(0,0,0,.9); max-width: 70vw; }
.survey-box .pill { background: rgba(44, 20, 73, .55); }

.react-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2vw; animation: rise .7s 5.6s both; }
.react-row .who { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 800; font-size: clamp(12px, 1vw, 16px); text-shadow: 0 2px 8px #000; }
.react-row .fig { animation: tremble .12s infinite alternate; }
.react-row .who:nth-child(2n) .fig { animation-duration: .09s; }
@keyframes tremble { from { transform: translate(-1.5px, 0) rotate(-1deg); } to { transform: translate(1.5px, -1px) rotate(1deg); } }

/* the arrest */
.arrest { display: flex; align-items: flex-end; justify-content: center; gap: 2.4vw; }
.arrest .who { display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 800; font-size: clamp(14px, 1.3vw, 22px); text-shadow: 0 2px 10px #000; position: relative; }
.arrest .cop-in { animation: fromright 1.6s cubic-bezier(.2,.8,.3,1) both; }
.arrest .bubble { position: absolute; top: 4%; width: max-content; max-width: 24vw; font-size: clamp(15px, 1.5vw, 26px); padding: 16px 22px; text-shadow: none; }
.arrest .bubble.perp { right: calc(100% + 6px); } .arrest .bubble.cop { left: calc(100% + 6px); background: #e8eefc; }
.arrest .bubble::before { top: 30px; left: auto; right: -21px; border: 14px solid transparent; border-left: 22px solid #fffaf0; border-right: 0; }
.arrest .bubble.cop::before { right: auto; left: -21px; border-left: 0; border-right: 22px solid #e8eefc; }

/* deduction tools */
.mini { background: var(--cyan); color: #06222a; font-weight: 800; font-size: 12px; padding: 4px 9px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.tag { background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-left: 4px; vertical-align: middle; }
.card.notes { border: 2px solid var(--cyan); }
.card.notes p { margin: 10px 0 0; font-weight: 700; }
.scenecard { padding: 12px 22px; font-size: clamp(15px, 1.5vw, 24px); }
.scenecard b { color: var(--gold); }
.tools-hint { color: var(--muted); font-weight: 700; font-size: clamp(14px, 1.3vw, 20px); }
.tv-notice { position: absolute; left: 50%; top: 12%; transform: translateX(-50%); z-index: 40; background: rgba(18, 6, 31, .92); border: 2px solid var(--cyan); color: #fff; padding: 14px 26px; border-radius: 16px; font-weight: 800; font-size: clamp(16px, 1.8vw, 30px); box-shadow: 0 0 30px rgba(45, 226, 255, .45); animation: noticeIn .4s ease; max-width: 80vw; text-align: center; }
@keyframes noticeIn { from { opacity: 0; transform: translate(-50%, -20px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* landing hub */
.hub { position: relative; display: flex; flex-direction: column; gap: 18px; padding-top: 18px; overflow: hidden; }
.hub-glow { position: absolute; inset: -20% -30% auto; height: 340px; background: radial-gradient(closest-side, rgba(255, 45, 138, .35), transparent); filter: blur(10px); animation: hubPulse 3.2s ease-in-out infinite; pointer-events: none; z-index: -1; }
@keyframes hubPulse { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.hub-logo { font-size: clamp(64px, 22vw, 108px); text-align: center; animation: hubFlicker 5s infinite; }
@keyframes hubFlicker { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .55; } 94% { opacity: 1; } 96% { opacity: .7; } 97% { opacity: 1; } }
.hub-tag { text-align: center; margin: 0; font-size: 17px; font-weight: 700; color: var(--muted); line-height: 1.35; }
.hub-tag b { color: var(--text); }
.hub-crew { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.hub-crew span { animation: hubBob 2.4s ease-in-out infinite; animation-delay: var(--d); }
@keyframes hubBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.hub-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; text-decoration: none; padding: 20px 22px; }
.hub-btn .big { font-size: 26px; }
.hub-btn small { font-family: var(--body); font-weight: 700; font-size: 14px; opacity: .85; }
.hub-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.hub-steps li { display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 15px; }
.hub-steps li span { font-size: 22px; }
@media (prefers-reduced-motion: reduce) { .hub-glow, .hub-logo, .hub-crew span { animation: none; } }

/* secret word (round 2+): innocents see a word, the Nut sees nothing */
.role.secretcard.shown { background: linear-gradient(135deg, #4a3500, #8a5d00); box-shadow: 0 0 34px rgba(255, 196, 0, .25); }
.secret-emoji { font-size: 72px; line-height: 1.1; margin: 6px 0; }
.opt.secret-opt { border-color: var(--gold); }
.secret-banner { display: flex; flex-direction: column; gap: 6px; padding: 14px 24px; max-width: 60vw; border: 2px solid var(--gold); font-size: clamp(15px, 1.5vw, 24px); }
.secret-banner b { color: var(--gold); font-family: var(--display); letter-spacing: .04em; }
/* no double-tap-to-zoom delay on anything tappable */
button, .btn, .opt, .person, label, [data-role], [data-secret] { touch-action: manipulation; }
/* sworn statements (alibi round) */
.stmt { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.tag.match { background: var(--gold); color: #2a1a00; }
.polygraph { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 59, 59, .12); border: 2px solid var(--red); font-weight: 900; text-align: center; }
.bubble .match-tag, .match-tag { display: inline-block; background: var(--gold); color: #2a1a00; border-radius: 999px; padding: .1em .6em; font-size: .55em; font-weight: 900; vertical-align: middle; margin-left: .4em; }
.bubble .hint-line { display: block; margin-top: .4em; font-size: .7em; color: #5a2a00; }
.stmt-sub { font-size: clamp(11px, .95vw, 15px); color: var(--muted); text-align: center; max-width: 12vw; line-height: 1.25; }
/* Among Us style voter faces under each suspect */
.voters { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 12vw; min-height: 30px; }
/* TV music volume slider */
.controls .vol { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 14px; border: 2px solid var(--ink-3); font-size: 18px; }
.controls .vol input { width: 110px; accent-color: var(--pink); }
/* each player's answer under their name on the phone's vote buttons */
.person .ans { display: block; font-size: 13px; font-weight: 700; color: var(--gold); margin-top: 2px; }

/* ---- question rounds (TV): banner up top so the characters and their speech bubbles stay clear ---- */
.tv-banner { align-self: center; display: flex; align-items: center; gap: 22px; padding: 14px 24px; max-width: min(1100px, 80vw); text-align: left; }
.tv-banner-text { display: flex; flex-direction: column; gap: 4px; }
.tv-banner-main { font-size: clamp(20px, 2.3vw, 40px); font-weight: 900; line-height: 1.15; }
.tv-banner-sub { font-size: clamp(13px, 1.1vw, 18px); font-weight: 700; }
.ring.small { width: clamp(64px, 5.6vw, 96px); flex-shrink: 0; }
.ring.small::before { inset: 7px; }
.ring.small span { font-size: clamp(18px, 1.9vw, 32px); }

/* ---- the end: text up top, the Nut stays in view, tally + leaderboard in a panel on the right ---- */
.end-top { justify-content: flex-start; gap: .4vh; margin-top: -6vh; } /* tucked up under the logo row so it clears everyone's faces */
.end-top .verdict, .end-top h1 { font-size: clamp(28px, 3.8vw, 68px) !important; line-height: 1; }
.end-top > .lead { font-size: clamp(15px, 1.4vw, 24px); }
.end-lines { margin-top: auto; padding: 14px 22px; display: grid; gap: 8px; font-weight: 800; font-size: clamp(16px, 1.6vw, 26px); max-width: 70vw; }
.end-lines small { font-size: .65em; color: var(--muted); font-weight: 700; }
.end-panel { width: min(560px, 40vw); align-self: stretch; }
.end-head { font-weight: 900; font-size: clamp(16px, 1.4vw, 22px); }
.end-head .busted { font-family: var(--display); color: var(--pink); }
.end-head .escaped { font-family: var(--display); color: var(--cyan); }
.tally-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); animation: sidein .5s var(--d) cubic-bezier(.2, .9, .3, 1) both; }
.tally-row-top { display: flex; gap: 14px; align-items: baseline; font-size: clamp(15px, 1.2vw, 19px); }
.tally-row-top .right { color: var(--green); font-family: var(--display); }
.tally-row-top .wrong { color: var(--red); font-family: var(--display); }
.tally-q { font-size: clamp(12px, .95vw, 15px); font-weight: 700; color: var(--muted); }
.tally-q.nut { color: #ffb4c8; }

/* leaderboard: rows slide from last game's order into the new one, bars grow, scores count up */
.board { position: relative; width: 100%; flex-shrink: 0; }
.board-row { position: absolute; left: 0; right: 0; height: 52px; display: grid; grid-template-columns: 26px 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 12px 6px; border-radius: 12px; background: rgba(18, 6, 31, .7); border: 1px solid var(--line); text-align: left; animation: boardMove 1.1s .5s cubic-bezier(.4, 0, .2, 1) both; }
.board-row.nut { border-color: var(--pink); }
.board-rank { font-family: var(--display); font-size: 20px; color: var(--gold); text-align: center; }
.board-who { display: flex; flex-direction: column; min-width: 0; }
.board-name { font-weight: 900; font-size: clamp(14px, 1.15vw, 19px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-sub { font-size: 12px; font-weight: 700; color: var(--muted); }
.board-pts { font-family: var(--display); font-size: clamp(17px, 1.5vw, 24px); text-align: right; white-space: nowrap; }
.board-pts .gain { font-size: .6em; color: var(--green); margin-left: 6px; }
.board-bar { position: absolute; left: 12px; right: 12px; bottom: 5px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.board-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--gold)); animation: boardBar 2.2s .9s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes boardMove { from { transform: translateY(var(--from)); } }
@keyframes boardBar { from { width: var(--w0); } to { width: var(--w1); } }

/* how-to-play walkthrough during the dance party (bottom of the host screen) */
.guide { margin-top: auto; align-self: center; width: min(820px, 90vw); padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; animation: rise .5s cubic-bezier(.2, .9, .3, 1.2) both; }
.guide-slides { display: grid; } /* all slides share one cell; the card keeps the tallest one's height */
.guide-step { grid-area: 1 / 1; display: flex; gap: 18px; align-items: center; text-align: left; opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .6s ease; pointer-events: none; }
.guide-step.on { opacity: 1; transform: none; pointer-events: auto; }
.guide .dots i { transition: background .4s ease; }
@media (prefers-reduced-motion: reduce) { .guide-step { transition: none; transform: none; } }
.guide-emoji { font-size: clamp(36px, 3.6vw, 60px); }
.guide-head { font-size: clamp(20px, 2.1vw, 34px); font-weight: 900; line-height: 1.15; text-wrap: balance; }
.guide-text { color: var(--muted); font-weight: 700; font-size: clamp(14px, 1.2vw, 19px); margin-top: 4px; }
.guide-foot { display: flex; align-items: center; gap: 10px; }
.guide-foot .dots { margin-right: auto; }

/* ---------- v22: the ridiculous extras ---------- */
/* new evidence: a small card in the corner, clear of the faces and bubbles */
.evidence-card { position: fixed; left: 16px; bottom: 92px; width: min(340px, 34vw); display: flex; gap: 12px; align-items: center; padding: 10px 14px; font-weight: 700; font-size: clamp(11px, .95vw, 16px); line-height: 1.25; text-align: left; animation: evIn .6s cubic-bezier(.2, 1.4, .4, 1) both; z-index: 3; }
.evidence-emoji { font-size: clamp(28px, 2.6vw, 44px); line-height: 1; }
.evidence-card .kicker { white-space: nowrap; }
@keyframes evIn { from { transform: translateY(30px) scale(.8); opacity: 0; } }
/* the worst detective's dare, at the bottom of the leaderboard */
.dare { border: 2px solid var(--pink); border-radius: 14px; padding: 10px 14px; font-weight: 800; background: rgba(255, 45, 138, .12); }
.card.dare.mine { background: linear-gradient(135deg, #5a0030, #a0005a); border-color: transparent; }
/* phone: the suspect in the hot seat (steady red, no flashing) */
.defend-me { text-align: center; background: linear-gradient(135deg, #5a0018, #b0002d); }
.defend-me h2 { font-size: 34px; }
/* phone: the reaction bar */
.reacts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.react { font-size: 30px; padding: 8px 0; border-radius: 14px; background: var(--ink-3); border: 0; }
.react.pop { animation: reactPop .3s ease-out; }
@keyframes reactPop { 50% { transform: scale(1.25); } }

/* BUILD YOUR OWN look (same as Spit Happens) */
.buildBtns { display: flex; gap: 8px; }
.buildBtns .btn:first-child { flex: 1; }
.builder { display: flex; flex-direction: column; gap: 12px; }
.bopts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.bopts .swatch { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); min-width: 0; }
.bopts .lchip { padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .15); color: inherit; font: inherit; font-size: 14px; font-weight: 700; text-transform: capitalize; min-width: 0; }
.bopts [aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 12px var(--gold); }
.bopts .lchip[aria-pressed="true"] { background: rgba(255, 200, 61, .2); }