/* Space Case · AndrewNet. AndrewNet chrome around a cartoon cutaway of a survey ship. */
:root {
  --bg: #0d1020; --bg2: #151a33; --surface: rgba(255,255,255,.05); --surface-hi: rgba(255,255,255,.09);
  --text: #f2f3fa; --muted: #9aa0bf; --accent: #8fb0ff; --border: rgba(255,255,255,.10); --glow: rgba(110,120,255,.45);
  /* ship palette (spec 8.1) */
  --hull: #1b2440; --deck: #26335c; --grate: #3a4a7a; --cyan: #6fe3ff; --hazard: #ffd45e; --alert: #ff4d5e;
  --ok: #3ddc84;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --hand: "Segoe Print", "Bradley Hand", "Chalkboard SE", "Comic Sans MS", "Marker Felt", cursive;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.55; color: var(--text);
  background: radial-gradient(900px 500px at 15% -10%, rgba(47,111,228,.35), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(123,63,228,.30), transparent 60%), var(--bg);
  background-attachment: fixed; overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
svg { display: block; }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.2; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.back { position: fixed; top: 10px; left: 12px; z-index: 5; color: var(--accent); text-decoration: none; font-size: .9rem; padding: 6px 10px; border-radius: 999px; background: rgba(13,16,32,.6); }
.loading { min-height: 100dvh; display: grid; place-items: center; color: var(--muted); font-family: var(--mono); letter-spacing: .2em; }
.note { color: var(--muted); font-size: .92rem; margin: 6px 0; }
.note.center, .center { text-align: center; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); z-index: 90; background: #222a4d; border: 1px solid var(--border); padding: 10px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- buttons and chips ---------- */
.btn { min-height: 44px; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.btn:hover, .btn:focus-visible { background: var(--surface-hi); border-color: rgba(143,176,255,.45); }
.btn.primary { background: linear-gradient(135deg, #8fd8ff, #a98bff); color: #0d1020; border: 0; }
.btn.big { min-height: 52px; font-size: 1.05rem; padding: 12px 24px; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(255,77,94,.5); color: #ffb3bb; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn .sub { display: block; font-size: .74rem; font-weight: 600; opacity: .72; }
.chip { min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; cursor: pointer; font-size: .92rem; }
.chip.on { background: rgba(143,176,255,.22); border-color: var(--accent); color: #fff; }
.chip.small { min-height: 36px; min-width: 36px; padding: 4px 10px; font-size: .82rem; }
.iconbtn { width: 44px; height: 44px; flex: none; border: 0; background: transparent; font-size: 1.35rem; cursor: pointer; border-radius: 12px; display: grid; place-items: center; }
.iconbtn:hover { background: var(--surface); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 22px; }
.ov-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.row .rl { flex: 0 0 100%; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.row .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.row.dim { opacity: .45; }

/* ---------- who is who ---------- */
.who { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; min-width: 0; }
.who .pt { flex: none; display: inline-flex; }
.who b { white-space: nowrap; }
.who .sep { color: var(--muted); }
.who .you { color: var(--accent); font-weight: 700; }
.cpu, .wit { font-size: .68rem; font-weight: 800; letter-spacing: .08em; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.1); color: var(--muted); text-transform: uppercase; }
.cpu { color: var(--cyan); }
.pchip-slot { font-weight: 600; color: var(--muted); }
.pchip { display: inline-flex; vertical-align: middle; }
.free { color: var(--muted); }

/* ---------- home ---------- */
.home { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 56px 16px 30px; overflow: hidden; }
.home-stars { position: fixed; inset: 0; pointer-events: none; opacity: .8; }
.home-stars svg { width: 100%; height: 100%; }
.home-inner { position: relative; text-align: center; max-width: 520px; width: 100%; }
.home-crew { display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; }
.home-crew span { animation: bob 3s ease-in-out infinite; }
.home-crew span:nth-child(2n) { animation-delay: -1.4s; }
.home h1 { margin: 0 0 6px; }
.tag { color: var(--muted); margin: 0 auto 24px; max-width: 420px; }
.home-buttons { display: flex; flex-direction: column; gap: 12px; align-items: stretch; max-width: 340px; margin: 0 auto; }
.hint { color: var(--muted); font-size: .9rem; margin-top: 22px; }
.wordmark { display: inline-flex; gap: .28em; font-weight: 900; letter-spacing: .02em; font-size: clamp(1.1rem, 4vw, 1.3rem); line-height: 1; }
.wordmark.big { font-size: clamp(2.6rem, 13vw, 4.4rem); letter-spacing: -.01em; }
.wm-a { color: #fff; text-shadow: 0 0 22px rgba(111,227,255,.35); }
.wm-b { color: var(--alert); text-shadow: 0 0 22px rgba(255,77,94,.4); }
.page-center { min-height: 100dvh; display: grid; place-items: center; padding: 60px 16px; }
.join-card, .solo-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; }
.join-card h2, .solo-card h2 { margin: 0; }
.join-card label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: .9rem; }
.join-card input { min-height: 48px; border-radius: 14px; border: 1px solid var(--border); background: rgba(0,0,0,.25); color: var(--text); font-size: 1.15rem; padding: 8px 14px; }
.err { color: #ff9b9b; margin: 0; }
.solo-opt { text-align: left; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 64px; }
.solo-opt small { color: var(--muted); }
.solo-opt.on { border-color: var(--accent); background: rgba(143,176,255,.14); }
.solo-card .row { margin: 0 0 0 4px; }
@keyframes bob { 50% { transform: translateY(-5px); } }

/* ---------- phone / desktop player shell ---------- */
.page-player { overflow: hidden; }
.game.player { display: grid; grid-template-rows: 54px auto minmax(0, 1fr) auto; height: 100vh; height: 100dvh; max-width: 560px; margin: 0 auto; position: relative; }
.game.player > .topbar { grid-row: 1; }
.game.player > .actbanner { grid-row: 2; }
.game.player > .panes { grid-row: 3; }
.game.player > .tabs { grid-row: 4; }
.topbar { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border-bottom: 1px solid var(--border); background: rgba(13,16,32,.7); min-width: 0; }
.tb-me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.tb-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.tb-txt small, .tb-round small, .tb-turn small { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.tb-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.tb-round { display: flex; flex-direction: column; align-items: center; line-height: 1.1; min-width: 46px; }
.tb-round b { font-size: 1.05rem; font-family: var(--mono); }
.tb-round b span { color: var(--muted); font-size: .8rem; }
.tb-turn { display: flex; flex-direction: column; align-items: center; min-width: 52px; line-height: 1.1; }
.tb-tn { position: relative; display: inline-grid; place-items: center; }
.tb-tn.mine { filter: drop-shadow(0 0 6px var(--hazard)); }
.tring { position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(var(--hazard) calc(var(--frac, 1) * 360deg), transparent 0);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); }
.actbanner { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; background: rgba(255,212,94,.14); border-bottom: 1px solid rgba(255,212,94,.4); font-weight: 700; }
.actbanner span { flex: 1; }
.pagebody { display: none; overflow-y: auto; padding: 12px 16px 30px; }
.mode-page .pagebody { display: block; grid-row: 3 / 5; }
.mode-page .panes, .mode-page .tabs { display: none; }
.panes { position: relative; min-height: 0; }
.pane { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; display: none; overscroll-behavior: contain; }
.game[data-tab="ship"] .pane-ship, .game[data-tab="notes"] .pane-notes, .game[data-tab="hand"] .pane-hand { display: block; }
.pane-ship { padding: 10px 12px 16px; }
.pane-notes { display: none; }
.game[data-tab="notes"] .pane-notes { display: flex; flex-direction: column; overflow: hidden; }
.pane-hand { padding: 10px 14px 20px; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); background: rgba(13,16,32,.9); padding-bottom: env(safe-area-inset-bottom); }
.tab { position: relative; min-height: 58px; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; font-weight: 700; font-size: .85rem; color: var(--muted); }
.tab .ti { font-size: 1.15rem; line-height: 1.1; }
.tab.on { color: var(--text); box-shadow: inset 0 3px 0 var(--accent); }
.tab .badge { position: absolute; top: 10px; right: calc(50% - 30px); width: 10px; height: 10px; border-radius: 50%; background: var(--hazard); box-shadow: 0 0 8px var(--hazard); display: none; }
.tab.new .badge { display: block; }
.spectator .tab[data-tab="notes"], .spectator .tab[data-tab="hand"] { opacity: .4; pointer-events: none; }
.conn { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 80; background: #5a2a2f; padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.game.alert .pane-ship { background: rgba(255,77,94,.1); }

/* ---------- lobby (phone) ---------- */
.lobby { max-width: 520px; margin: 0 auto; }
.lob-h { margin: 6px 0 2px; font-size: 1.25rem; }
.crewgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.crewpick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 10px; border-radius: 18px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; text-align: center; min-width: 0; }
.crewpick .cp-por svg { width: 100%; height: auto; max-width: 96px; margin: 0 auto; }
.crewpick .cp-name { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; line-height: 1.15; }
.crewpick .cp-name svg { flex: none; }
.crewpick .cp-own { font-size: .78rem; min-height: 1.3em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crewpick.mine { border-color: var(--cc); background: color-mix(in srgb, var(--cc) 18%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--cc) 40%, transparent); }
.crewpick.taken { opacity: .55; cursor: default; }
div.crewpick { cursor: default; }
.setup { margin-top: 16px; padding-top: 6px; border-top: 1px solid var(--border); }
.setup h2 { margin: 10px 0 4px; font-size: 1.2rem; }
.botrow { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.botrow small { color: var(--muted); }
.notice { margin: 8px 0; padding: 14px 16px; border-color: rgba(255,212,94,.4); }
.intro-p { max-width: 520px; margin: 30px auto; text-align: center; }
.intro-p .il, .tvi .il { opacity: 0; animation: fadeUp .8s ease-out forwards; animation-delay: var(--d); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- the stage (top of the Ship tab) ---------- */
.stage { margin-bottom: 10px; }
.st { border-radius: 20px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 8px; }
.st.mine { border-color: rgba(255,212,94,.5); background: linear-gradient(180deg, rgba(255,212,94,.10), rgba(255,255,255,.03)); }
.st.prompt { border-color: rgba(111,227,255,.6); background: linear-gradient(180deg, rgba(111,227,255,.10), rgba(255,255,255,.03)); }
.st-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.st-h .yt { font-size: 1.3rem; font-weight: 900; color: var(--hazard); }
.st-h .where { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .92rem; margin-left: auto; }
.st-h.noans { color: #ffb3bb; }
.die-s svg { width: 40px; height: 40px; }
.st-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.st-btns .btn { flex: 1 1 auto; }
.accuse-btn { border-color: rgba(255,77,94,.55); color: #ffc2c8; }
.called { color: var(--hazard); }
.sc-s { margin: 4px 0 8px; font-size: .98rem; }
.res-line { font-weight: 700; margin: 6px 0 0; }
.mylines { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); }
.mylines p { margin: 2px 0; font-weight: 700; color: var(--cyan); }
.cd { color: var(--muted); font-size: .85rem; margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.cd [data-deadline].hurry, [data-deadline].hurry { color: var(--alert); }
.cards3 { display: flex; gap: 8px; justify-content: center; margin: 6px 0; }
.cards3 .c3 { flex: 0 1 auto; min-width: 0; }
.cards3 svg { width: 84px; height: auto; max-width: 100%; }
.cards3.small svg { width: 56px; }
.answers { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ans { display: flex; align-items: center; gap: 8px; font-size: .92rem; padding: 4px 8px; border-radius: 10px; }
.ans .lamp { width: 10px; height: 10px; border-radius: 50%; background: #3a4566; flex: none; }
.ans.asking { background: rgba(111,227,255,.1); font-weight: 700; }
.ans.asking .lamp { background: var(--cyan); animation: pulse 1s ease-in-out infinite; }
.ans.passed .lamp { background: var(--alert); box-shadow: 0 0 6px var(--alert); }
.ans.passed { color: var(--muted); }
.ans.answered { background: rgba(61,220,132,.12); font-weight: 700; }
.ans.answered .lamp { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.ans.waiting { color: var(--muted); opacity: .6; }
@keyframes pulse { 50% { opacity: .35; } }

.reachlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.reach { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 10px; border-radius: 14px; border: 1px solid rgba(111,227,255,.35); background: rgba(111,227,255,.06); cursor: pointer; text-align: left; min-width: 0; }
.reach { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; row-gap: 0; }
.reach .ri { grid-row: 1 / 3; }
.reach .rn { font-weight: 700; font-size: .92rem; line-height: 1.15; min-width: 0; }
.reach small { color: var(--muted); font-size: .74rem; white-space: nowrap; line-height: 1.2; }
.reach.on { background: rgba(111,227,255,.22); border-color: var(--cyan); box-shadow: 0 0 12px rgba(111,227,255,.35); }
.ri { flex: none; display: inline-flex; }

/* hunch builder / picker chips: 56 px, two rows of three */
.hb h4, .picker h4 { margin: 10px 0 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.chips6, .chips9 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pchip56 { position: relative; display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 6px 8px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; min-width: 0; }
.pchip56 .ci { flex: none; display: inline-flex; }
.pchip56 .cn { font-size: .78rem; font-weight: 700; line-height: 1.12; min-width: 0; letter-spacing: -.01em; overflow-wrap: anywhere; }
@media (max-width: 400px) { .pchip56 { gap: 4px; padding: 6px 6px; } .pchip56 .cn { font-size: .74rem; } }
.pchip56.on { border-color: var(--hazard); background: rgba(255,212,94,.16); box-shadow: 0 0 0 1px var(--hazard), 0 0 14px rgba(255,212,94,.3); }
.pchip56.cleared:not(.on) { opacity: .5; }
.pchip56.cleared .cn { text-decoration: line-through; text-decoration-thickness: 2px; }
.pchip56.star { border-color: rgba(255,212,94,.7); box-shadow: 0 0 12px rgba(255,212,94,.35); }
.pchip56.gold { background: rgba(255,212,94,.1); }
.pchip56 .cb { position: absolute; top: -6px; right: -4px; font-size: .62rem; font-weight: 800; border-radius: 6px; padding: 0 4px; line-height: 1.5; }
.cb.log { background: #3a4566; color: #cfe0ff; }
.cb.held { padding: 0; }
.cb.starb { color: var(--hazard); font-size: .9rem; }
.cb.mine { background: rgba(143,176,255,.3); }

/* hold to look */
.look { position: relative; display: grid; place-items: center; margin: 8px auto; width: 190px; min-height: 230px; border-radius: 18px; background: rgba(0,0,0,.25); border: 2px dashed rgba(111,227,255,.5);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; cursor: pointer; }
.look-in { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; }
.look-back svg, .look-face svg { width: 130px; height: auto; }
.look-hint { font-weight: 800; color: var(--cyan); letter-spacing: .04em; }
.look.open { border-style: solid; border-color: var(--cyan); background: rgba(111,227,255,.1); }
.noted { margin: 0; font-weight: 700; text-align: center; font-size: .9rem; color: var(--ok); }
.look.none { border-style: solid; opacity: .6; }

/* red alert */
.redalert, .falsealarm { border-color: rgba(255,77,94,.7); background: linear-gradient(180deg, rgba(255,77,94,.2), rgba(255,77,94,.05)); text-align: center; }
.ra-h { font-family: var(--mono); font-weight: 900; letter-spacing: .3em; color: var(--alert); font-size: 1.2rem; }
html:not(.reduce-motion) .redalert .ra-h { animation: pulse .7s ease-in-out 3; }
.ra-out { font-weight: 800; font-size: 1.1rem; }
.ra-out.correct { color: var(--ok); }
.stamp { display: inline-block; margin: 8px auto; font-family: var(--mono); font-weight: 900; font-size: 2rem; letter-spacing: .2em; padding: 4px 16px; border: 4px solid currentColor; border-radius: 10px; transform: rotate(-6deg); }
.stamp.ok { color: var(--ok); }
.stamp.bad { color: var(--alert); }
html:not(.reduce-motion) .stamp { animation: stamp .45s cubic-bezier(.2,1.6,.4,1) both; }
.sealed svg { width: 160px; height: auto; margin: 6px auto; }
html:not(.reduce-motion) .sealed { animation: tremble .18s linear infinite; }
@keyframes stamp { from { transform: rotate(-6deg) scale(2.2); opacity: 0; } }
@keyframes tremble { 25% { transform: translateX(-2px) rotate(-1deg); } 75% { transform: translateX(2px) rotate(1deg); } }

/* answer prompt: my hand, matches raised */
.handrow { display: flex; flex-wrap: wrap; gap: 18px 8px; justify-content: center; margin: 20px 0 12px; }
.hcard { position: relative; border: 0; background: none; padding: 0; border-radius: 12px; }
.handrow .hcard { cursor: pointer; transition: transform .15s, opacity .15s; }
.handrow .hcard .cardart svg { width: 84px; height: auto; }
.handrow .hcard.match { transform: translateY(-8px); filter: drop-shadow(0 6px 10px rgba(111,227,255,.35)); }
.handrow .hcard.nomatch { opacity: .3; cursor: default; }
.handrow .hcard.on { outline: 3px solid var(--hazard); outline-offset: 2px; transform: translateY(-12px); }
.seen { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); display: flex; gap: 1px; background: rgba(13,16,32,.85); border-radius: 999px; padding: 1px 3px; }

/* mini deck plan with our token layer */
.planbox { position: relative; width: 100%; aspect-ratio: 380 / 266; margin: 0 auto; }
.planbox .plan, .planbox .plan svg { width: 100%; height: 100%; }
.planbox .tokens, .planbox .hits { position: absolute; inset: 0; pointer-events: none; }
.planbox .hits { pointer-events: none; }
.hit { position: absolute; pointer-events: auto; background: transparent; border: 0; border-radius: 10px; cursor: pointer; }
.hit.on { box-shadow: inset 0 0 0 3px var(--hazard); background: rgba(255,212,94,.12); }
.tok { position: absolute; transform: translate(-50%, -50%); transition: left .7s cubic-bezier(.4,.1,.2,1), top .7s cubic-bezier(.4,.1,.2,1); filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.tok svg { width: 100%; height: 100%; }
.tok.active { z-index: 2; }
.tok.active::after { content: ""; position: absolute; inset: -18%; border-radius: 50%; border: 3px solid var(--hazard); box-shadow: 0 0 12px var(--hazard); }
html:not(.reduce-motion) .tok.active::after { animation: pulse 1.4s ease-in-out infinite; }
.tok.named::before { content: "?"; position: absolute; top: -40%; right: -25%; font-weight: 900; color: var(--hazard); font-size: 70%; }
.tok.accused { filter: drop-shadow(0 0 8px var(--alert)); }
html:not(.reduce-motion) .tok.wobble { animation: wobble .4s ease-in-out 3; }
html:not(.reduce-motion) .tok.pop { animation: pop .9s ease-out; }
html.reduce-motion .tok { transition: none; }
@keyframes wobble { 25% { transform: translate(-50%, -50%) rotate(-14deg); } 75% { transform: translate(-50%, -50%) rotate(14deg); } }
@keyframes pop { 0% { transform: translate(-50%, -50%) scale(0); } 60% { transform: translate(-50%, -50%) scale(1.25); } 100% { transform: translate(-50%, -50%) scale(1); } }
.planbox.dip .plan { filter: brightness(.45); transition: filter .25s; }
.planbox .plan { transition: filter .8s; }
.fb-plan .rm.reach rect { stroke-dasharray: 18 10; }
.shipfoot { margin-top: 8px; }
.clockline { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 700; padding: 4px 2px; }
.clockline small { color: var(--muted); font-weight: 600; white-space: nowrap; }
.clockline .cbar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.clockline .cbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--hazard)); }
.clockline.last span:first-child { color: var(--hazard); }
.loglines { list-style: none; margin: 4px 0 0; padding: 8px 10px; border-radius: 12px; background: rgba(0,0,0,.3); font-family: var(--mono); font-size: .78rem; color: #b9c6f0; }
.loglines li { padding: 2px 0; line-height: 1.35; }
.ln { display: inline-block; min-width: 2em; color: var(--cyan); font-weight: 800; }
.lpt { display: inline-block; vertical-align: -4px; margin: 0 2px; }
.lpt svg { display: inline-block; }
.lres { color: var(--muted); }
em.ok { color: var(--ok); font-style: normal; font-weight: 800; }
em.bad { color: var(--alert); font-style: normal; font-weight: 800; }
.pausecover { position: absolute; inset: 0; z-index: 6; background: rgba(13,16,32,.82); display: grid; place-items: center; padding: 20px; text-align: center; backdrop-filter: blur(2px); }
.countin { font-size: 4rem; font-weight: 900; margin: 0; }
.filed { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }

/* ---------- the Hand tab ---------- */
.handp h3 { margin: 10px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.handgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.handgrid .hcard { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.handgrid .hcard .cardart svg { width: 100%; max-width: 140px; height: auto; }
.handgrid.ev .hcard .cardart svg { max-width: 96px; }
.seenby { font-size: .74rem; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 2px; text-align: center; }

/* fallback card face (art.js missing) */
.fcard { display: inline-flex; flex-direction: column; align-items: center; justify-content: space-between; width: 84px; aspect-ratio: 5 / 7; border-radius: 10px; background: #18203d; border: 2px solid #0a0f22; overflow: hidden; padding-bottom: 6px; }
.fc-band { width: 100%; background: var(--cc); color: #0d1020; font-size: .6rem; font-weight: 900; text-align: center; letter-spacing: .1em; }
.fc-name { font-size: .7rem; font-weight: 700; text-align: center; padding: 0 4px; }
.fcard.cback { background: var(--deck); justify-content: center; }
.fb-ico { display: inline-grid; place-items: center; font-size: 1rem; }
.cardart { display: inline-block; }

/* ---------- notepad ---------- */
.np { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.np-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--border); background: rgba(13,16,32,.92); }
.np-marks { display: flex; gap: 2px; flex: 1; min-width: 0; }
.np-marks.dim { opacity: .35; pointer-events: none; }
.np-arm { width: 40px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; display: grid; place-items: center; padding: 0; flex: 1 1 0; max-width: 46px; }
.np-arm.on { background: rgba(255,212,94,.2); border-color: var(--hazard); box-shadow: 0 0 10px rgba(255,212,94,.35); }
.np-undo { min-width: 50px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; padding: 0 6px; }
.np-undo small { font-size: .6rem; color: var(--muted); }
.np-undo:disabled { opacity: .35; }
.np-toggle { min-width: 52px; height: 44px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 700; font-size: .85rem; padding: 0 10px; }
.np-toggle[aria-pressed="true"] { border-color: var(--accent); }
.np-hint { padding: 4px 12px; font-size: .78rem; color: var(--hazard); background: rgba(255,212,94,.08); }
.np-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 6px 24px; }
.np-grid { --np-col: 36px; }
.np-row { display: grid; grid-template-columns: var(--tpl); align-items: stretch; min-height: 44px; border-bottom: 1px solid rgba(255,255,255,.06); }
.np-head { position: sticky; top: 0; z-index: 3; background: #11152b; min-height: 46px; border-bottom: 1px solid var(--border); }
.np-head .np-name { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.np-ch { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.np-ch small { font-size: .58rem; color: var(--accent); font-weight: 800; margin-top: 1px; }
.np-vh { color: var(--hazard); font-size: 1rem; }
.np-group { position: sticky; top: 46px; z-index: 2; background: #161b36; padding: 3px 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; color: var(--cyan); border-bottom: 1px solid var(--border); }
.np-name { display: flex; align-items: center; gap: 6px; padding: 0 4px 0 2px; min-width: 0; }
.np-ico { flex: none; display: inline-flex; }
.np-nm { font-size: .84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-cell { width: 100%; min-height: 44px; border: 0; border-left: 1px solid rgba(255,255,255,.06); background: transparent; cursor: pointer; padding: 0; display: grid; place-items: center; font-size: 1.15rem; line-height: 1; }
.np-cell:active { background: rgba(255,255,255,.08); }
.np-v { background: rgba(255,212,94,.04); }
.mk { display: inline-block; }
/* game marks: print */
.np-cell.by-game .mk { font-family: system-ui, sans-serif; font-weight: 800; color: #c9d2ee; }
.np-cell.by-game.v-tick .mk { color: var(--cc); font-size: 1.3rem; text-shadow: 0 0 6px color-mix(in srgb, var(--cc) 50%, transparent); }
.np-cell.by-game.v-x .mk { color: #6d7598; font-size: .95rem; }
/* my marks: handwriting */
.np-cell.by-me .mk { font-family: var(--hand); font-weight: 700; color: #fff4c9; transform: rotate(-6deg); font-size: 1.25rem; }
.np-cell.by-me.v-tick .mk { color: #a7f3c7; }
.np-cell.by-me.v-x .mk { color: #ffb3bb; }
/* Sidekick pencil: lighter */
.np-cell.by-pencil .mk { font-family: var(--hand); color: #9aa0bf; opacity: .6; font-weight: 400; }
.mk-maybe { color: #8fd8ff !important; }
.mk-sus { color: #ffb547 !important; font-weight: 900 !important; }
.mk-tag { font-size: .72rem !important; font-family: var(--mono) !important; border: 1.5px solid currentColor; border-radius: 6px; padding: 1px 3px; color: #b9a6ff !important; transform: none !important; }
.mk-star { color: var(--hazard) !important; text-shadow: 0 0 8px rgba(255,212,94,.6); }
.mk-clear { color: var(--muted) !important; }
.np-logtag { font-family: var(--mono); font-size: .56rem; font-weight: 800; color: #cfe0ff; background: #3a4566; border-radius: 4px; padding: 1px 2px; }
.np-held { display: inline-flex; }
.np-row.cleared .np-nm { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.np-row.gold { background: linear-gradient(90deg, rgba(255,212,94,.22), rgba(255,212,94,.06)); }
.np-row.star .np-nm { color: var(--hazard); }
.np-row.hl { animation: hl 3s ease-out; }
@keyframes hl { 0%, 60% { background: rgba(111,227,255,.25); box-shadow: inset 3px 0 0 var(--cyan); } }
.np-empty, .np-note { color: var(--muted); padding: 16px 8px; font-size: .9rem; }
.lg-list { list-style: none; margin: 0; padding: 6px 0; }
.lg-item { width: 100%; text-align: left; min-height: 44px; border: 0; border-bottom: 1px solid var(--border); background: none; cursor: pointer; padding: 8px 6px; font-size: .86rem; line-height: 1.5; }
.lg-item:hover { background: var(--surface); }
.lg-n { display: inline-block; min-width: 2.2em; font-family: var(--mono); color: var(--cyan); font-weight: 800; }
.lg-p { display: inline-block; vertical-align: -5px; }
.lg-p svg { display: inline-block; }
.lg-res { display: block; color: var(--muted); padding-left: 2.2em; }
.lg-pass { margin-right: 6px; }
.lg-shown { color: var(--cyan); font-weight: 700; }

/* ---------- sheets (accusation, best guess, reveal) ---------- */
.sheets { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.sheet { position: absolute; inset: 0; pointer-events: auto; background: rgba(8,10,22,.7); display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { width: 100%; max-height: 100%; overflow-y: auto; background: #141a35; border: 1px solid var(--border); border-radius: 22px 22px 0 0; padding: 12px 14px 20px; box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
html:not(.reduce-motion) .sheet-card { animation: slideUp .25s ease-out; }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } }
.sh-h { display: flex; align-items: center; gap: 10px; }
.sh-h h2 { flex: 1; margin: 4px 0; }
.cd.big { font-size: 1.3rem; font-weight: 900; color: var(--hazard); margin: 0; }
.picker.accuse h2 { color: #ffc2c8; }
.pk-sum { text-align: center; font-weight: 700; margin: 12px 0 8px; min-height: 1.5em; }
.holdbtn { position: relative; overflow: hidden; width: 100%; min-height: 60px; border-radius: 999px; border: 2px solid var(--alert); background: rgba(255,77,94,.12); color: #fff; font-weight: 900; font-size: 1.05rem; cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
.holdbtn:disabled { opacity: .45; cursor: default; }
.hold-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, #ff4d5e, #ff9f43); }
.holdbtn.holding .hold-fill { transform: scaleX(1); transition: transform var(--hold, 1500ms) linear; }
.hold-t { position: relative; }
.results.sheet-card, .sheet-card.results { border-radius: 22px 22px 0 0; height: 100%; }

/* the reveal */
.rv { text-align: center; }
.rv-head { font-weight: 800; margin: 4px 0; }
.rv-stage { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; }
.rv-boxes { position: relative; width: min(360px, 100%); }
.rv-boxes span { display: block; }
.rv-boxes svg { width: 100%; height: auto; }
.rv-boxes .b1 { position: absolute; inset: 0; }
.rv-culprit { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rv-culprit svg { width: 96px; height: auto; }
.rv-culprit svg + svg { width: 36px; }
.rv-line { font-size: 1.1rem; margin: 10px 0 2px; }
.rv-by { color: var(--hazard); font-weight: 700; font-style: italic; margin: 0; }
html:not(.reduce-motion) .rv:not(.instant) .b1 .sc-slot { opacity: 0; animation: slotIn .6s ease-out forwards; }
html:not(.reduce-motion) .rv:not(.instant) .b1 .sc-slot[data-slot="2"] { animation-delay: .8s; }
html:not(.reduce-motion) .rv:not(.instant) .b1 .sc-slot[data-slot="1"] { animation-delay: 2.2s; }
html:not(.reduce-motion) .rv:not(.instant) .b1 .sc-slot[data-slot="0"] { animation-delay: 3.6s; }
html:not(.reduce-motion) .rv:not(.instant) .b1 > svg > :not(.sc-slot) { opacity: 1; }
html:not(.reduce-motion) .rv:not(.instant) .rv-culprit { opacity: 0; animation: stepFwd .7s ease-out 4.2s forwards; }
html:not(.reduce-motion) .rv:not(.instant) .rv-line { opacity: 0; animation: fadeUp .7s ease-out 4.8s forwards; }
html:not(.reduce-motion) .rv:not(.instant) .rv-by { opacity: 0; animation: fadeUp .7s ease-out 6s forwards; }
@keyframes slotIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes stepFwd { from { opacity: 0; transform: scale(.6) translateY(16px); } to { opacity: 1; transform: none; } }
.rv-bottom h3 { margin: 16px 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.rv-hands { display: flex; flex-direction: column; gap: 6px; }
.rvh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rvh-who { min-width: 110px; }
.rvh-cards { display: flex; gap: 4px; flex-wrap: wrap; }
.mc svg { width: 44px; height: auto; }
.res-head, .res-row { display: grid; grid-template-columns: 34px minmax(0, 1.2fr) minmax(0, 2fr) 34px 38px; gap: 6px; align-items: center; }
.res-head { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.res-row { padding: 6px 4px; border-radius: 12px; background: var(--surface); margin-bottom: 4px; }
.res-row.me { box-shadow: inset 0 0 0 1px var(--accent); }
.res-row.first .rp { color: var(--hazard); }
.rp { font-weight: 900; font-family: var(--mono); }
.rw { min-width: 0; overflow: hidden; }
.rw .who { flex-wrap: wrap; row-gap: 0; }
.rw .who b { overflow: hidden; text-overflow: ellipsis; }
.rg { display: flex; flex-wrap: wrap; gap: 3px; font-size: .72rem; }
.gf { padding: 1px 5px; border-radius: 6px; background: rgba(255,255,255,.06); }
.gf i { font-style: normal; font-weight: 900; margin-right: 2px; }
.gf.ok i { color: var(--ok); }
.gf.bad i { color: var(--alert); }
.quip { color: var(--hazard); font-weight: 700; }
.rm, .rt { text-align: right; font-weight: 800; font-family: var(--mono); }
.rt { color: var(--hazard); }

/* ---------- overlays: menu, pause, how to play ---------- */
.overlays { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
.overlay { position: fixed; inset: 0; pointer-events: auto; background: rgba(8,10,22,.78); display: grid; place-items: center; padding: 16px; z-index: 50; overflow-y: auto; }
.tv-stage .overlay { position: absolute; }
.overlay.standalone { z-index: 60; }
.ov-card { width: 100%; max-width: 440px; background: #141a35; border: 1px solid var(--border); border-radius: 22px; padding: 18px 18px 20px; box-shadow: 0 20px 50px rgba(0,0,0,.5); max-height: calc(100dvh - 32px); overflow-y: auto; }
.ov-card h2 { margin: 0 0 10px; }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.slider { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 6px; font-weight: 600; }
.slider input { flex: 1; accent-color: var(--accent); min-height: 32px; }
.how { display: flex; flex-direction: column; gap: 10px; }
.how-card { display: grid; grid-template-columns: 76px 1fr; gap: 4px 12px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 12px; }
.how-card .how-art { grid-row: span 2; display: grid; place-items: center; }
.how-card .how-art svg { width: 70px; height: auto; max-height: 90px; }
.how-card h3 { margin: 0; font-size: 1rem; }
.how-card p { margin: 0; font-size: .88rem; color: #cfd4ec; }
.soundhint { position: absolute; right: 96px; bottom: 20px; z-index: 30; background: rgba(13,16,32,.85); border: 1px solid var(--border); padding: 8px 18px; border-radius: 999px; font-size: 22px; font-weight: 700; }

/* ---------- desktop: two columns, no tabs ---------- */
@media (min-width: 900px) {
  .game.player { max-width: 1240px; grid-template-rows: 58px auto minmax(0, 1fr) 0; }
  .tabs { display: none; }
  .panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); grid-template-rows: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 12px; padding: 0 12px; }
  .pane { position: relative; inset: auto; display: block !important; }
  .pane-ship { grid-column: 1; grid-row: 1; }
  .pane-hand { grid-column: 1; grid-row: 2; border-top: 1px solid var(--border); }
  .pane-notes { grid-column: 2; grid-row: 1 / 3; display: flex !important; flex-direction: column; overflow: hidden; border-left: 1px solid var(--border); }
  .pane-ship .planbox { max-width: 520px; }
  .sheet { align-items: center; }
  .sheet-card { max-width: 620px; border-radius: 22px; max-height: 92%; }
  .sheet-card.results { height: auto; }
  .mode-page .pagebody { max-width: 760px; width: 100%; margin: 0 auto; }
}

/* ======================================================================
   TV / laptop screen: a 1920 x 1080 stage scaled to fit, 5% safe margins
   ====================================================================== */
.page-screen { overflow: hidden; }
.tvwrap { position: fixed; inset: 0; overflow: hidden; }
.tv-stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform: translate(-50%, -50%) scale(var(--k, 1)); transform-origin: center; font-size: 26px; }
.tv-stars { position: absolute; inset: 0; opacity: .7; pointer-events: none; }
.tv-stars svg { width: 100%; height: 100%; }
.tv-clock { position: absolute; left: 96px; top: 40px; width: 1250px; height: 128px; }
.tc-row { display: flex; align-items: baseline; gap: 26px; }
.tc-brand .wordmark { font-size: 40px; }
.tc-lbl { font-family: var(--mono); font-size: 28px; font-weight: 800; color: #cfe0ff; }
.route { position: relative; margin-top: 18px; height: 50px; padding-right: 240px; }
.route .dots { display: flex; justify-content: space-between; align-items: center; height: 100%; border-top: 3px dotted rgba(207,224,255,.25); margin-top: 24px; height: 0; }
.route .dots i { width: 16px; height: 16px; border-radius: 50%; background: #2a3560; border: 3px solid #44527f; margin-top: -2px; }
.route .dots i.past { background: var(--cyan); border-color: var(--cyan); }
.route .dots i.now { background: var(--hazard); border-color: #fff; box-shadow: 0 0 14px var(--hazard); }
.route .tship { position: absolute; top: 9px; width: 60px; transform: translateX(-50%); transition: left 1.2s ease; }
.route .tship svg { width: 60px; height: 30px; }
.route .port { position: absolute; right: 0; top: 8px; font-family: var(--mono); font-weight: 800; font-size: 22px; color: var(--hazard); letter-spacing: .1em; }
.tv-box { position: absolute; left: 1404px; top: 26px; width: 420px; height: 150px; display: flex; flex-direction: column; align-items: center; }
.tv-box .boxart svg { width: 220px; height: auto; }
.boxlbl { font-family: var(--mono); font-size: 20px; color: var(--muted); letter-spacing: .1em; margin-top: -4px; }
.tv-ship { position: absolute; left: 96px; top: 172px; width: 1250px; height: 610px; display: flex; justify-content: center; }
.tv-ship .planbox { width: 1100px; aspect-ratio: 1250 / 692; }
.tv-die { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 8px; background: rgba(13,16,32,.8); padding: 20px 34px; border-radius: 28px; }
.tv-die svg { width: 150px; height: 150px; }
.tv-die b { font-size: 34px; }
html:not(.reduce-motion) .tv-die.roll .die-big { animation: tumble .7s cubic-bezier(.2,.9,.3,1.2); }
@keyframes tumble { 0% { transform: rotate(-540deg) scale(.3); } 100% { transform: none; } }
.tv-banner { position: absolute; left: 96px; bottom: 158px; width: 1250px; min-height: 132px; z-index: 3; display: flex; flex-direction: column; justify-content: flex-end; }
.bn { min-height: 132px; display: flex; align-items: center; gap: 22px; padding: 10px 26px; border-radius: 26px; background: rgba(20,26,53,.92); border: 2px solid rgba(143,176,255,.25); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.bn-por svg { width: 104px; height: 104px; }
.bn-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bn-big { font-size: 42px; line-height: 1.1; }
.bn-sm { font-size: 26px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bn-s { margin: 0; font-size: 30px; line-height: 1.25; }
.bn-line { margin: 0; font-size: 30px; font-weight: 800; color: var(--cyan); display: flex; align-items: center; gap: 10px; }
.bn-line .noans { color: #ffb3bb; }
.bn-cd { font-family: var(--mono); font-size: 54px; font-weight: 900; color: var(--hazard); min-width: 90px; text-align: right; }
.bn-die svg { width: 96px; height: 96px; }
.bn .cards3 { margin: 0; flex: none; }
.bn .cards3 svg, .tvcards svg { width: 78px; }
.bn.ra { border-color: var(--alert); background: rgba(70,14,24,.94); }
.ra-big { font-family: var(--mono); font-size: 40px; letter-spacing: .3em; color: var(--alert); }
.bn.reports { border-color: var(--hazard); }
.fl { opacity: .3; display: inline-flex; }
.fl.on { opacity: 1; filter: drop-shadow(0 0 6px var(--ok)); }
.tv-rail { position: absolute; left: 1404px; top: 190px; width: 420px; height: 836px; display: flex; flex-direction: column; gap: 12px; }
.rail-cards { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.rc { position: relative; flex: 1 1 0; max-height: 150px; min-height: 0; display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 22px; background: rgba(20,26,53,.9); border: 2px solid rgba(255,255,255,.08); overflow: hidden; }
.rc.k-witness { flex-grow: .7; max-height: 104px; opacity: .9; }
.rc-por { flex: none; }
.rc-por svg { width: 96px; height: 96px; }
.rc.k-witness .rc-por svg { width: 66px; height: 66px; }
.rc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rc-name { display: flex; align-items: center; gap: 8px; font-size: 30px; line-height: 1.1; }
.rc.k-witness .rc-name { font-size: 24px; }
.rc-pl { font-size: 22px; min-height: 0; }
.rc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 20px; color: var(--muted); }
.rc-st { color: var(--hazard); font-weight: 700; }
.rc.st-confined, .rc.st-away { opacity: .6; }
.rc.active { border-color: var(--hazard); box-shadow: 0 0 22px rgba(255,212,94,.35); background: rgba(60,52,26,.9); }
.rc-lamp { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: transparent; }
.rc.a-asking .rc-lamp { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
html:not(.reduce-motion) .rc.a-asking .rc-lamp { animation: pulse .8s ease-in-out infinite; }
.rc.a-passed .rc-lamp { background: var(--alert); box-shadow: 0 0 12px var(--alert); }
.rc.a-answered .rc-lamp { width: 26px; height: 34px; border-radius: 5px; background: var(--deck); border: 2px solid var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.rc-ev { flex: none; background: rgba(20,26,53,.9); border-radius: 18px; padding: 8px 12px; }
.rc-ev small { font-size: 18px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.rc-ev div { display: flex; gap: 8px; }
.rc-ev svg { width: 54px; height: auto; }
.tv-log { position: absolute; left: 96px; top: 928px; width: 1250px; height: 100px; font-family: var(--mono); font-size: 21px; color: #a8f0c6; background: rgba(4,8,16,.75); border-radius: 16px; padding: 6px 18px; overflow: hidden; border: 1px solid rgba(61,220,132,.2); }
.tl-h { position: absolute; right: 16px; top: 6px; font-size: 16px; color: rgba(168,240,198,.5); letter-spacing: .2em; }
.tv-log ol { list-style: none; margin: 0; padding: 0; }
.tv-log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.36; }
.tv-log li:not(:first-child) { opacity: .65; }
.tv-log .ln, .tv-log .lres { color: inherit; }
.tv-log .lpt svg { width: 22px; height: 22px; }
.tv-log .dim { opacity: .5; }
.tv-tint { position: absolute; inset: 0; pointer-events: none; background: rgba(255,77,94,.0); transition: background .4s; z-index: 4; }
.tv-stage.alert .tv-tint { background: rgba(255,77,94,.16); }
html:not(.reduce-motion) .tv-stage.alert .tv-tint { animation: redflash 1.2s ease-out 1; }
.tv-stage.false-alarm .tv-tint { background: rgba(255,77,94,.06); }
@keyframes redflash { 0%, 30% { background: rgba(255,77,94,.4); } 15%, 45% { background: rgba(255,77,94,.05); } 60% { background: rgba(255,77,94,.4); } }
.tv-stage.paused .tv-ship .plan svg { filter: saturate(.4) brightness(.6); }
.tv-stage .conn { position: absolute; top: 20px; }

/* the TV's full layers: lobby, intro, reveal */
.tv-layer { position: absolute; inset: 0; z-index: 10; background: radial-gradient(1200px 700px at 30% 0%, rgba(47,111,228,.25), transparent 60%), #0d1020; padding: 54px 96px; }
.tvl { display: grid; grid-template-columns: 1040px 1fr; gap: 48px; height: 100%; }
.tvl-left { display: flex; flex-direction: column; }
.tvl-left h1 { margin: 0; }
.tvl-left .wordmark.big { font-size: 96px; }
.tvl-left .tag { margin: 4px 0 10px; font-size: 30px; max-width: none; }
.tvl .crewgrid { gap: 18px; margin: 8px 0 16px; }
.tvl .crewpick { padding: 10px; border-radius: 22px; }
.tvl .crewpick .cp-por svg { max-width: 150px; width: 150px; height: 150px; }
.tvl .crewpick .cp-name { font-size: 26px; }
.tvl .crewpick .cp-name svg { width: 30px; height: 30px; }
.tvl .crewpick .cp-own { font-size: 24px; }
.tvl .crewpick.taken { opacity: 1; border-color: var(--cc); }
.joinbox { display: flex; align-items: center; gap: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 18px 24px; }
.joinbox .qr { width: 210px; height: 210px; background: #fff; border-radius: 12px; padding: 8px; image-rendering: pixelated; }
.joinbox p { margin: 2px 0; font-size: 28px; color: var(--muted); }
.joinbox .url { color: var(--text); font-weight: 700; font-size: 34px; }
.joinbox .code { font-family: var(--mono); font-size: 72px; letter-spacing: .12em; color: var(--hazard); }
.note.big { font-size: 28px; }
.tvl-right { overflow-y: auto; overflow-x: hidden; }
.tvl-right .setup { margin: 0; border: 0; padding: 18px 26px; background: var(--surface); border-radius: 22px; border: 1px solid var(--border); }
.tvl-right .setup h2 { font-size: 40px; margin: 0 0 6px; }
.tvl-right .row { margin: 4px 0; gap: 8px; flex-wrap: nowrap; align-items: center; }
.tvl-right .row .rl { flex: 0 0 200px; line-height: 1.2; }
.tvl-right .row .rl { font-size: 17px; }
.tvl-right .chip { min-height: 48px; font-size: 22px; padding: 4px 18px; }
.tvl-right .chip.small { min-height: 40px; font-size: 18px; }
.tvl-right .btn.big { font-size: 30px; min-height: 70px; padding: 10px 40px; }
.tvl-right .note { font-size: 20px; }
.tvl-right .botrow { font-size: 20px; }
.tvi { max-width: 1300px; margin: 120px auto 0; text-align: center; }
.tvi-box svg { width: 360px; height: auto; margin: 0 auto 20px; }
html:not(.reduce-motion) .tvi-box { animation: flicker 2.2s steps(1, end) 1; }
@keyframes flicker { 0%, 12%, 30% { opacity: 1; } 6%, 20%, 36% { opacity: .2; } }
.tvi h2 { font-size: 64px; margin: 0 0 20px; }
.tvi .il { font-size: 40px; margin: 14px 0; font-family: var(--mono); color: #cfe0ff; }
.tvi .note { font-size: 24px; margin-top: 40px; }
.tvi .btn { font-size: 24px; }
.tv-reveal { display: grid; grid-template-columns: 900px 1fr; gap: 48px; height: 100%; }
.tv-reveal .rv-top { display: flex; flex-direction: column; justify-content: center; }
.tv-reveal .rv-boxes { width: 640px; }
.tv-reveal .rv-culprit svg { width: 200px; }
.tv-reveal .rv-culprit svg + svg { width: 70px; }
.tv-reveal .rv-head { font-size: 36px; }
.tv-reveal .rv-line { font-size: 42px; }
.tv-reveal .rv-by { font-size: 34px; }
.tv-reveal .rv-bottom { overflow: hidden; font-size: 24px; }
.tv-reveal .rv-bottom h3 { font-size: 20px; }
.tv-reveal .mc svg { width: 58px; }
.tv-reveal .rvh-who { min-width: 230px; font-size: 26px; }
.tv-reveal .res-head, .tv-reveal .res-row { grid-template-columns: 64px minmax(0, 1.3fr) minmax(0, 2fr) 64px 70px; gap: 10px; }
.tv-reveal .res-head { font-size: 16px; }
.tv-reveal .res-row { padding: 8px 10px; }
.tv-reveal .gf { font-size: 18px; }
.tv-reveal .btn { font-size: 26px; min-height: 60px; }
.tv-reveal .btn.big { font-size: 30px; min-height: 70px; }
.tv-stage .ov-card { max-width: 760px; font-size: 26px; padding: 30px 36px; max-height: 960px; }
.tv-stage .ov-card h2 { font-size: 46px; }
.tv-stage .ov-card .btn { font-size: 28px; min-height: 64px; }
.tv-stage .slider { font-size: 26px; min-height: 60px; }
.tv-stage .how-card { grid-template-columns: 110px 1fr; }
.tv-stage .how-card p { font-size: 22px; }
.tv-stage .how-card h3 { font-size: 28px; }
.tv-stage .how-card .how-art svg { width: 100px; }
.tv-stage .countin { font-size: 120px; }
.tv-stage .pchip-slot { font-size: inherit; }

/* TV remote on the home pages: bigger everything */
html.tv .home-buttons { max-width: 520px; }
html.tv .btn.big { font-size: 1.4rem; min-height: 64px; }
html.tv .home .tag, html.tv .hint { font-size: 1.25rem; }
html.tv .solo-card, html.tv .join-card { max-width: 640px; font-size: 1.2rem; }
html.tv .chip { min-height: 52px; font-size: 1.1rem; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
html.reduce-motion .holdbtn.holding .hold-fill { transition-duration: var(--hold, 1500ms) !important; }

.tv-stage .note { font-size: 24px; }
.tv-stage .ov-card p { font-size: 24px; }
.st-sub { color: var(--muted); font-weight: 600; font-size: .9em; }
