/* ui/onboarding/onboarding.css — Start screen + first-run tutorial overlays.
   (onboarding.md §2/§3) Mission Control language: monospace, amber/green
   vector, cobalt void. Extends src/styles.css CSS custom properties.
   z-index 30 (above HUD + touch layer, same tier as map-select).
   No external assets, no font files. Touch targets >= 44px. */

/* ── Overlay root (shared by start + tutorial) ─────────────────────────────── */
.ob-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;            /* JS adds .ob-visible to show */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--void);
  color: var(--green);
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  overflow: hidden;
  pointer-events: none;
  padding:
    env(safe-area-inset-top,    16px)
    env(safe-area-inset-right,  16px)
    env(safe-area-inset-bottom, 16px)
    env(safe-area-inset-left,   16px);
}

.ob-overlay.ob-visible { display: flex; }

/* Hairline frame (design-system motif) */
.ob-frame {
  position: absolute;
  inset: 10px;
  border: 1px solid var(--green-dim);
  pointer-events: none;
  z-index: 0;
}

.ob-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 880px;
  padding: 24px;
  text-align: center;
}

/* ══ Start screen (design pass) ════════════════════════════════════════════════
   Asymmetric mission-control boot screen. Overrides the shared centered layout
   for .ob-start only; the tutorial keeps the centered .ob-stage. */
.ob-start { align-items: stretch; justify-content: center; }
.ob-start .ob-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.9; }
.ob-start .ob-frame { inset: 14px; border-color: var(--fx-green-line-dim); }

/* Furniture strips */
.ob-furniture {
  position: absolute; left: 0; right: 0; z-index: 2; pointer-events: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 0 clamp(28px, 5vw, 64px);
}
.ob-furniture-top    { top: clamp(28px, 4.5vh, 48px); }
.ob-furniture-bottom { bottom: clamp(28px, 4.5vh, 48px); }
.ob-status .fx-dot { margin-right: 6px; }
.ob-await { color: var(--amber); opacity: 0.7; }

/* Hero: emblem + treated wordmark, left-anchored.
   height:100% + overflow-y:auto (the missions-menu pattern, .ob-missions .ob-stage
   below) makes the stage itself scroll inside the overlay when the effective
   viewport (raw / --ui-scale) is too short for the hero + menu — the overlay
   stays overflow:hidden (untouched) so this is the one seam that clips.
   `safe center` (not `center`) keeps the top edge reachable while scrolling —
   plain `center` can push overflowed content above the scrollable area. */
.ob-start .ob-stage {
  align-items: flex-start; justify-content: safe center; text-align: left;
  max-width: min(1100px, 92vw); margin: 0 auto; gap: 30px;
  height: 100%; overflow-y: auto; overflow-x: hidden;
}
.ob-hero { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.ob-emblem {
  flex: 0 0 auto;
  width: clamp(86px, 12vw, 148px); height: clamp(86px, 12vw, 148px);
  filter: drop-shadow(0 0 14px rgba(255, 176, 0, 0.35));
}
.ob-sigil { width: 100%; height: 100%; display: block; }
.ob-sigil .sig-spin { transform-origin: 60px 60px; animation: ob-spin 24s linear infinite; }
@keyframes ob-spin { to { transform: rotate(360deg); } }

.ob-titlegroup { display: flex; flex-direction: column; gap: 12px; }
.ob-wordmark {
  margin: 0;
  font-size: clamp(64px, 13vw, 132px);
  letter-spacing: 0.16em;
  color: var(--amber);
  text-shadow: 0 0 4px rgba(255, 176, 0, 0.9), 0 0 22px rgba(255, 176, 0, 0.45),
               0 0 60px rgba(255, 176, 0, 0.25);
}
.ob-rule { display: flex; align-items: center; gap: 10px; }
.ob-rule-line { width: clamp(40px, 8vw, 96px); height: 1px; background: var(--fx-amber-line); }
.ob-rule-node {
  width: 7px; height: 7px; transform: rotate(45deg);
  background: var(--amber); box-shadow: 0 0 8px var(--amber);
}
.ob-rule-label { font-size: 11px; letter-spacing: 4px; color: var(--green); opacity: 0.75; }
.ob-tagline {
  font-size: clamp(12px, 2vw, 16px);
  letter-spacing: 6px; color: var(--green); opacity: 0.8;
}
@media (prefers-reduced-motion: reduce) { .ob-sigil .sig-spin { animation: none; } }

/* ── Primary CTA (start) / Got it (tutorial) ──────────────────────────────── */
.ob-cta {
  margin-top: 8px;
  min-height: 48px;
  padding: 14px 36px;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--amber);
  color: var(--amber);
  cursor: pointer;
  box-shadow: 0 0 8px 0 var(--amber);
  transition: background 0.12s, color 0.12s;
}
.ob-cta:hover,
.ob-cta:active,
.ob-cta:focus-visible {
  background: var(--amber);
  color: var(--void);
  outline: none;
}

