/* DEAD AIR: the look. A dark pirate-radio studio; content lives on riso-printed paper cards taped to the wall.
   Three inks (fluorescent pink, riso blue, sun yellow) printed slightly out of register, halftone everywhere.
   Mode stylesheets (modes/<id>/style.css) build on these tokens and components. */

:root {
  --ink: #151318;
  --ink-2: #1f1c24;
  --ink-3: #2c2833;
  --smoke: #8d8696;
  --paper: #f2e8d5;
  --paper-2: #e6d8bd;
  --paper-ink: #1c1920;
  --pink: #ff4f8b;
  --pink-deep: #d42c68;
  --blue: #3a63e8;
  --blue-deep: #2443b5;
  --yellow: #ffd23f;
  --yellow-deep: #e0a91b;
  --mint: #39c6a0;
  --orange: #ff7a3d;
  --lilac: #a68bff;
  --red: #ef3e36;
  --good: #39c6a0;
  --bad: #ef3e36;
  --shadow: 5px 5px 0 rgba(0, 0, 0, .55);
  --shadow-sm: 3px 3px 0 rgba(0, 0, 0, .5);
  --radius: 7px;
  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, 'Courier New', monospace;
  --gutter: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .5 0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='.55'/></svg>");
  --grain-light: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .2  0 0 0 0 .15  0 0 0 0 .1  0 0 0 .22 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  --dots: radial-gradient(rgba(0, 0, 0, .2) 1px, transparent 1.5px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
/* no zooming while playing: double tap and pinch are off everywhere (main.js blocks the iOS pinch gesture too);
   text fields stay at 16px or more, otherwise iOS zooms in when one is tapped */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* no pull-to-refresh (a swipe down used to reload the page and drop you on the home screen): the page itself never
   scrolls, and every scrolling panel keeps its overscroll to itself instead of handing it to the browser */
html, body { overscroll-behavior: none; overflow: hidden; }
.scroll, .mbrowser, .cat-sheet, .dbg-list, .sheet, .df-page, [class*="scroll"] { overscroll-behavior: contain; }
input, textarea, select { font-size: max(16px, 1em); }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.35;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
input, textarea { user-select: text; -webkit-user-select: text; }
button { font: inherit; color: inherit; }
img, svg { display: block; }

/* ---------------------------------------------------------------- studio wall */
.studio {
  position: fixed; inset: 0;
  display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr);
  background:
    radial-gradient(ellipse 80% 45% at 15% -5%, rgba(255, 79, 139, .16), transparent 70%),
    radial-gradient(ellipse 70% 40% at 100% 105%, rgba(58, 99, 232, .2), transparent 70%),
    var(--ink);
}
.studio::before { /* halftone wash */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .055) 1.1px, transparent 1.6px);
  background-size: 7px 7px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000, transparent 75%);
}
.studio::after { content: ''; position: absolute; inset: 0; background: var(--grain); opacity: .22; pointer-events: none; mix-blend-mode: overlay; }

