/* BLAF — 80s ARCADE CABINET × COMIC PICTURES.
   Black arcade monitor with a starfield + scanlines, Namco-style arcade lettering (BLAF Arcade) for
   HUD / labels / buttons, VT323 (CRT terminal) for longer text, the dithered pixel BLAF logo,
   comic pictures framed like an arcade game-select screen. Palette: yellow, cyan, orange, purple, red.
   Loaded after style.css and overrides it. */

:root {
  --ink: #0a0716; --night: var(--ink); --black: #05030c;
  --cream: #fff6e0; --cream2: #f3e6c4;
  --yellow: #ffd51f; --cyan: #1fd3f0; --orange: #ff5a1f; --purple: #8a4bff; --indigo: #3b2fe0; --red: #ff3b2f; --green: #1fd67a; --white: #ffffff;
  --pink: var(--orange); --lime: var(--green); --hot: var(--red); --violet: var(--purple); --mint: var(--cyan); --blue: var(--indigo);
  --panel: var(--black); --panel2: #15102a;
  --px: 'BLAF Arcade', monospace;
  --mono: 'VT323', monospace;
  --body: 'VT323', monospace;
  --scan: repeating-linear-gradient(0deg, rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px);
}
body { font-family: var(--body); font-weight: 400; font-size: 22px; line-height: 1.1; color: var(--white); }
h1, h2 { text-shadow: none; }

/* ---------- arcade monitor: black glass, starfield, scanlines, curved-glass vignette ---------- */
html, body { background: var(--black); }
#app {
  color: var(--white);
  background:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 72% 9%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 33% 61%, var(--cyan) 50%, transparent 51%), radial-gradient(1px 1px at 88% 44%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 54% 33%, var(--yellow) 50%, transparent 51%), radial-gradient(1px 1px at 8% 82%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 88%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 93% 74%, var(--orange) 50%, transparent 51%),
    radial-gradient(1px 1px at 41% 12%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 22% 47%, #fff 50%, transparent 51%),
    radial-gradient(120% 90% at 50% 40%, #16102e, var(--black) 75%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}
#app::before { z-index: 0; background: var(--scan); opacity: .6; -webkit-mask-image: none; mask-image: none; mix-blend-mode: normal; }
#app::after { content: ''; display: block; position: absolute; inset: 0; z-index: 40; pointer-events: none; transform: none; height: auto; left: 0; right: 0; opacity: 1;
  background: radial-gradient(130% 110% at 50% 50%, transparent 62%, rgba(0, 0, 0, .55)); -webkit-mask-image: none; mask-image: none; }
#top { background: linear-gradient(var(--black) 70%, transparent); padding-bottom: 8px; }
#dock { background: linear-gradient(transparent, var(--black) 40%); }
#tabs { display: none !important; }
@media (min-width: 640px) {
  body { background: radial-gradient(circle at 50% 30%, #241a3c, #07050d); }
  #app { border-radius: 30px / 24px; border: 16px solid #1b1724; box-shadow: 0 0 0 3px #000, 0 0 60px rgba(138, 75, 255, .35), 0 40px 80px rgba(0, 0, 0, .7); }
}
/* game worlds: a tinted glow on the glass */
#app.world-quiz { --glow: rgba(31, 211, 240, .18); } #app.world-comp { --glow: rgba(138, 75, 255, .22); } #app.world-party { --glow: rgba(255, 90, 31, .18); }
#app.world-creative { --glow: rgba(255, 213, 31, .16); } #app.world-social { --glow: rgba(255, 59, 47, .18); }
#app[class*="world-"]:not(.world-home) #scroller { background: radial-gradient(90% 60% at 50% 0%, var(--glow, transparent), transparent 70%); }
.enter .pop { animation: power-on .35s steps(4, end) both; animation-delay: calc(var(--i, 0) * 90ms); }

/* ---------- arcade HUD ---------- */
.ahud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; font-family: var(--px); font-size: 10px; line-height: 1.6; }
.ahud em { display: block; font-style: normal; color: var(--red); }
.ahud .up { color: var(--white); } .ahud .hi { text-align: center; color: var(--white); } .ahud .hi em { color: var(--red); }
.ahud .snd { justify-self: end; }
.ahud .back { justify-self: start; }
.snd, .back { font-family: var(--px); font-size: 9px; line-height: 1; color: var(--cyan); background: transparent; border: 2px solid var(--cyan); padding: 7px 7px 6px; box-shadow: none; text-transform: uppercase; }
.back { color: var(--yellow); border-color: var(--yellow); }
.back::before { content: '◀ '; }
.snd:active, .back:active { background: var(--cyan); color: var(--black); }
.topbar { display: flex; justify-content: space-between; align-items: center; }

/* ---------- logo + attract mode ---------- */
.mast { text-align: center; }
.logo-img { display: block; width: 94%; max-width: 380px; margin: 6px auto 0; transform: rotate(-7deg); image-rendering: pixelated; filter: drop-shadow(0 0 18px rgba(255, 213, 31, .25)); }
.enter .logo-img { animation: logo-in .7s steps(7, end) both; }
.mast-sub { display: block; margin-top: 22px; font-family: var(--px); font-size: 10px; line-height: 1.6; letter-spacing: .04em; color: var(--cyan); text-transform: uppercase; background: none; border: 0; box-shadow: none; transform: none; padding: 0; }
.attract { text-align: center; font-family: var(--px); text-transform: uppercase; padding: 4px 0 6px; }
.attract .blink { color: var(--yellow); font-size: 13px; animation: blink 1s steps(1) infinite; }
.attract .copy { margin-top: 12px; color: var(--white); font-size: 9px; letter-spacing: .04em; opacity: .85; }
.screen.home #body { justify-content: center; gap: 20px; }

/* ---------- comic pictures in arcade select frames ---------- */
.panel {
  --fc: var(--yellow); position: relative; display: block; width: 100%; padding: 0; overflow: hidden; text-align: left; background: var(--black);
  border: 3px solid var(--fc); outline: 3px solid var(--black); box-shadow: 0 0 0 6px color-mix(in srgb, var(--fc) 35%, transparent), 0 0 22px color-mix(in srgb, var(--fc) 30%, transparent);
  transition: transform .08s; transform: none;
}
.panel .art, .sheet-art .art { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; pointer-events: none; }
.home .panel .art { aspect-ratio: 16 / 8.4; }
.panel:active { transform: scale(.97); filter: brightness(1.25); }
.panel:focus-visible, .panel:hover { outline-color: var(--white); }
.cap {
  position: absolute; left: 0; top: 0; max-width: calc(100% - 44px); padding: 8px 10px 7px; background: var(--black); color: var(--fc);
  font-family: var(--px); font-size: 13px; line-height: 1.3; text-transform: uppercase; border: 0; border-right: 3px solid var(--fc); border-bottom: 3px solid var(--fc);
}
.ch { position: absolute; right: 0; top: 0; padding: 8px 8px 7px; background: var(--fc); color: var(--black); font-family: var(--px); font-size: 11px; line-height: 1.3; border: 0; }
.say {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: none; padding: 6px 10px 4px; background: rgba(5, 3, 12, .86); color: var(--white); border: 0; border-top: 3px solid var(--fc);
  font-family: var(--body); font-size: 22px; line-height: 1;
}
.say::before { content: '▶ '; color: var(--fc); animation: blink 1s steps(1) infinite; }
.panel:nth-of-type(1), .page .panel:nth-child(1) { --fc: var(--yellow); }
.panel:nth-of-type(2), .page .panel:nth-child(2) { --fc: var(--cyan); }
.page .panel:nth-child(3) { --fc: var(--orange); } .page .panel:nth-child(4) { --fc: var(--purple); } .page .panel:nth-child(5) { --fc: var(--red); }
.home .panel:nth-of-type(2) { --fc: var(--cyan); }

/* SELECT GAME: two per row, one screen */
.pagetitle { font-family: var(--px); font-size: 20px; line-height: 1.2; text-align: center; color: var(--yellow); margin: 2px 0 4px; text-shadow: 3px 3px 0 var(--red); transform: none; -webkit-text-stroke: 0; }
.page { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; padding: 4px; }
.page .panel .art { aspect-ratio: 1 / 1.05; }
.page .panel:last-child:nth-child(odd) { grid-column: 1 / -1; }
.page .panel:last-child:nth-child(odd) .art { aspect-ratio: 2.4 / 1; }
.page .panel .cap { font-size: 9px; padding: 6px 7px 5px; max-width: calc(100% - 30px); }
.page .panel .ch { font-size: 9px; padding: 6px 6px 5px; }
.page .panel .say { font-family: var(--px); font-size: 8px; padding: 6px 7px 5px; text-transform: uppercase; }
.screen.modes #body { gap: 12px; }

/* ---------- popups: a black screen sliding up ---------- */
.sheet { background: var(--black); color: var(--white); border-top: 3px solid var(--yellow); box-shadow: 0 -6px 0 var(--black), 0 -9px 0 var(--cyan), 0 -30px 60px rgba(31, 211, 240, .15); gap: 16px; }
.sheet::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--scan); opacity: .5; }
.sheet * { text-shadow: none; }
.sheet .grab { background: var(--cyan); border-radius: 0; }
.sheet-bg { background: rgba(0, 0, 0, .7); }
.sheet-art { --fc: var(--yellow); position: relative; border: 3px solid var(--fc); box-shadow: 0 0 22px color-mix(in srgb, var(--fc) 30%, transparent); background: var(--black); overflow: hidden; }
.sheet-art .art { aspect-ratio: 16 / 10; object-fit: contain; }   /* the whole picture, same shape as it is drawn */
.sheet > * { flex-shrink: 0; }   /* a long sheet (e.g. Czech) scrolls; it never squashes the picture into a strip */
.sheet-say { font-family: var(--body); font-size: 26px; line-height: 1.05; color: var(--white); }
.sheet-say i { display: inline-block; margin-left: 6px; padding: 4px 6px 3px; background: var(--red); color: var(--white); font-style: normal; font-family: var(--px); font-size: 9px; vertical-align: 4px; border: 0; }
.sheet h2, .sheet label { color: var(--white); }