/* ── Text-link affordance ("How to play" / "Skip") ─────────────────────────── */
.ob-link {
  min-height: 44px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: transparent;
  border: none;
  color: var(--green);
  opacity: 0.7;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.ob-link:hover,
.ob-link:active,
.ob-link:focus-visible { opacity: 1; color: var(--amber); outline: none; }

/* R2.1 — TESTING / god mode CTA. Real button, sits below "How to play" so it's
 * findable without being mistaken for the primary action. Amber outline = "tool". */
.ob-link.ob-testing {
  color: var(--amber);
  opacity: 0.95;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 2px;
  border: 1px dashed var(--amber);
  padding: 8px 18px;
  text-decoration: none;
  background: rgba(255, 176, 0, 0.06);
}
.ob-link.ob-testing:hover,
.ob-link.ob-testing:active,
.ob-link.ob-testing:focus-visible {
  opacity: 1;
  color: var(--amber);
  background: rgba(255, 176, 0, 0.16);
}

/* ── R3 menu (Play / Quick Start / Settings / Godmode) ─────────────────────
 * Vertical stack of 4 buttons, dpad-navigable. The focused button gets
 * .ob-focused (amber outline + soft glow). Settings is rendered with
 * .ob-menu-disabled until the real screen lands; clicking it shows a toast. */
/* ── 4-button menu, restyled as angular bracketed keys ─────────────────────────
   Left-anchored under the hero. Notched chamfer + a left accent bar that grows
   on hover/focus. Honors the "brighten, don't invert" rule: focus brightens +
   glows + bar, label stays light (amber→cream) — never dark-on-amber. */
.ob-menu {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 12px; width: 100%; max-width: 380px; margin-top: 4px;
}
.ob-menu-btn {
  position: relative; display: flex; align-items: center;
  min-height: 54px; padding: 14px 22px 14px 28px;
  font-family: inherit; font-size: 15px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--green); cursor: pointer; overflow: hidden;
  background: linear-gradient(0deg, rgba(51,255,102,.05), rgba(10,14,42,.20));
  border: 1px solid var(--fx-green-line-dim);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: color .14s, background .16s, border-color .16s, box-shadow .16s;
}
/* Left accent bar — the kinetic focus cue (uses currentColor → tints per state). */
.ob-menu-btn::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; z-index: 0;
  background: currentColor; box-shadow: 0 0 10px currentColor;
  transform: scaleY(0); transform-origin: bottom; transition: transform .18s ease;
}
.ob-menu-label { position: relative; z-index: 1; }
.ob-menu-btn:hover, .ob-menu-btn:focus-visible {
  color: var(--amber); border-color: var(--fx-amber-line); outline: none;
  background: linear-gradient(0deg, rgba(255,176,0,.10), rgba(255,176,0,.03));
}
.ob-menu-btn:hover::before, .ob-menu-btn:focus-visible::before { transform: scaleY(1); }

/* Primary actions (Play / Quick Start) read amber by default. */
.ob-menu-btn.ob-menu-primary {
  color: var(--amber); border-color: var(--fx-amber-line);
  background: linear-gradient(0deg, rgba(255,176,0,.08), rgba(255,176,0,.02));
}
/* Godmode = dashed "tool" affordance (utility, not gameplay). */
.ob-menu-btn.ob-menu-tool { border-style: dashed; color: var(--amber); opacity: 0.85; }
.ob-menu-btn.ob-menu-tool:hover, .ob-menu-btn.ob-menu-tool:focus-visible { opacity: 1; }
/* SETTINGS coming-soon stub — dimmed; focus still reads, just lower intensity. */
.ob-menu-btn.ob-menu-disabled { opacity: 0.4; cursor: help; }
.ob-menu-btn.ob-menu-disabled:hover, .ob-menu-btn.ob-menu-disabled:focus-visible {
  color: var(--green); border-color: var(--fx-green-line-dim); background: transparent;
}
.ob-menu-btn.ob-menu-disabled:hover::before, .ob-menu-btn.ob-menu-disabled:focus-visible::before { transform: scaleY(0); }
.ob-menu-btn.ob-menu-disabled.ob-focused { opacity: 0.6; }

