/* TI4 Command Deck — shared theme (first slice).
   Palette and feel from sketches/001-phone-home-command-deck. */

:root {
  --void: #05060A;
  --deep: #08111F;
  --panel: rgba(16, 24, 39, 0.82);
  --panel-strong: rgba(18, 32, 54, 0.94);
  --line: rgba(90, 213, 255, 0.18);
  --cyan: #38D5FF;
  --cyan-soft: rgba(56, 213, 255, 0.14);
  --gold: #F6C65B;
  --red: #FF4D5E;
  --green: #4DE38A;
  --white: #F0F4FF;
  --muted: #95A3B8;
  --purple: #A78BFA;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: Rajdhani, Inter, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;

  /* Declutter pass — additive design tokens (text scale, surfaces, button ink).
     Accents above (--gold/--cyan/--green/--red/--purple) stay as the app's
     palette for now; these add the missing layers the redesign reuses. */
  --bg: #05060A;
  --text-hi: #E8EDF5;     /* primary text / titles */
  --text-mid: #93A0B5;    /* body / descriptions */
  --text-lo: #74809A;     /* labels, meta, captions — bumped for WCAG AA contrast on the dark bg */
  --text-soft: #8A97AD;   /* slightly brighter muted */
  --text-bright: #CDD7E6; /* emphasis inside body text */
  --panel-quiet: rgba(18, 26, 42, 0.60);
  --panel-faint: rgba(18, 26, 42, 0.45);
  --hairline: rgba(255, 255, 255, 0.07);
  --gold-ink: #1A1206;    /* text on a gold primary button (never white) */
}

* { box-sizing: border-box; }

/* Form controls don't inherit color/font from <body>. Without this, <button>
   text falls back to the browser default — black on Chrome/Android, the system
   blue on iPhone Safari — so unstyled buttons (e.g. .more-menu-item, .strat-pick)
   render the wrong colour per platform. Force inheritance; explicit per-class
   colours (.btn.primary etc.) still win via specificity. */
button, input, select, textarea { color: inherit; font: inherit; }

/* The `hidden` attribute must win over component display rules (e.g.
   `.section-title { display: flex }`), otherwise hidden section titles keep
   taking layout space and push content under the fixed bottom nav. */
[hidden] { display: none !important; }