/* ---------- buttons: lit arcade buttons ---------- */
.btn, .pill, .icon-btn { border: 3px solid var(--white); border-radius: 0; box-shadow: none; color: var(--white); background: var(--black); text-shadow: none; }
.btn { font-family: var(--px); font-size: 13px; line-height: 1.3; text-transform: uppercase; padding: 15px 14px 13px; flex-direction: column; gap: 8px; }
.btn small { font-family: var(--body); font-size: 21px; line-height: 1; text-transform: none; letter-spacing: 0; color: var(--cyan); opacity: 1; }
.btn.xl { font-size: 14px; }
.btn.go { background: var(--red); border-color: var(--yellow); color: var(--white); box-shadow: 0 6px 0 #9a1a12, 0 0 24px rgba(255, 59, 47, .45); animation: none; }
.btn.go small { color: var(--yellow); }
.btn.primary { background: var(--cyan); color: var(--black); }
.btn.skip { background: var(--panel2); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #9a1a12; filter: brightness(1.2); }
.pill { font-family: var(--px); font-size: 9px; padding: 8px 9px 7px; border-width: 2px; color: var(--yellow); border-color: var(--yellow); }
.pill.red { background: var(--red); color: var(--white); border-color: var(--red); } .pill.light { background: transparent; color: var(--cyan); border-color: var(--cyan); }
.pill:active, .icon-btn:active { background: var(--white); color: var(--black); transform: none; }
.icon-btn { font-family: var(--px); font-size: 14px; color: var(--red); border-color: var(--red); background: transparent; }
.input { border-radius: 0; border: 3px solid var(--cyan); background: var(--black); color: var(--white); font-family: var(--body); font-size: 26px; box-shadow: none; caret-color: var(--yellow); }
.input::placeholder { color: #5a5470; }
.input:focus { border-color: var(--yellow); box-shadow: 0 0 18px rgba(255, 213, 31, .3); }
.code-input { font-family: var(--px); font-size: 24px; letter-spacing: .35em; padding: 18px 10px 16px; text-align: center; color: var(--yellow); }

/* ---------- avatars: lit initials ---------- */
.av { background: var(--black); border: 3px solid var(--c); border-radius: 0; box-shadow: 0 0 12px color-mix(in srgb, var(--c) 45%, transparent); font-family: var(--px); color: var(--c); font-size: 20px; }
.av.lg { font-size: 26px; } .av.xl, .av.xxl { font-size: 40px; } .av.xs { font-size: 9px; } .av.sm { font-size: 13px; }
.av.xs, .av.sm { border-width: 2px; box-shadow: none; }
.av.dashed { background: transparent; border: 2px dashed var(--white); color: var(--white); box-shadow: none; }
.av .dot { box-shadow: none; border-radius: 0; }
.orb3d { background: var(--black); border: 3px solid var(--o); border-radius: 0; box-shadow: none; animation: none; font-family: var(--px); color: var(--o); }

/* ---------- lobby / game: black panels with lit frames ---------- */
.win, .card, .glass, .tile, .stat, .tcard, .invite-card, .person, .fav, .ach, .paper, .code-card {
  background: rgba(5, 3, 12, .9); color: var(--white); border: 3px solid var(--cyan) !important; border-radius: 0; box-shadow: none;
}
.card:nth-of-type(3n), .win:nth-of-type(3n) { border-color: var(--yellow) !important; }
.win *, .card *, .glass *, .tile *, .person *, .paper *, .code-card * { text-shadow: none; }
.win > header, .card-title, .tile .tbar { background: transparent; color: var(--yellow); border-bottom: 2px dashed currentColor; border-radius: 0; font-family: var(--px); font-size: 11px; text-transform: uppercase; }
.card-title span, .win > header i { font-family: var(--px); font-size: 9px; color: var(--white); opacity: .8; }
.card > .card-title { border-radius: 0; }
.small, .glass.small, .win .small, .card .small { color: inherit; }
.tbar:not(.tile .tbar) { background: var(--black); color: var(--white); border: 2px solid var(--cyan); border-radius: 0; box-shadow: none; }
.tbar.win:not(.tile .tbar) { border-color: var(--yellow); }
.tbar i { background: repeating-linear-gradient(90deg, var(--yellow) 0 6px, var(--orange) 6px 12px) !important; }
.tile .tbar { position: static; border: 0; border-bottom: 2px dashed currentColor; overflow: visible; }
.tile .tbar i { position: static; height: auto; width: auto; background: none !important; }
.seg button, .seg label span, .chip, .tag { background: transparent; color: var(--white); border: 2px solid #4b4466; border-radius: 0; box-shadow: none; text-shadow: none; font-family: var(--body); font-size: 21px; padding: 5px 9px 4px; }
.seg button.on, .seg input:checked + span, .chip.on { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.setting label, .card label { font-family: var(--px); font-size: 9px; text-transform: uppercase; color: var(--cyan); }
.code-card small { font-family: var(--px); font-size: 9px; text-transform: uppercase; color: var(--cyan); }
.code-card .code, .code-big .c { font-family: var(--px); color: var(--yellow); text-shadow: 3px 3px 0 var(--red); letter-spacing: .14em; }
.mode-tag { font-family: var(--px); font-size: 9px; text-transform: uppercase; background: transparent; color: var(--yellow); border: 2px solid var(--yellow); border-radius: 0 !important; padding: 7px 7px 6px; box-shadow: none; text-shadow: none; }
.status, .lead { color: var(--white); text-shadow: none; font-family: var(--body); font-size: 26px; } .status b { color: var(--yellow); }
.progress { color: var(--white); font-family: var(--px); font-size: 14px; text-shadow: none; } .progress small { font-family: var(--px); font-size: 9px; color: var(--red); }
.hint, .dock-note { color: inherit; text-shadow: none; }
.waiting { color: var(--cyan); text-shadow: none; font-family: var(--px); font-size: 10px; text-transform: uppercase; }
.ptile .pname { font-family: var(--body); font-size: 21px; color: var(--white); }
.bub { border-radius: 0; font-family: var(--px); font-size: 8px; color: var(--black); background: var(--yellow); border: 0; }
.crown { top: -24px; right: -14px; padding: 4px 5px 3px; background: var(--red); color: var(--white); border: 0; font-family: var(--px); font-size: 8px; filter: none; transform: none; }
.kick, .react-bar button, .icon-btn { border-radius: 0 !important; }
.rules summary { font-family: var(--px); font-size: 11px; color: var(--yellow); }

/* question + answers */
.question {
  background: rgba(5, 3, 12, .9); color: var(--white); border: 3px solid var(--yellow); border-radius: 0; box-shadow: 0 0 24px rgba(255, 213, 31, .2);
  font-family: var(--px); font-size: 16px; line-height: 1.6; text-shadow: none; min-height: 170px;
}
.question::before { content: 'Question'; position: absolute; left: 0; top: 0; padding: 6px 8px 5px; background: var(--yellow); color: var(--black); font-family: var(--px); font-size: 9px; text-transform: uppercase; border: 0; }
.question.small { font-size: 12px; box-shadow: none; } .question.small::before { display: none; }
.q-label { color: var(--cyan); }
.answer { --a: var(--yellow); border: 3px solid var(--a); border-radius: 0; box-shadow: inset 0 0 0 3px var(--black), 0 0 16px color-mix(in srgb, var(--a) 30%, transparent); color: var(--black); background: var(--a); text-shadow: none; }
.answer .txt { font-family: var(--px); font-size: 12px; line-height: 1.4; text-transform: uppercase; }
.answer .k { font-size: 18px; }
.answer.a0 { --a: var(--red); color: var(--white); } .answer.a1 { --a: var(--cyan); } .answer.a2 { --a: var(--yellow); } .answer.a3 { --a: var(--purple); color: var(--white); }
.answer:active:not(:disabled) { transform: scale(.97); filter: brightness(1.2); }
.answer.picked { outline: 3px solid var(--white); outline-offset: 3px; }
.answer.right { transform: none; animation: flash .5s steps(2) 3; }
.answer .count { font-family: var(--px); font-size: 12px; }
.answers.compact .answer { border-radius: 0; }
.banner { border: 3px solid currentColor; border-radius: 0; box-shadow: none; font-family: var(--px); font-size: 16px; line-height: 1.4; transform: none; background: var(--black); text-transform: uppercase; }
.banner.good { color: var(--yellow); } .banner.bad { color: var(--red); background: var(--black); }
.banner b { color: var(--white); }
.board .line { background: transparent; color: var(--white); border: 0 !important; border-bottom: 2px dashed #3a3354 !important; border-radius: 0; box-shadow: none; text-shadow: none; font-family: var(--px); font-size: 11px; padding: 10px 4px; }
.board .rank { color: var(--red); font-family: var(--px); font-size: 11px; } .board .pts { font-family: var(--px); color: var(--yellow); font-size: 11px; }
.board .gain { font-family: var(--px); font-size: 9px; color: var(--green); }
.board .line.me { background: transparent; color: var(--yellow); }
.final-title { font-family: var(--px); font-size: 18px; color: var(--yellow); text-shadow: 3px 3px 0 var(--red); }
.tagline { font-family: var(--px); color: var(--red); }
.secret { border: 3px solid var(--purple); border-radius: 0; box-shadow: 0 0 24px rgba(138, 75, 255, .3); background: var(--black); color: var(--white); text-shadow: none; }
.secret * { text-shadow: none; } .secret.cover b, .secret .word { color: var(--yellow); font-family: var(--px); }
.bubble { border-radius: 0; background: var(--black); color: var(--white); border-color: var(--cyan); box-shadow: none; font-family: var(--body); } .msg.mine .bubble { border-color: var(--yellow); }
.vote { color: var(--white); font-family: var(--body); }
.vote.on { outline: 3px solid var(--yellow); }

/* timer: arcade countdown */
.timer { background: conic-gradient(var(--yellow) calc(var(--p) * 360deg), #2a2440 0); border: 0; box-shadow: none; }
.timer span { background: var(--black); color: var(--yellow); font-family: var(--px); font-size: 13px; }
.timer.low { background: conic-gradient(var(--red) calc(var(--p) * 360deg), #2a2440 0); } .timer.low span { color: var(--red); }

/* reactions + toast */
.react-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }   /* 8 reactions = 2 rows of 4, never wider than the phone */
.react-bar button { font-family: var(--px); font-size: 8px; text-transform: uppercase; color: var(--cyan); background: var(--black); border: 2px solid var(--cyan); box-shadow: none; padding: 8px 4px 7px; filter: none; width: 100%; min-width: 0; height: auto; flex: none; white-space: nowrap; overflow: hidden; }
.float-react { font-family: var(--px); font-size: 20px; color: var(--yellow); text-shadow: 3px 3px 0 var(--red); text-transform: uppercase; -webkit-text-stroke: 0; transform: none; }
#toast { font-family: var(--px); font-size: 10px; line-height: 1.6; color: var(--yellow); background: var(--black); border: 3px solid var(--yellow); border-radius: 0; box-shadow: 0 0 20px rgba(255, 213, 31, .3); padding: 12px 14px; text-transform: uppercase; }
#toast::before, #toast::after { display: none; }
.confetti i { border: 0; border-radius: 0 !important; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes power-on { 0% { opacity: 0; filter: brightness(3); } 50% { opacity: 1; filter: brightness(2); } 100% { opacity: 1; filter: none; } }
@keyframes logo-in { 0% { opacity: 0; transform: rotate(-7deg) translateY(-40px); } 100% { opacity: 1; transform: rotate(-7deg); } }
@keyframes flash { 50% { filter: brightness(1.6); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
.vote { border-radius: 0 !important; background: var(--black) !important; border: 3px solid #4b4466 !important; box-shadow: none !important; }
.vote.on { border-color: var(--yellow) !important; outline: 0; box-shadow: 0 0 18px rgba(255, 213, 31, .35) !important; }
.waiting { border-radius: 0 !important; background: transparent !important; border: 0 !important; animation: blink 1.2s steps(1) infinite; }
.banner.good, .banner.bad { background: var(--black) !important; }

/* ===== space scene (cosmic mixtape vibe): drifting parallax stars, nebula, shooting stars, planet ===== */
#app { background: radial-gradient(120% 90% at 50% 40%, #140e2c, var(--black) 75%); }
#app::before { z-index: 1; }
.space { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.stars { position: absolute; left: 0; top: 0; border-radius: 50%; background: transparent; }
.stars.s1 { animation: drift 140s linear infinite; opacity: .55; }
.stars.s2 { animation: drift 80s linear infinite; opacity: .8; }
.stars.s3 { animation: drift 45s linear infinite, twinkle 3s ease-in-out infinite alternate; }
.nebula {
  position: absolute; left: -30%; right: -30%; top: -12%; height: 70%; filter: blur(28px); opacity: .75;
  background:
    radial-gradient(38% 30% at 30% 40%, rgba(224, 57, 160, .55), transparent 70%),
    radial-gradient(34% 28% at 68% 30%, rgba(138, 75, 255, .6), transparent 70%),
    radial-gradient(30% 24% at 55% 58%, rgba(31, 211, 240, .35), transparent 70%),
    radial-gradient(22% 18% at 42% 22%, rgba(255, 140, 60, .35), transparent 70%);
  animation: nebula 26s ease-in-out infinite alternate;
}
.planet {
  position: absolute; right: -26px; top: 150px; width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb36b, #ff5a1f 45%, #7a1f4a 80%); box-shadow: inset -14px -10px 0 rgba(10, 7, 22, .45), 0 0 30px rgba(255, 90, 31, .35);
  animation: float 9s ease-in-out infinite;
}
.planet::after {
  content: ''; position: absolute; left: -34px; right: -34px; top: 40px; height: 14px; border-radius: 50%;
  border: 3px solid rgba(255, 213, 31, .85); border-top-color: transparent; transform: rotate(-16deg);
}
.shoot { position: absolute; width: 130px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff); opacity: 0; transform: rotate(-28deg); }
.shoot::after { content: ''; position: absolute; right: -2px; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff, 0 0 20px var(--cyan); }
.sh1 { left: -10%; top: 12%; animation: shoot 7s ease-in 2s infinite; }
.sh2 { left: 20%; top: 4%; animation: shoot 11s ease-in 5.5s infinite; }
.sh3 { left: -20%; top: 34%; animation: shoot 13s ease-in 9s infinite; }
/* the space scene belongs to home; elsewhere it dims so the games stay readable */
#app:not(.world-home) .space .nebula, #app:not(.world-home) .space .planet { opacity: .25; }

/* logo hovers in space */
.mast { position: relative; }
.mast::before { content: ''; position: absolute; left: 10%; right: 10%; top: 10%; height: 55%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 213, 31, .28), transparent); filter: blur(14px); animation: glow 4s ease-in-out infinite alternate; }
.logo-img { position: relative; animation: hover 4.5s ease-in-out infinite; filter: drop-shadow(0 0 22px rgba(255, 213, 31, .35)) drop-shadow(0 10px 0 rgba(0, 0, 0, .55)); }
.enter .logo-img { animation: logo-in .7s steps(7, end) both, hover 4.5s ease-in-out .7s infinite; }

/* slower, softer blinking */
.say::before { animation: soft-pulse 2.8s ease-in-out infinite; }
.attract .blink { animation: soft-pulse 2.2s ease-in-out infinite; }
.waiting { animation: soft-pulse 2.6s ease-in-out infinite; }
.waiting { flex-wrap: wrap; text-align: center; max-width: 100%; overflow-wrap: anywhere; }

@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-1200px); } }
@keyframes twinkle { from { opacity: .6; } to { opacity: 1; } }
@keyframes nebula { from { transform: translate(-4%, 0) scale(1); } to { transform: translate(4%, 3%) scale(1.12); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(6deg); } }
@keyframes shoot { 0% { opacity: 0; transform: rotate(-28deg) translateX(0); } 4% { opacity: 1; } 14% { opacity: 0; transform: rotate(-28deg) translateX(520px); } 100% { opacity: 0; transform: rotate(-28deg) translateX(520px); } }
@keyframes hover { 0%, 100% { transform: rotate(-7deg) translateY(0); } 50% { transform: rotate(-5deg) translateY(-10px); } }
@keyframes glow { from { opacity: .6; } to { opacity: 1; } }
@keyframes soft-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .stars, .nebula, .planet, .shoot, .logo-img, .mast::before { animation: none !important; } }
.planet { right: 22px; top: 74px; width: 58px; height: 58px; }
.planet::after { left: -22px; right: -22px; top: 24px; height: 10px; }
.nebula { opacity: .9; }

/* darker sky behind the logo: nebula kept faint, no planet */
.planet { display: none; }
.nebula { opacity: .35; }
.mast::before { background: radial-gradient(closest-side, rgba(255, 213, 31, .12), transparent); }
/* triangle: medium-speed soft pulse */
.say::before { animation: soft-pulse 1.4s ease-in-out infinite; }

/* triangle: drawn shape, centred on the text line */
.say { display: flex; align-items: center; gap: 10px; }
.say::before { content: ''; flex: none; width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid var(--fc); }
.page .panel .say { gap: 6px; } .page .panel .say::before { border-top-width: 5px; border-bottom-width: 5px; border-left-width: 8px; }

/* ===== Bluff Battles ===== */
.screen.bluff h2.center { font-family: var(--px); font-size: 14px; line-height: 1.5; text-align: center; color: var(--yellow); text-shadow: 3px 3px 0 var(--red); text-transform: uppercase; }
.screen.bluff .question { font-size: 15px; }
.mine-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; border: 3px dashed var(--cyan); text-align: center; background: rgba(5, 3, 12, .85); }
.mine-card small { font-family: var(--px); font-size: 9px; color: var(--cyan); text-transform: uppercase; }
.mine-card b { font-family: var(--px); font-size: 14px; line-height: 1.5; color: var(--white); text-transform: uppercase; word-break: break-word; }
.mine-card .link { font-family: var(--px); font-size: 9px; color: var(--yellow); text-transform: uppercase; }
.bopts { display: flex; flex-direction: column; gap: 12px; }
.bopt {
  --a: var(--yellow); position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 16px 14px; text-align: left;
  background: var(--black); color: var(--white); border: 3px solid var(--a); box-shadow: 0 0 14px color-mix(in srgb, var(--a) 25%, transparent);
}
.bopt.a0 { --a: var(--red); } .bopt.a1 { --a: var(--cyan); } .bopt.a2 { --a: var(--yellow); } .bopt.a3 { --a: var(--purple); }
.bopt .txt { font-family: var(--px); font-size: 12px; line-height: 1.5; text-transform: uppercase; word-break: break-word; }
.bopt .tag { flex: none; padding: 4px 6px 3px; background: #2a2440; color: var(--white); border: 0; font-family: var(--px); font-size: 8px; text-transform: uppercase; box-shadow: none; }
.bopt.picked { background: var(--a); color: var(--black); box-shadow: 0 0 22px color-mix(in srgb, var(--a) 55%, transparent); }
.bopt.picked .txt::before { content: '▶ '; }
.bopt.mine { opacity: .45; border-style: dashed; }
.bopt:active:not(:disabled) { transform: scale(.98); }
.bopt:disabled:not(.mine) { opacity: .7; }
/* Bluff Battles hint: crossed-out fakes, and the hint button in the dock */
.bopt.crossed { opacity: .3 !important; border-style: dashed; box-shadow: none; }
.bopt.crossed .txt { text-decoration: line-through; text-decoration-thickness: 2px; }
.hint-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 auto 8px; color: var(--green); border-color: var(--green); }
.hint-btn b { padding: 2px 5px 1px; background: var(--green); color: var(--black); }
.rrows { display: flex; flex-direction: column; gap: 10px; }
.rrow { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: rgba(5, 3, 12, .9); border: 3px solid #4b4466; }
.enter .rrow.pop { animation-duration: .5s; animation-delay: calc(var(--i, 0) * 220ms); }
.rrow .txt { font-family: var(--px); font-size: 12px; line-height: 1.5; text-transform: uppercase; color: var(--white); word-break: break-word; }
.rrow .by { font-family: var(--px); font-size: 8px; color: var(--orange); text-transform: uppercase; }
.rrow .fell { font-family: var(--body); font-size: 20px; color: var(--cyan); } .rrow .fell.none { color: #6e6888; }
.rrow.mine { border-color: var(--cyan); }
.rrow.truth { border-color: var(--yellow); box-shadow: 0 0 26px rgba(255, 213, 31, .35); }
.rrow.truth .txt { color: var(--yellow); }
.stamp-truth { align-self: flex-start; padding: 5px 8px 4px; background: var(--yellow); color: var(--black); font-family: var(--px); font-size: 10px; text-transform: uppercase; transform: rotate(-3deg); }
.panel img[src*="/bluff.svg"] { object-position: 50% 50%; }

/* Bluff Battles topic picker + topic picture above the question */
.pick-note { margin-left: 8px; color: var(--yellow); font-size: 8px; }
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pack { position: relative; display: block; padding: 0; overflow: hidden; background: var(--black); border: 3px solid #4b4466; text-align: left; }
.pack img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; filter: saturate(.55) brightness(.75); transition: filter .15s; }
.pack span { display: block; padding: 6px 7px 5px; font-family: var(--px); font-size: 8px; line-height: 1.4; color: var(--white); text-transform: uppercase; }
.pack i { position: absolute; right: 0; top: 0; padding: 4px 5px 3px; background: var(--black); color: var(--cyan); font-style: normal; font-family: var(--px); font-size: 8px; }
.pack.on { border-color: var(--yellow); box-shadow: 0 0 16px rgba(255, 213, 31, .4); }
.pack.on img { filter: none; }
.pack.on span { background: var(--yellow); color: var(--black); }
.pack.on::after { content: '✓'; position: absolute; left: 6px; top: 4px; width: 22px; height: 22px; display: grid; place-items: center; background: var(--yellow); color: var(--black); font-family: var(--px); font-size: 11px; border: 2px solid var(--black); }
.pack:disabled { cursor: default; }
/* who a topic is for: FANS / CZECH / ENGLISH WORDS (PACK_AUD in app.js) */
.pack .aud { display: inline-block; margin-inline-start: 6px; padding: 2px 4px 1px; font-style: normal; font-size: 7px; vertical-align: 1px; color: var(--black); background: var(--cyan); white-space: nowrap; }
.pack .aud-fans { background: var(--orange); } .pack .aud-cz { background: var(--white); }
.pack.on span .aud { box-shadow: 0 0 0 1px var(--black); }
.qpack { position: relative; border: 3px solid var(--yellow); border-bottom: 0; margin-bottom: -18px; }
.qpack img { display: block; width: 100%; aspect-ratio: 16 / 6; object-fit: cover; }
.qpack span { position: absolute; left: 0; bottom: 0; padding: 6px 8px 5px; background: var(--yellow); color: var(--black); font-family: var(--px); font-size: 9px; text-transform: uppercase; }
.screen.bluff .qpack + .question::before { display: none; }
.pack { display: flex; flex-direction: column; } .pack span { flex: 1; }

/* Flag questions: the mystery flag, framed like a cartridge label */
.qflag { display: grid; place-items: center; padding: 18px 14px; background: radial-gradient(circle at 50% 40%, #241a44, var(--black)); border: 3px solid var(--yellow); border-bottom: 0; margin-bottom: -18px; }
.qflag img { display: block; width: 78%; max-height: 190px; object-fit: contain; border: 3px solid var(--white); box-shadow: 0 0 0 3px var(--black), 0 0 26px rgba(255, 255, 255, .18); background: #fff; }
.qflag.small { padding: 10px; border-bottom: 3px solid var(--yellow); margin-bottom: 0; }
.qflag.small img { width: 46%; max-height: 90px; }
.qflag + .question::before { display: none; }
/* flags: printed sticker look, lit drop shadow, slight tilt */
.qflag img { border: 0; background: none; box-shadow: none; filter: drop-shadow(7px 7px 0 var(--yellow)) drop-shadow(0 0 22px rgba(255, 213, 31, .25)); transform: rotate(-2deg); }
.qflag.small img { filter: drop-shadow(4px 4px 0 var(--yellow)); }
/* flags are full comic panels now (drawn with their own background) */
.qflag { padding: 0; background: var(--black); }
.qflag img { width: 100%; max-height: none; aspect-ratio: 16 / 10 !important; object-fit: cover; transform: none; filter: none; border: 0; box-shadow: none; }
.qflag.small { padding: 0; }
.qflag.small img { width: 100%; aspect-ratio: 16 / 6 !important; }

/* ===== arcade style for Impostor / Two Truths / Pairs leftovers ===== */
.stmt-btn { --a: var(--yellow); background: var(--black) !important; color: var(--white) !important; border: 3px solid var(--a) !important; border-radius: 0 !important; box-shadow: 0 0 14px color-mix(in srgb, var(--a) 22%, transparent) !important; font-family: var(--body); font-size: 22px; }
.stmt-btn.a0 { --a: var(--red); } .stmt-btn.a1 { --a: var(--cyan); } .stmt-btn.a2 { --a: var(--yellow); }
.stmt-btn .k { border-radius: 0 !important; background: var(--a) !important; color: var(--black) !important; border: 0 !important; font-family: var(--px); }
.stmt-btn.picked { background: var(--a) !important; color: var(--black) !important; }
.stmt-btn.right { box-shadow: 0 0 26px var(--a) !important; } .stmt-btn.dim { opacity: .35; }
.stmt-btn .liebadge, .stmt .is-lie span, .stmt span { border-radius: 0 !important; font-family: var(--px); font-size: 9px; }
.stmt { border-radius: 0 !important; background: var(--black) !important; color: var(--white) !important; border: 2px solid #4b4466 !important; font-family: var(--body); font-size: 20px; }
.hot { border-radius: 0 !important; background: var(--black) !important; border: 3px solid var(--yellow) !important; color: var(--white) !important; }
.hot small { font-family: var(--px); color: var(--orange); } .hot b { font-family: var(--px); color: var(--white); }
.write-row .lie-pick span { border-radius: 0 !important; font-family: var(--px); font-size: 9px; background: transparent; color: var(--white); border: 2px solid #4b4466; }
.write-row .lie-pick input:checked + span { background: var(--red); border-color: var(--red); }
.peek { border-radius: 0 !important; font-family: var(--body); font-size: 20px; background: var(--black) !important; color: var(--cyan) !important; border: 2px solid var(--cyan) !important; box-shadow: none !important; }
.peek.imp { color: var(--white) !important; background: var(--red) !important; border-color: var(--red) !important; }
.discuss-head h2 { font-family: var(--px); color: var(--yellow); text-shadow: 3px 3px 0 var(--red); }
.order .o { border-radius: 0 !important; background: var(--black) !important; border: 2px solid #4b4466 !important; color: var(--white); font-family: var(--body); font-size: 19px; }
.order i { color: var(--yellow); font-style: normal; }
.composer .send { border-radius: 0 !important; background: var(--yellow) !important; color: var(--black) !important; box-shadow: none !important; border: 0 !important; font-family: var(--px); }
.result { border-radius: 0 !important; background: var(--black) !important; border: 3px solid var(--yellow) !important; color: var(--white) !important; }
.result.imp { border-color: var(--red) !important; } .result h2 { font-family: var(--px); color: var(--yellow); }
.tally { border-radius: 0 !important; background: var(--black) !important; border: 2px solid #4b4466 !important; color: var(--white) !important; font-family: var(--body); }
.secret .word { font-size: 24px; }
.team { border-radius: 0 !important; background: var(--black) !important; border: 2px solid #4b4466 !important; }
.team-head b { font-family: var(--px); font-size: 11px; color: var(--yellow); text-transform: uppercase; }
.team.side-m { border-color: var(--cyan) !important; } .team.side-f { border-color: var(--orange) !important; }
.member { color: var(--white); font-family: var(--body); font-size: 20px; }
.scores .tscore { border-radius: 0 !important; background: var(--black) !important; border: 2px solid #4b4466 !important; color: var(--white) !important; font-family: var(--px); font-size: 10px; }
.scores .tscore.active { border-color: var(--yellow) !important; } .scores .tscore b { color: var(--yellow); }
.turn-card, .word-card { border-radius: 0 !important; background: var(--black) !important; border: 3px solid var(--yellow) !important; color: var(--white) !important; box-shadow: 0 0 24px rgba(255, 213, 31, .2) !important; }
.turn-card h2, .word-card .word { font-family: var(--px); color: var(--yellow); text-shadow: 3px 3px 0 var(--red); }
.word-card small { font-family: var(--px); font-size: 9px; color: var(--cyan); }
.hint-tiles i { border-radius: 0 !important; background: var(--black) !important; border: 2px solid var(--cyan) !important; color: var(--yellow) !important; font-family: var(--px); }
.guesses span, .log span { border-radius: 0 !important; background: var(--black) !important; border: 2px solid #4b4466 !important; color: var(--white) !important; font-family: var(--body); }
.guesses span.ok, .log span.got { border-color: var(--green) !important; color: var(--green) !important; }
.row.two .btn { flex: 1; }
.row.two .btn.go { background: var(--green) !important; color: var(--black); box-shadow: 0 6px 0 #0e7a43 !important; border-color: var(--yellow); }

/* ===== Impostor: modes, canvas, turns ===== */
.secret .topic { font-family: var(--px); font-size: 10px; text-transform: uppercase; color: var(--black); background: var(--cyan); padding: 4px 8px 3px; margin-bottom: 8px; }
.mode-hint { font-family: var(--body); font-size: 19px; color: var(--cyan) !important; margin-top: -4px; }
details.pts { border: 2px dashed #4b4466; padding: 8px 10px; } details.pts summary { font-family: var(--px); font-size: 10px; color: var(--yellow); text-transform: uppercase; cursor: pointer; }
.turn-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; background: var(--black); border: 3px solid var(--yellow); box-shadow: 0 0 20px rgba(255, 213, 31, .2); }
.turn-banner b { font-family: var(--px); font-size: 11px; color: var(--white); } .turn-banner span { font-family: var(--body); font-size: 20px; color: var(--yellow); }
.turn-banner .pill { margin-left: auto; }
.turn-banner.open { flex-direction: column; align-items: flex-start; border-color: var(--cyan); } .turn-banner.open b { color: var(--cyan); }
.order .o.now { border-color: var(--yellow) !important; box-shadow: 0 0 12px rgba(255, 213, 31, .4); } .order .o.done { opacity: .45; }
.ans-list { display: flex; flex-direction: column; gap: 8px; }
.ans { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; padding: 10px 12px; background: var(--black); border: 2px solid #4b4466; }
.ans b { font-family: var(--px); font-size: 10px; color: var(--cyan); } .ans span { font-family: var(--body); font-size: 22px; color: var(--white); text-align: right; } .ans i { color: #6e6888; }
.pad-wrap { border: 3px solid var(--cyan); box-shadow: 0 0 20px rgba(31, 211, 240, .25); background: #fff6e0; }
.pad-wrap.mine { border-color: var(--yellow); box-shadow: 0 0 24px rgba(255, 213, 31, .35); }
.pad { display: block; width: 100%; aspect-ratio: 4 / 3; touch-action: none; background: #fff6e0; }
.pad.live { cursor: crosshair; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tools .sw { width: 34px; height: 34px; background: var(--c); border: 3px solid #4b4466; }
.tools .sw.eraser { width: auto; padding: 0 8px; color: var(--black); font-family: var(--px); font-size: 8px; }
.tools .sw.on { border-color: var(--white); box-shadow: 0 0 12px var(--c); transform: scale(1.1); }
.tools .sz { width: 34px; height: 34px; display: grid; place-items: center; background: var(--black); border: 2px solid #4b4466; }
.tools .sz i { display: block; background: var(--white); border-radius: 50%; } .tools .sz.on { border-color: var(--yellow); }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gallery figure { margin: 0; border: 2px solid #4b4466; background: var(--black); }
.gallery figcaption { padding: 5px 7px 4px; font-family: var(--px); font-size: 8px; color: var(--white); text-transform: uppercase; }
.win-tag { display: inline-block; margin-top: 10px; padding: 6px 10px 5px; font-family: var(--px); font-size: 10px; text-transform: uppercase; }
.win-tag.crew { background: var(--cyan); color: var(--black); } .win-tag.imp { background: var(--red); color: var(--white); }
.center-row { justify-content: center; gap: 10px; }
.hist .hrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 2px dashed #3a3354; font-family: var(--body); font-size: 19px; color: var(--white); }
.hist .hrow b { font-family: var(--px); font-size: 10px; color: var(--red); } .hist .hrow i { font-style: normal; font-family: var(--px); font-size: 8px; }
.hist .hrow i.crew { color: var(--cyan); } .hist .hrow i.imp { color: var(--red); }
.guess-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* arcade-marquee logo */
.logo-img.arcade { width: 100%; max-width: 400px; image-rendering: auto; transform: none; filter: drop-shadow(0 0 24px rgba(255, 224, 42, .25)); animation: hover-flat 4.5s ease-in-out infinite; }
.enter .logo-img.arcade { animation: logo-in .7s steps(7, end) both, hover-flat 4.5s ease-in-out .7s infinite; }
@keyframes hover-flat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.logo-img.arcade.pixel { image-rendering: pixelated; }

/* ================= NEON ARCADE ================= */
:root { --neon-pink: #ff3fa4; --neon-cyan: #2ff3ff; --neon-yellow: #ffe94a; --neon-purple: #b86bff; }
.neon-glow { --g: var(--neon-cyan); }

/* neon tube frame around the whole screen */
#app::after {
  background: radial-gradient(130% 110% at 50% 50%, transparent 62%, rgba(0, 0, 0, .55)) !important;
  box-shadow: inset 0 0 0 3px #ffb020, inset 0 0 14px 3px rgba(255, 176, 32, .55), inset 0 0 0 8px rgba(5, 3, 12, .9), inset 0 0 0 10px #e3262e, inset 0 0 22px 10px rgba(227, 38, 46, .4);   /* the logo's colours: amber outside, red inside */
  animation: tube-hum 3.2s ease-in-out infinite;
}

/* logo: neon halo */
.logo-img.arcade { filter: drop-shadow(0 0 6px rgba(255, 233, 74, .55)) drop-shadow(0 0 22px rgba(255, 63, 164, .45)) drop-shadow(0 0 40px rgba(47, 243, 255, .25)); }

/* neon sign text */
.mast-sub, .pagetitle, .attract .copy {
  color: #fff !important;
  text-shadow: 0 0 2px #fff, 0 0 6px var(--neon-cyan), 0 0 14px var(--neon-cyan), 0 0 28px var(--neon-cyan);
  animation: neon-flicker 9s linear infinite;
}
.pagetitle { -webkit-text-stroke: 0 !important; text-shadow: 0 0 2px #fff, 0 0 8px var(--neon-pink), 0 0 18px var(--neon-pink), 0 0 36px var(--neon-pink); animation-delay: 2s; }
.attract .blink { color: #fff !important; text-shadow: 0 0 4px var(--neon-yellow), 0 0 12px var(--neon-yellow), 0 0 24px #ff9a00; }
.ahud em { text-shadow: 0 0 6px #ff2a2a, 0 0 14px #ff2a2a; }
.ahud .hi, .ahud .up { text-shadow: 0 0 6px rgba(255, 255, 255, .7); }

/* panels: glowing neon tubes in their colour */
.panel, .sheet-art, .pack.on {
  border-color: var(--fc, var(--neon-yellow)) !important;
  box-shadow: 0 0 0 2px rgba(5, 3, 12, .9), 0 0 6px var(--fc, var(--neon-yellow)), 0 0 18px var(--fc, var(--neon-yellow)), 0 0 38px color-mix(in srgb, var(--fc, var(--neon-yellow)) 55%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc, var(--neon-yellow)) 45%, transparent);
  animation: tube-hum 3.6s ease-in-out infinite;
}
.panel:nth-child(2n) { animation-delay: 1.2s; } .panel:nth-child(3n) { animation-delay: 2.1s; }
.panel .cap, .panel .ch { box-shadow: 0 0 10px color-mix(in srgb, var(--fc) 60%, transparent); }
.panel:active { filter: brightness(1.3); box-shadow: 0 0 0 2px #000, 0 0 10px var(--fc), 0 0 30px var(--fc), 0 0 60px var(--fc); }

/* buttons glow like lit arcade buttons */
.btn.go { box-shadow: 0 6px 0 #9a1a12, 0 0 8px #ff3b2f, 0 0 24px rgba(255, 59, 47, .8), 0 0 48px rgba(255, 63, 164, .45); text-shadow: 0 0 6px rgba(255, 255, 255, .8); }
.btn:not(.go) { box-shadow: 0 0 6px rgba(255, 255, 255, .5), 0 0 16px rgba(47, 243, 255, .35); }
.snd, .back, .pill, .mode-tag, .react-bar button { box-shadow: 0 0 6px currentColor, inset 0 0 6px color-mix(in srgb, currentColor 40%, transparent); text-shadow: 0 0 6px currentColor; }

/* lobby / game frames */
.win, .card, .glass, .code-card, .question, .rrow.truth, .turn-banner, .result, .secret, .pad-wrap {
  box-shadow: 0 0 6px var(--neon-cyan), 0 0 18px rgba(47, 243, 255, .45), inset 0 0 10px rgba(47, 243, 255, .2);
}
.question, .rrow.truth { box-shadow: 0 0 6px var(--neon-yellow), 0 0 20px rgba(255, 233, 74, .5), inset 0 0 12px rgba(255, 233, 74, .2); }
.code-card .code { text-shadow: 0 0 4px #fff, 0 0 12px var(--neon-yellow), 0 0 26px #ff9a00; }
.answer, .bopt, .stmt-btn { box-shadow: 0 0 6px var(--a, var(--neon-cyan)), 0 0 18px color-mix(in srgb, var(--a, var(--neon-cyan)) 55%, transparent); }
.bopt.picked, .answer.picked { box-shadow: 0 0 10px var(--a), 0 0 30px var(--a), 0 0 60px color-mix(in srgb, var(--a) 60%, transparent); }
.timer { box-shadow: 0 0 10px var(--neon-yellow), 0 0 26px rgba(255, 233, 74, .5); }
.timer.low { box-shadow: 0 0 10px #ff2a2a, 0 0 26px rgba(255, 42, 42, .6); }
.av { box-shadow: 0 0 6px var(--c), 0 0 16px color-mix(in srgb, var(--c) 60%, transparent); }
.card-title, .win > header { text-shadow: 0 0 6px currentColor, 0 0 14px currentColor; }

@keyframes tube-hum { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.15); } }
@keyframes neon-flicker { 0%, 90%, 100% { opacity: 1; } 91% { opacity: .4; } 92% { opacity: 1; } 93.5% { opacity: .55; } 94.5% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #app::after, .panel, .mast-sub, .pagetitle, .attract .copy { animation: none !important; } }
/* arcade texture instead of halftone dots everywhere in the UI */
:root { --dots: repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 3px); --dots-lg: repeating-linear-gradient(0deg, rgba(0, 0, 0, .1) 0 1px, transparent 1px 4px); }
.qpack + .question::before { display: none; }


/* ===== realistic neon: steady light with short, irregular stutters ===== */
@keyframes nf-frame {
  0.0% { box-shadow: inset 0 0 0 3px #ffb020, inset 0 0 16px 3px rgba(255,176,32,.65), inset 0 0 0 8px rgba(5,3,12,.9), inset 0 0 0 10px #e3262e, inset 0 0 24px 10px rgba(227,38,46,.45); }
  58.0% { box-shadow: inset 0 0 0 3px #7a5010, inset 0 0 3px 3px rgba(255,176,32,.12), inset 0 0 0 8px rgba(5,3,12,.9), inset 0 0 0 10px #6a1418, inset 0 0 3px 10px rgba(227,38,46,.1); }
  58.6% { box-shadow: inset 0 0 0 3px #ffb020, inset 0 0 16px 3px rgba(255,176,32,.65), inset 0 0 0 8px rgba(5,3,12,.9), inset 0 0 0 10px #e3262e, inset 0 0 24px 10px rgba(227,38,46,.45); }
  59.4% { box-shadow: inset 0 0 0 3px #ffb020, inset 0 0 8px 3px rgba(255,176,32,.35), inset 0 0 0 8px rgba(5,3,12,.9), inset 0 0 0 10px #e3262e, inset 0 0 10px 10px rgba(227,38,46,.22); }
  60.1% { box-shadow: inset 0 0 0 3px #ffb020, inset 0 0 16px 3px rgba(255,176,32,.65), inset 0 0 0 8px rgba(5,3,12,.9), inset 0 0 0 10px #e3262e, inset 0 0 24px 10px rgba(227,38,46,.45); }
  61.2% { box-shadow: inset 0 0 0 3px #7a5010, inset 0 0 3px 3px rgba(255,176,32,.12), inset 0 0 0 8px rgba(5,3,12,.9), inset 0 0 0 10px #6a1418, inset 0 0 3px 10px rgba(227,38,46,.1); }
  61.6% { box-shadow: inset 0 0 0 3px #ffb020, inset 0 0 16px 3px rgba(255,176,32,.65), inset 0 0 0 8px rgba(5,3,12,.9), inset 0 0 0 10px #e3262e, inset 0 0 24px 10px rgba(227,38,46,.45); }
  100% { box-shadow: inset 0 0 0 3px #ffb020, inset 0 0 16px 3px rgba(255,176,32,.65), inset 0 0 0 8px rgba(5,3,12,.9), inset 0 0 0 10px #e3262e, inset 0 0 24px 10px rgba(227,38,46,.45); }
}
@keyframes nf-tube-a {
  0.0% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  22.0% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 2px color-mix(in srgb, var(--fc,#ffe94a) 50%, transparent); }
  22.6% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  23.4% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 4px var(--fc,#ffe94a), 0 0 10px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent); }
  24.1% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  25.2% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 2px color-mix(in srgb, var(--fc,#ffe94a) 50%, transparent); }
  25.6% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  100% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
}
@keyframes nf-tube-b {
  0.0% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  64.0% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 2px color-mix(in srgb, var(--fc,#ffe94a) 50%, transparent); }
  64.6% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  65.4% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 4px var(--fc,#ffe94a), 0 0 10px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent); }
  66.1% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  67.2% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 2px color-mix(in srgb, var(--fc,#ffe94a) 50%, transparent); }
  67.6% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  100% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
}
@keyframes nf-tube-c {
  0.0% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  41.0% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 2px color-mix(in srgb, var(--fc,#ffe94a) 50%, transparent); }
  41.6% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  42.4% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 4px var(--fc,#ffe94a), 0 0 10px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent); }
  43.1% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  44.2% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 2px color-mix(in srgb, var(--fc,#ffe94a) 50%, transparent); }
  44.6% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  71.0% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 4px var(--fc,#ffe94a), 0 0 10px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent); }
  71.8% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  72.4% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 2px color-mix(in srgb, var(--fc,#ffe94a) 50%, transparent); }
  72.8% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 4px var(--fc,#ffe94a), 0 0 10px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent); }
  74.0% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
  100% { box-shadow: 0 0 0 2px rgba(5,3,12,.9), 0 0 6px var(--fc,#ffe94a), 0 0 18px var(--fc,#ffe94a), 0 0 40px color-mix(in srgb, var(--fc,#ffe94a) 60%, transparent), inset 0 0 12px color-mix(in srgb, var(--fc,#ffe94a) 45%, transparent); }
}
@keyframes nf-textc {
  0.0% { text-shadow: 0 0 2px #fff, 0 0 6px #2ff3ff, 0 0 14px #2ff3ff, 0 0 28px #2ff3ff; color: #fff; }
  47.0% { text-shadow: none; color: #3a7a80; }
  47.6% { text-shadow: 0 0 2px #fff, 0 0 6px #2ff3ff, 0 0 14px #2ff3ff, 0 0 28px #2ff3ff; color: #fff; }
  48.4% { text-shadow: 0 0 2px #fff, 0 0 5px #2ff3ff; color: #d8fbff; }
  49.1% { text-shadow: 0 0 2px #fff, 0 0 6px #2ff3ff, 0 0 14px #2ff3ff, 0 0 28px #2ff3ff; color: #fff; }
  50.2% { text-shadow: none; color: #3a7a80; }
  50.6% { text-shadow: 0 0 2px #fff, 0 0 6px #2ff3ff, 0 0 14px #2ff3ff, 0 0 28px #2ff3ff; color: #fff; }
  77.0% { text-shadow: 0 0 2px #fff, 0 0 5px #2ff3ff; color: #d8fbff; }
  77.8% { text-shadow: 0 0 2px #fff, 0 0 6px #2ff3ff, 0 0 14px #2ff3ff, 0 0 28px #2ff3ff; color: #fff; }
  78.4% { text-shadow: none; color: #3a7a80; }
  78.8% { text-shadow: 0 0 2px #fff, 0 0 5px #2ff3ff; color: #d8fbff; }
  80.0% { text-shadow: 0 0 2px #fff, 0 0 6px #2ff3ff, 0 0 14px #2ff3ff, 0 0 28px #2ff3ff; color: #fff; }
  100% { text-shadow: 0 0 2px #fff, 0 0 6px #2ff3ff, 0 0 14px #2ff3ff, 0 0 28px #2ff3ff; color: #fff; }
}
@keyframes nf-textp {
  0.0% { text-shadow: 0 0 2px #fff, 0 0 8px #ff3fa4, 0 0 18px #ff3fa4, 0 0 36px #ff3fa4; color: #fff; }
  12.0% { text-shadow: none; color: #7a3054; }
  12.6% { text-shadow: 0 0 2px #fff, 0 0 8px #ff3fa4, 0 0 18px #ff3fa4, 0 0 36px #ff3fa4; color: #fff; }
  13.4% { text-shadow: 0 0 2px #fff, 0 0 6px #ff3fa4; color: #ffd8ec; }
  14.1% { text-shadow: 0 0 2px #fff, 0 0 8px #ff3fa4, 0 0 18px #ff3fa4, 0 0 36px #ff3fa4; color: #fff; }
  15.2% { text-shadow: none; color: #7a3054; }
  15.6% { text-shadow: 0 0 2px #fff, 0 0 8px #ff3fa4, 0 0 18px #ff3fa4, 0 0 36px #ff3fa4; color: #fff; }
  100% { text-shadow: 0 0 2px #fff, 0 0 8px #ff3fa4, 0 0 18px #ff3fa4, 0 0 36px #ff3fa4; color: #fff; }
}
@keyframes nf-logo {
  0.0% { filter: drop-shadow(0 0 6px rgba(255,233,74,.6)) drop-shadow(0 0 22px rgba(255,63,164,.5)) drop-shadow(0 0 40px rgba(47,243,255,.3)); }
  80.0% { filter: brightness(.82) drop-shadow(0 0 1px rgba(255,233,74,.2)); }
  80.6% { filter: drop-shadow(0 0 6px rgba(255,233,74,.6)) drop-shadow(0 0 22px rgba(255,63,164,.5)) drop-shadow(0 0 40px rgba(47,243,255,.3)); }
  81.4% { filter: drop-shadow(0 0 3px rgba(255,233,74,.4)) drop-shadow(0 0 10px rgba(255,63,164,.25)); }
  82.1% { filter: drop-shadow(0 0 6px rgba(255,233,74,.6)) drop-shadow(0 0 22px rgba(255,63,164,.5)) drop-shadow(0 0 40px rgba(47,243,255,.3)); }
  83.2% { filter: brightness(.82) drop-shadow(0 0 1px rgba(255,233,74,.2)); }
  83.6% { filter: drop-shadow(0 0 6px rgba(255,233,74,.6)) drop-shadow(0 0 22px rgba(255,63,164,.5)) drop-shadow(0 0 40px rgba(47,243,255,.3)); }
  100% { filter: drop-shadow(0 0 6px rgba(255,233,74,.6)) drop-shadow(0 0 22px rgba(255,63,164,.5)) drop-shadow(0 0 40px rgba(47,243,255,.3)); }
}
@keyframes nf-btn {
  0.0% { box-shadow: 0 6px 0 #9a1a12, 0 0 8px #ff3b2f, 0 0 24px rgba(255,59,47,.8), 0 0 48px rgba(255,63,164,.45); }
  33.0% { box-shadow: 0 6px 0 #9a1a12; }
  33.6% { box-shadow: 0 6px 0 #9a1a12, 0 0 8px #ff3b2f, 0 0 24px rgba(255,59,47,.8), 0 0 48px rgba(255,63,164,.45); }
  34.4% { box-shadow: 0 6px 0 #9a1a12, 0 0 6px #ff3b2f, 0 0 12px rgba(255,59,47,.5); }
  35.1% { box-shadow: 0 6px 0 #9a1a12, 0 0 8px #ff3b2f, 0 0 24px rgba(255,59,47,.8), 0 0 48px rgba(255,63,164,.45); }
  36.2% { box-shadow: 0 6px 0 #9a1a12; }
  36.6% { box-shadow: 0 6px 0 #9a1a12, 0 0 8px #ff3b2f, 0 0 24px rgba(255,59,47,.8), 0 0 48px rgba(255,63,164,.45); }
  100% { box-shadow: 0 6px 0 #9a1a12, 0 0 8px #ff3b2f, 0 0 24px rgba(255,59,47,.8), 0 0 48px rgba(255,63,164,.45); }
}
#app::after { animation: nf-frame 44s step-end infinite !important; }
.panel, .sheet-art, .pack.on { animation: nf-tube-a 36s step-end infinite !important; }
.panel:nth-child(2n) { animation: nf-tube-b 52s step-end infinite !important; }
.panel:nth-child(3n) { animation: nf-tube-c 28s step-end infinite !important; }
.mast-sub, .attract .copy { animation: nf-textc 32s step-end infinite !important; }
.pagetitle { animation: nf-textp 40s step-end infinite !important; }
.logo-img.arcade { animation: hover-flat 4.5s ease-in-out infinite, nf-logo 60s step-end infinite !important; }
.btn.go { animation: nf-btn 48s step-end infinite; }
.question, .rrow.truth { animation: none; }
@media (prefers-reduced-motion: reduce) { #app::after, .panel, .sheet-art, .pack.on, .mast-sub, .attract .copy, .pagetitle, .btn.go { animation: none !important; } .logo-img.arcade { animation: none !important; } }
/* vivid pictures */
.panel .art, .sheet-art .art, .qpack img, .qflag img, .pack.on img, .pbtn .art { filter: saturate(1.45) contrast(1.12) brightness(1.04); }
.pack img { filter: saturate(1) brightness(.88); }
.pack.on img { filter: saturate(1.45) contrast(1.12) brightness(1.04); }

/* ===== per-letter neon flicker ===== */
.mast-sub, .attract .copy, .pagetitle { animation: none !important; text-shadow: none !important; }
.mast-sub, .attract .copy { --glow: #2ff3ff; --dim: #2f6f78; }
.pagetitle { --glow: #ff3fa4; --dim: #6f2a4c; }
.enter .pagetitle.pop { animation: power-on .35s steps(4, end) both !important; }
.nl { display: inline-block; color: var(--lit, #fff); text-shadow: 0 0 2px #fff, 0 0 6px var(--glow), 0 0 14px var(--glow), 0 0 28px var(--glow); animation-name: nl-flick; animation-timing-function: step-end; animation-iteration-count: infinite; }
@keyframes nl-flick {
  0% { color: var(--lit, #fff); text-shadow: 0 0 2px #fff, 0 0 6px var(--glow), 0 0 14px var(--glow), 0 0 28px var(--glow); }
  90% { color: var(--dim); text-shadow: none; }
  92.5% { color: var(--lit, #fff); text-shadow: 0 0 2px #fff, 0 0 6px var(--glow), 0 0 14px var(--glow), 0 0 28px var(--glow); }
  95% { color: var(--dim); text-shadow: none; }
  97% { color: var(--lit, #fff); text-shadow: 0 0 2px #fff, 0 0 6px var(--glow), 0 0 14px var(--glow), 0 0 28px var(--glow); }
  100% { color: var(--lit, #fff); text-shadow: 0 0 2px #fff, 0 0 6px var(--glow), 0 0 14px var(--glow), 0 0 28px var(--glow); }
}

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

/* ===== logo letters + top bar letters flicker one by one ===== */
.logo-wrap { display: block; margin: 6px auto 0; animation: hover-flat 4.5s ease-in-out infinite !important; filter: drop-shadow(0 0 6px rgba(255, 233, 74, .55)) drop-shadow(0 0 20px rgba(255, 63, 164, .45)) drop-shadow(0 0 38px rgba(47, 243, 255, .25)) !important; }
.enter .logo-wrap { animation: logo-in .7s steps(7, end) both, hover-flat 4.5s ease-in-out .7s infinite !important; }
.logo-svg { display: block; width: 100%; height: auto; overflow: visible; }
.logo-svg .lg { animation-name: lg-flick; animation-timing-function: step-end; animation-iteration-count: infinite; }
@keyframes lg-flick { 0%, 100% { opacity: 1; } 90% { opacity: .3; } 92.5% { opacity: 1; } 95% { opacity: .45; } 97% { opacity: 1; } }
.ahud em { --glow: #ff2a2a; --dim: #6a1a1a; text-shadow: none !important; }
.ahud em .nl { color: #ff5a4a; }
.ahud .up, .ahud .hi { --glow: #ffffff; --dim: #4a4a5a; text-shadow: none !important; }
.snd { --glow: #2ff3ff; --dim: #1f5f66; text-shadow: none !important; }
.back { --glow: #ffe94a; --dim: #6a5a1a; text-shadow: none !important; }
.snd .nl, .back .nl { color: currentColor; }
@media (prefers-reduced-motion: reduce) { .logo-svg .lg { animation: none !important; } }

.ahud em { --lit: #ff5a4a; }
.snd { --lit: #2ff3ff; } .back { --lit: #ffe94a; }
/* letters don't blink: steady neon glow */
.nl, .logo-svg .lg { animation: none !important; }
/* EXIT button (leave room) */
.exit-btn { font-family: var(--px); font-size: 9px; line-height: 1; text-transform: uppercase; color: #ff5a4a; background: transparent; border: 2px solid #ff5a4a; padding: 8px 9px 7px; border-radius: 0; box-shadow: 0 0 6px rgba(255, 90, 74, .7), inset 0 0 6px rgba(255, 90, 74, .3); text-shadow: 0 0 6px rgba(255, 90, 74, .8); white-space: nowrap; flex: none; }
.exit-btn:active { background: #ff5a4a; color: var(--black); }
/* lobby: big banner for the chosen game */
.lobby-hero { --fc: var(--neon-yellow); position: relative; overflow: hidden; border: 3px solid var(--fc); background: var(--black); box-shadow: 0 0 6px var(--fc), 0 0 22px color-mix(in srgb, var(--fc) 50%, transparent); }
.m-bluff .lobby-hero { --fc: #ffe94a; } .m-impostor .lobby-hero { --fc: #2ff3ff; } .m-pairs .lobby-hero { --fc: #ff7a2a; } .m-truths .lobby-hero { --fc: #b86bff; } .m-likely .lobby-hero { --fc: #ff3b2f; }
.lobby-hero img { display: block; width: 100%; aspect-ratio: 16 / 8; object-fit: cover; filter: saturate(1.45) contrast(1.12) brightness(1.04); }
.lobby-hero .cap { position: absolute; left: 0; top: 0; padding: 9px 12px 8px; background: var(--black); color: var(--fc); font-family: var(--px); font-size: 16px; line-height: 1.2; text-transform: uppercase; border-right: 3px solid var(--fc); border-bottom: 3px solid var(--fc); text-shadow: 0 0 8px var(--fc); }
.lobby-hero .say { position: static; display: block; padding: 10px 12px 9px; background: rgba(5, 3, 12, .92); color: var(--white); border-top: 3px solid var(--fc); font-family: var(--body); font-size: 22px; line-height: 1.05; }
.lobby-hero .say::before { content: none; }
.lobby-hero .tagp { position: absolute; right: 0; top: 0; padding: 9px 10px 8px; background: var(--fc); color: var(--black); font-family: var(--px); font-size: 9px; text-transform: uppercase; }
/* smaller lobby banner */
.lobby-hero { display: grid; grid-template-columns: 96px 1fr; align-items: stretch; }
.lobby-hero img { grid-row: 1 / 3; width: 96px; height: 100%; aspect-ratio: auto; border-right: 3px solid var(--fc); }
.lobby-hero .cap { position: static; grid-column: 2; border: 0; padding: 8px 10px 4px; font-size: 12px; background: transparent; }
.lobby-hero .say { grid-column: 2; border-top: 0; padding: 0 10px 8px; font-size: 18px; background: transparent; }
.lobby-hero .tagp { top: auto; bottom: 0; right: 0; padding: 4px 6px 3px; font-size: 7px; }
/* even smaller lobby banner */
.lobby-hero { grid-template-columns: 64px 1fr; border-width: 2px; }
.lobby-hero img { width: 64px; border-right-width: 2px; }
.lobby-hero .cap { font-size: 10px; padding: 6px 8px 2px; }
.lobby-hero .say { font-size: 15px; padding: 0 8px 6px; }
.lobby-hero .tagp { font-size: 6px; padding: 3px 5px 2px; }
.lobby-hero .tagp { top: 0; bottom: auto; }

/* ===== languages ===== */
.hud-btns { display: flex; gap: 6px; justify-self: end; }
.lang-btn { color: #ffe94a !important; border-color: #ffe94a !important; min-width: 40px; }
.lang-list { display: flex; flex-direction: column; gap: 10px; }
/* Arabic: right-to-left with a PIXEL Arabic font. The pixel fonts we use have no Arabic letters, so the
   Arabic range of each of them is filled from GNU Unifont (16x16 bitmap font, SIL OFL 1.1, subset in
   /fonts/handjet-arabic.woff2). Latin letters and digits (room codes, scores) keep their usual pixel font. */
@font-face { font-family: 'BLAF Arcade'; src: url('/fonts/handjet-arabic.woff2') format('woff2'); font-weight: 400; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; size-adjust: 175%; ascent-override: 44%; descent-override: 10%; line-gap-override: 0%; font-display: block; }
@font-face { font-family: 'VT323'; src: url('/fonts/handjet-arabic.woff2') format('woff2'); font-weight: 400; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; size-adjust: 84%; ascent-override: 92%; descent-override: 30%; line-gap-override: 0%; font-display: block; }
@font-face { font-family: 'BLAF Arabic Pixel'; src: url('/fonts/handjet-arabic.woff2') format('woff2'); font-weight: 100 900; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; size-adjust: 200%; ascent-override: 44%; descent-override: 10%; line-gap-override: 0%; font-display: block; }
body.rtl { --px: 'BLAF Arcade', 'BLAF Arabic Pixel', monospace; --mono: 'VT323', 'BLAF Arabic Pixel', monospace; --body: 'VT323', 'BLAF Arabic Pixel', monospace; --pixel: 'BLAF Arcade', 'BLAF Arabic Pixel', monospace; }
body.rtl, body.rtl * { letter-spacing: 0 !important; font-variation-settings: 'ELSH' 2, 'wght' 560; }
body.rtl .snd, body.rtl .lang-btn, body.rtl .bub, body.rtl .crown { white-space: nowrap; }
body.rtl .question { font-size: 22px; line-height: 1.5; }
body.rtl .bopt .txt, body.rtl .rrow .txt { font-size: 18px; line-height: 1.4; text-transform: none; }
body.rtl .cap { left: auto; right: 0; border-right: 0; border-left: 3px solid var(--fc); }
body.rtl .ch { right: auto; left: 0; }
body.rtl .page .panel .ch { left: 6px; right: auto; }
body.rtl .say { text-align: right; }
body.rtl .lobby-hero img { border-right: 0; border-left: 2px solid var(--fc); }
body.rtl .lobby-hero .tagp { right: auto; left: 0; }
body.rtl .qpack span { left: auto; right: 0; }
body.rtl .question::before { left: auto; right: -3px; }
body.rtl .logo-wrap, body.rtl .logo-svg, body.rtl .code-card .code, body.rtl .timer, body.rtl .code-input, body.rtl .progress { direction: ltr; }
body.rtl .say::before { transform: scaleX(-1); }
/* Czech/Slovak: full-size base letter + drawn accent (pixel fonts squash accented capitals) */
.acc { position: relative; display: inline-block; }
.accword { white-space: nowrap; }
/* Parent rules like ".pack span" or ".qpack span" must not reach the accent helper spans. */
.accw.accw.accw, .accword.accword.accword { display: inline !important; position: static !important; padding: 0 !important; margin: 0 !important; background: none !important; flex: none !important; color: inherit !important; text-transform: inherit !important; text-shadow: inherit !important; font: inherit !important; letter-spacing: inherit !important; line-height: inherit !important; }
.acc.acc.acc { display: inline-block !important; position: relative !important; left: auto !important; bottom: auto !important; padding: 0 !important; margin: 0 !important; background: none !important; flex: none !important; color: inherit !important; text-shadow: inherit !important; font: inherit !important; line-height: 1 !important; vertical-align: baseline !important; }
.acc::before { content: attr(data-m); position: absolute; left: 0; right: 0; top: -.62em; text-align: center; font-size: .9em; line-height: 1; pointer-events: none; }
.acc.flip::before { transform: scaleY(-1); top: -.5em; }
.acc.ring::before { top: -.72em; font-size: .75em; }
body.latin2 .cap, body.latin2 .ch, body.latin2 .card-title, body.latin2 .lobby-hero .cap, body.latin2 .pack span, body.latin2 .setting label { padding-top: calc(var(--pt, 8px) + 5px) !important; }
/* buttons: room for the accents (Á Č Ž sit above the capitals) evenly above and below, so the text stays centred */
body.latin2 :is(.btn, .exit-btn, .snd, .back) { line-height: 1.6; }
body.latin2 .pagetitle, body.latin2 .mast-sub, body.latin2 .attract .copy, body.latin2 .question { line-height: 1.9; }
body.latin2 .cap, body.latin2 .ch, body.latin2 .pack span, body.latin2 .lobby-hero .cap, body.latin2 .setting label, body.latin2 .card-title { line-height: 1.8 !important; }
/* accents drawn as solid pixel shapes in the letter colour */
.acc::before { content: '' !important; top: -.42em !important; left: 50% !important; right: auto !important; width: .5em; height: .3em; transform: translateX(-50%) !important; background: currentColor; font-size: inherit !important; }
.acc[data-m="´"]::before { width: .3em; clip-path: polygon(55% 0, 100% 0, 45% 100%, 0 100%); transform: translateX(-30%) !important; }
.acc.flip::before { clip-path: polygon(0 0, 30% 0, 50% 45%, 70% 0, 100% 0, 65% 100%, 35% 100%); }
.acc[data-m="^"]:not(.flip)::before { clip-path: polygon(35% 0, 65% 0, 100% 100%, 70% 100%, 50% 55%, 30% 100%, 0 100%); }
.acc.ring::before { width: .38em; height: .34em; top: -.48em !important; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0, 30% 30%, 30% 70%, 70% 70%, 70% 30%, 30% 30%); }
.acc[data-m="¨"]::before { width: .5em; height: .2em; clip-path: polygon(0 0, 30% 0, 30% 100%, 0 100%, 0 0, 70% 0, 100% 0, 100% 100%, 70% 100%, 70% 0); }
.accw { display: inline; white-space: inherit; }
.acc { display: inline-block; text-indent: 0; }
.nl .acc, .nl.acc { display: inline-block; }
.accw, .acc { color: inherit; font: inherit; text-transform: inherit; text-shadow: inherit; }
.card-title > .accw { color: var(--yellow); text-transform: uppercase; font-family: var(--px); }

/* ===== Impostor: one phone (pass & play) ===== */
.pp-btn { color: var(--yellow) !important; border-color: var(--yellow) !important; }
.pp-list { display: flex; flex-direction: column; gap: 6px; }
.pp-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px dashed rgba(255,255,255,.12); }
.pp-num { font-family: var(--px); font-size: 10px; color: var(--yellow); min-width: 22px; text-align: center; }
.pp-name { flex: 1; font-family: var(--body); font-size: 22px; color: var(--white); font-weight: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-pts { font-family: var(--px); font-size: 12px; color: var(--cyan); }
.pp-row .kick { position: static; }
.pp-add { display: flex; gap: 8px; margin-top: 6px; } .pp-add .input { flex: 1; min-width: 0; }
.pp-pass { text-align: center; padding: 28px 8px 10px; }
.pp-pass small { display: block; font-family: var(--px); font-size: 10px; color: var(--cyan); text-transform: uppercase; letter-spacing: .08em; }
.pp-pass p { font-family: var(--body); font-size: 20px; color: var(--white); margin: 8px 0 0; }
.pp-big { font-family: var(--px); font-size: 30px; line-height: 1.3; color: var(--yellow); margin: 18px 0 10px; text-shadow: 3px 3px 0 var(--red), 0 0 18px rgba(255,213,31,.6); overflow-wrap: anywhere; }
.pp-big.sm { font-size: 22px; margin: 12px 0 4px; }
.pp-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-family: var(--body); font-size: 20px; }
.pp-chain b { color: var(--white); font-weight: normal; } .pp-chain i { color: var(--yellow); font-style: normal; }
.pp-vote { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
body.rtl .pp-chain i { transform: scaleX(-1); display: inline-block; }
.as-name { text-align: center; font-family: var(--body); font-size: 19px; color: var(--cyan); margin: -4px 0 4px; }
.as-name b { color: var(--yellow); font-weight: normal; } .as-name .link { font-size: 16px; }

/* Name prompt: full screen, the picture of the game you're about to play on top, a blurred glow of it behind */
.name-screen { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: 64px 20px calc(env(safe-area-inset-bottom) + 26px); background: #05030c; animation: name-in .35s ease-out; overflow: hidden auto; }
.name-screen::before { content: ''; position: absolute; inset: -40px; background: var(--art) center / cover no-repeat; filter: blur(22px) saturate(1.4) brightness(.55); transform: scale(1.1); pointer-events: none; }
.name-screen::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5,3,12,0) 30%, rgba(5,3,12,.85) 62%, #05030c 100%), var(--scan); }
.name-screen .exit-btn { position: absolute; top: 16px; left: 16px; z-index: 3; color: var(--yellow) !important; border-color: var(--yellow) !important; background: rgba(5,3,12,.6); }
/* Arabic too: EXIT / BACK always sit top left, like in every other language. The top bars keep the left-to-right
   order (the buttons on the other side move right); the Arabic words inside still read right to left. */
body.rtl :is(.bar, .bar .row, .ahud, .hud-sub, .hud) { direction: ltr; }
body.rtl :is(.bar, .ahud, .hud-sub, .hud) :is(.exit-btn, .back, .progress, .mode-tag) { unicode-bidi: isolate; }
.name-pic { position: relative; z-index: 2; border: 3px solid var(--yellow); box-shadow: 0 0 0 3px var(--black), 0 0 26px rgba(255,213,31,.55); background: var(--black); }
.name-pic img { display: block; width: 100%; aspect-ratio: 1.45; object-fit: cover; filter: saturate(1.35) contrast(1.08); }
.name-box { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.name-game { font-family: var(--px); font-size: 22px; line-height: 1.3; color: var(--yellow); text-shadow: 3px 3px 0 var(--red), 0 0 16px rgba(255,213,31,.55); text-transform: uppercase; }
.name-box h2 { margin: 4px 0 0; color: var(--white); }
.name-box .hint { margin: 0; }
@keyframes name-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.pp-bar { flex: 1; height: 10px; background: #1d1438; border: 1px solid #3a2a6a; } .pp-bar i { display: block; height: 100%; background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.pp-row:has(.pp-bar) .pp-name { flex: 0 1 40%; }
.snd .nl { white-space: nowrap; }
/* speaker icon button (replaces SND ON / SND OFF text) */
.spk-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 5px 9px; }
.spk-btn .spk { display: block; filter: drop-shadow(0 0 3px currentColor); }
.spk-btn.muted { color: #ff5a4a; border-color: #ff5a4a; }
/* About link + disclaimer */
.about-link { display: block; margin: 10px auto 0; background: none; border: 0; color: var(--cyan, #2ff3ff); font-family: var(--px); font-size: 9px; letter-spacing: 1px; text-transform: uppercase; text-decoration: underline; cursor: pointer; opacity: .85; }
.sheet .about-link { margin-top: 4px; }
.disclaimer { font-family: var(--body); font-size: 20px; line-height: 1.15; color: #e8e4f4; text-align: center; padding: 4px 6px; }
body.rtl .disclaimer { font-size: 22px; line-height: 1.5; }

/* ================= Countdown Bomb ================= */
.prem-tag { display: inline-block; font-family: var(--px); font-size: 8px; line-height: 1; padding: 4px 5px 3px; color: var(--black); background: var(--yellow); border: 2px solid var(--black); text-transform: uppercase; vertical-align: middle; box-shadow: 2px 2px 0 var(--red); }
.prem-line { text-align: center; font-family: var(--mono); font-size: 19px; margin: 0; }
.dock-note.prem { font-size: 17px; }
.perks { margin: 6px 0 10px; padding: 0 0 0 20px; font-family: var(--mono); font-size: 20px; line-height: 1.25; }
.perks li { margin: 4px 0; }
.redeem { margin-top: 10px; } .center-link { display: block; margin: 8px auto 0; }

.bcat { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 10px; background: var(--black); border: 3px solid var(--yellow); box-shadow: 4px 4px 0 var(--red); }
.bcat img { grid-row: 1 / 3; width: 64px; height: 40px; object-fit: cover; border: 2px solid var(--yellow); }
.bcat small { font-family: var(--px); font-size: 8px; color: var(--cyan); text-transform: uppercase; }
.bcat b { font-family: var(--px); font-size: 14px; line-height: 1.35; color: var(--yellow); text-transform: uppercase; }
.bcat.big { animation: cat-in .55s cubic-bezier(.3,1.6,.5,1) both; }
.bcat.big b { font-size: 16px; }
@keyframes cat-in { 0% { transform: scale(.4) rotate(-6deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

.bomb-stage { position: relative; width: 100%; max-width: 380px; aspect-ratio: 1; margin: 6px auto 0;
  background: radial-gradient(circle, rgba(255,213,31,.18) 0 28%, transparent 29%), radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1.6px) 0 0 / 9px 9px; border: 3px dashed rgba(31,211,240,.35); border-radius: 50%; }
.bseat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; width: 76px; text-align: center; z-index: 2; transition: transform .2s; }
.bseat .av { width: 42px; height: 42px; font-size: 17px; position: relative; overflow: hidden; }
.bseat .bname { font-family: var(--px); font-size: 8px; line-height: 1.3; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--white); }
.bseat.me .bname { color: var(--cyan); }
.bseat.hold { transform: translate(-50%, -50%) scale(1.12); z-index: 3; }
.bseat.hold .av { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--red), 0 0 22px var(--yellow); animation: hold-pulse .5s steps(2) infinite; }
@keyframes hold-pulse { 50% { box-shadow: 0 0 0 3px var(--yellow), 0 0 28px var(--red); } }
.bseat.out { opacity: .5; filter: grayscale(.9); }
.bseat .afk { font-family: var(--px); font-size: 7px; color: var(--red); text-transform: uppercase; animation: soft-pulse 1s infinite; }
.lives { display: inline-flex; gap: 2px; }
.heart { fill: var(--red); filter: drop-shadow(1px 1px 0 var(--black)); }
.heart.lost { fill: transparent; stroke: rgba(255,255,255,.45); stroke-width: .6; filter: none; }
/* soot: every life lost leaves more black smudges on the avatar; "boomed" = the frazzled, smoking look right after the blast */
.bseat .av::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; mix-blend-mode: multiply;
  background: radial-gradient(circle at 28% 30%, #111 0 18%, transparent 26%), radial-gradient(circle at 72% 64%, #111 0 14%, transparent 22%), radial-gradient(circle at 60% 18%, #222 0 10%, transparent 17%), radial-gradient(circle at 25% 78%, #222 0 12%, transparent 20%); }
.bseat.soot1 .av::after { opacity: .45; } .bseat.soot2 .av::after { opacity: .75; } .bseat.soot3 .av::after { opacity: .95; }
.bseat.boomed .av { animation: frazzle .12s steps(2) 8; background: #2a2626; color: #fff; }
.bseat.boomed::before { content: ''; position: absolute; top: -22px; left: 50%; width: 40px; height: 26px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(circle at 30% 70%, #8a8590 0 30%, transparent 32%), radial-gradient(circle at 62% 45%, #a29ca8 0 34%, transparent 36%), radial-gradient(circle at 45% 25%, #6e6874 0 24%, transparent 26%); animation: smoke 1.6s ease-out infinite; }
@keyframes frazzle { 50% { transform: rotate(-8deg) scale(1.1); } }
@keyframes smoke { 0% { opacity: .9; transform: translate(-50%, 6px) scale(.6); } 100% { opacity: 0; transform: translate(-50%, -18px) scale(1.3); } }

.bomb-wrap { position: absolute; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 4; --heat: 0; }
.bomb-svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(4px 5px 0 rgba(0,0,0,.45)); }
.bomb-wrap.live .bomb-svg { animation: wobble calc(1.3s - 1s * var(--heat)) ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(calc(-2deg - 7deg * var(--heat))) scale(1); } 50% { transform: rotate(calc(2deg + 7deg * var(--heat))) scale(calc(1 + .06 * var(--heat))); } }
.bomb-wrap .spark { transform-box: fill-box; transform-origin: center; }
.bomb-wrap.live .spark { animation: spark calc(.42s - .32s * var(--heat)) steps(2) infinite; }
@keyframes spark { 0% { transform: scale(.8) rotate(0); } 50% { transform: scale(calc(1.2 + .5 * var(--heat))) rotate(30deg); } }
.bomb-wrap:not(.live) .spark { opacity: .35; }
.bomb-wrap .sweat { opacity: 0; transition: opacity .4s; }
.bomb-wrap.hot .sweat { opacity: 1; animation: sweat .7s ease-in infinite; }
@keyframes sweat { 0% { transform: translateY(0); } 100% { transform: translateY(8px); opacity: .2; } }
.bomb-wrap.hot .pupil { animation: darting .3s steps(2) infinite; }
@keyframes darting { 50% { transform: translateX(3px); } }
.bomb-wrap.mine .bomb-svg { filter: drop-shadow(0 0 10px var(--yellow)) drop-shadow(4px 5px 0 rgba(0,0,0,.45)); }

.boom { position: absolute; left: 50%; top: 50%; width: 82%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 5; display: grid; place-items: center; }
.boom-svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: boom-in .5s cubic-bezier(.2,1.8,.4,1) both, boom-spin 3s linear infinite; }
.boom b { position: relative; font-family: var(--px); font-size: 34px; color: var(--black); -webkit-text-stroke: 1px var(--black); text-shadow: 3px 3px 0 var(--white), -2px -2px 0 var(--yellow); transform: rotate(-8deg); animation: boom-in .5s .08s cubic-bezier(.2,1.8,.4,1) both; }
@keyframes boom-in { 0% { transform: scale(.1) rotate(-30deg); opacity: 0; } 100% { opacity: 1; } }
@keyframes boom-spin { to { rotate: 360deg; } }

.bstatus { text-align: center; font-family: var(--px); font-size: 11px; line-height: 1.5; margin: 4px 0 0; color: var(--white); text-transform: uppercase; }
.bstatus.mine { color: var(--yellow); animation: soft-pulse .8s infinite; }
.bstatus.boom-line { color: var(--red); font-size: 13px; }
.challenge { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 14px; background: var(--black); border: 3px solid var(--orange); }
.challenge p { margin: 0; font-family: var(--mono); font-size: 20px; }
.challenge .btn { flex: none; padding: 10px 14px; }
.cbar { position: absolute; left: 0; bottom: 0; height: 5px; width: 100%; background: var(--orange); transform-origin: left; animation: cbar linear forwards; }
@keyframes cbar { to { transform: scaleX(0); } }
.bvote { text-align: center; display: grid; gap: 10px; justify-items: center; }
.bvq { margin: 0; font-family: var(--mono); font-size: 22px; }
.bv-btns { gap: 8px; justify-content: center; }
.bv-tally { display: flex; gap: 14px; font-family: var(--px); font-size: 10px; } .bv-tally .y { color: var(--green); } .bv-tally .n { color: var(--red); }
.bused { display: grid; gap: 8px; }
.uchips { display: flex; flex-wrap: wrap; gap: 6px; }
.uchip { display: inline-flex; flex-direction: column; padding: 5px 8px 4px; background: var(--black); border: 2px solid var(--cyan); font-family: var(--mono); font-size: 18px; line-height: 1; color: var(--white); }
.uchip small { font-size: 13px; color: var(--cyan); opacity: .8; }
.uchip.free { border-style: dashed; border-color: var(--orange); }
.uchip:first-child { animation: chip-in .35s cubic-bezier(.3,1.6,.5,1); border-color: var(--yellow); }
@keyframes chip-in { from { transform: scale(.3); } }
.bomb-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.bomb-form .btn { padding-inline: 16px; }
.bomb-msg { min-height: 18px; margin: 4px 0 0; text-align: center; font-family: var(--px); font-size: 9px; color: var(--red); text-transform: uppercase; }
.input.nope { animation: nope .38s ease; border-color: var(--red) !important; }
@keyframes nope { 15%, 55% { transform: translateX(-10px); } 35%, 75% { transform: translateX(10px); } }
#app.quake { animation: quake .7s cubic-bezier(.36,.07,.19,.97); }
@keyframes quake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(5px, -3px); } 30%, 50%, 70% { transform: translate(-9px, 4px) rotate(-1deg); } 40%, 60% { transform: translate(9px, -4px) rotate(1deg); } }
.rtl .bcat { box-shadow: -4px 4px 0 var(--red); }
@media (prefers-reduced-motion: reduce) { #app.quake, .bomb-wrap.live .bomb-svg, .boom-svg { animation: none; } }
.bstatus.checking { color: var(--cyan); animation: soft-pulse .6s infinite; }
.bomb-form.busy { opacity: .6; pointer-events: none; }
.uchip.ai { border-color: var(--green); }

/* ===== Bluff Scale ===== */
.dial-wrap { width: 100%; max-width: 420px; margin: 0 auto; }
.dial-wrap.small { max-width: 250px; }
.dial { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(5px 6px 0 var(--purple)); }
.dial.drag { touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.dial.drag:active { cursor: grabbing; }
.dial .z1 { fill: #ffd51f; } .dial .z2 { fill: #ff8a1f; } .dial .z3 { fill: #ff3b2f; }
.dial .z1, .dial .z2, .dial .z3 { stroke: #0a0716; stroke-width: 2.5; stroke-linejoin: round; }
.dial .zn { font-family: var(--px); font-size: 10px; fill: #0a0716; text-anchor: middle; }
.dial .sc-q { font-family: var(--px); font-size: 64px; fill: #ffd51f; stroke: #0a0716; stroke-width: 5; paint-order: stroke; text-anchor: middle; }
.dial .sc-av { font-family: var(--px); font-size: 10px; fill: #0a0716; text-anchor: middle; }
.dial .sc-cover { transform-box: view-box; transform-origin: 160px 160px; }
.dial .sc-cover.opening { animation: sc-open 1.2s 2.7s cubic-bezier(.7, 0, .25, 1) forwards; }
.rtl .dial .sc-cover.opening { animation-name: sc-open-rtl; }
@keyframes sc-open { to { transform: rotate(180deg); } }
@keyframes sc-open-rtl { to { transform: rotate(-180deg); } }
.dial .sc-n { opacity: 0; animation: sc-pop .35s calc(.25s + var(--i) * .12s) cubic-bezier(.2, 1.8, .4, 1) forwards; transform-box: fill-box; transform-origin: center; }
.dial-wrap.small .sc-n { animation: none; opacity: 1; }
.dial .sc-n.me circle { stroke: #fff; stroke-width: 3.5; }
@keyframes sc-pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
.dial .sc-ndl { transition: none; }
.dial .sc-burst { opacity: 0; transform-box: view-box; transform-origin: 160px 80px; animation: sc-burst 2.4s 3.9s cubic-bezier(.2, 1.8, .4, 1) forwards; pointer-events: none; }
.dial .sc-bt { font-family: var(--px); font-size: 15px; fill: #ff3b2f; stroke: #0a0716; stroke-width: 4; paint-order: stroke; text-anchor: middle; }
@keyframes sc-burst { 0% { opacity: 0; transform: scale(.2) rotate(-25deg); } 18% { opacity: 1; transform: scale(1.1) rotate(4deg); } 80% { opacity: 1; transform: scale(1) rotate(-3deg); } 100% { opacity: 0; transform: scale(1.2) rotate(-3deg); } }
.sc-ends { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-top: 8px; font-family: var(--px); font-size: 11px; line-height: 1.5; text-transform: uppercase; }
.sc-ends b { flex: 1; color: var(--cyan); font-weight: 400; } .sc-ends b:last-child { text-align: end; color: var(--orange); }
.sc-ends i { color: var(--yellow); font-style: normal; }
.dial-wrap.small .sc-ends { font-size: 8px; }
.sc-clue { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 14px; background: var(--cream); color: var(--ink); border: 4px solid var(--ink); box-shadow: 5px 5px 0 var(--yellow); text-align: center; position: relative; }
.sc-clue::after { content: ''; position: absolute; left: 50%; bottom: -15px; width: 18px; height: 18px; background: var(--cream); border: 4px solid var(--ink); border-top: 0; border-left: 0; transform: translateX(-50%) rotate(45deg); }
.sc-clue small { font-family: var(--px); font-size: 8px; text-transform: uppercase; color: #5a4a7a; }
.sc-clue b { font-family: var(--px); font-size: 16px; line-height: 1.5; text-transform: uppercase; word-break: break-word; font-weight: 400; min-height: 24px; }
.sc-drum { animation: soft-pulse .5s infinite; color: var(--yellow) !important; }
.sc-unmask { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.sc-stamp { padding: 12px 16px 9px; font-family: var(--px); font-size: 26px; line-height: 1.2; text-transform: uppercase; border: 5px solid var(--ink); transform: rotate(-6deg); animation: sc-stamp .5s cubic-bezier(.2, 1.9, .4, 1) both; text-align: center;
  background-image: radial-gradient(rgba(10, 7, 22, .22) 1.6px, transparent 1.7px); background-size: 8px 8px; }
.sc-stamp.caught { background-color: var(--red); color: var(--white); box-shadow: 7px 7px 0 var(--yellow); text-shadow: 3px 3px 0 var(--ink); }
.sc-stamp.away { background-color: var(--green); color: var(--ink); box-shadow: 7px 7px 0 var(--purple); transform: rotate(5deg); }
.sc-stamp.gone { background-color: #4b4466; color: var(--white); box-shadow: 7px 7px 0 var(--ink); font-size: 16px; }
@keyframes sc-stamp { from { opacity: 0; transform: scale(3.2) rotate(-18deg); } }
.sc-faker { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sc-faker b { font-family: var(--px); font-size: 15px; text-transform: uppercase; font-weight: 400; color: var(--yellow); }
.sc-faker small { font-family: var(--px); font-size: 9px; text-transform: uppercase; color: var(--white); }
.screen.scale .vote-grid { margin-top: 4px; }
.screen.scale h2 { font-family: var(--px); font-size: 14px; line-height: 1.5; text-align: center; color: var(--yellow); text-shadow: 3px 3px 0 var(--red); text-transform: uppercase; }
body.rtl .sc-ends, body.rtl .sc-clue b, body.rtl .sc-stamp, body.rtl .sc-faker b { font-family: var(--body); font-size: 24px; letter-spacing: 0; }
body.rtl .sc-stamp, body.rtl .sc-stamp.gone { font-size: 44px !important; line-height: 1.3; padding: 6px 22px 10px; } body.rtl .sc-clue b { font-size: 30px; line-height: 1.3; } body.rtl .dial-wrap.small .sc-ends { font-size: 18px; } body.rtl .dial .sc-bt { font-family: var(--body); font-size: 26px; }
@media (prefers-reduced-motion: reduce) { .dial .sc-cover.opening { animation-duration: .01s; } .sc-stamp, .dial .sc-n { animation: none; opacity: 1; } }

/* ===== Draw & Guess ===== */
.screen.draw h2 { font-family: var(--px); font-size: 14px; line-height: 1.5; text-align: center; color: var(--yellow); text-shadow: 3px 3px 0 var(--red); text-transform: uppercase; }
/* the canvas: a comic panel / sketchbook page, always 4:3 */
.dg-panel { position: relative; width: 100%; max-width: 520px; margin: 0 auto; padding: 8px; background: var(--white); border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--yellow), 6px 6px 0 7px var(--ink);
  background-image: radial-gradient(rgba(10, 7, 22, .16) 1.4px, transparent 1.5px); background-size: 7px 7px; }
.dg-panel::before { content: ''; position: absolute; left: 12px; right: 12px; top: -10px; height: 14px; pointer-events: none;
  background: radial-gradient(circle at 7px 7px, transparent 3.5px, var(--ink) 4px, var(--ink) 5.5px, transparent 6px) 0 0 / 20px 14px repeat-x; }
.dg-slot { position: relative; width: 100%; aspect-ratio: 4 / 3; border: 3px solid var(--ink); background: #fff6e0; overflow: hidden; }
.dg-cv { display: block; width: 100%; height: 100%; touch-action: none; -webkit-user-select: none; user-select: none; }
.dg-cv.dg-live { cursor: crosshair; }
/* tools */
.dg-tools { display: flex; flex-direction: column; gap: 8px; max-width: 520px; margin: 4px auto 0; width: 100%; }
.dg-sw { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.dg-sw .sw { aspect-ratio: 1; min-width: 0; background: var(--c); border: 3px solid var(--ink); box-shadow: 0 0 0 2px #4b4466; padding: 0; }
.dg-sw .sw.on { box-shadow: 0 0 0 3px var(--yellow); transform: translateY(-3px); }
.dg-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.dg-row .sz { width: 40px; height: 40px; display: grid; place-items: center; background: var(--black); border: 2px solid #4b4466; padding: 0; }
.dg-row .sz i { display: block; border-radius: 50%; background: var(--white); }
.dg-row .sz.on { border-color: var(--yellow); } .dg-row .sz.on i { background: var(--yellow); }
.dg-row .tb { flex: 1; min-width: 58px; height: 40px; padding: 0 6px; background: var(--black); color: var(--white); border: 2px solid #4b4466; font-family: var(--px); font-size: 8px; text-transform: uppercase; }
.dg-row .tb.on { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.dg-row .tb.warn { color: var(--red); border-color: var(--red); }
/* the word / hint */
.dg-secret { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 18px 8px; background: var(--yellow); color: var(--ink); border: 4px solid var(--ink); box-shadow: 4px 4px 0 var(--red); transform: rotate(-1.5deg); }
.dg-secret small { font-family: var(--px); font-size: 8px; text-transform: uppercase; }
.dg-secret b { font-family: var(--px); font-size: 18px; line-height: 1.4; font-weight: 400; text-transform: uppercase; word-break: break-word; text-align: center; }
.dg-secret.got { background: var(--green); } .dg-secret.reveal { background: var(--cyan); box-shadow: 4px 4px 0 var(--purple); }
.dg-hint { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 6px; padding: 4px 0; }
.dg-hint span { width: 22px; height: 30px; border-bottom: 4px solid var(--white); font-family: var(--px); font-size: 16px; line-height: 26px; text-align: center; color: var(--yellow); text-transform: uppercase; }
.dg-hint span:not(.blank) { animation: pop-in .4s cubic-bezier(.2, 1.8, .4, 1); }
.dg-hint i.sp { width: 12px; }
.dg-hint small { align-self: center; margin-inline-start: 8px; font-family: var(--px); font-size: 9px; color: var(--cyan); }
.dg-who { font-size: 22px !important; }
/* word cards for the Artist */
.dg-words { display: flex; flex-direction: column; gap: 12px; }
.dg-word { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; border: 4px solid var(--ink); color: var(--ink); background: var(--cream); box-shadow: 5px 5px 0 var(--c, var(--green)); }
.dg-word small { font-family: var(--px); font-size: 9px; text-transform: uppercase; }
.dg-word b { font-family: var(--px); font-size: 18px; line-height: 1.4; font-weight: 400; text-transform: uppercase; }
.dg-word.d-easy { --c: var(--green); } .dg-word.d-medium { --c: var(--orange); } .dg-word.d-hard { --c: var(--red); }
.dg-word:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--c); }
/* chat */
.dg-chat { display: flex; flex-direction: column; gap: 3px; max-width: 520px; width: 100%; margin: 0 auto; padding: 8px 10px; border: 3px solid #4b4466; background: rgba(5, 3, 12, .8); font-size: 21px; line-height: 1.1; min-height: 64px; }
.dg-chat p { margin: 0; word-break: break-word; } .dg-chat p b { color: var(--cyan); font-weight: 400; }
.dg-chat p.ok { color: var(--green); } .dg-chat p.ok b { color: var(--green); }
.dg-chat p.empty { color: #8a84a8; }
.dg-report { align-self: center; color: #8a84a8 !important; font-size: 18px; }
.dg-guess { display: flex; gap: 8px; width: 100%; } .dg-guess .input { flex: 1; min-width: 0; } .dg-guess .btn { padding: 0 16px; }
/* "BOOM!" on a right guess */
.dg-burst { position: fixed; left: 50%; top: 42%; width: min(70vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 90; pointer-events: none; display: grid; place-items: center; animation: dg-burst 1.25s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.dg-burst svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: boom-spin 3s linear infinite; }
.dg-burst b { position: relative; font-family: var(--px); font-size: 30px; color: var(--red); -webkit-text-stroke: 2px var(--ink); text-shadow: 4px 4px 0 var(--ink); transform: rotate(-8deg); }
@keyframes dg-burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(-30deg); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(4deg); } 75% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); } }
@keyframes pop-in { from { transform: scale(.2); opacity: 0; } }
/* end-of-game gallery */
.dg-galh { margin-top: 6px; }
.dg-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dg-fig { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 6px; background: var(--white); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--yellow); color: var(--ink); }
.dg-fig:nth-child(even) { transform: rotate(1.5deg); } .dg-fig:nth-child(odd) { transform: rotate(-1.5deg); }
.dg-fig canvas { width: 100%; aspect-ratio: 4 / 3; height: auto; border: 2px solid var(--ink); display: block; }
.dg-fig figcaption { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.dg-fig figcaption b { font-family: var(--px); font-size: 10px; font-weight: 400; text-transform: uppercase; line-height: 1.4; }
.dg-fig figcaption span { font-size: 18px; color: #5a4a7a; }
.dg-fig .pill { align-self: center; background: var(--ink); }
body.rtl .dg-secret b, body.rtl .dg-word b, body.rtl .dg-hint span, body.rtl .dg-fig figcaption b, body.rtl .dg-row .tb, body.rtl .dg-burst b { font-family: var(--body); letter-spacing: 0; }
body.rtl .dg-secret b, body.rtl .dg-word b { font-size: 30px; } body.rtl .dg-hint span { font-size: 26px; } body.rtl .dg-row .tb { font-size: 18px; } body.rtl .dg-burst b { font-size: 44px; }
@media (prefers-reduced-motion: reduce) { .dg-burst, .dg-burst svg { animation-duration: .01s; } }
.panel .say { white-space: nowrap; } .panel .say .prem-tag { font-size: 8px; padding: 3px 5px; }

/* Bluff Battles: the chooser's category tiles */
.pick-packs { margin-top: 14px; }
.pack.pick::after { display: none; }
.pack.pick:disabled { opacity: 1; cursor: default; }
.pack.pick:not(:disabled):active { transform: translate(2px, 2px); }
.screen.bluff h2 .hl { color: var(--yellow); }

/* ---------- colour film grain over the whole game ----------
   Coloured noise (red / green / blue specks, not grey), only on the lit-up parts: the noise is mostly white
   with coloured darker specks and is multiplied onto the page, so it shows on bright neon, glows and art
   but leaves the dark background clean (dark times anything stays dark). No clicks blocked. --grain sets the strength (0 to 1).
   To remove it, delete the grain div at the end of index.html. */
:root {
  --grain: .3;
  --grain-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='6'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2.6' intercept='-0.8'/%3E%3CfeFuncG type='linear' slope='2.6' intercept='-0.8'/%3E%3CfeFuncB type='linear' slope='2.6' intercept='-0.8'/%3E%3CfeFuncA type='linear' slope='0' intercept='1'/%3E%3C/feComponentTransfer%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='0.55' intercept='0.45'/%3E%3CfeFuncG type='linear' slope='0.55' intercept='0.45'/%3E%3CfeFuncB type='linear' slope='0.55' intercept='0.45'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.grain-overlay { position: fixed; inset: -200px; z-index: 2147482000; pointer-events: none; background-image: var(--grain-img); background-size: 200px 200px; mix-blend-mode: multiply; opacity: calc(var(--grain) * 2.3);
  /* slow drift: the layer is one tile bigger on each side and slides exactly one tile, so the loop is seamless.
     Uses transform only, so the browser moves it on the GPU without repainting the page. --grain-speed sets one loop. */
  animation: grain-drift var(--grain-speed, 60s) linear infinite; will-change: transform; }
@keyframes grain-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(200px, 200px, 0); } }
@media (prefers-reduced-motion: reduce) { .grain-overlay { animation: none; } }

/* ---------- quick picture glitch ----------
   glitchPictures() in app.js glitches one random picture on screen every few seconds for a quarter of a
   second: the picture shakes and shifts colour (.glitch), and a copy of it on top (.glitch-slice) shows
   only thin strips that jump sideways. Nothing happens for "reduce motion". */
.glitch { animation: pic-glitch .26s steps(1, end) 1; }
@keyframes pic-glitch {
  0%   { translate: -3px 0; filter: saturate(1.45) contrast(1.12) brightness(1.04) hue-rotate(40deg); }
  20%  { translate: 4px 0;  filter: saturate(2.4) contrast(1.4); }
  40%  { translate: -2px 0; filter: saturate(1.45) contrast(1.12) brightness(1.25) hue-rotate(-30deg); }
  60%  { translate: 3px 0;  filter: saturate(2) contrast(1.5) brightness(.9); }
  80%  { translate: -1px 0; filter: saturate(1.45) contrast(1.12) brightness(1.04); }
  100% { translate: 0 0; }
}
.glitch-slice { position: absolute; z-index: 1; pointer-events: none; margin: 0; mix-blend-mode: screen; animation: pic-slice .26s steps(1, end) 1 forwards; }
@keyframes pic-slice {
  0%   { translate: 14px 0;  clip-path: inset(18% 0 70% 0); filter: saturate(3) hue-rotate(160deg); }
  15%  { translate: -18px 0; clip-path: inset(62% 0 30% 0); filter: saturate(3) hue-rotate(-90deg); }
  30%  { translate: 9px 0;   clip-path: inset(40% 0 52% 0); filter: saturate(3) hue-rotate(80deg); }
  45%  { translate: -11px 0; clip-path: inset(8% 0 86% 0);  filter: saturate(3) hue-rotate(200deg); }
  60%  { translate: 20px 0;  clip-path: inset(74% 0 14% 0); filter: saturate(3) hue-rotate(-140deg); }
  75%  { translate: -6px 0;  clip-path: inset(30% 0 64% 0); filter: saturate(3) hue-rotate(110deg); }
  90%, 100% { clip-path: inset(50% 0 50% 0); }
}
@media (prefers-reduced-motion: reduce) { .glitch, .glitch-slice { animation: none; } .glitch-slice { display: none; } }

/* ---------- Neon Heist ----------
   Crew colours: Pink #ff3fa4 / Cyan #2ff3ff (the neon pair used across the arcade theme). The wall is a grid of
   small monitors (.hx-cell). Closed screens are dark with cyan text; the Hackers see each owner as a coloured frame
   (.key); an opened screen fills with its crew colour, an empty one goes dead grey, the Glitch flashes red. */
.screen.heist { --hx-pink: #ff3fa4; --hx-cyan: #2ff3ff; --hx-glitch: #ff2a2a; }
.hx-c.pink { color: var(--hx-pink); text-shadow: 0 0 6px var(--hx-pink); } .hx-c.cyan { color: var(--hx-cyan); text-shadow: 0 0 6px var(--hx-cyan); }
.hx-crews { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 8px; }
.hx-vs { align-self: center; font-family: var(--px); font-size: 12px; color: var(--neon-yellow); text-shadow: 0 0 8px var(--neon-yellow); }
.hx-crew { --c: var(--hx-pink); padding: 8px 9px 7px; background: rgba(5, 3, 12, .9); border: 3px solid color-mix(in srgb, var(--c) 45%, #0a0716); display: flex; flex-direction: column; gap: 6px; min-width: 0; transition: border-color .2s, box-shadow .2s; }
.hx-crew.cyan { --c: var(--hx-cyan); }
.hx-crew.on { border-color: var(--c); box-shadow: 0 0 8px var(--c), 0 0 22px color-mix(in srgb, var(--c) 55%, transparent), inset 0 0 12px color-mix(in srgb, var(--c) 35%, transparent); }
.hx-crew-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.hx-crew-top b { font-family: var(--px); font-size: 12px; text-transform: uppercase; color: var(--c); text-shadow: 0 0 6px var(--c); }
.hx-wins b { color: var(--white); font-weight: 400; }
.hx-left { font-family: var(--px); font-size: 16px; color: var(--white); } .hx-left small { font-size: 7px; color: #b9b0d8; }
.hx-members { display: flex; flex-wrap: wrap; gap: 4px; }
.hx-m { position: relative; display: inline-flex; } .hx-m .av { width: 26px; height: 26px; font-size: 13px; }
.hx-m.hk .av { outline: 2px solid var(--neon-yellow); outline-offset: 1px; }
.hx-m i { position: absolute; right: -5px; bottom: -5px; font: 7px/1 var(--px); font-style: normal; padding: 2px 3px; background: var(--neon-yellow); color: #0a0716; }
.hx-wins { font-family: var(--px); font-size: 7px; text-transform: uppercase; color: #b9b0d8; }
.hx-clue { --c: var(--hx-pink); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 12px; background: rgba(5, 3, 12, .92); border: 3px solid var(--c); box-shadow: 0 0 8px var(--c), 0 0 24px color-mix(in srgb, var(--c) 45%, transparent); text-align: center; }
.hx-clue.cyan { --c: var(--hx-cyan); }
.hx-clue small { font-family: var(--px); font-size: 8px; text-transform: uppercase; color: #b9b0d8; }
.hx-clue b { font-family: var(--px); font-size: 22px; text-transform: uppercase; color: var(--white); text-shadow: 0 0 6px var(--c), 0 0 16px var(--c); letter-spacing: .06em; }
.hx-clue em { font-style: normal; color: var(--neon-yellow); text-shadow: 0 0 8px var(--neon-yellow); margin-left: 6px; }

/* the wall of monitors */
.hx-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; padding: 9px; background: #07040f; border: 3px solid #1d1530; box-shadow: inset 0 0 24px rgba(138, 75, 255, .25); }
.hx-cell { position: relative; min-height: 54px; padding: 6px 3px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #142236 0%, #0a1020 70%); color: #bff9ff; border: 3px solid #2a2f48; border-radius: 6px;
  font-family: var(--px); font-size: 9px; line-height: 1.25; text-transform: uppercase; letter-spacing: .02em; text-align: center; overflow-wrap: anywhere;
  box-shadow: inset 0 0 10px rgba(47, 243, 255, .18), 0 2px 0 #000; text-shadow: 0 0 5px rgba(47, 243, 255, .7); transition: transform .12s; }
.hx-cell::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px); }   /* scanlines */
.hx-cell span { position: relative; z-index: 1; }
.hx-cell.l7 { font-size: 7.5px; } .hx-cell.l9 { font-size: 6.5px; letter-spacing: 0; } .hx-cell.l11 { font-size: 5.5px; letter-spacing: 0; }
.hx-cell[data-action] { cursor: pointer; border-color: #3d4a7a; }
.hx-cell[data-action]:hover, .hx-cell[data-action]:focus-visible { border-color: var(--neon-yellow); box-shadow: 0 0 10px var(--neon-yellow), inset 0 0 10px rgba(255, 233, 74, .3); }
.hx-cell[data-action]:active { transform: scale(.95); }
.hx-cell:disabled { cursor: default; opacity: 1; }
/* the Hackers' key: who owns each closed screen */
.hx-board.key .hx-cell.o-pink:not(.open) { border-color: var(--hx-pink); box-shadow: inset 0 0 12px rgba(255, 63, 164, .45), 0 0 6px rgba(255, 63, 164, .6); }
.hx-board.key .hx-cell.o-cyan:not(.open) { border-color: var(--hx-cyan); box-shadow: inset 0 0 12px rgba(47, 243, 255, .45), 0 0 6px rgba(47, 243, 255, .6); }
.hx-board.key .hx-cell.o-none:not(.open) { border-color: #2a2f48; color: #7f8aa8; text-shadow: none; }
.hx-board.key .hx-cell.o-glitch:not(.open) { border: 3px dashed var(--hx-glitch); color: #ffb3b3; text-shadow: 0 0 6px var(--hx-glitch); }
.hx-tag { position: absolute; left: 0; right: 0; bottom: 2px; font: 6px/1 var(--px); font-style: normal; color: var(--hx-glitch); letter-spacing: .1em; z-index: 1; }
.hx-cell:not(.open) .hx-tag { display: none; } .hx-board.key .hx-cell:not(.open) .hx-tag { display: block; }
/* opened screens (and the whole board after the round) */
.hx-cell.open.o-pink, .screen.heist .hx-cell.o-pink.reveal { background: var(--hx-pink); color: #2a0518; text-shadow: none; border-color: #ffd0ea; box-shadow: 0 0 10px var(--hx-pink), 0 0 22px rgba(255, 63, 164, .55); }
.hx-cell.open.o-cyan { background: var(--hx-cyan); color: #032a30; text-shadow: none; border-color: #d6fdff; box-shadow: 0 0 10px var(--hx-cyan), 0 0 22px rgba(47, 243, 255, .55); }
.hx-cell.open.o-none { background: #1a1826; color: #575470; text-shadow: none; border-color: #26233a; box-shadow: none; }
.hx-cell.open.o-glitch { background: repeating-linear-gradient(0deg, #ff2a2a 0 3px, #2a0505 3px 6px); color: #fff; text-shadow: 2px 0 #2ff3ff, -2px 0 #ff3fa4; border-color: #ff8080; animation: hx-static .18s steps(2) infinite; }
.hx-cell.open.o-glitch .hx-tag { display: block; color: #fff; }
/* after the round: closed screens show their owner, dimmed */
.screen.heist .hx-board:not(.key) .hx-cell:not(.open).o-pink { border-color: var(--hx-pink); color: var(--hx-pink); opacity: .7; }
.screen.heist .hx-board:not(.key) .hx-cell:not(.open).o-cyan { border-color: var(--hx-cyan); color: var(--hx-cyan); opacity: .7; }
.screen.heist .hx-board:not(.key) .hx-cell:not(.open).o-none { opacity: .45; }
.screen.heist .hx-board:not(.key) .hx-cell:not(.open).o-glitch { border: 3px dashed var(--hx-glitch); color: #ffb3b3; }
.screen.heist .hx-board:not(.key) .hx-cell:not(.open).o-glitch .hx-tag { display: block; }
.hx-cell.last { animation: hx-on .45s steps(4, end) 1; }
@keyframes hx-on { 0% { filter: brightness(3); transform: scale(1.08); } 50% { filter: brightness(.6); } 100% { filter: none; transform: none; } }
@keyframes hx-static { 0% { background-position: 0 0; translate: 1px 0; } 100% { background-position: 0 3px; translate: -1px 0; } }
.hx-board.glitching { animation: pic-glitch .26s steps(1, end) 3; }
.hx-log { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.hx-log span { font: 8px/1 var(--px); text-transform: uppercase; padding: 5px 6px; border: 2px solid currentColor; }
.hx-log .pink { color: var(--hx-pink); } .hx-log .cyan { color: var(--hx-cyan); }
.hx-result { --c: var(--hx-pink); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; text-align: center; background: rgba(5, 3, 12, .92); border: 3px solid var(--c); box-shadow: 0 0 10px var(--c), 0 0 30px color-mix(in srgb, var(--c) 50%, transparent); }
.hx-result.cyan { --c: var(--hx-cyan); }
.hx-result b { font-family: var(--px); font-size: 15px; line-height: 1.4; text-transform: uppercase; color: var(--c); text-shadow: 0 0 8px var(--c); }
.hx-result small { font-family: var(--body); font-size: 20px; color: var(--white); }
/* the Hacker's clue form and the guessers' dock */
.hx-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.hx-form .input { grid-column: 1 / -1; }
.hx-nums { display: flex; gap: 6px; }
.hx-nums button { width: 44px; height: 44px; font-family: var(--px); font-size: 14px; color: var(--neon-yellow); background: #0a0716; border: 3px solid #3d3560; }
.hx-nums button.on { color: #0a0716; background: var(--neon-yellow); border-color: var(--neon-yellow); box-shadow: 0 0 12px var(--neon-yellow); }
.hx-dock { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hx-dock span { font-family: var(--px); font-size: 10px; text-transform: uppercase; color: var(--neon-yellow); text-shadow: 0 0 6px var(--neon-yellow); }
@media (prefers-reduced-motion: reduce) { .hx-cell.last, .hx-cell.open.o-glitch, .hx-board.glitching { animation: none; } }

/* ---------- Neon Heist: the winning crew "hacks the system" (heistHack() in app.js) ----------
   Timeline: terminal lines 0-1.3 s, progress bar 1.3-2 s, glitch at 2 s, ACCESS GRANTED 2.3 s, title 2.9 s. */
.hx-hack { --c: #ff3fa4; position: fixed; inset: 0; z-index: 2147481000; overflow: hidden; background: rgba(5, 3, 12, .96); color: var(--c);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; cursor: pointer; animation: hxh-in .2s ease-out both; }
.hx-hack.cyan { --c: #2ff3ff; }
.hx-hack.out { animation: hxh-out .4s ease-in both; }
.hx-rain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .45; }
.hx-term { position: relative; width: min(100%, 340px); padding: 14px 14px 12px; background: rgba(0, 0, 0, .75); border: 2px solid var(--c); box-shadow: 0 0 14px var(--c), inset 0 0 18px color-mix(in srgb, var(--c) 25%, transparent);
  font: 13px/1.6 ui-monospace, Menlo, monospace; text-align: left; animation: hxh-term-away .25s steps(2) 2.25s both; }
.hx-term p { margin: 0; white-space: nowrap; overflow: hidden; text-shadow: 0 0 6px var(--c); width: 0; animation: hxh-type .3s steps(24, end) var(--d) forwards; }
.hx-bar { position: relative; height: 16px; margin-top: 10px; border: 2px solid var(--c); }
.hx-bar i { position: absolute; inset: 2px auto 2px 2px; width: 0; background: var(--c); box-shadow: 0 0 10px var(--c); animation: hxh-bar .7s steps(10, end) 1.3s forwards; }
.hx-bar span { position: absolute; right: -44px; top: -2px; font-size: 12px; opacity: 0; animation: hxh-show 0s 2s forwards; }
.hx-granted { position: absolute; left: 50%; top: 50%; padding: 10px 16px; border: 4px solid var(--c); background: #05030c; color: #fff;
  font-family: var(--px); font-size: 22px; letter-spacing: .08em; white-space: nowrap; text-shadow: 0 0 8px var(--c), 0 0 22px var(--c); box-shadow: 0 0 18px var(--c), 0 0 50px color-mix(in srgb, var(--c) 60%, transparent);
  opacity: 0; transform: translate(-50%, -50%) scale(2.4) rotate(-6deg); animation: hxh-stamp .35s cubic-bezier(.2, 1.6, .4, 1) 2.3s forwards, hxh-away .3s steps(2) 2.85s forwards; }
.hx-title { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 16px; text-align: center; opacity: 0; animation: hxh-show 0s 2.9s forwards; }
.hx-title small { font-family: var(--px); font-size: 20px; letter-spacing: .12em; color: #05030c; background: var(--c); padding: 8px 12px; box-shadow: 0 0 22px var(--c); animation: hxh-pop .4s cubic-bezier(.2, 1.6, .4, 1) 2.9s both; }
.hx-title b { position: relative; font-family: var(--px); font-size: clamp(30px, 10vw, 46px); line-height: 1.15; color: #fff; text-transform: uppercase;
  text-shadow: 0 0 6px var(--c), 0 0 18px var(--c), 0 0 40px var(--c); animation: hxh-pop .45s cubic-bezier(.2, 1.6, .4, 1) 3.05s both, hxh-flicker 3s steps(1) 3.5s infinite; }
/* RGB split copies of the title that jitter, so it looks like a hacked screen */
.hx-title b::before, .hx-title b::after { content: attr(data-t); position: absolute; inset: 0; mix-blend-mode: screen; pointer-events: none; }
.hx-title b::before { color: #ff3fa4; text-shadow: none; animation: hxh-split-a 1.6s steps(1) 3.1s infinite; }
.hx-title b::after { color: #2ff3ff; text-shadow: none; animation: hxh-split-b 1.6s steps(1) 3.1s infinite; }
.hx-title em { font-style: normal; font-family: var(--body); font-size: 26px; color: var(--neon-yellow); text-shadow: 0 0 8px var(--neon-yellow); opacity: 0; animation: hxh-show 0s 3.5s forwards; }
.hx-tapclose { position: absolute; bottom: 28px; left: 0; right: 0; margin: 0; text-align: center; font-family: var(--px); font-size: 9px; color: #b9b0d8; opacity: 0; animation: hxh-show 0s 3.8s forwards, hxh-blink 1s steps(2) 3.8s infinite; }
.hx-hack::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--c); opacity: 0; mix-blend-mode: screen; animation: hxh-flash .45s steps(3) 2s 1; }   /* the glitch flash */
@keyframes hxh-in { from { opacity: 0; } }
@keyframes hxh-out { to { opacity: 0; filter: brightness(2) blur(2px); } }
@keyframes hxh-type { to { width: 100%; } }
@keyframes hxh-bar { to { width: calc(100% - 4px); } }
@keyframes hxh-show { to { opacity: 1; } }
@keyframes hxh-blink { 50% { opacity: .2; } }
@keyframes hxh-term-away { 0% { transform: translateX(-12px) skewX(20deg); filter: hue-rotate(90deg); } 50% { transform: translateX(16px); } 100% { opacity: 0; transform: scaleY(.02); } }
@keyframes hxh-stamp { to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-6deg); } }
@keyframes hxh-away { 0% { opacity: 1; transform: translate(calc(-50% + 14px), -50%) rotate(-6deg); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.6) rotate(-6deg); } }
@keyframes hxh-pop { from { opacity: 0; transform: scale(2.2); } to { opacity: 1; transform: none; } }
@keyframes hxh-flash { 0% { opacity: .9; } 33% { opacity: 0; } 66% { opacity: .6; } 100% { opacity: 0; } }
@keyframes hxh-flicker { 0%, 100% { opacity: 1; } 47% { opacity: 1; } 48% { opacity: .3; } 49% { opacity: 1; } 82% { opacity: .5; } 83% { opacity: 1; } }
@keyframes hxh-split-a { 0%, 100% { transform: translate(-3px, 0); clip-path: inset(0 0 60% 0); } 20% { transform: translate(4px, 1px); clip-path: inset(40% 0 20% 0); } 45% { transform: translate(-2px, 0); clip-path: inset(70% 0 0 0); } 70% { transform: none; clip-path: inset(0 0 100% 0); } }
@keyframes hxh-split-b { 0%, 100% { transform: translate(3px, 0); clip-path: inset(55% 0 0 0); } 25% { transform: translate(-4px, -1px); clip-path: inset(10% 0 65% 0); } 50% { transform: translate(2px, 0); clip-path: inset(30% 0 45% 0); } 75% { transform: none; clip-path: inset(0 0 100% 0); } }
/* calm mode: just the title, no motion */
.hx-hack.calm, .hx-hack.calm * { animation: none !important; }
.hx-hack.calm .hx-term, .hx-hack.calm .hx-granted, .hx-hack.calm .hx-rain { display: none; }
.hx-hack.calm .hx-title, .hx-hack.calm .hx-title em, .hx-hack.calm .hx-tapclose { opacity: 1; }

/* ---------- picture frames in the logo's colours ----------
   Every game picture frame (menu, home, game pop-up, lobby banner) uses the BLAF logo's red for the neon
   frame and caption, and the logo's yellow for the number badge, instead of a different colour per game.
   Logo colours: yellow #ffe02a, amber #ffb020, red #e3262e, ink #120e18. */
:root { --logo-yellow: #ffe02a; --logo-amber: #ffb020; --logo-red: #e3262e; }
.panel, .page .panel, .home .panel, .sheet-art, .lobby-hero, .screen .lobby-hero { --fc: var(--logo-red) !important; }
.panel .ch, .sheet-art .ch { background: var(--logo-yellow); color: var(--logo-red); box-shadow: 0 0 10px rgba(255, 224, 42, .7); }
.lobby-hero .tagp { background: var(--logo-yellow); color: var(--logo-red); }

/* ---------- each game's own neon colour ----------
   Frame + caption (--fc) and number badge (--bc), on the menu panel, the game pop-up and the lobby banner.
   Picked for each game's theme. The home screen panels keep the logo colours above. */
.panel[data-mode="bluff"], .sheet-art.g-bluff, .m-bluff .lobby-hero { --fc: #ffe94a !important; --bc: #ff3fa4; }          /* quiz-show spotlight, the gold of the truth */
.panel[data-mode="impostor"], .sheet-art.g-impostor, .m-impostor .lobby-hero { --fc: #b86bff !important; --bc: #2ff3ff; } /* mystery, suspicion */
.panel[data-mode="pairs"], .sheet-art.g-pairs, .m-pairs .lobby-hero { --fc: #ff3fa4 !important; --bc: #2ff3ff; }          /* couples, hearts */
.panel[data-mode="likely"], .sheet-art.g-likely, .m-likely .lobby-hero { --fc: #ffb020 !important; --bc: #b86bff; }       /* the crown */
.panel[data-mode="bomb"], .sheet-art.g-bomb, .m-bomb .lobby-hero { --fc: #ff2a2a !important; --bc: #ffe94a; }             /* danger; the yellow fuse */
.panel[data-mode="draw"], .sheet-art.g-draw, .m-draw .lobby-hero { --fc: #7cff3a !important; --bc: #ff3fa4; }             /* marker / chalk */
.panel[data-mode="scale"], .sheet-art.g-scale, .m-scale .lobby-hero { --fc: #f2c45a !important; --bc: #f2c45a; }          /* champagne gold, like the jazz lounge inside */
.panel[data-mode="heist"], .sheet-art.g-heist, .m-heist .lobby-hero { --fc: #2ff3ff !important; --bc: #ff3fa4; }          /* hacker glow; pink + cyan crews */
.panel[data-mode] .ch, .sheet-art[class*="g-"] .ch { background: var(--bc); color: #120e18; box-shadow: 0 0 10px var(--bc); }
.m-bluff .lobby-hero .tagp, .m-impostor .lobby-hero .tagp, .m-pairs .lobby-hero .tagp, .m-likely .lobby-hero .tagp, .m-bomb .lobby-hero .tagp,
.m-draw .lobby-hero .tagp, .m-scale .lobby-hero .tagp, .m-heist .lobby-hero .tagp { background: var(--bc); color: #120e18; }

/* ---------- home screen panels ----------
   New Game: purple frame with a cyan badge. Join Game: cyan frame with a purple badge. */
.home .panel:nth-of-type(1) { --fc: #b86bff !important; --bc: #2ff3ff; }
.home .panel:nth-of-type(2) { --fc: #2ff3ff !important; --bc: #b86bff; }
.home .panel .ch { background: var(--bc); color: #120e18; box-shadow: 0 0 10px var(--bc); }

/* ---------- number badges match their frame ----------
   The 01, 02… badge (and the lobby's "4+ players" tag) takes the same neon colour as its frame and title. */
.panel .ch, .sheet-art .ch { background: var(--fc) !important; color: #120e18 !important; box-shadow: 0 0 10px var(--fc) !important; }
.lobby-hero .tagp { background: var(--fc) !important; color: #120e18 !important; }

/* ---------- Neon Heist lobby crews ---------- */
.hx-team.pink { border-color: #ff3fa4 !important; box-shadow: 0 0 10px rgba(255, 63, 164, .35); }
.hx-team.cyan { border-color: #2ff3ff !important; box-shadow: 0 0 10px rgba(47, 243, 255, .35); }
.hx-team.pink .team-head b { color: #ff3fa4; text-shadow: 0 0 6px #ff3fa4; } .hx-team.cyan .team-head b { color: #2ff3ff; text-shadow: 0 0 6px #2ff3ff; }
.hx-team.mine { background: color-mix(in srgb, var(--black) 85%, #ffffff) !important; }
.hx-team.pink.mine { box-shadow: 0 0 8px #ff3fa4, 0 0 22px rgba(255, 63, 164, .5), inset 0 0 14px rgba(255, 63, 164, .25); }
.hx-team.cyan.mine { box-shadow: 0 0 8px #2ff3ff, 0 0 22px rgba(47, 243, 255, .5), inset 0 0 14px rgba(47, 243, 255, .25); }
.team-head b small { font-size: 9px; color: var(--white); text-shadow: none; margin-left: 4px; }
.hx-here { font-family: var(--px); font-size: 8px; text-transform: uppercase; color: var(--neon-yellow); }
.hx-host { font: 7px/1 var(--px); font-style: normal; padding: 3px 4px; background: var(--neon-yellow); color: #120e18; }
.hx-move { font-size: 8px !important; padding: 5px 7px !important; }

/* ---------- pixel characters (public/avatars.js) ----------
   The same mid-blue badge for every character (so every face reads clearly), a thick ink ring, and the player's own
   colour as the glowing outer ring. */
.av.px { border-radius: 50% !important; background: radial-gradient(circle at 50% 40%, #5f86ec, #4064cf 70%) !important; border: 3px solid #120e18 !important; overflow: hidden; padding: 0;
  box-shadow: 0 0 0 2.5px var(--c), 0 0 12px color-mix(in srgb, var(--c) 60%, transparent) !important; }
.av.px .px-face { width: 100%; height: 100%; image-rendering: pixelated; display: block; }   /* the portraits fill the badge; shoulders meet the bottom edge */
.av.px.xs, .av.px.sm { border-width: 2px !important; box-shadow: 0 0 0 1.5px var(--c) !important; }
.av.px .dot { z-index: 1; }
.px-label { font-family: var(--px); font-size: 10px; text-transform: uppercase; color: var(--neon-cyan, #2ff3ff); margin-top: 4px; }
.px-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
.px-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.px-opt input { position: absolute; opacity: 0; pointer-events: none; }
.px-opt .av.px { width: 58px; height: 58px; transition: transform .12s; --c: #3d3560; }
.px-opt small { font-family: var(--px); font-size: 7px; text-transform: uppercase; color: #b9b0d8; text-align: center; }
.px-opt input:checked + .av.px { transform: scale(1.12); box-shadow: 0 0 0 3px var(--neon-yellow, #ffe94a), 0 0 18px var(--neon-yellow, #ffe94a) !important; }
.px-opt input:checked ~ small { color: var(--neon-yellow, #ffe94a); }
.px-opt input:focus-visible + .av.px { outline: 2px dashed #fff; outline-offset: 3px; }
.as-name .av { vertical-align: middle; margin-right: 6px; }

/* ---------- PLAYER SELECT (the name + character screen) ----------
   An arcade hall: a row of glowing cabinets on the back wall (drawn in app.js, arcadeHall) and a shiny floor. The page scrolls over it (.ps-scroll); the scene stays put (.ps-bg). */
.ps-screen { padding: 0 !important; display: block !important; overflow: hidden !important; background: #05030c; }
.ps-screen::before, .ps-screen::after { content: none !important; }
.ps-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: #05030c; }
.ps-hall { position: absolute; left: 0; top: 70px; width: 100%; height: 400px; }
.ps-hall .scr { animation: ps-flick 3.4s steps(1) infinite; animation-delay: var(--d); }
.ps-hall .spr { animation: ps-spr 1.2s steps(2) infinite; animation-delay: var(--d); }
.ps-hall .mq { filter: drop-shadow(0 0 6px var(--c)); animation: ps-mq 2.6s ease-in-out infinite; animation-delay: var(--d); }
.ps-hall .coin { animation: ps-mq 1.4s steps(2) infinite; animation-delay: var(--d); }
.ps-hall .tube { filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 0 14px currentColor); }
.ps-hall .tube.a { color: #ff3fa4; } .ps-hall .tube.b { color: #2ff3ff; animation: ps-tube 7s steps(1) infinite; }
@keyframes ps-flick { 0%, 100% { opacity: 1; } 47% { opacity: .55; } 48% { opacity: 1; } 81% { opacity: .75; } 82% { opacity: 1; } }
@keyframes ps-spr { 50% { transform: translateX(6px); } }
@keyframes ps-mq { 50% { opacity: .7; } }
@keyframes ps-tube { 0%, 100% { opacity: 1; } 62% { opacity: .2; } 63% { opacity: 1; } 64% { opacity: .3; } 65% { opacity: 1; } }
.ps-scroll { position: relative; z-index: 2; height: 100%; overflow: hidden auto; padding: 64px 18px calc(env(safe-area-inset-bottom) + 16px); display: flex; flex-direction: column; gap: 14px; }
.ps-screen .exit-btn { position: absolute; top: 16px; left: 16px; z-index: 3; }
.ps-head { text-align: center; }
.ps-title { margin: 0; font-family: var(--px); font-size: 26px; line-height: 1.2; color: #fff; }
.ps-title .nl { text-shadow: 0 0 2px #fff, 0 0 8px var(--neon-pink, #ff3fa4), 0 0 20px var(--neon-pink, #ff3fa4), 0 0 40px var(--neon-pink, #ff3fa4); }
.ps-game { display: inline-block; margin-top: 8px; font-family: var(--px); font-size: 10px; text-transform: uppercase; color: var(--neon-cyan, #2ff3ff); text-shadow: 0 0 8px var(--neon-cyan, #2ff3ff); }
/* the chosen character, big, standing in front of the sun */
.ps-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 2px 0 6px; position: relative; }
.ps-p1 { font-family: var(--px); font-size: 11px; color: var(--neon-yellow, #ffe94a); text-shadow: 0 0 8px var(--neon-yellow, #ffe94a); animation: blink 1s steps(1) infinite; }
.av.px.ps-big { width: 132px; height: 132px; border-width: 5px !important; --c: #ffe94a; box-shadow: 0 0 0 4px #ffe94a, 0 0 26px #ffe94a, 0 0 60px rgba(255, 63, 164, .7) !important; }
.av.px.ps-big.swap { animation: ps-swap .35s steps(4, end); }
@keyframes ps-swap { 0% { transform: scale(.6) rotate(-8deg); filter: brightness(2.5); } 60% { transform: scale(1.1) rotate(3deg); } 100% { transform: none; filter: none; } }
.ps-cname { font-family: var(--px); font-size: 16px; text-transform: uppercase; color: #fff; text-shadow: 3px 3px 0 #ff3fa4, 0 0 14px rgba(47, 243, 255, .7); }
/* the form sits on a dark glass panel so it reads over the grid floor */
.ps-form { display: flex; flex-direction: column; gap: 10px; padding: 14px 12px 0; background: rgba(5, 3, 12, .82); border: 3px solid #9b5cff;
  box-shadow: 0 0 10px #9b5cff, 0 0 30px rgba(155, 92, 255, .4), inset 0 0 18px rgba(155, 92, 255, .2); }
.ps-form .px-label { text-align: left; }
.ps-go { position: sticky; bottom: 0; padding: 10px 0 12px; margin: 0 -12px; padding-left: 12px; padding-right: 12px; background: linear-gradient(180deg, rgba(5, 3, 12, 0), rgba(5, 3, 12, .95) 35%); }
@media (prefers-reduced-motion: reduce) { .ps-hall *, .ps-p1, .av.px.ps-big.swap { animation: none !important; } }

/* ---------- your player card (top of home + Select game) ---------- */
.me-chip { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 6px 10px 6px 6px; cursor: pointer; text-align: left;
  background: rgba(5, 3, 12, .85); border: 2px solid #9b5cff; color: #fff; box-shadow: 0 0 8px rgba(155, 92, 255, .6), inset 0 0 10px rgba(155, 92, 255, .2); }
.me-chip .av.px { width: 40px; height: 40px; }
.me-txt { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.me-txt small { font-family: var(--px); font-size: 8px; color: var(--neon-yellow, #ffe94a); text-shadow: 0 0 6px var(--neon-yellow, #ffe94a); }
.me-txt b { font-family: var(--px); font-size: 12px; font-weight: 400; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-edit { font-family: var(--px); font-size: 8px; text-transform: uppercase; color: var(--neon-cyan, #2ff3ff); border: 2px solid currentColor; padding: 6px 7px; box-shadow: 0 0 6px currentColor; }
.me-chip:active { transform: translateY(1px); filter: brightness(1.2); }

/* top bar with your character instead of the 1UP / HI-SCORE counters */
.ahud.me-hud { display: flex; align-items: center; gap: 10px; padding-top: 10.5px; }
/* the cyan frame line is 10px in from the screen edge; the character's ring (2.5px outside the badge) sits exactly
   10px inside that line on the left and on top, and the buttons on the right keep the same 10px from it */
.ahud.me-hud .hud-btns { margin-right: 4px; }
.ahud.me-hud .hud-btns { margin-left: auto; }
.me-pic { padding: 0; background: none; border: 0; cursor: pointer; flex: none; line-height: 0; }
.me-pic { border-radius: 50%; margin: 0 0 0 6.5px; align-self: center; box-shadow: 0 0 0 2.5px #ffb020, 0 0 10px rgba(255, 176, 32, .75); }   /* amber ring, like the frame */
.me-pic .av.px { width: 46px; height: 46px; box-shadow: none !important; }
.me-pic:active { transform: scale(.94); }

/* Back sits under your character, lined up with its left edge (the ring's outer edge, 10px in from the cyan frame) */
.hud-sub { display: flex; margin-top: 10px; padding-left: 4px; }

/* ---------- Neon Heist: pink + cyan screen frame and the hacker look ---------- */
#app.in-heist::after { animation: none !important;
  box-shadow: inset 0 0 0 3px #ff3fa4, inset 0 0 16px 3px rgba(255, 63, 164, .6), inset 0 0 0 8px rgba(5, 3, 12, .9), inset 0 0 0 10px #2ff3ff, inset 0 0 24px 10px rgba(47, 243, 255, .4) !important; }
/* scrolling code rain behind everything */
.screen.heist { position: relative; }
.screen.heist::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='160'%3E%3Cg font-family='monospace' font-size='12' fill='%2336ff8a'%3E%3Ctext x='4' y='14'%3E1%3C/text%3E%3Ctext x='4' y='40'%3E0%3C/text%3E%3Ctext x='4' y='92'%3E1%3C/text%3E%3Ctext x='28' y='26'%3E0%3C/text%3E%3Ctext x='28' y='66'%3E1%3C/text%3E%3Ctext x='28' y='132'%3E0%3C/text%3E%3Ctext x='52' y='8'%3E1%3C/text%3E%3Ctext x='52' y='54'%3E1%3C/text%3E%3Ctext x='52' y='118'%3E0%3C/text%3E%3Ctext x='76' y='34'%3E0%3C/text%3E%3Ctext x='76' y='80'%3E1%3C/text%3E%3Ctext x='76' y='150'%3E1%3C/text%3E%3Ctext x='100' y='20'%3E1%3C/text%3E%3Ctext x='100' y='104'%3E0%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 160px; animation: hx-rain 9s linear infinite; }
.screen.heist > * { position: relative; z-index: 1; }
@keyframes hx-rain { to { background-position: 0 160px; } }
/* terminal readout */
.hx-readout { padding: 8px 10px; background: rgba(0, 0, 0, .78); border: 2px solid #36ff8a; box-shadow: 0 0 10px rgba(54, 255, 138, .35), inset 0 0 14px rgba(54, 255, 138, .12);
  font: 12px/1.5 ui-monospace, Menlo, monospace; color: #36ff8a; text-shadow: 0 0 6px rgba(54, 255, 138, .7); }
.hx-readout-h { font-weight: 700; letter-spacing: .08em; margin-bottom: 2px; }
.hx-meter { display: flex; gap: 8px; align-items: baseline; white-space: nowrap; }
.hx-meter span { width: 40px; } .hx-meter i { font-style: normal; flex: 1; overflow: hidden; } .hx-meter b { width: 38px; text-align: right; }
.hx-meter.pink i, .hx-meter.pink span { color: #ff3fa4; text-shadow: 0 0 6px #ff3fa4; }
.hx-meter.cyan i, .hx-meter.cyan span { color: #2ff3ff; text-shadow: 0 0 6px #2ff3ff; }
.hx-cur { animation: blink 1s steps(1) infinite; margin-left: 2px; }
/* terminal status lines */
.hx-line { margin: 0; padding: 2px 2px; font: 13px/1.5 ui-monospace, Menlo, monospace; color: #c8ffe0; text-shadow: 0 0 6px rgba(54, 255, 138, .5); }
.hx-line b { font-weight: 700; }
/* YOU ARE THE HACKER, in your crew's colour */
.hx-you { --c: #ff3fa4; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 12px; text-align: center; background: rgba(5, 3, 12, .9);
  border: 3px solid var(--c); box-shadow: 0 0 10px var(--c), 0 0 30px color-mix(in srgb, var(--c) 45%, transparent), inset 0 0 14px color-mix(in srgb, var(--c) 25%, transparent); }
.hx-you.cyan { --c: #2ff3ff; }
.hx-you small { font: 10px/1 ui-monospace, Menlo, monospace; letter-spacing: .14em; color: var(--c); opacity: .85; }
.hx-you b { font-family: var(--px); font-size: 18px; font-weight: 400; text-transform: uppercase; color: var(--c); text-shadow: 0 0 6px var(--c), 0 0 18px var(--c); animation: hx-you 2.4s steps(1) infinite; }
@keyframes hx-you { 0%, 92%, 100% { opacity: 1; transform: none; } 93% { opacity: .6; transform: translateX(-2px); } 95% { opacity: 1; transform: translateX(2px); } }
/* the clue arrives as a transmission */
.hx-clue small { font: 10px/1.2 ui-monospace, Menlo, monospace !important; letter-spacing: .1em; color: var(--c) !important; }
/* mainframe header over the wall */
.hx-wall-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: -10px; padding: 4px 10px; background: #07040f; border: 3px solid #1d1530; border-bottom: 0;
  font: 11px/1 ui-monospace, Menlo, monospace; letter-spacing: .12em; color: #8b84a8; }
.hx-wall-h span:first-child { display: flex; align-items: center; gap: 6px; color: #c8c2e0; }
.hx-rec { width: 8px; height: 8px; border-radius: 50%; background: #ff2a2a; box-shadow: 0 0 6px #ff2a2a; animation: blink 1.2s steps(1) infinite; }
/* padlock on every locked screen */
.hx-lock { position: absolute; top: 3px; right: 4px; width: 7px; height: 8px; z-index: 1; opacity: .55;
  background: linear-gradient(currentColor, currentColor) 0 3px / 7px 5px no-repeat; border-radius: 1px; color: #7f8aa8; }
.hx-lock::before { content: ''; position: absolute; left: 1px; top: 0; width: 5px; height: 4px; box-sizing: border-box; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 3px 3px 0 0; }
.hx-board.key .hx-cell.o-pink .hx-lock { color: #ff3fa4; } .hx-board.key .hx-cell.o-cyan .hx-lock { color: #2ff3ff; } .hx-board.key .hx-cell.o-glitch .hx-lock { color: #ff2a2a; }
@media (prefers-reduced-motion: reduce) { .screen.heist::before, .hx-you b, .hx-rec, .hx-cur { animation: none; } }

/* ---------- Neon Heist: round score + the crews-only final screen ---------- */
.hx-score { font-family: var(--px); font-size: 20px; color: #fff; } .hx-score i { font-style: normal; }
.hx-score .pink { color: #ff3fa4; text-shadow: 0 0 8px #ff3fa4; } .hx-score .cyan { color: #2ff3ff; text-shadow: 0 0 8px #2ff3ff; }
.hx-ftitle.pink { color: #ff3fa4 !important; text-shadow: 0 0 10px #ff3fa4, 0 0 26px #ff3fa4 !important; }
.hx-ftitle.cyan { color: #2ff3ff !important; text-shadow: 0 0 10px #2ff3ff, 0 0 26px #2ff3ff !important; }
.hx-final { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hx-fcrew { --c: #ff3fa4; position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; background: rgba(5, 3, 12, .9);
  border: 3px solid color-mix(in srgb, var(--c) 40%, #0a0716); opacity: .7; }
.hx-fcrew.cyan { --c: #2ff3ff; }
.hx-fcrew.won { opacity: 1; border-color: var(--c); box-shadow: 0 0 10px var(--c), 0 0 30px color-mix(in srgb, var(--c) 50%, transparent), inset 0 0 16px color-mix(in srgb, var(--c) 25%, transparent); }
.hx-fcrew > b { font-family: var(--px); font-size: 12px; font-weight: 400; text-transform: uppercase; color: var(--c); text-shadow: 0 0 6px var(--c); }
.hx-fwins { font-family: var(--px); font-size: 34px; color: #fff; text-shadow: 0 0 10px var(--c); }
.hx-fmembers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hx-fm { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; }
.hx-fm small { font-family: var(--body); font-size: 15px; color: #fff; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 64px; }
.hx-stamp { position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-6deg); padding: 3px 6px; font: 8px/1 var(--px); font-style: normal; white-space: nowrap;
  color: #05030c; background: var(--c); box-shadow: 0 0 12px var(--c); }

/* ---------- Neon Heist: pink instead of yellow for all the yellow text and buttons ---------- */
#app.in-heist { --yellow: #ff3fa4; --neon-yellow: #ff3fa4; --logo-yellow: #ff3fa4; }
#app.in-heist .hx-m i { background: #ff3fa4; color: #fff; }
#app.in-heist .hx-m.hk .av { outline-color: #ff3fa4; }
#app.in-heist .hx-clue em { color: #ff3fa4; text-shadow: 0 0 8px #ff3fa4; }
#app.in-heist .lang-btn { color: #ff3fa4 !important; border-color: #ff3fa4 !important; }

/* Select game: Bluff Battles (#1) and Neon Heist (#4) are full-width banners. The frames keep their original shapes
   (banners 2:1, tiles nearly square) and the pictures fill them edge to edge, centred. */
.page .panel[data-mode="bluff"], .page .panel[data-mode="heist"] { grid-column: 1 / -1; }
.screen.modes .page .panel .art { aspect-ratio: 1 / 1.05; object-fit: cover; object-position: 50% 50%; }
.screen.modes .page .panel[data-mode="bluff"] .art, .screen.modes .page .panel[data-mode="heist"] .art { aspect-ratio: 2 / 1; }

/* ---------- Bluff Scale: late-night jazz lounge (red wine, gold, candlelight), still arcade ----------
   Applies to its lobby and game (#app.in-scale). Yellow becomes champagne gold, the frame is wine + gold,
   the background is a velvet wine-red room with a smoky spotlight and candle glows. */
#app.in-scale { --yellow: #f2c45a; --neon-yellow: #f2c45a; --logo-yellow: #f2c45a; --cyan: #f7d9a8; --orange: #ff6f61;
  background: radial-gradient(70% 45% at 50% 0%, rgba(255, 196, 120, .22), transparent 70%),
    radial-gradient(120% 90% at 50% 45%, #4a0c1f, #23040f 70%, #120208) !important; }
#app.in-scale::after { animation: none !important;
  box-shadow: inset 0 0 0 3px #b0183c, inset 0 0 16px 3px rgba(176, 24, 60, .65), inset 0 0 0 8px rgba(18, 2, 8, .9), inset 0 0 0 10px #f2c45a, inset 0 0 24px 10px rgba(242, 196, 90, .35) !important; }
/* velvet curtain folds, drifting smoke and candle glows behind everything */
#app.in-scale #scroller::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .22) 0 14px, rgba(255, 80, 110, .05) 14px 30px, rgba(0, 0, 0, .22) 30px 44px) top / 100% 120px no-repeat,
    radial-gradient(3px 3px at 12% 82%, #ffd38a 40%, transparent 60%), radial-gradient(30px 30px at 12% 82%, rgba(255, 180, 80, .35), transparent 70%),
    radial-gradient(3px 3px at 88% 76%, #ffd38a 40%, transparent 60%), radial-gradient(30px 30px at 88% 76%, rgba(255, 180, 80, .35), transparent 70%),
    radial-gradient(3px 3px at 70% 92%, #ffd38a 40%, transparent 60%), radial-gradient(26px 26px at 70% 92%, rgba(255, 180, 80, .3), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 120px, transparent 160px, #000 220px); mask: linear-gradient(#000 0 120px, transparent 160px, #000 220px);
  animation: lounge-candle 3.4s ease-in-out infinite; }
#app.in-scale #scroller::after { content: ''; position: fixed; inset: -20%; z-index: 0; pointer-events: none; opacity: .18;
  background: radial-gradient(40% 20% at 30% 60%, #fff 0%, transparent 70%), radial-gradient(35% 18% at 70% 35%, #fff 0%, transparent 70%);
  filter: blur(30px); animation: lounge-smoke 24s ease-in-out infinite alternate; }
#app.in-scale #scroller > * { position: relative; z-index: 1; }
@keyframes lounge-candle { 0%, 100% { opacity: 1; } 40% { opacity: .82; } 55% { opacity: .95; } 70% { opacity: .86; } }
@keyframes lounge-smoke { from { transform: translate(-4%, 2%) scale(1); } to { transform: translate(5%, -3%) scale(1.1); } }
/* the dial: gold zones like a wine label, a burgundy velvet cover */
#app.in-scale .dial .z1 { fill: #f2c45a; } #app.in-scale .dial .z2 { fill: #d4743c; } #app.in-scale .dial .z3 { fill: #b0183c; }
#app.in-scale .sc-cover path:first-child { fill: #6e1230; }
#app.in-scale .dial .sc-q { fill: #f2c45a; }
#app.in-scale .sc-ends b { color: #f7d9a8; } #app.in-scale .sc-ends b:last-child { color: #ff8f84; }
/* the clue arrives on a cream cocktail card with a gold edge */
#app.in-scale .sc-clue { background: #fbf1dc; border-color: #2a0611; box-shadow: 5px 5px 0 #b0183c, 0 0 0 2px #f2c45a inset; }
#app.in-scale .sc-clue small { color: #8e1b3a; letter-spacing: .08em; }
#app.in-scale .sc-clue b { color: #2a0611; }
#app.in-scale .screen.scale h2, #app.in-scale .sc-faker b { color: #f2c45a; text-shadow: 3px 3px 0 #6e1230, 0 0 12px rgba(242, 196, 90, .45); }
#app.in-scale .sc-stamp.caught { background-color: #b0183c; box-shadow: 7px 7px 0 #f2c45a; }
#app.in-scale .sc-stamp.away { background-color: #f2c45a; box-shadow: 7px 7px 0 #6e1230; }
#app.in-scale .sc-drum { color: #f2c45a !important; }
#app.in-scale .lang-btn { color: #f2c45a !important; border-color: #f2c45a !important; }
#app.in-scale .snd:not(.lang-btn) { color: #f7d9a8; }
@media (prefers-reduced-motion: reduce) { #app.in-scale #scroller::before, #app.in-scale #scroller::after { animation: none; } }
#app.in-scale .dial { filter: drop-shadow(5px 6px 0 #b0183c) drop-shadow(0 0 14px rgba(242, 196, 90, .25)); }

/* ---------- each game's own theme (frame, accent colour, background), like Neon Heist and Bluff Scale ----------
   Applies to the game's lobby and the game itself (#app.in-<mode>). */

/* Bluff Battles: a TV game-show stage. Gold marquee frame, studio-blue night, two spotlights sweeping. */
#app.in-bluff { --yellow: #ffd23a; --neon-yellow: #ffd23a;
  background: radial-gradient(60% 40% at 50% 0%, rgba(80, 140, 255, .28), transparent 70%), radial-gradient(120% 90% at 50% 45%, #10204e, #070c22 70%, #04060f) !important; }
#app.in-bluff::after { animation: none !important;
  box-shadow: inset 0 0 0 3px #ffd23a, inset 0 0 16px 3px rgba(255, 210, 58, .6), inset 0 0 0 8px rgba(4, 6, 15, .9), inset 0 0 0 10px #ff3b2f, inset 0 0 22px 10px rgba(255, 59, 47, .35) !important; }
#app.in-bluff #scroller::before { content: ''; position: fixed; inset: -10%; z-index: 0; pointer-events: none; opacity: .5;
  background: conic-gradient(from 160deg at 20% -5%, transparent 0 12deg, rgba(255, 230, 150, .28) 16deg 24deg, transparent 28deg),
              conic-gradient(from 176deg at 80% -5%, transparent 0 12deg, rgba(150, 200, 255, .25) 16deg 24deg, transparent 28deg);
  animation: show-sweep 7s ease-in-out infinite alternate; }
/* marquee bulbs along the top */
#app.in-bluff #scroller::after { content: ''; position: fixed; left: 14px; right: 14px; top: 12px; height: 6px; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, #fff3a0 0 2px, rgba(255, 210, 58, .5) 3px, transparent 4px) 0 50% / 16px 6px repeat-x; animation: bulbs 1s steps(2) infinite; }
#app.in-bluff #scroller > * { position: relative; z-index: 1; }
@keyframes show-sweep { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes bulbs { 50% { background-position: 8px 50%; } }

/* Impostor: suspicion. Purple frame with a blood-red inner line, a dark violet room and a slow red searchlight. */
#app.in-impostor { --yellow: #c49bff; --neon-yellow: #c49bff;
  background: radial-gradient(120% 90% at 50% 40%, #241044, #0e0620 70%, #06030e) !important; }
#app.in-impostor::after { animation: none !important;
  box-shadow: inset 0 0 0 3px #b86bff, inset 0 0 16px 3px rgba(184, 107, 255, .6), inset 0 0 0 8px rgba(6, 3, 14, .9), inset 0 0 0 10px #ff3b5c, inset 0 0 22px 10px rgba(255, 59, 92, .3) !important; }
#app.in-impostor #scroller::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(35% 22% at 50% 50%, rgba(255, 50, 80, .22), transparent 70%); animation: searchlight 9s ease-in-out infinite alternate; }
#app.in-impostor #scroller > * { position: relative; z-index: 1; }
@keyframes searchlight { 0% { transform: translate(-30%, -25%); } 50% { transform: translate(25%, 5%); } 100% { transform: translate(-10%, 30%); } }

/* Countdown Bomb: danger. Red frame with hazard-yellow inside, a dark red room, hazard stripes along the bottom, a red alarm pulse. */
#app.in-bomb { --yellow: #ffcc00; --neon-yellow: #ffcc00;
  background: radial-gradient(120% 90% at 50% 40%, #3a0808, #1a0303 70%, #0c0101) !important; }
#app.in-bomb::after { animation: alarm-frame 1.6s ease-in-out infinite !important;
  box-shadow: inset 0 0 0 3px #ff2a2a, inset 0 0 16px 3px rgba(255, 42, 42, .6), inset 0 0 0 8px rgba(12, 1, 1, .9), inset 0 0 0 10px #ffcc00, inset 0 0 22px 10px rgba(255, 204, 0, .3) !important; }
#app.in-bomb #scroller::before { content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: 16px; z-index: 0; pointer-events: none; opacity: .55;
  background: repeating-linear-gradient(-45deg, #ffcc00 0 12px, #120202 12px 24px); }
#app.in-bomb #scroller > * { position: relative; z-index: 1; }
@keyframes alarm-frame { 0%, 100% { filter: none; } 50% { filter: brightness(1.35) drop-shadow(0 0 10px rgba(255, 42, 42, .6)); } }

/* Draw & Guess: a sketchbook at night. Lime frame with a pink inner line, a dark chalkboard-green page with faint grid paper. */
#app.in-draw { --yellow: #9dff5a; --neon-yellow: #9dff5a;
  background: radial-gradient(120% 90% at 50% 40%, #0f2a1e, #07150f 70%, #030a07) !important; }
#app.in-draw::after { animation: none !important;
  box-shadow: inset 0 0 0 3px #7cff3a, inset 0 0 16px 3px rgba(124, 255, 58, .55), inset 0 0 0 8px rgba(3, 10, 7, .9), inset 0 0 0 10px #ff3fa4, inset 0 0 22px 10px rgba(255, 63, 164, .3) !important; }
#app.in-draw #scroller::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(157, 255, 90, .07) 0 1px, transparent 1px 22px), repeating-linear-gradient(90deg, rgba(157, 255, 90, .07) 0 1px, transparent 1px 22px); }
#app.in-draw #scroller > * { position: relative; z-index: 1; }

/* the language button follows each game's accent */
#app.in-bluff .lang-btn { color: #ffd23a !important; border-color: #ffd23a !important; }
#app.in-impostor .lang-btn { color: #c49bff !important; border-color: #c49bff !important; }
#app.in-bomb .lang-btn { color: #ffcc00 !important; border-color: #ffcc00 !important; }
#app.in-draw .lang-btn { color: #9dff5a !important; border-color: #9dff5a !important; }
@media (prefers-reduced-motion: reduce) { #app.in-bluff #scroller::before, #app.in-bluff #scroller::after, #app.in-impostor #scroller::before, #app.in-bomb::after { animation: none !important; } }

/* Countdown Bomb: the big digital clock in the background (bombClock() in app.js) */
.bomb-clock { position: absolute; left: 0; right: 0; top: 44%; z-index: 0; pointer-events: none; display: grid; place-items: center;
  font: 900 92px/1 "Courier New", ui-monospace, monospace; letter-spacing: .02em; transform: translateY(-50%) skewX(-6deg); }
.bomb-clock span { grid-area: 1 / 1; }
.bomb-clock .bc-off { color: rgba(255, 42, 42, .05); }
.bomb-clock .bc-on { color: rgba(255, 42, 42, .22); text-shadow: 0 0 18px rgba(255, 42, 42, .35); }
.bomb-clock.hot .bc-on { color: rgba(255, 42, 42, .22); animation: bc-flash .5s steps(1) infinite; }
@keyframes bc-flash { 50% { opacity: .4; } }

/* Draw & Guess: faint pencil doodles all over the dark page */
#app.in-draw #scroller::after { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .22;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='3'%3E%3Cpath d='M30 40l6 12 13 2-10 9 3 13-12-7-12 7 3-13-10-9 13-2z' stroke='%239dff5a'/%3E%3Cpath d='M170 50c10-12 30-2 22 12-6 10-22 8-22-2 0-6 8-8 10-2' stroke='%23ff3fa4'/%3E%3Cpath d='M120 130c-8-10-26-4-20 10 4 8 20 18 20 18s16-10 20-18c6-14-12-20-20-10z' stroke='%23ff3fa4'/%3E%3Ccircle cx='60' cy='170' r='18' stroke='%239dff5a'/%3E%3Cpath d='M53 166h1M67 166h1M52 176c4 5 12 5 16 0' stroke='%239dff5a'/%3E%3Cpath d='M190 170c8-6 16 6 24 0s16 6 24 0' stroke='%239dff5a'/%3E%3Cpath d='M100 40l18 18M118 40l-18 18' stroke='%2338eaff'/%3E%3Cpath d='M20 110q20-20 40 0t40 0' stroke='%2338eaff'/%3E%3Cpath d='M200 110l-12 22h24z' stroke='%23ffd42a'/%3E%3C/svg%3E") 0 0 / 240px 240px; }

/* lobby + topic picking + every card in the game follow the game's theme: the cyan used for cards, buttons and
   outlines becomes each game's second colour */
#app.in-bluff { --cyan: #6fa8ff; --neon-cyan: #6fa8ff; --mint: #6fa8ff; }
#app.in-impostor { --cyan: #b86bff; --neon-cyan: #b86bff; --mint: #b86bff; --neon-pink: #ff3b5c; }
#app.in-bomb { --cyan: #ff4a3a; --neon-cyan: #ff4a3a; --mint: #ff4a3a; }
#app.in-draw { --cyan: #7cff3a; --neon-cyan: #7cff3a; --mint: #7cff3a; }
#app.in-bomb .bomb-stage { border-color: rgba(255, 74, 58, .45); background: radial-gradient(circle, rgba(255, 204, 0, .2) 0 28%, transparent 29%), radial-gradient(circle, rgba(255, 255, 255, .06) 1px, transparent 1.6px) 0 0 / 9px 9px; }
/* the lobby banner keeps its game's colour even without a room (Impostor on one phone) */
#app.in-impostor .lobby-hero { --fc: #b86bff !important; } #app.in-bluff .lobby-hero { --fc: #ffe94a !important; } #app.in-bomb .lobby-hero { --fc: #ff2a2a !important; }
#app.in-draw .lobby-hero { --fc: #7cff3a !important; } #app.in-heist .lobby-hero { --fc: #2ff3ff !important; } #app.in-scale .lobby-hero { --fc: #f2c45a !important; }

/* ---------- song picker (the music button) ---------- */
.song-head { display: flex; align-items: center; justify-content: space-between; }
.song-head h2 { margin: 0; }
.songs { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow: auto; }
.song { display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-align: left; background: #0a0716; color: #fff; border: 2px solid #3d3560; cursor: pointer; }
.song b { display: block; font-family: var(--px); font-size: 11px; font-weight: 400; text-transform: uppercase; }
.song small { font-family: var(--body); font-size: 17px; color: #b9b0d8; }
.song.on { border-color: var(--neon-yellow, #ffe94a); box-shadow: 0 0 10px var(--neon-yellow, #ffe94a); }
.song.on b { color: var(--neon-yellow, #ffe94a); }
.song-eq { display: flex; align-items: flex-end; gap: 2px; width: 16px; height: 16px; flex: none; }
.song-eq i { width: 4px; height: 30%; background: #3d3560; }
.song.on .song-eq i { background: var(--neon-yellow, #ffe94a); animation: song-eq .8s ease-in-out infinite; }
.song.on .song-eq i:nth-child(2) { animation-delay: -.3s; } .song.on .song-eq i:nth-child(3) { animation-delay: -.55s; }
@keyframes song-eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.bar-right .mus-btn { width: 38px; height: 38px; padding: 0; }
@media (prefers-reduced-motion: reduce) { .song.on .song-eq i { animation: none; height: 70%; } }

/* ---------- the full website: on a laptop / desktop (900px and wider) the game fills the browser ----------
   No phone frame: the neon frame runs around the whole window. Menus use a wide layout (up to 1000px), lobbies and
   games a comfortable centred column (up to 720px). Pop-ups sit in the middle instead of stretching edge to edge. */
@media (min-width: 900px) {
  body { display: block !important; background: #05030c !important; }
  #app { width: 100vw !important; height: 100dvh !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; transform: none !important; }
  .screen { --col: 720px; }
  .screen.home, .screen.modes { --col: 1000px; }
  #top, #body, #dock { padding-left: max(24px, calc((100% - var(--col)) / 2)) !important; padding-right: max(24px, calc((100% - var(--col)) / 2)) !important; }
  #top { padding-top: 22px !important; }
  /* home: big logo on top, New game and Join game side by side */
  .screen.home #body { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-content: start; }
  .screen.home #body > .mast, .screen.home #body > .attract { grid-column: 1 / -1; }
  .screen.home .logo-wrap { max-width: 640px; margin: 10px auto 0; }
  /* Select game: four columns; the two banners take two columns each, so every row lines up */
  .screen.modes .page { grid-template-columns: repeat(4, 1fr); gap: 22px 18px; }
  .screen.modes .page .panel[data-mode="bluff"], .screen.modes .page .panel[data-mode="heist"] { grid-column: span 2; }
  .screen.modes .page .panel .art { aspect-ratio: 1 / 1.02; }
  .screen.modes .page .panel[data-mode="bluff"] .art, .screen.modes .page .panel[data-mode="heist"] .art { aspect-ratio: 2.08 / 1.02; }
  .screen.modes .page .panel[data-mode="heist"] .art { object-position: 50% 30%; }
  .screen.modes .pagetitle { font-size: 40px; }
  .page .panel .cap { font-size: 11px; } .page .panel .say { font-size: 9px; }
  /* pop-ups and the song picker in the middle */
  .sheet { width: min(560px, 100%); margin-inline: auto; }
  .ps-scroll { max-width: 600px; margin: 0 auto; }
  /* a little more room in games */
  .dial-wrap { max-width: 520px; } .dial-wrap.small { max-width: 320px; }
  .hx-cell { min-height: 72px; font-size: 12px; } .hx-cell.l7 { font-size: 10px; } .hx-cell.l9 { font-size: 8.5px; } .hx-cell.l11 { font-size: 7.5px; }
}

/* Neon Heist: the highlights (number buttons, taps left, timer, Skip, the clue's number, H badges) are in your crew's
   colour: pink if you're on Pink, cyan if you're on Cyan */
#app.in-heist .screen.heist.me-cyan { --yellow: #2ff3ff; --neon-yellow: #2ff3ff; }
#app.in-heist .screen.heist.me-pink { --yellow: #ff3fa4; --neon-yellow: #ff3fa4; }
#app.in-heist .screen.heist.me-cyan .hx-clue em { color: #2ff3ff; text-shadow: 0 0 8px #2ff3ff; }
#app.in-heist .screen.heist.me-cyan .hx-m i { background: #2ff3ff; color: #05030c; }
#app.in-heist .screen.heist.me-cyan .hx-m.hk .av { outline-color: #2ff3ff; }
#app.in-heist .screen.heist.me-cyan .hx-nums button { border-color: #1f6a78; }

/* Neon Heist pop-up: "Play with friends" in cyan (readable dark subtitle), "Practice with bots" in pink */
#app.in-heist .sheet .btn.go { background: #2ff3ff !important; color: #05030c !important; border-color: #c8fdff !important;
  box-shadow: 0 6px 0 #0a7f8f, 0 0 10px #2ff3ff, 0 0 26px rgba(47, 243, 255, .6) !important; text-shadow: none !important; }
#app.in-heist .sheet .btn.go small { color: #05030c !important; opacity: .8; }
#app.in-heist .sheet .btn.xl:not(.go) { border-color: #ff3fa4 !important; color: #ff3fa4 !important; box-shadow: 0 0 8px #ff3fa4, 0 0 22px rgba(255, 63, 164, .45) !important; text-shadow: 0 0 6px #ff3fa4; }
#app.in-heist .sheet .btn.xl:not(.go) small { color: #ffd0ea !important; }

/* every game's pop-up: the main button ("Play with friends" / "Play online") filled with the game's colour,
   the other buttons ("Practice with bots", "One phone") outlined in its second colour */
#app.in-bluff    { --pa: #ffd23a; --ptx: #120e18; --pb: #6fa8ff; --pd: #a8763a; }
#app.in-impostor { --pa: #b86bff; --ptx: #0e0620; --pb: #ff3b5c; --pd: #5b2bb0; }
#app.in-scale    { --pa: #f2c45a; --ptx: #2a0611; --pb: #ff6f61; --pd: #8e1b3a; }
#app.in-draw     { --pa: #7cff3a; --ptx: #07150f; --pb: #ff3fa4; --pd: #2b9a54; }
#app.in-bomb     { --pa: #ff2a2a; --ptx: #ffffff; --pb: #ffcc00; --pd: #8a0e0e; }
#app:is(.in-bluff, .in-impostor, .in-scale, .in-draw, .in-bomb) .sheet .btn.go {
  background: var(--pa) !important; color: var(--ptx) !important; border-color: color-mix(in srgb, var(--pa) 55%, #fff) !important; text-shadow: none !important;
  box-shadow: 0 6px 0 var(--pd), 0 0 10px var(--pa), 0 0 26px color-mix(in srgb, var(--pa) 55%, transparent) !important; }
#app:is(.in-bluff, .in-impostor, .in-scale, .in-draw, .in-bomb) .sheet .btn.go small { color: var(--ptx) !important; opacity: .8; }
#app:is(.in-bluff, .in-impostor, .in-scale, .in-draw, .in-bomb) .sheet .btn.xl:not(.go) {
  border-color: var(--pb) !important; color: var(--pb) !important; text-shadow: 0 0 6px var(--pb);
  box-shadow: 0 0 8px var(--pb), 0 0 22px color-mix(in srgb, var(--pb) 45%, transparent) !important; }
#app:is(.in-bluff, .in-impostor, .in-scale, .in-draw, .in-bomb) .sheet .btn.xl:not(.go) small { color: color-mix(in srgb, var(--pb) 45%, #fff) !important; }
@media (min-width: 900px) { .ps-hall { top: 110px; } }

/* ---- photo characters: the "+ YOU" tile and the photo editor (public/photo-avatar.js) ---- */
.px-add { background: none; border: 0; padding: 0; font: inherit; }
.px-add .av.px { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: #120e24 !important;
  border: 3px dashed #2ff3ff !important; box-shadow: 0 0 12px rgba(47, 243, 255, .45) !important; }
.px-add b { font-family: var(--px); font-size: 20px; line-height: 1; color: #2ff3ff; text-shadow: 0 0 8px #2ff3ff; }
.px-add small { font-size: 8px !important; color: #fff !important; }
.pa-wrap { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 14px;
  background: rgba(5, 3, 12, .86); backdrop-filter: blur(3px); }
.pa-box { width: min(360px, 100%); max-height: 100%; overflow: auto; padding: 16px 14px 14px; background: #0d0920; border: 3px solid #9b5cff;
  box-shadow: 0 0 0 3px #05030c, 0 0 30px rgba(155, 92, 255, .6); display: flex; flex-direction: column; gap: 10px; }
.pa-title { margin: 0; font-family: var(--px); font-size: 15px; text-align: center; color: #fff; text-shadow: 0 0 10px #ff3fa4; }
.pa-say { margin: 0; font-family: var(--body); font-size: 18px; line-height: 1.15; text-align: center; color: #c9c0e8; }
.pa-stage { position: relative; width: 280px; max-width: 100%; aspect-ratio: 1; margin: 0 auto; border: 3px solid #2ff3ff; box-shadow: 0 0 14px rgba(47, 243, 255, .5); }
.pa-cv { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.pa-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.pa-empty[hidden] { display: none; }
.pa-hero { display: flex; justify-content: center; }
.pa-hero .pa-prev.av.px { width: 168px; height: 168px; --c: #ffe94a; box-shadow: 0 0 0 4px #ffe94a, 0 0 24px #ffe94a, 0 0 50px rgba(255, 63, 164, .6) !important; }
.pa-wait { display: flex; height: 100%; align-items: center; justify-content: center; text-align: center; font-family: var(--px); font-size: 10px; color: #fff; padding: 20px; }
.pa-adjust { display: flex; flex-direction: column; gap: 8px; }
.pa-adjust[hidden] { display: none; }
.pa-hint { margin: 0; text-align: center; font-family: var(--body); font-size: 16px; color: #c9c0e8; }
.pa-check { flex-direction: row !important; align-items: center; gap: 8px !important; }
.pa-check input { accent-color: #ff3fa4; width: 18px; height: 18px; }
.pa-cancel { align-self: center; }
.pa-row { display: flex; align-items: center; gap: 12px; }
.pa-prev.av.px { width: 92px; height: 92px; flex: none; --c: #ffe94a; }
.pa-ctl { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.pa-ctl label { display: flex; flex-direction: column; gap: 2px; font-family: var(--px); font-size: 9px; text-transform: uppercase; color: #2ff3ff; }
.pa-ctl input[type=range] { width: 100%; accent-color: #ff3fa4; }
.pa-btns { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 6px; }
.pa-ctl { display: flex; flex-direction: column; gap: 6px; }
.pa-btns .btn { padding: 10px 4px; font-size: 10px; }

/* ---------- BLAF Pass (locked preview) ---------- */
/* Lock mark: a small gold pixel lock + PASS, at the end of the player count. Locked pictures are dimmed a little. */
.lk { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: #f2c94c; font-style: normal; }
.lk em { font-style: normal; letter-spacing: 1px; }
.lk-ico { display: block; flex: none; }
.panel.locked .art { filter: saturate(.55) brightness(.6) !important; }
.panel.locked .cap { opacity: .85; }
body.rtl .lk { margin-left: 0; margin-right: auto; }
/* locked topics: dimmed picture, a gold lock in a dark corner square */
.pack.locked img { filter: saturate(.4) brightness(.45) !important; }
.pack.locked span { color: #b9b3c6; }
.pack .lk-c, .px-add .lk-c { position: absolute; right: 0; top: 0; padding: 5px 5px 4px; background: #0d0b12; color: #f2c94c; line-height: 0; }
.px-add { position: relative; } .px-add.locked .av { opacity: .8; }
.px-add .lk-c { right: 2px; top: 2px; border-radius: 4px; z-index: 2; }
/* mode pop-up of a locked game */
.pass-note { display: flex; align-items: center; justify-content: center; gap: 8px; color: #f2c94c; font-family: var(--px); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.pass-note .lk-ico { width: 12px; height: 14px; }
#app .sheet .btn.go.pass-go, #app .sheet .btn.go.pass-buy, .btn.pass-go, .btn.pass-buy { background: #f2c94c !important; color: #0d0b12 !important; border-color: #0d0b12 !important; box-shadow: 4px 4px 0 #000 !important; text-shadow: none !important; }
/* the ticket */
.ticket { position: relative; display: flex; background: #efe6d2; color: #0d0b12; box-shadow: 5px 5px 0 #000; flex: none; }
.ticket .tk-l { flex: 1; min-width: 0; padding: 12px 14px 11px; display: flex; flex-direction: column; gap: 7px; border-right: 2px dashed rgba(13, 11, 18, .4); }
.ticket small { font-family: var(--px); font-size: 7px; letter-spacing: 1.5px; color: #6b5f48; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket .tk-mark { display: flex; align-items: center; gap: 10px; direction: ltr; }
.ticket .tk-logo { width: 116px; flex: none; } .ticket .tk-logo svg { display: block; width: 100%; height: auto; }
.ticket .tk-mark b { font-family: var(--px); font-size: 26px; line-height: 1; letter-spacing: 1px; }
.ticket .tk-r { width: 40px; background: #f2c94c; display: flex; align-items: center; justify-content: center; }
.ticket .tk-r b { font-family: var(--px); font-size: 8px; letter-spacing: 2px; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.ticket .tk-h { position: absolute; right: 31px; width: 18px; height: 18px; border-radius: 50%; background: var(--black); }
.ticket .tk-h.t { top: -9px; } .ticket .tk-h.b { bottom: -9px; }
/* the BLAF Pass screen */
.pass-say { color: #b9b3c6 !important; font-size: 20px !important; }
.pass-sec { display: flex; justify-content: space-between; font-family: var(--px); font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: #fff; padding-bottom: 7px; border-bottom: 1px solid #2a2633; margin-top: 4px; }
.pass-sec i { font-style: normal; color: #8b8597; }
.pass-games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pass-games .pg .art { aspect-ratio: 1; object-fit: cover; border: 2px solid var(--fc, #4b4466); }
.pass-games .pg.g-heist { --fc: #2ff3ff; } .pass-games .pg.g-draw { --fc: #7cff3a; } .pass-games .pg.g-bomb { --fc: #ff2a2a; }
.pass-games .pg b { display: block; margin-top: 6px; font-family: var(--px); font-size: 7px; line-height: 1.4; text-align: center; color: #fff; text-transform: uppercase; }
.pass-topics { columns: 2; column-gap: 12px; }
.pass-topics div { break-inside: avoid; display: flex; align-items: center; gap: 8px; padding: 3px 0; font-family: var(--body); font-size: 18px; line-height: 1.05; color: #e6e1ee; }
.pass-topics img { width: 24px; height: 24px; object-fit: cover; flex: none; }
.pass-char { display: flex; align-items: center; gap: 12px; font-family: var(--body); font-size: 18px; line-height: 1.1; color: #e6e1ee; }
.pass-char .av { width: 48px; height: 48px; flex: none; border: 2px solid #f2c94c; border-radius: 0; }
.pass-have { text-align: center; font-family: var(--px); font-size: 11px; color: #f2c94c; padding: 14px 0; }

/* Player Select: remove your photo character (x, then DELETE to confirm) */
.px-ph { position: relative; display: flex; justify-content: center; }
.px-del { position: absolute; top: -4px; right: -2px; z-index: 3; min-width: 22px; height: 22px; padding: 0 5px; border: 2px solid #0d0b12; border-radius: 11px; background: #ff3b2f; color: #fff; font-family: var(--px); font-size: 11px; line-height: 18px; box-shadow: 0 2px 0 #000; cursor: pointer; }
.px-del.armed { font-size: 7px; letter-spacing: 1px; right: -14px; padding: 0 7px; }
body.rtl .px-del { right: auto; left: -2px; } body.rtl .px-del.armed { left: -14px; }

/* Beat pulse (app.js "beat pulse"): --beat goes 0..1 on each drum hit. `scale` is separate from `transform`, so it
   adds to the existing hover / power-on animations instead of replacing them. */
#app { --beat: 0; }
.logo-wrap { scale: calc(1 + var(--beat) * .06); }
.timer, .pagetitle .nl, .ps-title .nl { scale: calc(1 + var(--beat) * .08); }
@media (prefers-reduced-motion: reduce) { .logo-wrap, .timer, .pagetitle .nl, .ps-title .nl { scale: none; } }