/* Focus indicator (dpad / arrow / hover) — brighten + glow + bar, NEVER invert. */
.ob-menu-btn.ob-focused {
  color: var(--amber); border-color: var(--amber); outline: none;
  background: linear-gradient(0deg, rgba(255,176,0,.16), rgba(255,176,0,.05));
  box-shadow: 0 0 22px rgba(255,176,0,.28), 0 0 7px rgba(255,176,0,.40);
}
.ob-menu-btn.ob-focused::before { transform: scaleY(1); }
.ob-menu-btn.ob-focused .ob-menu-label { color: var(--cream, #f0e6c8); }

/* ── Settings overlay (R3) — vertical stack of rows, each row holds a label
 * on the left and a toggle button on the right. Same chrome as the start
 * screen so the player doesn't see a jarring style break across menus. */
/* Same per-screen scroll seam as .ob-start .ob-stage above: the CONTROLS
 * sub-page (.controls-page) renders inside this same stage element, so one
 * rule covers both the main settings list and the sub-page. */
.ob-settings .ob-stage {
  height: 100%; overflow-y: auto; overflow-x: hidden;
  justify-content: safe center;
}
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 520px;
  margin-top: 4px;
}
.settings-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
}
.settings-row-label {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--green);
  opacity: 0.8;
  text-align: right;
}

/* ── Sensitivity slider rows ── label | range | value readout. The <input
 * type=range> is the focusable element (dpad/arrow navigation lands on it),
 * so it carries the amber focus glow rather than a row outline. */
.settings-row-slider {
  grid-template-columns: 90px 1fr 46px;
}
.settings-row-value {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--amber);
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.settings-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--green-dim);
  outline: none;
  cursor: pointer;
  border: 1px solid rgba(51,255,102,.30);
}
.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  border: none;
  box-shadow: 0 0 6px rgba(51,255,102,.6);
}
.settings-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  border: none;
  box-shadow: 0 0 6px rgba(51,255,102,.6);
}
.settings-slider.ob-focused {
  border-color: var(--amber);
  background: rgba(255,176,0,.12);
  box-shadow: 0 0 16px rgba(255,176,0,.30), 0 0 6px rgba(255,176,0,.40);
}
.settings-slider.ob-focused::-webkit-slider-thumb {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255,176,0,.8);
}
.settings-slider.ob-focused::-moz-range-thumb {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255,176,0,.8);
}

/* ── SOUND row — 3-mode segmented control (FULL / SFX ONLY / MUTED). One
 * focus stop; left/right cycles modes live like a slider. The active mode
 * reads amber-filled, inactive ones dim green. A hint line under the
 * segments teaches what the active mode means without waiting for a tooltip. */
.settings-row-sound {
  grid-template-columns: 90px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  outline: none;
}
.settings-sound-modes {
  display: flex;
  gap: 6px;
  grid-column: 2;
  grid-row: 1;
}
.settings-sound-hint {
  grid-column: 2;
  grid-row: 2;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--green);
  opacity: 0.55;
  text-transform: uppercase;
  margin-top: 4px;
  min-height: 12px;
}
.settings-sound-mode {
  flex: 1 1 0;
  position: relative;
  min-height: 40px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 1.6px;
  line-height: 1.15;
  text-transform: uppercase;
  text-align: center;
  color: var(--green);
  cursor: pointer;
  background: linear-gradient(0deg, rgba(51,255,102,.04), rgba(10,14,42,.15));
  border: 1px solid var(--fx-green-line-dim);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: color .14s, background .16s, border-color .16s, box-shadow .16s;
  white-space: normal;
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-sound-mode:hover {
  color: var(--amber);
  border-color: var(--fx-amber-line);
}
.settings-sound-mode.is-active {
  color: var(--amber);
  border-color: var(--amber);
  background: linear-gradient(0deg, rgba(255,176,0,.14), rgba(255,176,0,.04));
  box-shadow: 0 0 10px rgba(255,176,0,.22);
}
/* Row-level focus ring (dpad/arrow navigation lands on the row container). */
.settings-row-sound.ob-focused {
  box-shadow: 0 0 22px rgba(255,176,0,.20);
}
.settings-row-sound.ob-focused .settings-sound-mode.is-active {
  border-color: var(--amber);
  box-shadow: 0 0 16px rgba(255,176,0,.40), 0 0 4px rgba(255,176,0,.60);
}
.settings-row-sound.ob-focused .settings-sound-hint {
  color: var(--cream, #f0e6c8);
  opacity: 0.9;
}

/* ── CONTROLS sub-page (rendered inside the same Settings overlay) ──────────
 * DEVICE segmented toggle (MOUSE & KEYBOARD / CONTROLLER) drives which
 * bindings table renders below it; GUNS ON (CONTROLLER-only) reuses the same
 * segmented-row language to flip Fire/ADS between bumpers and triggers. */
.controls-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 520px;
  margin-top: 4px;
}

/* Segmented rows (DEVICE / GUNS ON) — same two-row grid as .settings-row-sound:
 * label | segments on row 1, an optional hint line spanning row 2. */
.controls-seg-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 6px 14px;
  padding: 6px 0;
  outline: none;
}
.controls-hint {
  grid-column: 2;
  grid-row: 2;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--green);
  opacity: 0.55;
  text-transform: uppercase;
  margin-top: 4px;
  min-height: 12px;
}
.controls-seg {
  flex: 1 1 0;
  position: relative;
  min-height: 40px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 1.6px;
  line-height: 1.15;
  text-transform: uppercase;
  text-align: center;
  color: var(--green);
  cursor: pointer;
  background: linear-gradient(0deg, rgba(51,255,102,.04), rgba(10,14,42,.15));
  border: 1px solid var(--fx-green-line-dim);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: color .14s, background .16s, border-color .16s, box-shadow .16s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.controls-seg:hover {
  color: var(--amber);
  border-color: var(--fx-amber-line);
}
.controls-seg.is-active {
  color: var(--amber);
  border-color: var(--amber);
  background: linear-gradient(0deg, rgba(255,176,0,.14), rgba(255,176,0,.04));
  box-shadow: 0 0 10px rgba(255,176,0,.22);
}

/* Focus parity with the SOUND row treatment (dpad/arrow navigation lands on
 * the row container, not the individual segment buttons). */
.controls-seg-row.ob-focused {
  box-shadow: 0 0 22px rgba(255,176,0,.20);
}
.controls-seg-row.ob-focused .controls-seg.is-active {
  border-color: var(--amber);
  box-shadow: 0 0 16px rgba(255,176,0,.40), 0 0 4px rgba(255,176,0,.60);
}
.controls-seg-row.ob-focused .controls-hint {
  color: var(--cream, #f0e6c8);
  opacity: 0.9;
}
.controls-seg.ob-focused {
  color: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 16px rgba(255,176,0,.40), 0 0 4px rgba(255,176,0,.60);
}

/* Bindings table — scannable two-column list, action dim-green / binding
 * amber, tabular numerals so paired digits (L1/R1 etc) line up. */
.controls-bindings {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  padding: 10px 4px;
  border-top: 1px solid var(--fx-green-line-dim);
  border-bottom: 1px solid var(--fx-green-line-dim);
}
.controls-bindings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: baseline;
  gap: 14px;
  padding: 3px 0;
  font-variant-numeric: tabular-nums;
}
.controls-bindings-action {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--green);
  opacity: 0.8;
  text-align: right;
}
.controls-bindings-value {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--amber);
  text-align: left;
}