html {
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior: none;
  touch-action: pan-y;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  /* `clip` contains horizontal drag without turning <body> into its own
     vertical scroll container. That extra (nested) scroll container is what
     blocked mouse-wheel scrolling on desktop while touch scrolling still
     worked on phones. Horizontal overflow is still clipped at <html>. */
  overflow-x: clip;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(circle at 20% 10%, rgba(56, 213, 255, .14), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(246, 198, 91, .10), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(167, 139, 250, .10), transparent 30%),
    linear-gradient(145deg, #02030A, #08111F 52%, #02030A);
  font-family: var(--font-body);
  color: var(--white);
}

body.player-active-turn {
  /* "Your turn" is a GOLD act-now cue (red is reserved for "under attack"). */
  background:
    radial-gradient(circle at 50% 0%, rgba(246, 198, 91, .20), transparent 30%),
    radial-gradient(circle at 20% 10%, rgba(56, 213, 255, .12), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(246, 198, 91, .10), transparent 24%),
    linear-gradient(145deg, #0a0700, #14100a 48%, #02030A);
}

body.player-active-turn .panel.hero {
  border-color: rgba(246, 198, 91, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 42px rgba(246, 198, 91, .24);
}

.turn-alert {
  display: none;
  margin: 0 0 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 77, 94, .82);
  background: linear-gradient(135deg, rgba(255, 77, 94, .28), rgba(246, 198, 91, .13));
  color: #fff;
  font: 900 16px var(--font-display);
  letter-spacing: .12em;
  text-align: center;
  padding: 11px 12px;
  text-transform: uppercase;
  box-shadow: 0 0 26px rgba(255, 77, 94, .22);
}
body.player-active-turn .turn-alert { display: block; }

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: max(16px, calc(env(safe-area-inset-top) + 16px)) 16px max(96px, calc(env(safe-area-inset-bottom) + 96px));
  position: relative; z-index: 1; /* premium pass: lift content above z:0 atmosphere */
}
.wrap.wide {
  max-width: 1500px;
  padding: max(24px, calc(env(safe-area-inset-top) + 24px)) 28px max(28px, calc(env(safe-area-inset-bottom) + 28px));
}

/* ponytail: Strategy-phase only. Floats the "My strategy card" pick panel up to
   just under the now-banner so players see "this phase = pick a card" without
   scrolling. Pure visual reorder via flex order — the DOM is untouched, so when
   the phase changes the class drops and the normal block layout returns exactly. */
#app.phase-strategy { display: flex; flex-direction: column; }
#app.phase-strategy > * { order: 2; }
#app.phase-strategy > .me-banner,
#app.phase-strategy > #whisper-notif,
#app.phase-strategy > #now-panel { order: 0; }
#app.phase-strategy > #strategy-title,
#app.phase-strategy > #strategy-panel { order: 1; }

/* Strategy-pick card tiles (Strategy phase only — rendered into #strategy-panel).
   Each tile carries its card's theme inline as --card / --card-glow / --card-soft
   (from Deck.strategyTheme), so the border, art tint and "mine" glow match the
   card's colour. Tapping a live tile picks it. */
.strat-pick-head { margin: 0 0 10px; }
.strat-pick-head b { display: block; font: 700 15px var(--font-display); }
.strat-pick-head .muted { display: block; font-size: 11.5px; line-height: 1.35; margin-top: 2px; }
.strat-pick-progress { display: inline-block; margin-top: 7px; font: 700 11px var(--font-mono);
  color: var(--cyan); background: rgba(56,213,255,.12); padding: 3px 9px; border-radius: 999px; }
.strat-pick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.strat-pick { display: flex; align-items: center; gap: 9px; text-align: left; padding: 8px;
  border-radius: 12px; cursor: pointer; border: 1px solid rgba(240,244,255,.14);
  background: rgba(255,255,255,.04); font: 600 13px var(--font-body); }
.strat-pick.on { border-color: var(--card, rgba(56,213,255,.55)); background: var(--card-soft, rgba(56,213,255,.10));
  box-shadow: 0 0 16px var(--card-glow, transparent); }
.strat-pick[disabled] { cursor: default; opacity: .45; }
.strat-pick.mine { border-color: var(--card, var(--cyan));
  box-shadow: 0 0 0 1px var(--card, var(--cyan)) inset, 0 0 18px var(--card-glow, rgba(56,213,255,.25)); opacity: 1; }
.strat-pick-art { width: 46px; height: 46px; flex: none; border-radius: 9px; overflow: hidden;
  display: grid; place-items: center; background: var(--card-soft, rgba(0,0,0,.28));
  font: 800 14px var(--font-display); color: var(--card, var(--cyan)); }
.strat-pick-meta { min-width: 0; }
.strat-pick-name { display: block; line-height: 1.2; }
.strat-pick-taker { display: block; color: var(--muted); font-size: 10.5px; margin-top: 1px; }

.topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.brand {
  font-family: var(--font-display);
  letter-spacing: .11em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 18px;
}
.brand small { display: block; color: var(--muted); font: 600 10px var(--font-mono); letter-spacing: .14em; }

.round-pill {
  border: 1px solid rgba(246, 198, 91, .35);
  color: var(--gold);
  background: rgba(246, 198, 91, .1);
  padding: 7px 11px;
  border-radius: 999px;
  font: 700 11px var(--font-mono);
  white-space: nowrap;
}

.panel {
  border: 1px solid rgba(240, 244, 255, .09);
  background: var(--panel);
  border-radius: 20px;
  padding: 13px;
  margin-bottom: 12px;
}
.panel.hero {
  border-color: rgba(56, 213, 255, .24);
  background: linear-gradient(155deg, rgba(16, 24, 39, .92), rgba(8, 17, 31, .66));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 48px rgba(0, 0, 0, .35);
  position: relative;
  overflow: hidden;
}
.panel.hero:after {
  content: ""; position: absolute; right: -36px; top: -36px; width: 130px; height: 130px;
  border-radius: 50%; border: 1px solid rgba(56, 213, 255, .22);
  box-shadow: 0 0 45px rgba(56, 213, 255, .13);
}

.k-label { color: var(--muted); font: 700 11px var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.phase-title { font-family: var(--font-display); font-size: 31px; line-height: .95; font-weight: 700; margin: 5px 0 10px; letter-spacing: .02em; }

.turn-box {
  display: flex; align-items: center; gap: 10px;
  background: rgba(56, 213, 255, .11);
  border: 1px solid rgba(56, 213, 255, .20);
  border-radius: 16px;
  padding: 11px 12px;
}
.avatar {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  font: 800 15px var(--font-display);
  color: #04101c;
  box-shadow: 0 0 22px rgba(56, 213, 255, .22);
}
.turn-copy { flex: 1; min-width: 0; }
.turn-copy strong { display: block; font-weight: 800; font-size: 14px; }
.turn-copy span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.minis { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini {
  border: 1px solid rgba(240, 244, 255, .09);
  border-radius: 16px;
  background: rgba(255, 255, 255, .045);
  padding: 10px;
}
.mini .k { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; }
.mini .v { margin-top: 4px; font: 700 16px var(--font-display); }

.section-title {
  margin: 14px 2px 8px;
  display: flex; align-items: center; justify-content: space-between;
  font: 800 12px var(--font-body);
  text-transform: uppercase; letter-spacing: .08em; color: rgba(240, 244, 255, .88);
}
.section-title span { color: var(--muted); font: 700 10px var(--font-mono); }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action {
  min-height: 69px;
  border-radius: 18px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid rgba(240, 244, 255, .09);
  overflow: hidden;
  text-align: left;
  color: var(--white);
  font-family: var(--font-body);
  cursor: pointer;
}
.action.primary { border-color: rgba(56, 213, 255, .38); background: linear-gradient(155deg, rgba(56, 213, 255, .18), rgba(16, 24, 39, .86)); }
.action.gold { border-color: rgba(246, 198, 91, .35); }
.action.red { border-color: rgba(255, 77, 94, .28); }
.action.green { border-color: rgba(77, 227, 138, .32); }
.action .icon {
  width: 25px; height: 25px; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(240, 244, 255, .08);
  margin-bottom: 7px;
  font-size: 14px;
}
.action b { display: block; font-size: 13px; }
.action small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 3px; line-height: 1.25; }

.trackers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.tracker {
  border-radius: 16px; padding: 7px 6px 8px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .08);
  text-align: center;
}
.tracker .pic {
  /* Asset slot: emoji placeholder now, image later (see data-asset attr). */
  width: 31px; height: 31px; margin: 0 auto 4px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(56, 213, 255, .22), rgba(246, 198, 91, .16));
  display: grid; place-items: center; font-size: 20px;
  border: 1px solid rgba(240, 244, 255, .1);
}
.tracker b { display: block; font: 800 18px var(--font-display); line-height: 1; }
.tracker span { color: var(--muted); font-size: 9.5px; }
.tracker .steppers { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }

button.btn {
  border-radius: 14px;
  border: 1px solid rgba(240, 244, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: var(--white);
  font: 700 13px var(--font-body);
  padding: 10px 14px;
  cursor: pointer;
}
button.btn:active { transform: scale(.97); }
/* ponytail: global press feedback so EVERY button acknowledges a tap — the nav items and
   the tappable rows (.setup-item/.obj-row/.tech-row/.more-menu-item/.strat-pick) had none.
   Existing .btn/.u-btn/.u-step :active rules are more specific, so they still win. */
button:active:not(:disabled) { transform: scale(.97); }
/* Visible focus for keyboard / switch-control users. :focus-visible does not fire on
   mouse/touch taps, so the tap-driven phone experience is unaffected. */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px;
}
button.btn.primary { border-color: rgba(56, 213, 255, .45); background: rgba(56, 213, 255, .16); color: var(--cyan); }
button.btn.gold { border-color: rgba(246, 198, 91, .4); background: rgba(246, 198, 91, .12); color: var(--gold); }
button.btn.danger { border-color: rgba(255, 77, 94, .4); background: rgba(255, 77, 94, .12); color: var(--red); }
button.btn.green { border-color: rgba(77, 227, 138, .4); background: rgba(77, 227, 138, .12); color: var(--green); }
button.btn.small { padding: 6px 10px; font-size: 12px; border-radius: 11px; }
button.btn.step { width: 34px; height: 30px; padding: 0; font: 800 15px var(--font-mono); }
button.btn.block { width: 100%; }
button.btn:disabled { opacity: .4; cursor: default; }

/* Declutter pass — unified button hierarchy. Rule: ONE gold primary per screen
   (the single most important action); everything else is ghost / quiet / danger. */
.u-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  font: 700 13.5px var(--font-body); padding: 12px 14px; line-height: 1;
  color: var(--text-hi); background: rgba(255, 255, 255, .05);
  transition: transform .12s ease, background .15s ease, opacity .15s ease;
}
.u-btn:active { transform: scale(.97); }
.u-btn:disabled { opacity: .4; cursor: default; }
.u-btn.block { width: 100%; }
.u-btn.primary { background: var(--gold); color: var(--gold-ink); border-color: rgba(246, 198, 91, .5); font-weight: 800; }
.u-btn.ghost { background: rgba(56, 213, 255, .10); color: var(--cyan); border-color: rgba(56, 213, 255, .32); }
.u-btn.quiet { background: transparent; color: var(--text-mid); }
.u-btn.danger { background: rgba(255, 77, 94, .08); color: var(--red); border-color: rgba(255, 77, 94, .4); }
.u-btn.green { background: rgba(77, 227, 138, .12); color: var(--green); border-color: rgba(77, 227, 138, .4); }
.u-btn.dashed { background: rgba(255, 255, 255, .03); color: var(--text-soft); border: 1px dashed rgba(255, 255, 255, .14); }
.u-step {
  flex: none; width: 32px; height: 30px; padding: 0; border-radius: 9px;
  border: 1px solid rgba(240, 244, 255, .14); background: rgba(255, 255, 255, .06);
  color: var(--text-hi); font: 800 16px var(--font-mono); cursor: pointer;
}
.u-step:active { transform: scale(.94); }

/* Declutter pass — generic bottom sheet (pickers, detail, confirms). Replaces
   deep nested pages + searchable pickers that used to grow the page past the fold. */