/* ---------------------------------------------------------------- top bar */
.bar {
  position: relative; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-top) + 10px) var(--gutter) 10px;
  min-height: 56px;
}
.onair {
  display: inline-flex; align-items: center; gap: 7px;
  font: 700 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 9px 6px 8px; border-radius: 4px;
  background: #2a0f18; color: #6b3447; border: 1.5px solid #4a1a2b;
}
.onair i { width: 9px; height: 9px; border-radius: 50%; background: #5a2235; }
.onair.live { color: #ffd7e5; background: #4a0f22; border-color: var(--pink); box-shadow: 0 0 18px rgba(255, 79, 139, .45), inset 0 0 8px rgba(255, 79, 139, .4); }
.onair.live i { background: var(--pink); box-shadow: 0 0 10px var(--pink); animation: lamp 1.6s ease-in-out infinite; }
@keyframes lamp { 50% { opacity: .55; } }
.bar .code { font: 700 13px/1 var(--mono); letter-spacing: .2em; color: var(--paper); opacity: .85; }
.bar .spacer { flex: 1; }
.iconbtn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: var(--ink-3); border: 1.5px solid rgba(255, 255, 255, .08); cursor: pointer;
}
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn:active { transform: scale(.94); }
.iconbtn.off { color: var(--pink); border-color: rgba(255, 79, 139, .45); }
.iconbtn { flex: none; }
/* the bar must never widen the page: during a show phones drop the room code and shrink the buttons */
.bar { gap: 8px; min-width: 0; overflow: hidden; }
.onair { white-space: nowrap; flex: none; }
.mescore { min-width: 0; white-space: nowrap; overflow: hidden; }
/* phones in a show: the ON AIR pill becomes its lamp so the score next to the avatar is never clipped */
@media (max-width: 440px) { .bar.live .onair { font-size: 0; gap: 0; padding: 7px; } }
@media (max-width: 520px) {
  .bar.live .code { display: none; }
  .bar.live { gap: 6px; }
  .bar.live .iconbtn { width: 38px; height: 38px; }
  .bar.live .iconbtn svg { width: 18px; height: 18px; }
  .bar.live .mescore .av { width: 28px; height: 28px; }
  .bar.live .mescore { font-size: 18px; gap: 6px; }
}
@media (max-width: 370px) { .bar.live .onair { font-size: 0; gap: 0; padding: 7px; } .bar.live .iconbtn { width: 34px; height: 34px; } }
.mescore { display: flex; align-items: center; gap: 8px; font: 400 20px/1 var(--display); letter-spacing: .02em; }
.mescore .av { width: 34px; height: 34px; }
.rulebar {
  position: relative; z-index: 4; margin: 0 var(--gutter); padding: 6px 10px; border-radius: 4px;
  font: 700 12px/1.3 var(--mono); color: var(--ink); background: var(--yellow);
  transform: rotate(-.6deg); box-shadow: var(--shadow-sm);
}
.rulebar b { letter-spacing: .1em; margin-right: 6px; }

/* ---------------------------------------------------------------- stage */
.mid { position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 0; }
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.fadein { animation: fade .25s both; }
.scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 6px var(--gutter) 24px; }
.screen-mode .scroll { overflow: hidden; padding-bottom: 12px; } /* the TV never scrolls: main.js fitStage scales a tall view down instead */
.screen-mode .center { justify-content: safe center; } /* too tall: spill downwards (measurable), never off the top */
.center { min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.wrap { max-width: 560px; margin: 0 auto; width: 100%; }
.screen-mode .wrap { max-width: 1100px; }

/* ---------------------------------------------------------------- paper cards */
.paper {
  position: relative;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 3px;
  padding: 18px;
  box-shadow: var(--shadow);
  background-image: var(--grain-light), linear-gradient(180deg, rgba(255, 255, 255, .25), transparent 40%);
  background-blend-mode: multiply, normal;
}
.paper.tilt-l { transform: rotate(-1.1deg); }
.paper.tilt-r { transform: rotate(.9deg); }
.paper.pink { background-color: var(--pink); }
.paper.blue { background-color: var(--blue); color: #fff; }
.paper.yellow { background-color: var(--yellow); }
.paper.dark { background-color: var(--ink-2); color: var(--paper); background-image: var(--grain); }
.tape {
  position: absolute; width: 84px; height: 24px; top: -11px; left: 50%; margin-left: -42px;
  background: rgba(255, 238, 170, .62); transform: rotate(-3deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 45%);
}
.tape.r { left: auto; right: -18px; top: 8px; transform: rotate(38deg); }
.tape.l { left: -18px; margin: 0; top: 8px; transform: rotate(-36deg); }
.halftone { position: relative; }
.halftone::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: var(--dots); background-size: 5px 5px; opacity: .45; mix-blend-mode: multiply; border-radius: inherit; }

/* ---------------------------------------------------------------- type */
.display { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: .95; text-transform: uppercase; }
.mis { text-shadow: 2px 2px 0 var(--pink), -2px -1px 0 var(--blue); }
.mis-y { text-shadow: 3px 2px 0 var(--yellow), -2px -1px 0 var(--pink); }
.paper .mis { text-shadow: 2px 2px 0 rgba(255, 79, 139, .85), -1.5px -1px 0 rgba(58, 99, 232, .8); }
h1, h2, h3 { margin: 0; }
.h1 { font: 400 clamp(44px, 13vw, 92px)/.9 var(--display); text-transform: uppercase; }
.h2 { font: 400 clamp(28px, 8vw, 46px)/.95 var(--display); text-transform: uppercase; }
.h3 { font: 400 22px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.kicker { font: 700 11px/1.2 var(--mono); letter-spacing: .18em; text-transform: uppercase; opacity: .75; }
.kicker > svg { width: 1.4em; height: 1.4em; vertical-align: -.35em; margin-right: .3em; } /* an inline icon in a kicker (unsized it filled the whole card) */
.q { font: 700 clamp(21px, 5.6vw, 30px)/1.18 var(--body); letter-spacing: -.01em; }
.screen-mode .q { font-size: clamp(30px, 3.4vw, 54px); }
.small { font-size: 13px; opacity: .8; }
.mono { font-family: var(--mono); }
.muted { opacity: .65; }
.center-t { text-align: center; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --bg: var(--pink); --fg: var(--ink);
  appearance: none; border: 3px solid var(--ink); cursor: pointer;
  background: var(--bg); color: var(--fg);
  font: 400 22px/1 var(--display); text-transform: uppercase; letter-spacing: .03em;
  padding: 16px 20px 15px; border-radius: var(--radius);
  --plate: var(--blue);
  box-shadow: 5px 5px 0 -1px var(--plate);
  transition: transform .06s, box-shadow .06s;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; width: 100%;
  position: relative;
}
.btn::after { content: ''; position: absolute; inset: 0; border-radius: 3px; background-image: var(--dots); background-size: 4px 4px; opacity: .3; pointer-events: none; }
.btn:active, .btn.pressed { transform: translate(3px, 3px); box-shadow: 1px 1px 0 -1px var(--plate); }
.btn[disabled] { filter: grayscale(.8) brightness(.7); cursor: default; }
.btn.blue { --bg: var(--blue); --fg: #fff; --plate: var(--pink); }
.btn.yellow { --bg: var(--yellow); --plate: var(--pink); }
.btn.paper-b { --bg: var(--paper); --plate: var(--pink); }
.paper .btn { --plate: var(--ink); }
.paper .btn.paper-b { --bg: #fffaf0; }
.btn.ghost { --bg: transparent; --fg: var(--paper); border-color: rgba(242, 232, 213, .35); box-shadow: none; }
.btn.small { font-size: 16px; padding: 10px 14px 9px; min-height: 44px; border-width: 2.5px; box-shadow: 3px 3px 0 -1px var(--plate); }
.btn svg { width: 22px; height: 22px; flex: none; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------------------------------------------------------------- inputs */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font: 700 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.input {
  appearance: none; width: 100%; border: 3px solid var(--ink); border-radius: var(--radius);
  background: #fffaf0; color: var(--ink); padding: 14px 14px; font: 700 20px/1.1 var(--body); outline: none;
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, .08);
}
.input:focus { border-color: var(--blue); box-shadow: inset 3px 3px 0 rgba(0, 0, 0, .08), 0 0 0 3px rgba(58, 99, 232, .3); }
.input.code { font: 700 34px/1 var(--mono); letter-spacing: .4em; text-align: center; text-transform: uppercase; padding-left: .4em; }

/* ---------------------------------------------------------------- chips, segmented */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px 4px; border-radius: 3px;
  font: 700 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
}
.chip svg { width: 14px; height: 14px; }
.chip.pink { background: var(--pink); color: var(--ink); }
.chip.blue { background: var(--blue); color: #fff; }
.chip.yellow { background: var(--yellow); color: var(--ink); }
.chip.mint { background: var(--mint); color: var(--ink); }
.chip.line { background: transparent; border: 1.5px solid currentColor; }
.seg { display: flex; border: 2.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.seg button { flex: 1; appearance: none; border: 0; background: transparent; padding: 11px 6px 10px; font: 400 16px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; color: var(--ink); cursor: pointer; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button.on { background: var(--ink); color: var(--yellow); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.sw { width: 54px; height: 30px; border-radius: 30px; border: 2.5px solid var(--ink); background: var(--paper-2); position: relative; flex: none; cursor: pointer; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--ink); transition: left .15s; }
.sw.on { background: var(--pink); }
.sw.on::after { left: 27px; }
.stepper { display: flex; align-items: center; border: 2.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.stepper button { width: 42px; height: 40px; border: 0; background: var(--paper-2); font: 400 24px/1 var(--display); cursor: pointer; color: var(--ink); }
.stepper span { min-width: 44px; text-align: center; font: 400 22px/1 var(--display); color: var(--ink); }

/* ---------------------------------------------------------------- avatars & players */
.av { width: 48px; height: 48px; flex: none; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .45)); }
.av.lg { width: 76px; height: 76px; }
.av.xl { width: 120px; height: 120px; }
.av.off { opacity: .35; filter: grayscale(1); }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px 8px; }
.ptile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; position: relative; }
.ptile .nm { font: 700 13px/1.1 var(--body); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptile .badge { position: absolute; top: -4px; right: 14px; }
.ptile.done .av { filter: drop-shadow(2px 2px 0 var(--pink)); }
.ptile.wait .av { opacity: .5; }
.ptile.new { animation: stampin .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 30px; background: var(--ink-3); font: 700 13px/1 var(--body); }
.pill .av { width: 24px; height: 24px; filter: none; }
.pill.done { background: var(--pink); color: var(--ink); }
.pill.team0 { box-shadow: inset 0 0 0 2px var(--pink); }
.pill.team1 { box-shadow: inset 0 0 0 2px var(--blue); }

/* ---------------------------------------------------------------- timer */
.timer { position: relative; height: 12px; border-radius: 12px; background: var(--ink-3); overflow: hidden; border: 2px solid var(--ink); }
.timer i { position: absolute; inset: 0; transform-origin: left; background: repeating-linear-gradient(-45deg, var(--yellow) 0 8px, var(--yellow-deep) 8px 16px); }
.timer.low i { background: repeating-linear-gradient(-45deg, var(--pink) 0 8px, var(--pink-deep) 8px 16px); }
.timer-num { font: 400 30px/1 var(--display); min-width: 2ch; text-align: right; }
.timer-row { display: flex; align-items: center; gap: 10px; }
.timer-row .timer { flex: 1; }

/* ---------------------------------------------------------------- choice tiles */
.opts { display: grid; gap: 10px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opt {
  --c: var(--paper);
  appearance: none; text-align: left; cursor: pointer;
  border: 3px solid var(--ink); border-radius: var(--radius);
  background: var(--c); color: var(--ink);
  padding: 14px 14px 13px 54px; min-height: 62px; position: relative;
  font: 700 18px/1.15 var(--body);
  box-shadow: 4px 4px 0 -1px rgba(0, 0, 0, .55);
  transition: transform .06s, box-shadow .06s, opacity .2s;
}
.opt:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 -1px rgba(0, 0, 0, .55); }
.opt .l { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--c); font: 400 18px/1 var(--display); }
.opt:nth-child(4n+1) { --c: var(--pink); }
.opt:nth-child(4n+2) { --c: var(--blue); color: #fff; }
.opt:nth-child(4n+2) .l { color: var(--blue); background: #fff; }
.opt:nth-child(4n+3) { --c: var(--yellow); }
.opt:nth-child(4n+4) { --c: var(--paper); }
.opt.picked { outline: 4px solid var(--paper); outline-offset: 3px; }
.opt.dim { opacity: .35; }
.opt.right { box-shadow: 0 0 0 4px var(--mint), 4px 4px 0 4px var(--ink); }
.opt.wrong { opacity: .3; }
.opt .who { display: flex; gap: 3px; margin-top: 8px; flex-wrap: wrap; }
.opt .who .av { width: 24px; height: 24px; filter: none; }
.screen-mode .opt { font-size: 28px; min-height: 92px; padding-left: 74px; }
.screen-mode .opt .l { width: 46px; height: 46px; font-size: 26px; }
.screen-mode .opts { grid-template-columns: 1fr 1fr; }

/* ---------------------------------------------------------------- stamps, overlays */
.stamp {
  display: inline-block; padding: 8px 14px 6px; border: 4px solid currentColor; border-radius: 6px;
  font: 400 34px/1 var(--display); text-transform: uppercase; letter-spacing: .04em;
  transform: rotate(-7deg); color: var(--pink);
  animation: stampin .5s cubic-bezier(.2, 1.6, .4, 1) both;
  mix-blend-mode: normal;
}
.stamp.good { color: var(--mint); }
.stamp.blue { color: var(--blue); }
@keyframes stampin { from { transform: rotate(-7deg) scale(2.2); opacity: 0; } to { transform: rotate(-7deg) scale(1); opacity: 1; } }
.locked {
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 30px 0;
}
.pop { animation: pop .35s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.rise { animation: rise .45s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.delta { font: 400 22px/1 var(--display); color: var(--mint); }
.delta.neg { color: var(--red); }
.sips { display: inline-flex; align-items: center; gap: 3px; font: 700 12px/1 var(--mono); color: var(--yellow); }
.sips svg { width: 14px; height: 14px; }
.paper .sips, .brow .sips { color: var(--pink-deep); }

/* ---------------------------------------------------------------- caption (the host speaking) */
.capwrap { position: relative; z-index: 6; display: grid; grid-template-rows: 1fr; transition: grid-template-rows .35s cubic-bezier(.2, .9, .3, 1), opacity .3s; }
.capwrap.gone { grid-template-rows: 0fr; opacity: 0; pointer-events: none; }
.capinner { min-height: 0; overflow: hidden; }
.caption {
  position: relative; z-index: 6;
  margin: 0 var(--gutter) calc(var(--safe-bot) + 10px);
  display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center;
  background: var(--ink-2); border: 2px solid var(--ink-3); border-radius: 10px;
  padding: 8px 12px 8px 8px; min-height: 72px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
  transition: opacity .3s, transform .3s;
}
.caption.idle { opacity: .55; }
.caption .face { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--ink-3); border: 2px solid var(--ink); }
.caption .face svg { width: 100%; height: 100%; }
.caption .who { font: 700 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--pink); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.caption .txt { font: 600 15px/1.3 var(--body); color: var(--paper); max-height: 4.1em; overflow: hidden; }
.caption .meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.caption .meta .av { width: 24px; height: 24px; filter: none; }
.caption .meta .det { font: 700 12px/1.25 var(--mono); color: var(--yellow); letter-spacing: .02em; }
.screen-mode .caption .meta .av { width: 40px; height: 40px; }
.screen-mode .caption .meta .det { font-size: 20px; }
.caption.talking .face { box-shadow: 0 0 0 2px var(--pink), 0 0 16px rgba(255, 79, 139, .5); }
.caption .eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 10px; }
.caption .eq i { width: 2px; background: var(--pink); height: 30%; }
.caption.talking .eq i { animation: eq .5s ease-in-out infinite alternate; }
.caption .eq i:nth-child(2) { animation-delay: .15s; } .caption .eq i:nth-child(3) { animation-delay: .3s; }
@keyframes eq { to { height: 100%; } }
.screen-mode .caption { grid-template-columns: 96px 1fr; min-height: 112px; margin: 0 28px 24px; }
.screen-mode .caption .face { width: 96px; height: 96px; }
.screen-mode .caption .txt { font-size: 26px; }

/* ---------------------------------------------------------------- toasts, sheets */
.toasts { position: fixed; left: 0; right: 0; top: calc(var(--safe-top) + 62px); z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 var(--gutter); }
.toast { background: var(--yellow); color: var(--ink); font: 700 14px/1.25 var(--body); padding: 10px 14px; border-radius: 6px; border: 2.5px solid var(--ink); box-shadow: var(--shadow-sm); animation: rise .3s both; max-width: 520px; }
.toast.bad { background: var(--pink); }
.sheet-bg { position: fixed; inset: 0; background: rgba(10, 8, 12, .7); z-index: 40; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 88vh; overflow-y: auto; padding: 22px var(--gutter) calc(var(--safe-bot) + 22px); background: var(--paper); color: var(--ink); border-radius: 16px 16px 0 0; animation: up .28s cubic-bezier(.2, .9, .3, 1) both; background-image: var(--grain); }
@keyframes up { from { transform: translateY(100%); } }
@media (min-width: 720px) { .sheet { left: 50%; right: auto; width: 560px; margin-left: -280px; bottom: 24px; border-radius: 12px; } }
/* The Booth's restart warning: a strip across the top of every page, above the veil */
.station-banner { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 8px); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 24px); padding: 8px 12px; border-radius: 6px; border: 2.5px solid var(--ink); background: var(--yellow); color: var(--ink); box-shadow: var(--shadow-sm); font: 700 14px/1.2 var(--body); pointer-events: none; }
.station-banner .sb-tag { font: 700 11px/1 var(--mono); letter-spacing: .14em; background: var(--ink); color: var(--yellow); padding: 4px 6px; border-radius: 3px; flex: none; }
.station-banner .sb-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.station-banner .sb-left { font: 700 14px/1 var(--mono); flex: none; }
/* The Booth's "mode of the night" badge on lobby cards */
.mcard .chip.feat { background: var(--mint); color: var(--ink); }
.pause-veil { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(10, 8, 12, .78); text-align: center; padding: var(--gutter); }

/* ---------------------------------------------------------------- home */
.logo { position: relative; text-align: center; }
.logo .word { font: 400 clamp(78px, 25vw, 170px)/.8 var(--display); letter-spacing: .01em; color: var(--paper); text-transform: uppercase; position: relative; display: inline-block; }
.logo .word::before, .logo .word::after { content: attr(data-t); position: absolute; inset: 0; mix-blend-mode: screen; pointer-events: none; }
.logo .word::before { color: var(--pink); transform: translate(4px, 3px); opacity: .9; }
.logo .word::after { color: var(--blue); transform: translate(-3px, -2px); opacity: .85; }
.logo .word span { position: relative; z-index: 1; mix-blend-mode: normal; }
.logo .sub { font: 700 12px/1 var(--mono); letter-spacing: .32em; text-transform: uppercase; color: var(--yellow); margin-top: 14px; }
.logo svg.waves { width: 70px; height: 40px; margin: 0 auto 10px; }

/* ---------------------------------------------------------------- lobby */
.codecard { text-align: center; }
.codecard .big { font: 700 clamp(48px, 15vw, 96px)/1 var(--mono); letter-spacing: .14em; padding-left: .14em; }
.qr { background: #fffaf0; padding: 10px; border-radius: 6px; width: 180px; height: 180px; margin: 0 auto; border: 3px solid var(--ink); }
.qr svg { width: 100%; height: 100%; }
.screen-mode .qr { width: 300px; height: 300px; }
.mgroup { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 10px; opacity: .6; }
.mgroup svg { width: 13px; height: 13px; flex: none; }
.mgroup { opacity: 1; } .mgroup > span:not(.spacer) { opacity: .6; } .mgroup .spacer { flex: 1; }
.mgsw { width: 42px; height: 24px; } .mgsw::after { width: 14px; height: 14px; } .mgsw.on::after { left: 21px; } /* a category on/off switch in the setlist */
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mcard {
  appearance: none; text-align: left; cursor: pointer; position: relative;
  border: 2.5px solid var(--ink); border-radius: 6px; padding: 10px 10px 9px; min-height: 112px;
  background: var(--paper-2); color: var(--ink); display: flex; flex-direction: column; gap: 5px;
  box-shadow: 3px 3px 0 var(--ink);
}
.mcard .nm { font: 400 19px/1 var(--display); text-transform: uppercase; }
.mcard .tl { font: 600 12px/1.25 var(--body); opacity: .8; }
.mcard .ic { display: flex; gap: 4px; margin-top: auto; }
.mcard .ic svg { width: 16px; height: 16px; }
.mcard.on { background: var(--yellow); }
.mcard.on::after { content: ''; position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12l5 5 9-10' fill='none' stroke='%23ffd23f' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/14px no-repeat; }
.mcard.off { opacity: .45; }
.mcard .order { position: absolute; top: 7px; right: 8px; font: 400 18px/1 var(--display); }
.section { display: flex; flex-direction: column; gap: 10px; }
.section > .kicker { color: inherit; }
.hosts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hostbtn { appearance: none; border: 2.5px solid var(--ink); background: var(--paper-2); border-radius: 8px; padding: 6px 4px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); }
.hostbtn svg { width: 58px; height: 58px; }
.hostbtn span { font: 400 14px/1 var(--display); text-transform: uppercase; }
.hostbtn.on { background: var(--pink); box-shadow: 3px 3px 0 var(--ink); }

/* ---------------------------------------------------------------- scoreboard */
.board { display: flex; flex-direction: column; gap: 8px; }
.brow { display: grid; grid-template-columns: 30px 40px 1fr auto; gap: 10px; align-items: center; background: var(--paper); color: var(--ink); border-radius: 4px; padding: 6px 12px 6px 8px; box-shadow: var(--shadow-sm); position: relative; transition: transform .6s cubic-bezier(.2, .9, .3, 1); }
.brow:nth-child(odd) { transform: rotate(-.35deg); }
.brow:nth-child(even) { transform: rotate(.3deg); }
.brow .rk { font: 400 24px/1 var(--display); text-align: center; }
.brow .av { width: 40px; height: 40px; }
.brow .nm { font: 700 16px/1.1 var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .nm small { display: block; font: 700 11px/1.2 var(--mono); opacity: .65; margin-top: 2px; letter-spacing: .04em; }
.brow .sc { font: 400 28px/1 var(--display); text-align: right; }
.brow .sc .delta { display: block; font-size: 16px; color: #0f8a68; }
.brow .sc .delta.neg { color: var(--red); }
.brow.me { background: var(--yellow); }
.brow.first { background: var(--pink); }
.brow.team0 { box-shadow: -6px 0 0 var(--pink), var(--shadow-sm); }
.brow.team1 { box-shadow: -6px 0 0 var(--blue), var(--shadow-sm); }
.screen-mode .brow { grid-template-columns: 50px 64px 1fr auto; padding: 10px 20px; }
.screen-mode .brow .av { width: 64px; height: 64px; }
.screen-mode .brow .nm { font-size: 26px; }
.screen-mode .brow .sc { font-size: 44px; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.teamcard { border-radius: 6px; padding: 10px 12px; color: var(--ink); border: 2.5px solid var(--ink); }
.teamcard.t0 { background: var(--pink); }
.teamcard.t1 { background: var(--blue); color: #fff; }
.teamcard .tn { font: 400 20px/1 var(--display); text-transform: uppercase; }
.teamcard .ts { font: 400 34px/1 var(--display); }

/* ---------------------------------------------------------------- podium */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; }
.podium .col { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.podium .blk { width: 100%; border: 3px solid var(--ink); border-bottom: 0; border-radius: 6px 6px 0 0; display: grid; place-items: center; font: 400 44px/1 var(--display); color: var(--ink); background-image: var(--dots); background-size: 5px 5px; }
.podium .p1 .blk { height: 150px; background-color: var(--pink); }
.podium .p2 .blk { height: 104px; background-color: var(--yellow); }
.podium .p3 .blk { height: 76px; background-color: var(--blue); color: #fff; }
.podium .nm { font: 700 15px/1.1 var(--body); }
.podium .sc { font: 400 22px/1 var(--display); }

/* ---------------------------------------------------------------- gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.gitem { background: #fff; padding: 8px 8px 10px; box-shadow: var(--shadow-sm); color: var(--ink); }
.gitem:nth-child(3n) { transform: rotate(1.2deg); } .gitem:nth-child(3n+1) { transform: rotate(-1deg); }
.gitem img, .gitem svg { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--paper); }
.gitem .cap { font: 700 12px/1.2 var(--mono); margin-top: 6px; }

/* ---------------------------------------------------------------- misc */
.divider { height: 0; border-top: 2px dashed rgba(28, 25, 32, .3); margin: 6px 0; }
.dark .divider { border-color: rgba(242, 232, 213, .2); }
.hide { display: none !important; }
.grow { flex: 1; }
.noscroll { touch-action: none; }
canvas.full { display: block; width: 100%; height: 100%; touch-action: none; }
.fill { position: absolute; inset: 0; }
.err { color: var(--pink); font-weight: 700; }
a { color: var(--yellow); }
::selection { background: var(--pink); color: var(--ink); }
/* reduced motion: animations end at once (one iteration, so loops do not flicker); juice.js softens its own effects */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
.screen-mode { --gutter: 28px; }
.screen-mode body, body.screen-mode { font-size: 20px; }
.screen-mode .bar { padding: 18px 28px 12px; min-height: 76px; }
.screen-mode .onair { font-size: 15px; padding: 9px 13px; }
.screen-mode .bar .code { font-size: 22px; }
.screen-mode .iconbtn { width: 52px; height: 52px; }
.screen-mode .mescore { display: none; }

/* ---------------------------------------------------------------- TV mode (public/js/tv.js) */
/* a TV runs the show: the host voice plays on the TV, phones are controllers. The TV shows no captions (they
   folded in and out and shrank the whole view each line); phones keep them, so caption-only names and scores stay visible */
.screen-mode .capwrap { display: none; }
.tvpair { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; max-width: 1200px; }
.tvpair .logo .word { font-size: 96px; }
.tvp-code { font-size: 140px; letter-spacing: .12em; white-space: nowrap; text-align: center; }
.tvp-left > .h2 { margin: 18px 0 8px; }
.tvp-card .qr { max-width: 300px; margin: 12px auto 0; }
.tvpair .how li { font-size: 22px; margin: 8px 0; }
@media (max-width: 800px) { .tvpair { grid-template-columns: 1fr; gap: 24px; } .tvpair .logo .word { font-size: 64px; } .tvp-code { font-size: 80px; } }
.tvlink { font: 700 17px/1.3 var(--mono); word-break: break-all; padding: 10px 12px; border: 2px dashed var(--ink); border-radius: 8px; margin: 6px 0 10px; }
.eyes { align-items: center; }
.eyes-ic svg { width: 96px; height: 96px; color: var(--yellow); stroke: currentColor; fill: none; stroke-width: 1.6; animation: tvpulse 1.2s ease-in-out infinite alternate; }
@keyframes tvpulse { to { opacity: .55; transform: scale(.94); } }
.foot .build { opacity: .45; font: 400 11px/1.6 var(--mono); letter-spacing: .08em; }

/* ---------------------------------------------------------------- Honk Party accounts
   Logged-in names (verified by the server from a hub token) print in gold ink with an ink keyline and the seal,
   so they read on dark studio walls, cream paper and yellow/pink rows alike. Guests keep the normal ink.
   The hub's sso.js injects its own .sq-* styles after this sheet, so the overrides below carry a parent class. */
:root { --sq-gold: #ffc53d; }
.sq-verified { color: var(--sq-gold) !important; font-weight: 700; white-space: nowrap; text-shadow: -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink), 1px 1px 0 var(--ink), 2px 2px 0 var(--ink); }
.sq-seal { width: .95em; height: .95em; vertical-align: -.12em; margin-right: .22em; display: inline-block; overflow: visible; }
.sq-seal path { fill: var(--sq-gold); stroke: none; }
.sq-seal .sq-tick { fill: none; stroke: #1a1300; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
/* VIP (passport roles vip / pass / founder / venue): purple + diamond; staff: gold + star (apps/passport/sso-kit/README.md) */
:root { --sq-vip: #b48cff; }
#app .sq-verified.sq-vip, .sq-verified.sq-vip { color: var(--sq-vip) !important; }
.sq-dia path { fill: var(--sq-vip); } .sq-dia .sq-tick { fill: none; stroke: #1a0b2e; stroke-width: 1.4; }
.sq-star { font-size: .8em; margin-left: .2em; vertical-align: .08em; }
#app .sq-verified .sq-seal path:first-child { stroke: var(--ink); stroke-width: 1.3; }
.pill .sq-verified, .ptile .sq-verified { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

/* the name gate on the home card: "or sign on" as two riso stamps; logged in = an on-air ticket */
#app .profile .sq-gate { gap: 9px; }
#app .profile .sq-gate [hidden] { display: none !important; }
  font: 400 15px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 4px; padding: 6px 11px 5px; background: var(--pink);
  box-shadow: var(--shadow-sm); transform: rotate(-1.5deg); cursor: pointer;
}
/* guests get no Log in / Register offer (2026-10-11): an account is only used when already logged in on the hub */
#app .profile .sq-or { display: none !important; }
#app .profile .sq-me {
  position: relative; gap: 4px 10px; padding: 11px 12px 10px; border: 3px solid var(--ink); border-radius: 4px;
  background: var(--ink) var(--grain); color: var(--paper); box-shadow: 4px 4px 0 var(--sq-gold); transform: rotate(-.6deg);
}
#app .profile .sq-me small { flex-basis: 100%; font: 700 10px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
#app .profile .sq-me small::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-right: 6px; vertical-align: 0; box-shadow: 0 0 6px var(--red); animation: sqblink .8s ease-in-out infinite alternate; }
@keyframes sqblink { to { opacity: .3; } }
#app .profile .sq-me .sq-verified { font: 400 24px/1.05 var(--display); letter-spacing: .03em; text-transform: uppercase; text-shadow: 2px 2px 0 rgba(0, 0, 0, .6); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#app .profile .sq-me .sq-btn { font: 700 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--paper); opacity: .75; border-bottom: 1.5px solid currentColor; margin-left: auto; cursor: pointer; }
@media (max-width: 380px) { #app .profile .sq-me .sq-verified { font-size: 20px; } }

/* ---- LITE (Chromecast, smart-TV browsers; state.js sets html.lite): same layout, no expensive paint.
   The SVG noise grain, blend modes and filters re-rasterise on every animation and crashed Cast receivers. */
html.lite { --grain: none; --grain-light: none; --dots: none; }
html.lite .studio::before, html.lite .studio::after, html.lite .halftone::after { display: none; }
html.lite *, html.lite *::before, html.lite *::after { mix-blend-mode: normal !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.lite *:not(.off):not([disabled]) { filter: none !important; } /* drop-shadow and blur filters are re-rendered every frame they move */
/* no endless CSS animations on LITE: every looping animation plays once and rests (fog strips, rings, neon pulses
   repainted a Chromecast all night). A loop the game needs (a spinning hand that IS the clock, the host badge)
   opts out with class .lite-loop on the animated element itself (its ::before/::after follow it). Keep the selector
   simple (no complex :not()): an old Cast Chromium that cannot parse it would drop the whole rule. */
html.lite *:not(.lite-loop), html.lite *:not(.lite-loop)::before, html.lite *:not(.lite-loop)::after { animation-iteration-count: 1 !important; }
html.lite .av, html.lite .ptile.done .av { filter: none; }
html.lite .logo .word::before, html.lite .logo .word::after { display: none; }
/* endless decorative loops repaint every frame: still on LITE */
html.lite .onair.live i, html.lite .eyes-ic svg, html.lite .drumdots i, html.lite .readq-wave i, html.lite .toastglass, html.lite #app .profile .sq-me small::before { animation: none !important; }

/* a live game is on (football, racing, ...: view def `stable: true`): the stage keeps its size. Phones drop the
   caption and the rule bar (the voice still plays, the game has its own banners); the big screen floats them. */
body.stable-stage:not(.screen-mode) .capwrap, body.stable-stage:not(.screen-mode) .rulebar { display: none; }
body.stable-stage.screen-mode .capwrap { position: absolute; left: 0; right: 0; bottom: 0; }
body.stable-stage.screen-mode .rulebar { display: none; }

/* home: the game count sticker */
.gamecount { align-self: center; display: inline-flex; align-items: center; gap: 12px; margin: 2px auto 4px; padding: 8px 16px 8px 12px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--pink); transform: rotate(-2.5deg); }
.gamecount b { font-size: 46px; line-height: .85; }
.gamecount span { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.gamecount em { font: 700 15px/1.1 var(--body); font-style: normal; text-transform: uppercase; letter-spacing: .04em; }
.gamecount small { font: 700 10px/1.25 var(--mono); letter-spacing: .06em; opacity: .75; }

/* mode art (modes/<id>/assets/art.jpg, made with scripts/mode-art.mjs): a printed banner on the setlist card and
   on the segment intro */
.mcard.has-art { padding-top: 0; overflow: hidden; }
.mcard .mart { display: block; width: calc(100% + 20px); margin: 0 -10px 4px; height: 92px; object-fit: cover; border-bottom: 2.5px solid var(--ink); background: var(--ink-3, #2a2630); }
.intro-art { margin: -4px -4px 12px; height: min(30vh, 46vw); background: center 40% / cover no-repeat; border: 3px solid var(--ink); border-radius: 4px; box-shadow: 4px 4px 0 rgba(21, 19, 24, .35); }
.screen-mode .intro-art { height: 34vh; }

/* the home logo is ON AIR: the waves transmit, the misprinted ink layers drift, the title sways, and every few seconds
   the signal glitches. Off for reduced motion and on TV sticks (LITE). */
@media (prefers-reduced-motion: no-preference) {
  .home .logo svg.waves { overflow: visible; }
  .home .logo svg.waves .w1, .home .logo svg.waves .w2 { animation: wavebeam 2.4s ease-out infinite; }
  .home .logo svg.waves .w2 { animation-delay: .35s; }
  .home .logo svg.waves .w0 { transform-origin: 35px 19.5px; animation: wavedot 2.4s ease-in-out infinite; }
  .home .logo .word { animation: logosway 7s ease-in-out infinite; transform-origin: 50% 80%; }
  .home .logo .word::before { animation: inkpink 5.5s ease-in-out infinite, glitchpink 8s steps(1) infinite; }
  .home .logo .word::after { animation: inkblue 6.5s ease-in-out infinite, glitchblue 8s steps(1) infinite; }
  .home .logo .sub { animation: subflicker 8s steps(1) infinite; }
}
@keyframes wavebeam { 0% { opacity: .2; } 25% { opacity: 1; } 70%, 100% { opacity: .2; } }
@keyframes wavedot { 0%, 100% { transform: scale(1); filter: none; } 20% { transform: scale(1.25); filter: drop-shadow(0 0 6px #ffd23f); } }
@keyframes logosway { 0%, 100% { transform: rotate(-1.2deg) translateY(0); } 50% { transform: rotate(1deg) translateY(-3px); } }
@keyframes inkpink { 0%, 100% { transform: translate(4px, 3px); } 50% { transform: translate(6px, 1px); } }
@keyframes inkblue { 0%, 100% { transform: translate(-3px, -2px); } 50% { transform: translate(-5px, 1px); } }
/* the glitch: two quick frames out of 8 seconds where the inks jump and slice */
@keyframes glitchpink { 0%, 90%, 92.5%, 100% { clip-path: none; } 91% { clip-path: inset(10% 0 55% 0); translate: 14px 0; } 92% { clip-path: inset(60% 0 8% 0); translate: -10px 0; } }
@keyframes glitchblue { 0%, 90%, 92.5%, 100% { clip-path: none; } 91% { clip-path: inset(48% 0 20% 0); translate: -16px 0; } 92% { clip-path: inset(5% 0 70% 0); translate: 12px 0; } }
@keyframes subflicker { 0%, 90%, 93%, 100% { opacity: 1; } 91% { opacity: .3; } 92% { opacity: .8; } }
html.lite .home .logo * , html.lite .home .logo .word::before, html.lite .home .logo .word::after { animation: none !important; }

/* the TV's host badge (main.js hostCam): the animated portrait in a corner, outside the layout (no captions on TV) */
.hostcam { position: fixed; left: 2.2vmin; bottom: 2.2vmin; z-index: 7; display: flex; flex-direction: column; align-items: center; gap: .8vmin; pointer-events: none; }
.hostcam.hide, body.stable-stage .hostcam { display: none; }
.hostcam video, .hostcam .hcs { width: 15vmin; height: 15vmin; border-radius: 50%; object-fit: cover; background: var(--paper); border: .5vmin solid var(--ink); box-shadow: 0 0 0 .4vmin var(--paper-dim, #d8cdb6); }
.hostcam.talking video, .hostcam.talking .hcs { box-shadow: 0 0 0 .4vmin var(--pink), 0 0 2.4vmin rgba(255, 79, 139, .55); }
html.lite .hostcam.talking video, html.lite .hostcam.talking .hcs { box-shadow: 0 0 0 .4vmin var(--pink); }
/* LITE host badge (main.js hostCam): sprite strips stepped by background-position, one small circle repainted at
   4 fps (idle) / 8 fps (talking). Frames are one badge wide: background-origin border-box makes that exactly 15vmin. */
.hostcam .hcs { background: var(--paper) var(--portrait, none) center / cover no-repeat; background-origin: border-box; }
.hostcam .hcs.has-idle { background-image: var(--idle); background-size: 800% 100%; background-position: 0 0; animation: hcs-idle 2s steps(8) infinite; }
.hostcam.talking .hcs.has-talk { background-image: var(--talk); background-size: 1000% 100%; background-position: 0 0; animation: hcs-talk 1.25s steps(10) infinite; }
@keyframes hcs-idle { to { background-position: -120vmin 0; } }
@keyframes hcs-talk { to { background-position: -150vmin 0; } }
.hostcam .nm { font: 700 1.5vmin/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--paper); background: var(--ink); padding: .5vmin 1vmin; border-radius: .6vmin; }
.caption .face video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------------------------------------------------------- setlist card + mode browser (lobby.js) */
.setlist .pills.left { justify-content: flex-start; }
.mini-steps { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-step { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; }
.mini-step > small { font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.mini-step .stepper { justify-content: space-between; }
.small-seg button { padding: 9px 4px 8px; font-size: 14px; }
.catchips { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.catchip { appearance: none; display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 2.5px solid var(--ink); border-radius: var(--radius); background: var(--paper-2); color: var(--ink); cursor: pointer; font: 700 13px/1.1 var(--body); text-align: left; opacity: .6; }
.catchip svg { width: 16px; height: 16px; flex: none; }
.catchip span { flex: 1; }
.catchip small { font: 700 11px/1 var(--mono); opacity: .75; }
.catchip.on { background: var(--yellow); opacity: 1; box-shadow: 2px 2px 0 var(--ink); }
.catchip.part { background: linear-gradient(90deg, var(--yellow) 0 50%, var(--paper-2) 50%); opacity: 1; }
.mstrip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; cursor: pointer; -webkit-overflow-scrolling: touch; }
.mthumb { flex: 0 0 104px; scroll-snap-align: start; position: relative; border: 2px solid var(--ink); border-radius: 5px; overflow: hidden; background: var(--yellow); box-shadow: 2px 2px 0 var(--ink); }
.mthumb img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mthumb b { display: block; padding: 4px 6px 5px; font: 400 12px/1.05 var(--display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.mthumb i { position: absolute; top: 4px; left: 4px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--ink); color: var(--yellow); font: 400 14px/22px var(--display); text-align: center; font-style: normal; }
.mb-open { width: 100%; }
.modes.one { grid-template-columns: minmax(0, 260px); justify-content: center; }
.mbrowser { position: fixed; inset: 0; z-index: 45; background: var(--paper); color: var(--ink); background-image: var(--grain); overflow-y: auto; display: flex; flex-direction: column; animation: up .26s cubic-bezier(.2, .9, .3, 1) both; overscroll-behavior: contain; }
.mb-head { position: sticky; top: 0; z-index: 2; background: var(--paper); padding: calc(var(--safe-top) + 12px) var(--gutter) 8px; border-bottom: 2.5px solid var(--ink); display: flex; flex-direction: column; gap: 8px; }
.mb-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mb-x { color: var(--ink); }
.mb-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 2px; scrollbar-width: none; }
.mb-tabs::-webkit-scrollbar { display: none; }
.mb-tab { appearance: none; flex: none; display: flex; align-items: center; gap: 6px; padding: 7px 11px; border: 2px solid var(--ink); border-radius: 20px; background: transparent; color: var(--ink); font: 700 13px/1 var(--body); cursor: pointer; }
.mb-tab svg { width: 15px; height: 15px; }
.mb-tab small { font: 700 10px/1 var(--mono); opacity: .7; }
.mb-tab.on { background: var(--ink); color: var(--yellow); }
.mb-tip { opacity: .7; }
.mb-grid { padding: 14px var(--gutter) 100px; max-width: 900px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.mb-all { grid-column: 1 / -1; }
.mb-foot { position: sticky; bottom: 0; margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter) calc(var(--safe-bot) + 10px); background: var(--ink); color: var(--paper); }
.mb-count { flex: 1; font: 700 14px/1.2 var(--body); }
.mb-done { flex: 0 0 auto; width: auto; padding-left: 28px; padding-right: 28px; }
.rules-head { appearance: none; border: 0; background: none; color: inherit; padding: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; text-align: left; cursor: pointer; }
.rules-head .kicker { grid-column: 1; }
.rules-sum { grid-column: 1; font: 700 14px/1.3 var(--body); }
.rules-chev { grid-column: 2; grid-row: 1 / 3; align-self: center; width: 26px; height: 26px; transition: transform .2s; }
.rules-chev svg { width: 26px; height: 26px; }
.rules.open .rules-chev { transform: rotate(180deg); }
.rules:not(.open) > :not(.rules-head) { display: none; }
.setlist .chip.line { color: var(--ink); border-color: var(--ink); }
.mb-search { position: relative; display: flex; align-items: center; }
.mb-search > svg { position: absolute; left: 12px; width: 18px; height: 18px; opacity: .6; pointer-events: none; }
.mb-search .mb-q { padding-left: 38px; padding-right: 40px; font-size: 16px; }
.mb-search .mb-q::-webkit-search-cancel-button { display: none; }
.mb-qx { position: absolute; right: 6px; appearance: none; border: 0; background: none; color: var(--ink); width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; }
.mb-qx svg { width: 18px; height: 18px; }
.mb-qx[hidden] { display: none; }
.mb-filters { display: flex; gap: 6px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scrollbar-width: none; }
.mb-filters::-webkit-scrollbar { display: none; }
.mb-filters .chip { flex: none; cursor: pointer; }
.mb-filters .chip.line { color: var(--ink); border-color: var(--ink); }
.mb-hits { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 700 14px/1.2 var(--body); }
.mb-hits .chip.line { color: var(--ink); border-color: var(--ink); cursor: pointer; }

/* ---------------------------------------------------------------- game catalog + mode details (js/catalog.js) */
button.gamecount { font: inherit; cursor: pointer; transition: transform .12s, box-shadow .12s; }
button.gamecount:hover { transform: rotate(-2.5deg) translateY(-2px); box-shadow: 6px 6px 0 var(--pink); }
button.gamecount:active { transform: rotate(-2.5deg) translate(3px, 3px); box-shadow: 1px 1px 0 var(--pink); }
.gamecount .gc-go { flex-direction: row !important; align-items: center; gap: 2px !important; margin-left: 4px; padding: 6px 8px 6px 10px; border-radius: 20px; background: var(--ink); color: var(--yellow); font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.gamecount .gc-go svg { width: 14px; height: 14px; transform: rotate(-90deg); order: 2; }
.cat-players { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; }
.cat-players button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid currentColor; background: transparent; color: inherit; font: 700 14px/1 var(--body); padding: 0; cursor: pointer; }
.cat-players b { min-width: 16px; text-align: center; }
.cat-pl { margin-left: auto; font: 700 10px/1 var(--mono); opacity: .7; }
.mc-info { position: absolute; top: 6px; left: 6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(21, 19, 24, .78); color: var(--paper); cursor: pointer; z-index: 2; }
.mc-info svg { width: 20px; height: 20px; }
.mc-info:hover { background: var(--ink); color: var(--yellow); }
.cat-sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(10, 9, 12, .62); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s both; }
.cat-sheet { position: relative; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; background: var(--paper); color: var(--ink); background-image: var(--grain); border: 3px solid var(--ink); border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -6px 0 var(--pink); animation: up .26s cubic-bezier(.2, .9, .3, 1) both; overscroll-behavior: contain; }
@media (min-width: 700px) { .cat-sheet-bg { align-items: center; } .cat-sheet { border-bottom: 3px solid var(--ink); border-radius: 18px; box-shadow: 8px 8px 0 var(--pink); } }
.cat-x { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(21, 19, 24, .8); color: var(--paper); }
.cat-art { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 3px solid var(--ink); }
.cat-art.none { display: grid; place-items: center; background: var(--ink-3); color: var(--yellow); }
.cat-art.none svg { width: 64px; height: 64px; }
.cat-body { display: flex; flex-direction: column; gap: 10px; padding: 14px var(--gutter) calc(var(--safe-bot) + 18px); }
.cat-tag { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 20px; background: var(--ink); color: var(--yellow); font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.cat-tag svg { width: 14px; height: 14px; }
.cat-name { margin: 0; color: var(--ink); }
.cat-tl { margin: 0; font: 600 17px/1.3 var(--body); }
.cat-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-facts .chip { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); border-color: var(--ink); opacity: 1; }
.cat-facts .chip svg { width: 15px; height: 15px; }
.cat-how { margin: 0; padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.cat-how li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; font: 500 15px/1.35 var(--body); }
.cat-how li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--pink); color: var(--ink); font: 400 17px/1 var(--display); border: 2px solid var(--ink); }
.cat-note { opacity: .7; }

/* ---------------------------------------------------------------- debug mode (js/debug.js: ten taps on the title) */
.dbg-bg { position: fixed; inset: 0; z-index: 70; background: rgba(10, 9, 12, .7); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s both; }
.dbg { width: min(620px, 100%); max-height: 94vh; display: flex; flex-direction: column; gap: 10px; padding: 14px var(--gutter) calc(var(--safe-bot) + 14px); background: #0f1a16; color: var(--paper); border: 3px solid var(--mint); border-bottom: 0; border-radius: 16px 16px 0 0; font-family: var(--mono); animation: up .22s cubic-bezier(.2, .9, .3, 1) both; }
@media (min-width: 700px) { .dbg-bg { align-items: center; } .dbg { border-radius: 16px; border-bottom: 3px solid var(--mint); } }
.dbg-head { display: flex; justify-content: space-between; align-items: center; }
.dbg-head .h2 { color: var(--mint); }
.dbg-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dbg-step { display: grid; gap: 4px; }
.dbg-step small { font: 700 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; opacity: .7; }
.dbg-step .stepper b { min-width: 28px; text-align: center; }
.dbg .input { background: #07110c; color: var(--paper); border-color: #22352d; }
.dbg-head, .dbg-opts, .dbg .input, .dbg-tabs { flex: none; }
.dbg-tabs .mb-tab { color: var(--paper); border-color: #2f4a3e; }
.dbg-tabs .mb-tab.on { background: var(--mint); color: var(--ink); }
.dbg-list { flex: 1; min-height: 120px; overflow-y: auto; display: grid; gap: 4px; padding-right: 4px; }
.dbg-mode { display: flex; align-items: center; gap: 10px; padding: 5px; border: 2px solid transparent; border-radius: 8px; background: #16241e; color: var(--paper); text-align: left; cursor: pointer; }
.dbg-mode img, .dbg-mode > i { width: 54px; height: 36px; border-radius: 4px; object-fit: cover; background: #22352d; flex: none; }
.dbg-mode span { display: grid; gap: 2px; min-width: 0; }
.dbg-mode b { font: 700 14px/1.1 var(--body); }
.dbg-mode small { font: 700 10px/1 var(--mono); opacity: .6; }
.dbg-mode.on { border-color: var(--mint); background: #1f3a2f; }
.dbg-play { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; }
.dbg-play span svg { width: 20px; height: 20px; }
.dbg-bar { position: fixed; left: 50%; top: calc(var(--safe-top) + 62px); white-space: nowrap; transform: translateX(-50%); z-index: 65; display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 30px; background: rgba(15, 26, 22, .92); border: 2px solid var(--mint); font: 700 11px/1 var(--mono); color: var(--mint); letter-spacing: .12em; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.dbg-bar button { white-space: nowrap; padding: 7px 12px; border-radius: 20px; border: 0; background: #22352d; color: var(--paper); font: 700 12px/1 var(--mono); cursor: pointer; }
.dbg-bar button.x { background: var(--mint); color: var(--ink); }

/* ---------------------------------------------------------------- juice (js/juice.js + the shared views)
   Physical feedback everywhere: buttons press down and spring back, views slide in, things idle-bob. Keyframes that
   move things use the individual translate/scale/rotate properties so they add to an element's own tilt. */
.btn { transition: transform .16s cubic-bezier(.3, 1.8, .5, 1), box-shadow .16s cubic-bezier(.3, 1.8, .5, 1), filter .2s; }
.btn:active, .btn.pressed { transform: translate(4px, 4px); box-shadow: 0 0 0 -1px var(--plate); transition-duration: .03s; }
.btn:active::after { opacity: .5; }
.btn.ghost:active { transform: translate(0, 2px) scale(.98); box-shadow: none; }
.btn[disabled]:active { transform: none; box-shadow: 5px 5px 0 -1px var(--plate); }
.btn.small[disabled]:active { box-shadow: 3px 3px 0 -1px var(--plate); }
.opt { transition: transform .16s cubic-bezier(.3, 1.8, .5, 1), box-shadow .16s cubic-bezier(.3, 1.8, .5, 1), opacity .25s, scale .25s; }
.opt:active { transform: translate(4px, 4px); box-shadow: 0 0 0 -1px rgba(0, 0, 0, .55); transition-duration: .03s; }
.opt[disabled] { cursor: default; }
.opt[disabled]:active { transform: none; }
.opt.picked { scale: 1.03; box-shadow: 0 0 0 4px var(--paper), 7px 7px 0 2px rgba(0, 0, 0, .6); z-index: 1; animation: optpick .32s cubic-bezier(.2, 1.6, .4, 1); }
.opt.dim { scale: .96; }
@keyframes optpick { 0% { scale: .94; } 60% { scale: 1.07; } 100% { scale: 1.03; } }
.opt.right { animation: optright .5s cubic-bezier(.2, 1.6, .4, 1) .15s backwards; }
@keyframes optright { 0% { scale: .9; } 55% { scale: 1.06; } 100% { scale: 1; } }
.opt.wrong.mine { opacity: .6; animation: shake .4s .2s; }
.opt.wrong.mine::before { content: ''; position: absolute; left: 8px; right: 8px; top: 50%; height: 4px; margin-top: -2px; background: var(--red); border-radius: 2px; rotate: -3deg; }
.numb, .vbtn, .hostbtn, .mcard, .catchip, .seg button, .stepper button, .iconbtn, .avpick, .toastglass { transition: transform .16s cubic-bezier(.3, 1.8, .5, 1), box-shadow .16s, scale .2s; }
.numb:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); transition-duration: .03s; }
.mcard:active, .hostbtn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); transition-duration: .03s; }
.seg button:active, .stepper button:active, .catchip:active { transform: scale(.93); transition-duration: .03s; }
.avpick:active { transform: scale(.92) rotate(-4deg); }
.numb.picked { background: var(--yellow) !important; color: var(--ink) !important; scale: 1.12; box-shadow: 0 0 0 3px var(--paper), 3px 3px 0 var(--ink); }
.numb[disabled]:not(.picked) { opacity: .4; }

/* view to view: a quick slide off the tape (never blocks: the view is live from the first frame) */
.viewin { animation: viewin .26s cubic-bezier(.2, .9, .3, 1.05) backwards; }
@keyframes viewin { from { opacity: 0; translate: 22px 0; } } /* translate only: a canvas measuring itself on mount gets its real size */
html.lite .viewin { animation-name: fade; animation-duration: .2s; }

/* the rubber stamp juice.js slams onto things */
.jstamp { position: absolute; left: 50%; top: 50%; z-index: 5; pointer-events: none; white-space: nowrap;
  padding: 8px 16px 5px; border: 5px solid currentColor; border-radius: 8px; transform: translate(-50%, -50%) rotate(-9deg);
  font: 400 clamp(30px, 10vw, 54px)/1 var(--display); text-transform: uppercase; letter-spacing: .05em;
  background: rgba(255, 250, 240, .3); box-shadow: inset 0 0 0 2px rgba(255, 250, 240, .35); }
.jstamp.good { color: #0f8a68; }
.jstamp.bad { color: var(--pink-deep); }
.screen-mode .jstamp { font-size: 72px; }

/* the stamp class used across views slams harder: overshoot, then a settle */
@keyframes stampin { 0% { transform: rotate(-7deg) scale(2.6); opacity: 0; } 55% { transform: rotate(-7deg) scale(.9); opacity: 1; } 75% { transform: rotate(-7deg) scale(1.06); } 100% { transform: rotate(-7deg) scale(1); opacity: 1; } }

/* locked in: the stamp lands, then the waiting pills idle-bob like people fidgeting */
.locked .stamp { font-size: 42px; }
.locked .pills .pill { animation: idlebob 2.4s ease-in-out infinite; }
.locked .pills .pill:nth-child(3n+2) { animation-delay: -.8s; } .locked .pills .pill:nth-child(3n) { animation-delay: -1.6s; }
.locked > .kicker { animation: lamp 1.6s ease-in-out infinite; }
@keyframes idlebob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@keyframes idlesway { 0%, 100% { rotate: -1.5deg; translate: 0 0; } 50% { rotate: 1.5deg; translate: 0 -3px; } }

/* the timer: urgent in the last 5 seconds (the bar throbs, the number punches every second) */
.timer-row.low .timer { animation: tpulse .5s ease-in-out infinite alternate; }
.timer-row.low .timer-num { color: var(--pink); }
.timer-num.beat { animation: tbeat .3s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes tpulse { from { scale: 1 1; } to { scale: 1 1.35; box-shadow: 0 0 0 2px var(--pink), 0 0 14px rgba(255, 79, 139, .55); } }
@keyframes tbeat { 0% { scale: 1.6; rotate: -8deg; } 100% { scale: 1; rotate: 0deg; } }
html.lite .timer-row.low .timer { animation: none; box-shadow: 0 0 0 2px var(--pink); }

/* intro card slams onto the wall, question cards drop in, the round number slams */
.introcard { animation: cardslam .42s cubic-bezier(.3, 1.3, .5, 1) backwards; }
@keyframes cardslam { 0% { opacity: 0; scale: 1.5; rotate: -9deg; translate: 0 -30px; } 60% { opacity: 1; scale: .97; rotate: 1deg; translate: 0 0; } 100% { scale: 1; rotate: 0deg; } }
.qcard { animation: carddrop .34s cubic-bezier(.2, 1.3, .4, 1) backwards; }
@keyframes carddrop { 0% { opacity: 0; translate: 0 -40px; rotate: -4deg; } 70% { opacity: 1; translate: 0 3px; } 100% { translate: 0 0; rotate: 0deg; } }
.roundcard-n { animation: roundslam .5s cubic-bezier(.3, 1.4, .5, 1) backwards; }
@keyframes roundslam { 0% { opacity: 0; scale: 2.4; rotate: -12deg; } 60% { opacity: 1; scale: .92; rotate: 2deg; } 100% { scale: 1; rotate: 0deg; } }

/* scoreboard: rows slide in from the side, the leader shines, deltas pop */
.brow.slidein { animation: browin .42s cubic-bezier(.2, 1.1, .3, 1) backwards; }
@keyframes browin { from { opacity: 0; translate: -60px 0; } 70% { translate: 5px 0; } }
.brow.first::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%) 200% 0 / 220% 100% no-repeat; animation: shine 2.6s ease-in-out 1s infinite; }
@keyframes shine { 0% { background-position: 200% 0; } 40%, 100% { background-position: -120% 0; } }
.brow .sc .delta { animation: pop .35s cubic-bezier(.2, 1.6, .4, 1) .9s backwards; }
.brow.me .rk { animation: idlebob 1.8s ease-in-out infinite; }
html.lite .brow.first::before { display: none; }
html.lite .brow.me .rk { animation: none; }

/* podium: blocks rise from the floor, the winner sways */
.podium .blk { transform-origin: bottom; animation: blkup .5s cubic-bezier(.2, 1.3, .4, 1) backwards; animation-delay: inherit; }
@keyframes blkup { from { scale: 1 0; } }
.podium .p1 .av { animation: idlesway 1.6s ease-in-out 1.6s infinite; }

/* waiting / stand-by screens are alive */
.waitcard { animation: idlesway 4s ease-in-out infinite; }
.onair-dots { display: flex; gap: 8px; margin-top: 12px; justify-content: center; }
.onair-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--pink); animation: eq .45s ease-in-out infinite alternate; }
.onair-dots i:nth-child(2) { background: var(--yellow); animation-delay: .15s; } .onair-dots i:nth-child(3) { background: var(--blue); animation-delay: .3s; }

/* home + lobby: idle life */
.home .gamecount { animation: idlebob 3.2s ease-in-out infinite; }
.home .avpick .av { animation: idlesway 3.6s ease-in-out infinite; }
.lobby .players .ptile .av, .screen-lobby .ptile .av { animation: idlebob 2.8s ease-in-out infinite; }
.lobby .players .ptile:nth-child(3n+2) .av, .screen-lobby .ptile:nth-child(3n+2) .av { animation-delay: -.9s; }
.lobby .players .ptile:nth-child(3n) .av, .screen-lobby .ptile:nth-child(3n) .av { animation-delay: -1.8s; }
.ptile.new { animation: joinpop .55s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes joinpop { 0% { opacity: 0; scale: .2; rotate: -20deg; translate: 0 30px; } 60% { opacity: 1; scale: 1.15; rotate: 6deg; translate: 0 -6px; } 100% { scale: 1; rotate: 0deg; translate: 0 0; } }

html.lite .locked .pills .pill, html.lite .locked > .kicker, html.lite .waitcard, html.lite .onair-dots i, html.lite .podium .p1 .av,
html.lite .lobby .players .ptile .av, html.lite .screen-lobby .ptile .av, html.lite .home .gamecount, html.lite .home .avpick .av { animation: none !important; }

/* small extras for the shared views */
.drinkglass { animation: idlesway 2.2s ease-in-out infinite; transform-origin: 50% 90%; }
.rknob { transition: scale .12s cubic-bezier(.3, 1.8, .5, 1), box-shadow .12s; }
.rknob.grab { scale: 1.15; box-shadow: 5px 5px 0 var(--ink), 0 0 0 4px rgba(255, 210, 63, .35); cursor: grabbing; }
html.lite .drinkglass { animation: none; }

/* iPhones: no double-tap zoom anywhere (2026-10-11). Zero specificity, so canvases and pads that set
   touch-action: none (maps, joysticks, sensors) keep it */
* { touch-action: manipulation; }

/* ---------------------------------------------------------------- the first five minutes (2026-10-12)
   Join screen (main.js homeView), the non-leader "You're in" card + Start button (lobby.js), the TV lobby
   (lobby.js screenLobby) and "How it works" (howto.js). TV parts: no filters, no blend modes, no endless loops. */

/* join: a QR / shared link lands on the invite (code stamp + live status), returning players get a ticket */
.home.invited { gap: 16px; }
.home.invited .logo .word { font-size: clamp(60px, 18vw, 120px); }
.home .jhow { width: auto; align-self: center; }
.jinvite { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.jcode { font: 700 clamp(56px, 18vw, 92px)/1 var(--mono); letter-spacing: .14em; padding-left: .14em; color: var(--ink); }
.jt-change { appearance: none; border: 0; background: none; padding: 6px 2px; cursor: pointer; color: inherit; font: 700 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; border-bottom: 1.5px solid currentColor; opacity: .7; }
.jinvite .jcoderow { width: 100%; max-width: 280px; margin-top: 4px; }
.jstatus { display: grid; gap: 3px; width: 100%; padding: 10px 12px; border: 2.5px solid var(--ink); border-radius: var(--radius); text-align: left; color: var(--ink); background: #fffaf0; }
.jstatus b { font: 400 20px/1.05 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.jstatus span { font: 600 13px/1.3 var(--body); }
.jstatus.ok { background: var(--mint); }
.jstatus.live { background: var(--pink); }
.jstatus.live b::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 50%; background: var(--ink); vertical-align: 2px; }
.jstatus.bad { background: var(--ink); color: var(--paper); border-color: var(--red); }
.jstatus.bad b { color: var(--red); }
.jticket { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.jt-av { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; }
.jt-av .av { width: 76px; height: 76px; }
.jt-who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jt-name { font: 400 30px/1 var(--display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jgo.busy { opacity: .7; pointer-events: none; }
.jgo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* phone lobby, not the leader: you are in, whose show, what is coming */
.inhere { display: flex; flex-direction: column; gap: 12px; }
.in-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.in-lamp { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px 5px; border-radius: 4px; background: var(--ink); color: #ffd7e5; font: 700 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.in-lamp i { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px var(--pink); animation: lamp 1.6s ease-in-out infinite; }
.in-row { display: flex; align-items: center; gap: 14px; }
.in-row .av.xl { width: 96px; height: 96px; }
.in-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.in-wait { font: 600 16px/1.3 var(--body); }
.in-plan { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 2px dashed rgba(28, 25, 32, .35); font: 600 14px/1.3 var(--body); }
.in-host { width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden; border: 2.5px solid var(--ink); }
.in-host svg { width: 100%; height: 100%; }
.in-need { padding: 8px 10px; border-radius: 4px; background: var(--ink); color: var(--yellow); font: 700 14px/1.3 var(--body); }

/* the leader's Start button: cold (dashed paper, "Need 1 more") until the setlist can play */
.startbar .startcold { border-style: dashed; box-shadow: none; opacity: .9; }
.startbar .starthot { box-shadow: 5px 5px 0 -1px var(--plate), 0 0 0 4px rgba(255, 210, 63, .25); }

/* TV lobby: readable from the sofa. QR + address + code always on the left, sized in vh (no fitStage shrink) */
.screen-mode .wrap.screen-lobby { max-width: 1680px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4vw; align-items: center; }
.tvl-join { padding: 2.4vh 2.6vh; display: flex; flex-direction: column; align-items: center; }
.tvl-join > .kicker { font-size: 1.9vh; }
.screen-mode .qr.tvl-qr { width: 50vh; height: 50vh; padding: 1.4vh; margin: 1.2vh auto 0; }
.tvl-or { font: 700 1.9vh/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; opacity: .7; margin-top: 1.8vh; }
.tvl-url { font: 700 4.4vh/1.1 var(--mono); white-space: nowrap; margin-top: .6vh; }
.tvl-code { display: flex; align-items: baseline; justify-content: center; gap: 1.6vh; margin-top: .6vh; }
.tvl-code .kicker { font-size: 1.9vh; }
.tvl-code b { font: 700 11vh/1 var(--mono); letter-spacing: .12em; }
.tvl-side { gap: 2vh; min-width: 0; }
.screen-lobby .logo .word.tvl-word { font-size: 11vh; }
.tvl-tag { font-size: 3vh; }
.tvl-ready { display: grid; gap: .8vh; padding: 1.8vh 2.2vh; border: 3px solid rgba(242, 232, 213, .5); border-radius: 8px; background: var(--ink-2); }
.tvl-ready b { font: 400 5vh/1 var(--display); text-transform: uppercase; color: var(--yellow); }
.tvl-ready span { font: 600 2.4vh/1.25 var(--body); opacity: .85; }
.tvl-ready.go { background: var(--pink); color: var(--ink); border-color: var(--ink); }
.tvl-ready.go b { color: var(--ink); }
.screen-lobby .plist { grid-template-columns: repeat(auto-fill, minmax(12vh, 1fr)); gap: 1.6vh 1vh; }
.screen-lobby .ptile .av.lg { width: 9vh; height: 9vh; }
.screen-lobby .ptile .nm { font-size: 2vh; }

/* How it works: three tilted paper cards over the studio wall (phones only) */
.howto { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: calc(var(--safe-top) + 16px) var(--gutter) calc(var(--safe-bot) + 16px); background: rgba(10, 8, 12, .84); animation: fade .2s both; overscroll-behavior: contain; }
.ht-deck { width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; }
.ht-skip { align-self: flex-end; appearance: none; border: 0; background: none; color: var(--paper); cursor: pointer; padding: 8px 2px; font: 700 12px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; border-bottom: 1.5px solid currentColor; opacity: .8; }
.ht-card { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px 22px 26px; text-align: center; cursor: pointer; touch-action: pan-y; }
.ht-card > .kicker { align-self: stretch; text-align: left; }
.ht-card.ht-pink { background-color: var(--pink); }
.ht-card.ht-blue { background-color: var(--blue); color: #fff; }
.ht-card.ht-yellow { background-color: var(--yellow); }
.ht-art { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: #fffaf0; color: var(--ink); border: 3.5px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); margin: 6px 0; }
.ht-art svg { width: 66px; height: 66px; }
.ht-art.host { overflow: hidden; }
.ht-art.host svg { width: 100%; height: 100%; }
.ht-text { margin: 0; max-width: 330px; font: 600 17px/1.4 var(--body); }
.ht-in { animation: htin .34s cubic-bezier(.2, 1.3, .4, 1) both; }
.ht-back { animation: htback .34s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes htin { from { opacity: 0; translate: 70px 0; rotate: 6deg; } }
@keyframes htback { from { opacity: 0; translate: -70px 0; rotate: -6deg; } }
.ht-foot { display: flex; align-items: center; gap: 14px; }
.ht-dots { flex: 1; display: flex; gap: 8px; }
.ht-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--paper); }
.ht-dots i.on { background: var(--yellow); border-color: var(--yellow); }
.ht-next { width: auto; flex: none; padding-left: 26px; padding-right: 22px; }
.ht-next .ht-chev { transform: rotate(-90deg); }

/* licence gating (public/js/licence.js): VIP purple, the same as the passport's VIP name colour */
.chip.vip { background: #b48cff; color: var(--ink); border-color: var(--ink); }
.mcard.vip-lock { opacity: .78; }
.mcard.vip-lock .mart { filter: grayscale(.7); }
html.lite .mcard.vip-lock .mart { filter: none; }
.seg button.vip-lock { display: inline-flex; align-items: center; justify-content: center; gap: 4px; opacity: .8; }
.seg button.vip-lock .chip { padding: 1px 5px; font-size: 10px; }
.vipcard { background: #e9dcff; }
.vipcard .vc-txt { display: flex; flex-direction: column; gap: 4px; font: 600 13px/1.3 var(--body); margin: 4px 0 10px; }
.vipcard .vc-txt b { font: 400 18px/1.1 var(--display); text-transform: uppercase; }
.btn.vipbtn { background: #b48cff; color: var(--ink); }
.in-vip { margin-top: 6px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.chip.vip.recode { margin: 4px auto 0; display: inline-block; cursor: pointer; }

/* ================================================================ Jackbox polish, engine shell (2026-10-13)
   Everything below is transform + opacity animation, one-shot unless it says otherwise; html.lite keeps it safe. */

/* ---- TV effects tier (state.js TIER 'tv' -> html.lite.tvfx): the riso texture back as static backgrounds only
   (no feTurbulence, no blend modes), for a /tv page on a capable browser. Cast receivers never get this class. */
html.lite.tvfx { --dots: radial-gradient(rgba(0, 0, 0, .2) 1px, transparent 1.5px); }
html.lite.tvfx .studio::before, html.lite.tvfx .halftone::after { display: block; }
html.lite.tvfx .paper.dark { background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1.6px); background-size: 6px 6px; }

/* ---- the timer as a burning fuse (sdk.js timer): the rope (i::before) slides back into its sleeve, the spark (i::after)
   rides on its end; one translateX on `i` moves both */
.timer.fuse { height: 22px; border: 0; border-radius: 0; background: transparent; overflow: hidden; }
.timer.fuse::before { content: ''; position: absolute; left: 0; right: 4px; top: 9px; height: 4px; border-radius: 2px; background: repeating-linear-gradient(90deg, #3a3238 0 3px, #24202a 3px 6px); }
.timer.fuse i { background: none; }
.timer.fuse i::before { content: ''; position: absolute; left: 0; right: 10px; top: 7px; height: 8px; border-radius: 4px; box-shadow: 0 0 0 2px var(--ink);
  background: repeating-linear-gradient(-55deg, var(--yellow) 0 4px, var(--yellow-deep) 4px 7px); }
.timer.fuse i::after { content: ''; position: absolute; right: 0; top: 0; width: 22px; height: 22px;
  background: radial-gradient(circle, #fffbe6 0 2.5px, var(--yellow) 3.5px 5px, var(--orange) 6px 7.5px, transparent 8.5px);
  clip-path: polygon(50% 0, 60% 34%, 96% 22%, 68% 50%, 100% 72%, 62% 66%, 54% 100%, 42% 66%, 6% 80%, 32% 52%, 0 26%, 40% 34%);
  animation: sparkle .16s steps(2) infinite; }
@keyframes sparkle { 50% { rotate: 24deg; scale: 1.18; } }
.timer.fuse.big { height: 30px; }
.timer.fuse.big::before { top: 12px; height: 6px; }
.timer.fuse.big i::before { top: 9px; height: 12px; border-radius: 6px; }
.timer.fuse.big i::after { width: 30px; height: 30px; }
.timer-row.low .timer.fuse { animation: none; box-shadow: none; }
.timer-row.low .timer.fuse i::before { background: repeating-linear-gradient(-55deg, var(--pink) 0 4px, var(--pink-deep) 4px 7px); }
.timer-row.low .timer.fuse i::after { scale: 1.35; }
.timer-row.out .timer.fuse i::after { opacity: 0; }
html.lite .timer-row.low .timer.fuse { box-shadow: none; }
html.lite .timer.fuse i::after { animation: none; }

/* ---- the keyed waiting strip (sdk.js waiting): answered = a stamped IN pill, the last holdout wobbles */
.waitstrip .pill { position: relative; }
.waitstrip .pill .pin { display: none; }
.waitstrip .pill.in { background: var(--mint); color: var(--ink); animation: none !important; }
.waitstrip .pill.in .pin { display: inline-block; font: 400 12px/1 var(--display); letter-spacing: .06em; padding: 3px 5px 1px; margin-left: 2px;
  border: 2px solid var(--ink); border-radius: 3px; rotate: -8deg; background: var(--paper); color: #0f8a68; }
.waitstrip .pill.flip { animation: pillflip .42s cubic-bezier(.2, 1.6, .4, 1) !important; }
@keyframes pillflip { 0% { transform: none; } 40% { transform: rotateX(90deg) scale(1.12); } 100% { transform: none; } }
.waitstrip .pill.holdout { background: var(--pink); color: var(--ink); animation: pillwobble 2.2s ease-in-out infinite !important; }
@keyframes pillwobble { 0%, 30%, 100% { rotate: 0deg; scale: 1; } 6% { rotate: -9deg; scale: 1.12; } 12% { rotate: 8deg; } 18% { rotate: -6deg; } 24% { rotate: 3deg; } }
.waitstrip .allin { width: 100%; text-align: center; }
html.lite .waitstrip .pill.flip { animation: pillflip .32s ease-out 1 !important; }
html.lite .waitstrip .pill.holdout { animation: pillwobble 2.2s ease-in-out 1 !important; }

/* ---- the stage transition (juice.js tapeWipe): riso tape pulled off the screen; thin = one band (Cast / TV UAs) */
.tapewipe { position: fixed; inset: 0; z-index: 58; pointer-events: none; overflow: hidden; contain: strict; }
.tapewipe i { position: absolute; top: -12%; bottom: -12%; left: -22%; width: 144%; will-change: transform; border-right: 7px solid var(--ink);
  background: var(--paper) repeating-linear-gradient(90deg, transparent 0 26px, rgba(21, 19, 24, .08) 26px 29px); }
.tapewipe i:first-child { background: var(--pink); border-right-color: var(--blue); }
.tapewipe.thin i { left: 0; width: 46vw; border-right: 0; background: var(--yellow); }
.tapewipe.thin i:first-child { display: none; }

/* ---- shift change as a channel flip (core.js handover) */
.chset { position: relative; width: min(300px, 72vw); margin: 6px auto 0; padding: 14px 14px 40px; background: var(--ink-2); border: 4px solid var(--ink);
  border-radius: 24px 24px 18px 18px; box-shadow: var(--shadow), inset 0 0 0 3px #2b2730; rotate: -1.2deg; }
.chscreen { position: relative; aspect-ratio: 5 / 4; border-radius: 18px / 26px; overflow: hidden; background: #0b0a0d; border: 3px solid var(--ink); }
.chface { position: absolute; inset: 0; display: grid; place-items: center; }
.chface svg { width: 100%; height: 100%; }
.chface.in { opacity: 0; }
.chbars { position: absolute; left: 0; right: 0; top: -10%; bottom: -10%; opacity: 0;
  background: repeating-linear-gradient(0deg, rgba(242, 232, 213, .85) 0 3px, rgba(21, 19, 24, .9) 3px 7px, rgba(255, 79, 139, .6) 7px 9px, transparent 9px 14px); }
.chdial { position: absolute; right: 16px; bottom: 8px; display: flex; align-items: baseline; gap: 4px; font: 700 11px/1 var(--mono); color: var(--smoke); letter-spacing: .1em; }
.chdial b { display: inline-block; font: 400 26px/1 var(--display); color: var(--yellow); letter-spacing: .02em; }
.chname { text-align: center; }
.chname .h1 { line-height: 1; }
.chfrom { opacity: .6; }
.screen-mode .chset { width: min(560px, 44vw); padding-bottom: 60px; }
.screen-mode .chdial b { font-size: 44px; }

/* ---- results countdown (core.js ranking): rows wait unseen, #1 waits sealed, then lands as the hero */
.rk-wait { opacity: 0; }
.rank-hero { min-height: 132px; display: flex; flex-direction: column; gap: 8px; border: 3px solid var(--ink); rotate: -.8deg; }
.rank-hero .rh-kicker { text-align: center; }
.rank-hero .rh-body { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; min-height: 84px; }
.rank-hero.sealed .rh-body { flex-direction: column; gap: 4px; }
.rank-hero .rh-q { font-size: 64px; line-height: 1; color: var(--yellow); }
.rank-hero .drumdots { margin-top: 0; }
.rank-hero.rolling { animation: rattle .09s linear 6 alternate; }
@keyframes rattle { from { translate: -3px 0; rotate: -1.6deg; } to { translate: 3px 0; rotate: .4deg; } }
.rank-hero.landed { background-color: var(--pink); color: var(--ink); }
.rh-one { display: flex; align-items: center; gap: 12px; }
.rh-one .av.xl { width: 84px; height: 84px; }
.rh-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rh-nm { font: 400 34px/1 var(--display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
.rh-val { font: 700 14px/1.2 var(--mono); letter-spacing: .04em; }
.rh-pts { font-size: 40px; padding: 4px 8px 2px; background: var(--yellow); border: 3px solid var(--ink); rotate: 4deg; box-shadow: 3px 3px 0 var(--ink); }
.rh-one.me .rh-pts { background: var(--paper); }
.screen-mode .rank-hero { min-height: 220px; }
.screen-mode .rh-one .av.xl { width: 150px; height: 150px; }
.screen-mode .rh-nm { font-size: 64px; }
.screen-mode .rh-val { font-size: 22px; }
.screen-mode .rh-pts { font-size: 64px; }
.screen-mode .rank-hero .rh-q { font-size: 120px; }

/* ---- the board as a radio chart (core.js scores): a VU meter per row, paper delta stickers */
.brow.chart { padding-bottom: 12px; }
.brow .vut { position: absolute; left: 8px; right: 8px; bottom: 3px; height: 5px; overflow: hidden; border-radius: 2px; background: rgba(21, 19, 24, .12); pointer-events: none; }
.brow .vu { position: absolute; inset: 0; will-change: transform;
  background: repeating-linear-gradient(90deg, var(--blue) 0 7px, transparent 7px 9px); }
.brow .vu.up { background: repeating-linear-gradient(90deg, #16a77a 0 7px, transparent 7px 9px); }
.brow .vu.down { background: repeating-linear-gradient(90deg, var(--red) 0 7px, transparent 7px 9px); }
.brow.chart .sc .delta { display: inline-block; font-size: 15px; padding: 3px 6px 1px; margin-top: 4px; background: var(--yellow); color: var(--ink);
  border: 2px solid var(--ink); rotate: -4deg; box-shadow: 2px 2px 0 var(--ink); }
.brow.chart .sc .delta.neg { background: var(--pink); color: var(--ink); }
.brow.chart.me .sc .delta { background: var(--paper); }
.screen-mode .brow.chart { padding-bottom: 18px; }
.screen-mode .brow .vut { height: 8px; bottom: 5px; }
.screen-mode .brow.chart .sc .delta { font-size: 22px; }

/* ---- the finale, last to first (core.js final): JS lands each column; the winner's block waits sealed */
.podium .blk { animation: none; position: relative; }
.podium .col.pwait { opacity: 0; }
.podium .col.sealed { opacity: 1; }
.podium .col.sealed > :not(.blk) { visibility: hidden; }
.podium .col.sealed .blk { color: transparent; background-color: var(--ink-3); }
.podium .col.sealed .blk::after { content: '?'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--yellow); }
.podium .p1:not(.landed) .av { animation: none; }

/* ---- the intro's "rolling in" fuse (core.js intro, server show.js READY_FUSE) */
.rollin { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); rotate: -1deg; box-shadow: var(--shadow-sm); }
.rollin .kicker { color: var(--ink); opacity: 1; flex: none; }
.rollin .timer-row { flex: 1; }
.rollin .timer.fuse i::before { background: repeating-linear-gradient(-55deg, var(--pink) 0 4px, var(--pink-deep) 4px 7px); }
.screen-mode .rollin .kicker { font-size: 22px; }

/* Scan TV (tvscan.js): a full-screen camera sheet with an aiming frame */
.tvscan { position: fixed; inset: 0; z-index: 80; background: rgba(8, 8, 10, .94); display: grid; place-content: center; justify-items: center; gap: 16px; padding: calc(var(--safe-top, 0px) + 20px) 20px calc(var(--safe-bot, 0px) + 24px); }
.tvscan-box { position: relative; width: min(86vw, 420px); aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #000; }
.tvscan-v { width: 100%; height: 100%; object-fit: cover; display: block; }
.tvscan-frame { position: absolute; inset: 14%; border: 3px solid var(--yellow, #ffd23f); border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); animation: tvscan-pulse 1.4s ease-in-out infinite alternate; }
@keyframes tvscan-pulse { to { inset: 17%; } }
.tvscan-note { color: var(--paper, #f4ead6); font: 600 15px/1.35 var(--body); text-align: center; max-width: 30ch; }
@media (prefers-reduced-motion: reduce) { .tvscan-frame { animation: none; } }