/* ── Tutorial ──────────────────────────────────────────────────────────────── */
.ob-heading {
  font-size: 18px;
  letter-spacing: 5px;
  color: var(--amber);
}

.ob-cards {
  display: flex;
  flex-direction: row;
  gap: 16px;
  width: 100%;
}

.ob-card {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px;
  border: 1px solid var(--green-dim);
  background: var(--panel-bg);
  text-align: left;
}

.ob-card-num {
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--amber);
}
.ob-card-title {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--green);
}
.ob-card-body {
  font-size: 12px;
  letter-spacing: 0.5px;
  line-height: 1.5;
  text-transform: none;
  color: var(--green);
  opacity: 0.8;
}

.ob-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 4px;
}

/* ── Responsive: stack cards on narrow screens ─────────────────────────────── */
@media (max-width: 640px) {
  .ob-cards { flex-direction: column; }
  /* Stacked: size each card to its content; flex:1 1 0 (row mode) would force
     equal 1/3 heights that are too short, overflowing text into the next card. */
  .ob-card { flex: 0 0 auto; }
  .ob-stage { gap: 16px; }
}

/* ── Short-height landscape (iPhone 15 landscape ≈ 852×393) ──────────────────
   Start screen: the big wordmark + tagline + 4-button menu blow past 393px and,
   because the overlay clips overflow, the lower menu buttons (Settings/Godmode)
   fall off-screen. Shrink the hero, lay the hero + menu side-by-side, and allow
   the stage to scroll as a fail-safe so every menu button is reachable. */