.sheet {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(2, 4, 10, .66); animation: sheet-fade .18s ease both;
}
.sheet-card {
  width: 100%; max-width: 480px; max-height: 76vh; display: flex; flex-direction: column;
  background: var(--panel-strong); border: 1px solid rgba(56, 213, 255, .25); border-bottom: 0;
  border-radius: 18px 18px 0 0; padding: 10px 16px max(16px, calc(env(safe-area-inset-bottom) + 14px));
  box-shadow: 0 -14px 50px rgba(0, 0, 0, .5); animation: sheet-rise .22s ease both;
}
.sheet-grab { width: 36px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .18); margin: 2px auto 10px; flex: none; }
.sheet-head { margin: 0 0 10px; }
.sheet-head b { font: 700 17px var(--font-body); display: block; color: var(--text-hi); }
.sheet-head small { display: block; color: var(--text-mid); font-size: 12px; margin-top: 3px; line-height: 1.4; }
.sheet-body { overflow-y: auto; flex: 1; min-height: 0; }
@keyframes sheet-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-rise { from { transform: translateY(18px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-card { animation: none; } }

/* View Transitions API: short crossfade on phone tab switches (the dashboard already uses
   it; navigateView in player.js wraps the render in startViewTransition, instant fallback
   where unsupported). Reduced-motion → instant. */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

input.field, select.field {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(240, 244, 255, .14);
  background: rgba(5, 6, 10, .6);
  color: var(--white);
  font: 600 16px var(--font-body);
  padding: 10px 12px;
}
select.field option { background: var(--deep); }

.row { display: flex; gap: 8px; align-items: center; }
.row.wrap-row { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.chip {
  border-radius: 999px;
  border: 1px solid rgba(240, 244, 255, .14);
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font: 700 11px var(--font-mono);
  padding: 6px 11px;
  cursor: pointer;
}
.chip.on { color: var(--cyan); border-color: rgba(56, 213, 255, .45); background: rgba(56, 213, 255, .12); }

.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li {
  display: flex; gap: 8px; align-items: baseline;
  padding: 7px 2px;
  border-bottom: 1px solid rgba(240, 244, 255, .06);
  font-size: 12.5px;
  color: rgba(240, 244, 255, .9);
}
.event-list li:last-child { border-bottom: 0; }
.event-list time { color: var(--muted); font: 600 10px var(--font-mono); flex: none; }

.passed { opacity: .45; }
.muted { color: var(--muted); }
.gold-text { color: var(--gold); }
.cyan-text { color: var(--cyan); }
.red-text { color: var(--red); }
.green-text { color: var(--green); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: rgba(255, 77, 94, .92);
  color: #fff; font: 700 13px var(--font-body);
  border-radius: 12px; padding: 10px 16px;
  z-index: 50; max-width: 90vw;
}
.toast.ok { background: rgba(20, 40, 60, .95); border: 1px solid rgba(56, 213, 255, .4); color: var(--cyan); }

.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; }
.conn-dot.on { background: var(--green); box-shadow: 0 0 8px rgba(77, 227, 138, .7); }

/* Guided progression + timers (shared by dashboard/admin/player). */
.step-line { color: var(--muted); font-size: 12.5px; margin: -4px 0 10px; }
.step-line b { color: var(--cyan); font: 700 11px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }

.prompt-banner {
  display: none;
  border: 1px solid rgba(246, 198, 91, .45);
  background: rgba(246, 198, 91, .12);
  border-radius: 16px;
  padding: 11px 13px;
  margin-bottom: 10px;
  color: var(--gold);
  font-weight: 600;
  font-size: 13.5px;
}
.prompt-banner.show { display: block; }
.prompt-banner small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; margin-top: 3px; }

.timer-row { display: flex; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.timer-chip {
  flex: 1; min-width: 90px;
  border: 1px solid rgba(240, 244, 255, .1);
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
  padding: 8px 10px;
}
.timer-chip .k { color: var(--muted); font: 700 9.5px var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.timer-chip .v { margin-top: 2px; font: 700 18px var(--font-mono); }
.timer-chip.over { border-color: rgba(255, 77, 94, .5); background: rgba(255, 77, 94, .1); }
.timer-chip.over .v { color: var(--red); }
.timer-chip.over .k { color: var(--red); }

.status-steps { margin-top: 12px; display: grid; gap: 7px; }
.status-step {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(240, 244, 255, .08);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}
.status-step b { color: rgba(240,244,255,.86); font-size: 12px; }
.status-step span { font: 700 10px var(--font-mono); white-space: nowrap; }
.status-step.current { border-color: rgba(56, 213, 255, .45); background: rgba(56, 213, 255, .10); }
.status-step.current b { color: var(--cyan); }
.status-step.complete { border-color: rgba(77, 227, 138, .35); background: rgba(77, 227, 138, .08); }
.status-step.complete span { color: var(--green); }
/* Setup checklist (player phone) — tappable per-item rows. */
.setup-items { display: grid; gap: 7px; }
.setup-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(240, 244, 255, .1);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: inherit;
  font: inherit;
  padding: 9px 10px;
  cursor: pointer;
}
.setup-item .tick {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(240, 244, 255, .22);
  display: flex; align-items: center; justify-content: center;
  font: 700 11px var(--font-mono);
  color: var(--muted);
  margin-top: 1px;
}
.setup-item b { display: block; font-size: 13px; color: rgba(240, 244, 255, .9); }
.setup-item small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.4; margin-top: 2px; }
.setup-item.done { border-color: rgba(77, 227, 138, .4); background: rgba(77, 227, 138, .08); }
.setup-item.done .tick { border-color: rgba(77, 227, 138, .6); color: var(--green); }
.setup-item.done b { color: var(--green); }
.setup-item.final { border-color: rgba(56, 213, 255, .35); }
.setup-item.final.done { border-color: rgba(77, 227, 138, .55); }
/* Speaker-only setup step: reveal the first 2 Stage I objectives (gold accent). */
.setup-reveal { padding: 9px 10px; border-radius: 12px;
  background: rgba(246, 198, 91, .08); border: 1px solid rgba(246, 198, 91, .34); }
.setup-reveal .setup-item { border: 0; background: transparent; padding: 0; cursor: default; }
.setup-reveal .setup-item .tick { border-color: rgba(246, 198, 91, .55); color: var(--gold); }
.setup-reveal.done { border-color: rgba(77, 227, 138, .45); background: rgba(77, 227, 138, .08); }
.setup-reveal.done .setup-item .tick { border-color: rgba(77, 227, 138, .6); color: var(--green); }
/* Speaker's Stage-I reveal picker is collapsible (collapsed by default). */
.setup-reveal .setup-reveal-head { cursor: pointer; }
.setup-reveal.collapsed .obj-list { display: none; }
.setup-reveal .setup-chev { flex: none; align-self: center; color: var(--gold); font-size: 13px; transition: transform .15s ease; }
.setup-reveal.collapsed .setup-chev { transform: rotate(-90deg); }

.status-player-list { display: grid; gap: 6px; margin-top: 10px; }
.status-player {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 9px; border-radius: 11px; background: rgba(255,255,255,.04);
  font-size: 12px;
}
.status-player.done { color: var(--green); }
.status-player .mini-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Contextual guidance: tappable cards open a deeper view (e.g. Action Help). */
.turn-alert { cursor: pointer; }
.turn-alert small {
  display: block; margin-top: 3px;
  font: 700 10px var(--font-mono); letter-spacing: .12em;
  color: rgba(255, 255, 255, .82);
}
button.action { font-family: var(--font-body); width: 100%; }
.action.tappable { position: relative; padding-right: 22px; }
.action.tappable::after {
  content: "›"; position: absolute; right: 10px; top: 8px;
  color: var(--cyan); font: 800 18px var(--font-display); line-height: 1;
}

/* Action Help view — large, paraphrased guidance cards. */
.help-card { padding: 13px; }
.help-card.primary { border-color: rgba(56, 213, 255, .34); }
.help-card.gold { border-color: rgba(246, 198, 91, .32); }
.help-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.help-card-head b { font: 800 17px var(--font-display); letter-spacing: .02em; }
.help-ico {
  flex: none; width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; font-size: 18px;
  background: linear-gradient(135deg, rgba(56, 213, 255, .22), rgba(246, 198, 91, .16));
  border: 1px solid rgba(240, 244, 255, .1);
}
.help-card p { color: rgba(240, 244, 255, .86); font-size: 13px; line-height: 1.5; margin: 0 0 8px; }
.help-card p:last-child { margin-bottom: 0; }
.help-steps { margin: 0 0 8px; padding-left: 20px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.help-steps li { margin-bottom: 2px; }
.help-good { color: var(--muted); font-size: 12px; }
.help-good b { color: rgba(240, 244, 255, .82); }
.help-reminders { margin: 0; padding-left: 20px; color: rgba(240, 244, 255, .86); font-size: 13px; line-height: 1.6; }

/* Strategy card resolution window emphasis (player phone). */
.panel.strategy-live { border-color: rgba(56, 213, 255, .4); box-shadow: 0 0 26px rgba(56, 213, 255, .16); }

/* Battle command station (player phone). */
.battle-unit {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(240,244,255,.1); border-radius: 12px;
  background: rgba(255,255,255,.035); padding: 7px 9px; margin-bottom: 7px;
}
.battle-unit.active { border-color: rgba(255,77,94,.4); background: rgba(255,77,94,.08); }
.battle-unit b { display: block; font-size: 13px; }
.battle-unit small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.bu-ico { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; background: rgba(255,255,255,.06); }
.bu-ico.sm { width: 18px; height: 18px; font-size: 11px; vertical-align: middle; }
.bu-count { min-width: 22px; text-align: center; font: 800 16px var(--font-display); }
.fleet-summary { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.fleet-chip { display: inline-flex; align-items: center; gap: 4px; font: 700 11px var(--font-mono); color: rgba(240,244,255,.85);
  border: 1px solid rgba(240,244,255,.12); background: rgba(255,255,255,.05); border-radius: 999px; padding: 3px 8px; }
.roll-result b { display: block; font: 800 16px var(--font-display); color: var(--gold); margin-bottom: 4px; }
.roll-line { font: 700 11px var(--font-mono); color: var(--muted); margin-bottom: 3px; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.die { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 5px; background: rgba(255,255,255,.08);
  color: var(--muted); font: 800 10px var(--font-mono); }
.die.hit { background: var(--red); color: #fff; box-shadow: 0 0 8px rgba(255,77,94,.5); }

/* Objectives (player phone). Tappable rows: tap to mark scored. */
.obj-list { display: grid; gap: 7px; margin: 7px 0 2px; }
.obj-row {
  display: flex; align-items: center; gap: 9px;
  width: 100%; text-align: left;
  border: 1px solid rgba(240, 244, 255, .1);
  border-left: 3px solid var(--obj, rgba(240,244,255,.2));
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  color: inherit; font: inherit;
  padding: 8px 10px; cursor: pointer;
}
.obj-row b { display: block; font-size: 13px; color: rgba(240, 244, 255, .92); }
.obj-row small { display: block; color: var(--muted); font-size: 10.5px; line-height: 1.35; margin-top: 2px; }
.obj-row .obj-pts {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font: 800 13px var(--font-display);
  color: #04101c; background: var(--obj, var(--gold));
}
.obj-row .obj-check { flex: none; width: 20px; text-align: center; color: var(--green); font-weight: 800; }
/* Objective-type symbol chip (secret / Stage I / Stage II). Transparent so the
   game symbol shows clean (no coloured frame); the row's left border still marks
   the type colour. The data-asset slot upgrades to the symbol image. */
.obj-symbol { flex: none; display: inline-block; width: 30px; height: 30px; vertical-align: middle; }
.obj-symbol.sm { width: 18px; height: 18px; }
.obj-row.scored { border-color: var(--green); background: rgba(77, 227, 138, .1); }
.obj-row.scored b { color: var(--green); }

/* Tech tree (player phone). Lanes are the four tech colours; rows show
   owned / available / locked states with prerequisite pips. */
.tech-symbol-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tech-symbol-chip {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--lane, rgba(240,244,255,.18));
  border-radius: 999px; padding: 4px 10px 4px 6px;
  font: 700 11px var(--font-body); color: rgba(240,244,255,.9);
  background: rgba(255,255,255,.04);
}
.tech-symbol-chip b { font-family: var(--font-mono); color: var(--lane, var(--cyan)); }
.tech-ico {
  width: 22px; height: 22px; flex: none; border-radius: 7px;
  display: grid; place-items: center; font-size: 13px;
  background: rgba(255,255,255,.06);
}
.tech-ico.sm { width: 18px; height: 18px; font-size: 11px; }
.tech-purpose { font-size: 11.5px; line-height: 1.4; margin: 0 0 9px; }
.tech-lane { border-left: 3px solid var(--lane, rgba(240,244,255,.2)); }

/* Declutter pass — collapsible tech lanes (one open at a time). Accent lives on the
   left border + count + badge border; the per-row tech-ico icons are unchanged. */
.tlane { border: 1px solid var(--hairline); border-left: 3px solid var(--lane, var(--cyan));
  border-radius: 14px; background: var(--panel); margin-bottom: 9px; overflow: hidden; }
.tlane-head { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: transparent; border: 0; cursor: pointer; padding: 12px 13px; color: var(--text-hi); font-family: var(--font-body); }
.tlane-badge { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-size: 15px; background: rgba(255, 255, 255, .06); border: 1px solid var(--lane, var(--hairline)); overflow: hidden; }
.tlane-name { flex: 1; min-width: 0; font: 700 14px var(--font-body); }
.tlane-count { flex: none; font: 700 12px var(--font-mono); color: var(--lane, var(--cyan)); }
.tlane-chev { flex: none; color: var(--text-lo); font-size: 13px; width: 14px; text-align: center; }
.tlane-body { padding: 2px 11px 11px; }
.tlane-body .tech-row:last-child { margin-bottom: 0; }
.tech-row {
  display: flex; align-items: center; gap: 9px;
  width: 100%; text-align: left;
  border: 1px solid rgba(240,244,255,.1);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  color: inherit; font: inherit;
  padding: 8px 10px; margin-bottom: 7px;
  cursor: pointer;
}
.tech-row:last-child { margin-bottom: 0; }
.tech-row b { display: block; font-size: 13px; color: rgba(240,244,255,.92); }
.tech-row small { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 10.5px; margin-top: 3px; }
.tech-row.owned { border-color: var(--lane, rgba(77,227,138,.5)); background: rgba(255,255,255,.07); }
.tech-row.owned b { color: var(--lane, var(--green)); }
.tech-row.available { border-color: rgba(240,244,255,.3); box-shadow: 0 0 14px rgba(240,244,255,.07); }
.tech-row.locked { opacity: .55; }

/* Soft per-faction tech-suggestion card (Tech tab) */
.ts-card { border: 1px solid var(--hairline); border-left: 3px solid var(--gold); margin-bottom: 11px; }
.ts-head { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left;
  background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.ts-bulb { flex: none; font-size: 20px; line-height: 1.15; }
.ts-chev { flex: none; color: var(--text-lo, var(--muted)); font-size: 13px; width: 14px; text-align: center; }
.ts-soft { font: 700 9px var(--font-mono); color: var(--gold); border: 1px solid var(--gold);
  border-radius: 6px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; letter-spacing: .04em; }
.ts-identity { color: var(--text-mid, var(--muted)); font-size: 12.5px; line-height: 1.4; margin-top: 9px; }
.ts-glabel { font: 700 10px var(--font-mono); color: var(--text-lo, var(--muted)); letter-spacing: .06em;
  text-transform: uppercase; margin: 11px 0 6px; }
.ts-picks { display: flex; flex-direction: column; gap: 6px; }
.ts-pick { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  border: 1px solid rgba(240,244,255,.1); border-left: 3px solid var(--lane, var(--gold));
  border-radius: 11px; background: rgba(255,255,255,.035); color: inherit; font: inherit; padding: 7px 10px; cursor: pointer; }
.ts-pick.have { background: rgba(255,255,255,.07); border-left-color: var(--lane, var(--green)); }
.ts-num { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font: 800 12px var(--font-display); color: var(--lane, var(--gold)); background: rgba(255,255,255,.06); }
.ts-main { min-width: 0; }
.ts-main b { display: block; font-size: 13px; color: rgba(240,244,255,.92); }
.ts-main small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.ts-have { color: var(--green); }
.ts-note { color: var(--text-lo, var(--muted)); font-size: 10.5px; font-style: italic; margin: 10px 0 0; }

/* PoK leaders tool (More → 🎖 Leaders) */
.ld-card { border: 1px solid var(--hairline); border-left: 3px solid var(--lane, var(--gold)); border-radius: 14px;
  background: var(--panel); padding: 12px 13px; margin-bottom: 10px; }
.ld-card.ld-agent { --lane: var(--cyan); }
.ld-card.ld-commander { --lane: var(--gold); }
.ld-card.ld-hero { --lane: var(--purple); }
.ld-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ld-tag { font: 800 9px var(--font-mono); letter-spacing: .06em; padding: 2px 6px; border-radius: 6px;
  background: rgba(255,255,255,.06); color: var(--lane, var(--gold)); border: 1px solid var(--lane, var(--hairline)); }
.ld-name { flex: 1; min-width: 0; font: 700 14px var(--font-display); color: var(--text-hi, #f0f4ff); }
.ld-status { font: 700 9px var(--font-mono); letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; flex: none; }
.ld-status.is-ready, .ld-status.is-on { color: var(--green); border: 1px solid rgba(77,227,138,.5); }
.ld-status.is-ex, .ld-status.is-locked { color: var(--muted); border: 1px solid var(--hairline); }
.ld-status.is-purged { color: var(--red); border: 1px solid rgba(255,77,94,.5); }
.ld-unlock { font-size: 11px; color: var(--text-mid, var(--muted)); margin: 8px 0 0; line-height: 1.4; }
.ld-unlock b { color: var(--lane, var(--gold)); font-weight: 700; }
.ld-ability { font-size: 12px; color: rgba(240,244,255,.86); line-height: 1.45; margin-top: 7px; }
.ld-ability.is-dim { opacity: .5; }
.ld-controls { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.ld-btn { flex: 1 1 auto; }
.ld-btn.small { flex: 0 0 auto; }
.tech-state { flex: none; font: 700 10px var(--font-mono); display: flex; gap: 3px; align-items: center; }
.tech-state.owned-text, .owned-text { color: var(--green); }
.tech-state.avail-text, .avail-text { color: var(--cyan); }
.pip {
  width: 9px; height: 9px; border-radius: 3px; display: inline-block;
  box-shadow: 0 0 6px rgba(0,0,0,.4);
}
.pip.dim { opacity: .8; }
.pip.free { background: rgba(240,244,255,.25); }

/* Tech detail sheet — bottom overlay. */
#tech-sheet {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(2, 4, 10, .66);
  display: flex; align-items: flex-end; justify-content: center;
}
.tech-sheet-card {
  width: 100%; max-width: 480px;
  background: var(--panel-strong);
  border: 1px solid rgba(56, 213, 255, .25);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  padding: 16px 16px max(16px, calc(env(safe-area-inset-bottom) + 12px));
  box-shadow: 0 -14px 50px rgba(0, 0, 0, .5);
}
.tech-sheet-meta { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--muted); margin: 6px 0 8px; }
.tech-sheet-meta .pip { vertical-align: middle; }
.tech-sheet-stats { font: 700 12px var(--font-mono); color: var(--gold); margin: 0 0 6px; }
.tech-sheet-summary { font-size: 13.5px; line-height: 1.45; color: rgba(240,244,255,.92); margin: 0 0 6px; }
.tech-sheet-exact { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 0; border-top: 1px solid rgba(240,244,255,.08); padding-top: 8px; }

/* Private asset pack: data-asset slots upgraded from emoji to real images.
   The img fills its slot; the slot keeps its own size/background/colour. */
.asset-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 2px;
  pointer-events: none;
}

/* Starting-unit icon chips on the setup checklist (real plastic reference). */
.unit-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.unit-chip {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(240, 244, 255, .12);
  background: rgba(255, 255, 255, .05);
  border-radius: 11px;
  padding: 4px 8px 4px 5px;
  font: 700 12px var(--font-mono);
  color: rgba(240, 244, 255, .9);
}
.unit-chip .unit-chip-pic {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center; font-size: 15px;
}

/* Agenda Phase walkthrough — numbered steps (full hints on the phone, compact
   labels on the dashboard via the .dash modifier). */
.agenda-steps { list-style: decimal; margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; }
.agenda-steps li { font-size: 13px; line-height: 1.4; }
.agenda-steps li b { display: block; }
.agenda-steps li span { color: var(--muted); font-size: 12px; }
.agenda-steps.dash { gap: 4px; padding-left: 26px; }
.agenda-steps.dash li { font: 700 clamp(14px, 1.4vw, 22px) var(--font-body); }

/* =========================================================================
   PREMIUM PASS (2026-07-02) — cinematic sci-fi direction.
   Purely ADDITIVE: a second :root block (custom props merge), global material
   layers (grain / ambient-drift / vignette), a few glow enhancements on existing
   elements, an inline-SVG icon base, and a master reduced-motion guard.
   No existing rule is deleted; motion uses transform/opacity only (GPU-cheap).
   See design-review/premium-review-2026-07-02.md.
   ========================================================================= */
:root {
  /* Premium-pass tokens actually consumed by rules below. The full design scale
     (type --fs-*, radius --r-*, spacing --s-*, surface, shadow, glow, motion) is
     in design-review/premium-review-2026-07-02.md §2 — add each token here only
     when a rule consumes it (ponytail: no live unused custom properties). */
  --glow-cyan: 0 0 24px rgba(56, 213, 255, .20);
  --glow-gold: 0 0 26px rgba(246, 198, 91, .24);
  --dur-1: 120ms; --dur-2: 180ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ic-md: 20px;
}

/* Ambient atmosphere — slow drifting glows + edge vignette on one fixed,
   GPU-composited layer (transform only). Sits behind all content (z:0).
   Body's own static gradients are untouched; this adds parallax "alive" light. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 28% 78%, rgba(56, 213, 255, .10), transparent 30%),
    radial-gradient(circle at 74% 26%, rgba(167, 139, 250, .09), transparent 28%),
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(0, 0, 0, .42) 100%);
  animation: ambient-drift 42s ease-in-out infinite alternate;
  will-change: transform;
}
/* Gold-forward ambient when it's your turn (pairs with body.player-active-turn). */
body.player-active-turn::after {
  background:
    radial-gradient(circle at 50% 12%, rgba(246, 198, 91, .16), transparent 34%),
    radial-gradient(circle at 74% 26%, rgba(167, 139, 250, .07), transparent 28%),
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(0, 0, 0, .40) 100%);
}
@keyframes ambient-drift {
  from { transform: translate3d(-1.4%, 1%, 0); }
  to   { transform: translate3d(1.8%, -1.4%, 0); }
}

/* Film grain — full-viewport, very low opacity, overlay blend. Kills the flat
   "CSS gradient" plastic look. pointer-events:none so it never blocks taps. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 9990; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: .035; mix-blend-mode: overlay;
}

/* A few glow enhancements on existing high-value elements (additive). */
.u-btn.primary { box-shadow: var(--glow-gold); transition: transform var(--dur-1) var(--ease-spring), box-shadow var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out); }
.u-btn.primary:hover { box-shadow: 0 0 30px rgba(246, 198, 91, .36); }
.chip.on { box-shadow: var(--glow-cyan); }
/* ponytail: conn-dot "breathing" was an infinite box-shadow animation —
   non-composited, always-on across all 3 live screens for a whole session =
   needless repaint on phones. The steady glow on the base .conn-dot.on rule
   reads as "live" without the cost. Restore as a composited opacity/scale
   animation if the breath is wanted back. */

/* Inline-SVG icon base (used by /icons.svg sprite via <svg class="ic"><use href="..."/>).
   One stroke language app-wide: 1.6px, round caps/joins, currentColor. */
.ic {
  width: var(--ic-md); height: var(--ic-md); flex: none;
  stroke: currentColor; fill: none; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Master reduced-motion guard — kills all animation/transition, ambient drift,
   and grain for users who ask for less motion. Non-negotiable a11y baseline. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  body::after { animation: none !important; }
}

/* Starfield canvas (TV/dashboard showpiece) + lift all .wrap content above the
   z:0 atmosphere layers (ambient ::after + #starfield) so panels never sit
   behind their own background. */
#starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