@media (max-height: 480px) {
  /* Allow vertical scroll as a safety net (centered content otherwise clips). */
  .ob-overlay { overflow-y: auto; }
  .ob-stage { padding: 12px 18px; gap: 14px; }

  /* Start screen: put the hero and the menu in a row so neither needs the full
     height. Hero shrinks hard; menu stays a tight vertical stack. */
  .ob-start .ob-stage {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: clamp(20px, 4vw, 48px);
    max-width: min(1100px, 94vw);
  }
  .ob-start .ob-furniture { display: none; }   /* free up the vertical edges */
  .ob-hero { gap: clamp(12px, 2.5vw, 28px); }
  .ob-emblem { width: clamp(56px, 8vw, 88px); height: clamp(56px, 8vw, 88px); }
  .ob-wordmark { font-size: clamp(40px, 8vw, 72px); }
  .ob-tagline { font-size: clamp(10px, 1.6vw, 13px); letter-spacing: 4px; }
  .ob-rule-label { font-size: 10px; letter-spacing: 3px; }
  .ob-menu { gap: 8px; max-width: 320px; margin-top: 0; }
  .ob-menu-btn { min-height: 46px; padding: 10px 18px 10px 24px; font-size: 13px; letter-spacing: 3px; }

  /* Tutorial: keep cards in a row (they're wide-friendly), compress so the
     GOT IT button stays visible; cards scroll internally if copy is long. */
  .ob-heading { font-size: 15px; letter-spacing: 3px; }
  .ob-cards { gap: 12px; }
  .ob-card { padding: 10px 12px; gap: 6px; min-height: 0; overflow-y: auto; }
  .ob-card-num { font-size: 18px; }
  .ob-card-title { font-size: 12px; }
  .ob-card-body { font-size: 11px; line-height: 1.35; }
  .ob-cta { min-height: 44px; padding: 10px 28px; font-size: 14px; }
}

/* ── Class-gated twin of the max-height:480 block above (contract C1) ────────
   The raw `@media (max-height:480px)` query above never fires under UI SCALE
   zoom — the *raw* viewport is unchanged, only the effective canvas shrinks.
   `:root.eff-h-le-480` (main.js, keyed off effH = innerHeight/--ui-scale)
   fires the same compaction whenever the effective height drops to
   iPhone-landscape territory at ANY scale (e.g. a taller device at 1.45x).
   Keep this in lockstep with the @media block above — same declarations,
   `:root.eff-h-le-480` swapped in for the media query. Deck @1.45 (effH≈552)
   stays uncompacted on purpose — it's tall enough to just scroll (A2). */
/* Allow vertical scroll as a safety net (centered content otherwise clips). */
:root.eff-h-le-480 .ob-overlay { overflow-y: auto; }
:root.eff-h-le-480 .ob-stage { padding: 12px 18px; gap: 14px; }

:root.eff-h-le-480 .ob-start .ob-stage {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 4vw, 48px);
  max-width: min(1100px, 94vw);
}
:root.eff-h-le-480 .ob-start .ob-furniture { display: none; }   /* free up the vertical edges */
:root.eff-h-le-480 .ob-hero { gap: clamp(12px, 2.5vw, 28px); }
:root.eff-h-le-480 .ob-emblem { width: clamp(56px, 8vw, 88px); height: clamp(56px, 8vw, 88px); }
:root.eff-h-le-480 .ob-wordmark { font-size: clamp(40px, 8vw, 72px); }
:root.eff-h-le-480 .ob-tagline { font-size: clamp(10px, 1.6vw, 13px); letter-spacing: 4px; }
:root.eff-h-le-480 .ob-rule-label { font-size: 10px; letter-spacing: 3px; }
:root.eff-h-le-480 .ob-menu { gap: 8px; max-width: 320px; margin-top: 0; }
:root.eff-h-le-480 .ob-menu-btn { min-height: 46px; padding: 10px 18px 10px 24px; font-size: 13px; letter-spacing: 3px; }

:root.eff-h-le-480 .ob-heading { font-size: 15px; letter-spacing: 3px; }
:root.eff-h-le-480 .ob-cards { gap: 12px; }
:root.eff-h-le-480 .ob-card { padding: 10px 12px; gap: 6px; min-height: 0; overflow-y: auto; }
:root.eff-h-le-480 .ob-card-num { font-size: 18px; }
:root.eff-h-le-480 .ob-card-title { font-size: 12px; }
:root.eff-h-le-480 .ob-card-body { font-size: 11px; line-height: 1.35; }
:root.eff-h-le-480 .ob-cta { min-height: 44px; padding: 10px 28px; font-size: 14px; }

/* ══ Sub-menus (Bulwark / Missions) ═════════════════════════════════════════════
   Mirror the start screen chrome (.ob-overlay / .ob-frame / .ob-furniture) so
   the look is consistent across menu hops. Bulwark is a compact centered
   3-button stack; Missions is a taller scrollable list with a Quick Start band. */
.ob-submenu .ob-stage,
.ob-missions .ob-stage {
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  max-width: min(960px, 92vw);
  gap: 18px;
  padding-top: clamp(64px, 9vh, 96px);
  padding-bottom: clamp(48px, 6vh, 72px);
}

.ob-submenu .ob-rule { justify-content: center; }
.ob-submenu-blurb {
  margin: 0;
  max-width: 640px;
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 1px;
  color: var(--green);
  opacity: 0.85;
  text-transform: none;
}
.ob-submenu-hint {
  margin-top: 6px;
  max-width: 560px;
  font-size: 11px;
  letter-spacing: 1.5px;
  line-height: 1.5;
  color: var(--green);
  opacity: 0.7;
  text-transform: none;
}

/* ── Missions: scrollable stage + scoped sections ───────────────────────────── */
.ob-missions .ob-stage {
  align-items: stretch;
  text-align: left;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--green-dim) transparent;
}
.ob-missions .ob-heading { text-align: center; }

/* Quick Start band */
.mission-quickstart {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--fx-amber-line);
  background: linear-gradient(0deg, rgba(255,176,0,.05), rgba(10,14,42,.20));
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.mission-quickstart-head {
  display: flex; align-items: center; gap: 14px;
}
.mission-quickstart-title {
  margin: 0;
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--amber);
}
.mission-quickstart-rule {
  flex: 1; height: 1px; background: var(--fx-amber-line); opacity: 0.6;
}
.mission-quickstart-concept {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 1px;
  color: var(--green);
  opacity: 0.85;
  text-transform: none;
}
.mission-quickstart-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}
.mission-loadout-card {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 6px; padding: 12px 14px;
  font-family: inherit; text-align: left;
  background: linear-gradient(0deg, rgba(51,255,102,.05), rgba(10,14,42,.20));
  border: 1px solid var(--fx-green-line-dim);
  color: var(--green); cursor: pointer; overflow: hidden;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: color .14s, background .16s, border-color .16s, box-shadow .16s;
}
.mission-loadout-card:hover,
.mission-loadout-card:focus-visible,
.mission-loadout-card.ob-focused {
  color: var(--amber);
  border-color: var(--amber);
  background: linear-gradient(0deg, rgba(255,176,0,.14), rgba(255,176,0,.04));
  box-shadow: 0 0 18px rgba(255,176,0,.22);
  outline: none;
}
.mission-loadout-name {
  font-size: 15px; letter-spacing: 3px; color: var(--amber);
}
.mission-loadout-class {
  font-size: 10px; letter-spacing: 3px; color: var(--green); opacity: 0.7;
}
.mission-loadout-blurb {
  font-size: 11px; line-height: 1.4; letter-spacing: 0.5px;
  color: var(--green); opacity: 0.8; text-transform: none;
}
.mission-loadout-cta {
  margin-top: 4px;
  font-size: 11px; letter-spacing: 3px; color: var(--amber); opacity: 0.9;
}

/* Strike list */
.mission-list-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-top: 4px;
}
.mission-list-title {
  margin: 0;
  font-size: 14px; letter-spacing: 4px; color: var(--green);
}
.mission-list-sub { font-size: 11px; letter-spacing: 2px; color: var(--green); opacity: 0.75; }
.mission-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.mission-card {
  position: relative;
  display: flex; flex-direction: column; align-items: stretch;
  gap: 8px; padding: 14px 16px;
  font-family: inherit; text-align: left;
  background: linear-gradient(0deg, rgba(51,255,102,.05), rgba(10,14,42,.20));
  border: 1px solid var(--fx-green-line-dim);
  color: var(--green); cursor: pointer; overflow: hidden;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: color .14s, background .16s, border-color .16s, box-shadow .16s;
}
.mission-card:hover,
.mission-card:focus-visible,
.mission-card.ob-focused {
  color: var(--amber);
  border-color: var(--amber);
  background: linear-gradient(0deg, rgba(255,176,0,.12), rgba(255,176,0,.03));
  box-shadow: 0 0 18px rgba(255,176,0,.22);
  outline: none;
}
.mission-card-head {
  display: flex; align-items: center; gap: 12px;
}
.mission-card-sigil {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 0 6px var(--sigil-glow, transparent));
}
.mission-card-sigil svg { display: block; }
.mission-card-titles {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.mission-card-name { font-size: 13px; letter-spacing: 3px; color: var(--amber); }
.mission-card-map  { font-size: 10px; letter-spacing: 2px; color: var(--green); opacity: 0.7; }
.mission-card-sig  { font-size: 10px; letter-spacing: 2px; color: var(--green); opacity: 0.85; }
.mission-card-blurb {
  font-size: 11px; line-height: 1.45; letter-spacing: 0.5px;
  color: var(--green); opacity: 0.8; text-transform: none;
}
.mission-card-foot {
  display: flex; justify-content: space-between; gap: 8px;
  margin-top: 2px;
  font-size: 10px; letter-spacing: 2px;
  color: var(--green); opacity: 0.75;
}
.mission-card-foot .fx-key { color: var(--green); opacity: 0.65; margin-right: 4px; }
/* A campaign card whose ladder rung is still locked (campaign-spec §7) — visible
   but dimmed; the lock note says why and main.js refuses the launch. */
.mission-card-campaign-locked { opacity: 0.55; }
.mission-card-lock-note {
  margin-top: 6px;
  font-size: 10px; letter-spacing: 2px; color: var(--amber); opacity: 0.85;
}
.mission-card-loadout, .mission-card-mods {
  padding: 4px 8px;
  border: 1px solid var(--fx-green-line-dim);
}

/* Back button — centered, room around it */
.ob-missions-back, .ob-submenu .ob-menu-btn.ob-missions-back {
  align-self: center;
  margin-top: 6px;
  max-width: 320px;
}

/* ══ PLAY hub (STORY / BULWARK / MISSIONS) ═══════════════════════════════════
   Three equal-weight activity cards. Same card grammar as .mission-card so the
   whole menu tree reads as one system; wider + centered because there are three. */
.play-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 860px;
}
.play-choice {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 6px; padding: 16px 18px;
  font-family: inherit; text-align: left;
  background: linear-gradient(0deg, rgba(51,255,102,.05), rgba(10,14,42,.20));
  border: 1px solid var(--fx-green-line-dim);
  color: var(--green); cursor: pointer; overflow: hidden;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: color .14s, background .16s, border-color .16s, box-shadow .16s;
}
.play-choice:hover,
.play-choice:focus-visible,
.play-choice.ob-focused {
  color: var(--amber);
  border-color: var(--amber);
  background: linear-gradient(0deg, rgba(255,176,0,.14), rgba(255,176,0,.04));
  box-shadow: 0 0 18px rgba(255,176,0,.22);
  outline: none;
}
.play-choice-name   { font-size: 17px; letter-spacing: 4px; color: var(--amber); }
.play-choice-kicker { font-size: 10px; letter-spacing: 2px; color: var(--green); opacity: 0.75; }
.play-choice-blurb  {
  font-size: 11px; line-height: 1.45; letter-spacing: 0.5px;
  color: var(--green); opacity: 0.8; text-transform: none;
}
.play-choice-meta {
  margin-top: auto; padding-top: 8px;
  font-size: 10px; letter-spacing: 2px; color: var(--green); opacity: 0.9;
}
.play-choice-pips { letter-spacing: 2px; color: var(--amber); }

/* ══ STORY — the episode ladder ══════════════════════════════════════════════ */
.ob-story .ob-stage {
  align-items: stretch;
  text-align: left;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--green-dim) transparent;
  max-width: min(1000px, 92vw);
}
.ob-story .ob-heading { text-align: center; }

.story-ladder {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--fx-amber-line);
  background: linear-gradient(0deg, rgba(255,176,0,.05), rgba(10,14,42,.20));
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.story-ladder-count { font-size: 12px; letter-spacing: 3px; color: var(--amber); }
.story-ladder-count .fx-key { color: var(--green); opacity: 0.7; margin-right: 6px; }
.story-ladder-pips { display: flex; gap: 4px; font-size: 14px; letter-spacing: 2px; }
.story-pip { color: var(--green); opacity: 0.45; }
.story-pip-done { color: var(--amber); opacity: 1; }

.story-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}
.story-card {
  position: relative;
  display: flex; flex-direction: column; align-items: stretch;
  gap: 7px; padding: 14px 16px;
  font-family: inherit; text-align: left;
  background: linear-gradient(0deg, rgba(51,255,102,.05), rgba(10,14,42,.20));
  border: 1px solid var(--fx-green-line-dim);
  color: var(--green); cursor: pointer; overflow: hidden;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: color .14s, background .16s, border-color .16s, box-shadow .16s;
}
.story-card:hover,
.story-card:focus-visible,
.story-card.ob-focused {
  color: var(--amber);
  border-color: var(--amber);
  background: linear-gradient(0deg, rgba(255,176,0,.12), rgba(255,176,0,.03));
  box-shadow: 0 0 18px rgba(255,176,0,.22);
  outline: none;
}
/* A cleared episode keeps a standing amber edge — the mark is visible in the
   grid without reading the status line. */
.story-card-done { border-color: var(--fx-amber-line); }
.story-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.story-card-badge {
  padding: 3px 8px;
  font-size: 11px; letter-spacing: 3px; color: var(--amber);
  border: 1px solid var(--fx-amber-line);
}
.story-card-mark { font-size: 16px; color: var(--green); opacity: 0.5; }
.story-mark-done { color: var(--amber); opacity: 1; }
.story-card-act     { font-size: 10px; letter-spacing: 2px; color: var(--green); opacity: 0.7; }
.story-card-title   { font-size: 15px; letter-spacing: 3px; color: var(--amber); }
.story-card-logline {
  font-size: 11px; line-height: 1.45; letter-spacing: 0.5px;
  color: var(--green); opacity: 0.8; text-transform: none;
}
.story-card-issues {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 10px; letter-spacing: 1.5px;
}
.story-issue {
  padding: 3px 7px;
  border: 1px solid var(--fx-green-line-dim);
  color: var(--green); opacity: 0.85;
}
.story-issue .fx-key { color: var(--green); opacity: 0.6; margin-right: 5px; }
/* A stand-in issue (data/missions.js episodeIssues) — dashed and dimmed so it reads as
   "not this episode's own chapter" at a glance, before anyone reads the label. */
.story-issue-fallback {
  border-style: dashed;
  opacity: 0.55;
}
.story-card-pending {
  font-size: 9px; letter-spacing: 1.5px;
  color: var(--green); opacity: 0.5;
}
.story-card-pending .fx-key { opacity: 0.7; margin-right: 4px; }
.story-card-status {
  margin-top: 2px;
  font-size: 10px; letter-spacing: 2px; color: var(--green); opacity: 0.8;
}
.story-card-status .fx-key { color: var(--green); opacity: 0.6; margin-right: 4px; }
.story-status-flag { color: var(--green); opacity: 0.7; }
.story-status-done .story-status-flag { color: var(--amber); opacity: 1; }
.story-card-cta {
  margin-top: 4px;
  font-size: 11px; letter-spacing: 3px; color: var(--amber); opacity: 0.9;
}
/* The inert "unwritten" stub card — never focusable, never clickable. */
.story-card-unwritten {
  cursor: default;
  opacity: 0.5;
  border-style: dashed;
  pointer-events: none;
}
.story-card-unwritten .story-card-title { color: var(--green); }
/* A §7-locked campaign card — focusable (the ladder must read top to bottom) but
   dimmed, and its confirm goes nowhere. The status line carries the tease. */
.story-card-locked { opacity: 0.62; cursor: default; }
.story-card-locked .story-card-title { color: var(--green); }
.story-card-locked .story-card-cta { color: var(--green); opacity: 0.6; }
/* Act header rows spanning the grid — ACT I / II / III boundaries. */
.story-act-head {
  grid-column: 1 / -1;
  margin: 6px 0 -2px;
  font-size: 11px; letter-spacing: 3px; color: var(--amber); opacity: 0.85;
}
.story-act-head .fx-key { color: var(--green); opacity: 0.7; margin-right: 6px; }
.story-footer { margin: 2px 0 0; font-size: 10px; letter-spacing: 2px; opacity: 0.7; }

/* ── Sub-menu responsive ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .mission-quickstart-grid { grid-template-columns: 1fr; }
  .mission-list { grid-template-columns: 1fr; }
  .play-choices { grid-template-columns: 1fr; }
  .story-list { grid-template-columns: 1fr; }
  .story-ladder { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ── GODMODE hub (ui/godmode/god-hub.js) — two-column "intro plus" layout
   (docs/god-hub-two-column-spec.md) ───────────────────────────────────────
   Reuses the start-screen hero + menu language; adds a one-line hint under
   each tool tile and an ON/OFF treatment for the two toggle tiles.
   `.ob-start .gh-stage` (not bare `.gh-stage`): the hub's overlay carries both
   `.ob-start` and `.gh-hub` (it reuses the start-screen chrome), so its stage
   also matches `.ob-start .ob-stage` above. A bare single-class `.gh-stage`
   selector loses that specificity tie (2 classes beats 1) and the hub used to
   render at its own narrower column instead of the shared shape. Matching
   the ancestor + own-class shape here makes this rule win.
   Widened to the start screen's own shape (was a 560px single column pre-
   two-column pass) — the hub now hosts two side-by-side `.gh-menu` columns
   under the shared hero, same width budget as `.ob-start .ob-stage`. */
.ob-start .gh-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: safe center;
  text-align: left;
  gap: clamp(16px, 3vh, 28px);
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 clamp(24px, 8vw, 120px);
  max-width: min(1100px, 92vw);
  margin: 0 auto;
}
.gh-columns {
  display: flex;
  align-items: flex-start;
  gap: clamp(24px, 4vw, 64px);
}
.gh-col { display: flex; flex-direction: column; gap: 10px; }
.gh-col-label {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--green);
  opacity: 0.65;
}
.gh-menu { align-items: stretch; }
.gh-menu .ob-menu-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.gh-tile-sub {
  position: relative;
  z-index: 1;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  opacity: 0.65;
}
.gh-toggle .gh-tile-sub { color: var(--amber); }
.gh-toggle.gh-toggle-on { border-style: solid; }
.gh-toggle.gh-toggle-on .ob-menu-label::after {
  content: ' ●';
  color: var(--green);
}

/* ── Responsive: stack the two columns on narrow screens (§4) ──────────────
   Game column above tools column; the existing small-screen .ob-menu-btn
   shrink rules (the @media (max-width: 640px) block above) still apply. */
@media (max-width: 640px) {
  .gh-columns { flex-direction: column; }
}
