:root {
  --navy: #10243a;
  --deep: #091624;
  --ink: #04070b;
  --lime: #b7f534;
  --lime-glow: rgba(183, 245, 52, .55);
  --amber: #ffcf4a;
  --red: #ff3b47;
  --text: #eef3f8;
  --muted: #93a4b6;
  --hud: 'Chakra Petch', 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  --display: 'Teko', 'Chakra Petch', Impact, 'Arial Narrow', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); overflow: hidden; }
body {
  font: 600 15px/1.3 var(--hud);
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
img { -webkit-user-drag: none; }
kbd {
  display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .4em;
  border-radius: 5px; background: #eef3f8; color: #0b1520; font: 700 .8em var(--hud); box-shadow: 0 3px 0 #7d8b99;
  vertical-align: .05em;
}

#app { position: fixed; inset: 0; }
.stage { position: absolute; inset: 0; overflow: hidden; }

/* ---------- world: one full-bleed scene ---------- */
.world {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) min(34vw, 470px);
  /* placeholder yard backdrop until the loading-yard plate arrives */
  background:
    radial-gradient(55% 60% at 38% 74%, rgba(160, 170, 180, .16), transparent 70%),
    radial-gradient(40% 30% at 70% 8%, rgba(255, 214, 140, .10), transparent 70%),
    linear-gradient(180deg, #080b0f 0%, #10151b 44%, #1b2127 45%, #252b31 100%);
}
.world::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 45% 55%, transparent 55%, rgba(0, 0, 0, .65) 100%);
}
.surface-cell { position: relative; min-width: 0; min-height: 0; container-type: size; display: grid; place-items: center; }
.surface-stage { position: relative; width: min(100cqw, calc(100cqh * 1400 / 1115)); aspect-ratio: 1400 / 1115; }
.layer { position: absolute; pointer-events: none; }
.surface-stage canvas.layer { left: 0; top: 0; width: 100%; height: 100%; }
.surface-stage img.plate { left: 0; top: calc(115 / 1115 * 100%); width: calc(1536 / 1400 * 100%); height: auto; }
.surface-stage img.operator { left: calc(-41 / 1400 * 100%); top: calc(6 / 1115 * 100%); width: calc(1536 / 1400 * 100%); height: auto; visibility: hidden; }
.surface-stage img.operator.on { visibility: visible; }

/* the cutaway is the inspector's rugged tablet feed */
.feed { position: relative; min-width: 0; min-height: 0; display: grid; place-items: center; padding: 64px 18px 92px 0; z-index: 1; }
.feed-frame {
  position: relative; width: 100%; height: 100%; max-height: 760px; border-radius: 26px; padding: 14px;
  background: linear-gradient(145deg, #2a333d, #11161c 40%, #1b2229);
  box-shadow: 0 0 0 2px #050709, 0 24px 60px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 6px #0b0f14;
}
.feed-frame::before, .feed-frame::after {
  content: ''; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #3a4552; box-shadow: inset 0 1px 1px #000;
}
.feed-frame::before { left: 4px; top: 50%; }
.feed-frame::after { right: 4px; top: 50%; }
.feed-frame canvas { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); border-radius: 12px; background: #000; }
.feed-tag {
  position: absolute; left: 28px; top: 26px; font: 700 12px var(--hud); letter-spacing: .16em; color: var(--lime);
  text-shadow: 0 0 8px var(--lime-glow); display: flex; align-items: center; gap: 6px;
}
.feed-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }

/* ---------- review: hologram model fills the screen ---------- */
.review-cell { position: absolute; inset: 0; background: radial-gradient(70% 80% at 32% 52%, #0e2232 0%, #04070b 70%); }
.review-cell[hidden] { display: none; }
.model-wrap { position: absolute; }
.model-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.model-note { position: absolute; left: 18px; right: calc(min(460px, 42vw) + 40px); bottom: 10px; margin: 0; font-size: 11px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
#pins { position: absolute; inset: 0; pointer-events: none; }
.pin-dot { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid var(--lime); box-shadow: 0 0 10px var(--lime-glow); }
.pin-dot.done { border-color: #6fd0ff; box-shadow: 0 0 10px rgba(111, 208, 255, .6); }
.pin-line { position: absolute; height: 2px; background: rgba(183, 245, 52, .8); transform-origin: 0 50%; }
.pin {
  position: absolute; transform: translate(-50%, -50%); pointer-events: auto; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--lime); background: rgba(9, 22, 36, .85);
  color: var(--lime); font: 700 20px var(--display); box-shadow: 0 0 16px var(--lime-glow);
}
.pin.done { border-color: #6fd0ff; color: #6fd0ff; box-shadow: none; }
.pin.active { background: var(--lime); color: var(--deep); }
.pin[hidden], .pin-dot[hidden], .pin-line[hidden] { display: none; }

/* ---------- HUD ---------- */
.hud { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.hud-score, .hud-objective {
  position: absolute; top: 14px; padding: 6px 16px 6px 12px; display: flex; align-items: baseline; gap: 10px;
  background: linear-gradient(90deg, rgba(5, 10, 16, .82), rgba(5, 10, 16, .35));
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}
.hud-score { left: 14px; border-left: 3px solid var(--lime); }
.hud-score span, .hud-objective span { font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.hud-score b { font: 600 34px/1 var(--display); color: var(--lime); text-shadow: 0 0 12px var(--lime-glow); }
.hud-objective { left: 50%; transform: translateX(-50%); clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 100%, 0 100%); background: rgba(5, 10, 16, .7); padding: 6px 26px; }
.hud-objective b { font: 600 22px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.hud-pause {
  position: absolute; right: 14px; top: 12px; width: 46px; height: 46px; border-radius: 50%; pointer-events: auto; cursor: pointer;
  background: rgba(5, 10, 16, .7); border: 2px solid rgba(183, 245, 52, .6); color: var(--lime); font: 700 16px var(--hud);
}
.hud-gauge { position: absolute; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 10px; text-shadow: 0 2px 6px #000; }
.knob { width: 74px; height: 74px; filter: drop-shadow(0 0 8px rgba(0, 0, 0, .8)); }
.knob-ring { fill: rgba(5, 10, 16, .78); stroke: #2c4058; stroke-width: 4; }
.knob-band { fill: none; stroke: rgba(183, 245, 52, .35); stroke-width: 9; }
.knob-arc { fill: none; stroke: var(--lime); stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 4px var(--lime)); }
.knob-needle { stroke: #fff; stroke-width: 4; stroke-linecap: round; transform-origin: 50px 50px; transition: transform .08s linear; }
.knob-hub { fill: #c9d3dd; }
.nums { font-size: 13px; line-height: 1.35; white-space: nowrap; }
.nums .big { display: flex; align-items: baseline; gap: 6px; }
.nums .big b { font: 600 28px/1 var(--display); color: var(--lime); }
.nums .big span { font-size: 11px; letter-spacing: .18em; color: var(--muted); }
.rocker-ind { display: inline-block; width: 10px; height: 16px; border-radius: 3px; background: #24384f; position: relative; vertical-align: -3px; margin-right: 6px; }
.rocker-ind i { position: absolute; left: 2px; right: 2px; height: 6px; border-radius: 2px; background: var(--lime); top: 8px; transition: top .18s; }
.rocker-ind[data-state="up"] i { top: 2px; }
.hud-power { position: absolute; left: 16px; bottom: 100px; display: flex; flex-direction: column; gap: 6px; }
.hud-power span {
  font: 700 12px var(--hud); letter-spacing: .12em; padding: 4px 12px 4px 8px; border-left: 3px solid var(--lime); color: var(--text);
  background: rgba(5, 10, 16, .78);
}
.hud-power span::before { content: '\2713  '; color: var(--lime); }
.motion .hud-power span { animation: tallyIn .3s cubic-bezier(.2, .9, .2, 1) both; }
.hud-sub {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); margin: 0; width: min(720px, 70%);
  text-align: center; font-size: 18px; text-shadow: 0 2px 4px #000, 0 0 14px #000;
}
.hud-sub .warn { color: var(--amber); }
.phase-title .hud, .phase-result .hud-gauge, .phase-review .hud-gauge, .phase-decide .hud-gauge, .phase-reveal .hud-gauge,
.phase-saved .hud-gauge, .phase-brief .hud-gauge, .phase-asset .hud-gauge { display: none; }
.phase-review .hud-sub, .phase-decide .hud-sub, .phase-result .hud-sub, .phase-title .hud-sub { display: none; }
.phase-result .hud-objective { display: none; }

/* ---------- coach: big action cue ---------- */
.coach {
  position: absolute; z-index: 7; left: 50%; bottom: 70px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; padding: 8px 22px 8px 10px;
  background: rgba(5, 10, 16, .82); border: 2px solid var(--lime); border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 22px rgba(183, 245, 52, .25);
  font: 600 30px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; pointer-events: none;
}
.coach[hidden] { display: none; }
.coach .cap {
  display: grid; place-items: center; min-width: 50px; height: 50px; padding: 0 8px; border-radius: 10px;
  background: #f1f6fa; color: #0b1520; font: 700 28px var(--hud); box-shadow: 0 5px 0 #8796a5;
}
.coach .cap.wide { font-size: 16px; min-width: 96px; letter-spacing: .1em; }
.coach.hot { border-color: var(--amber); color: var(--amber); box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 28px rgba(255, 207, 74, .35); }
.motion .coach { animation: coachIn .22s ease-out, coachBob 1.1s ease-in-out .22s infinite; }
.motion .coach .cap { animation: capPress 1.1s ease-in-out infinite; }
.motion .coach.hot { animation: coachIn .2s ease-out, coachFlash .45s ease-in-out infinite alternate; }
@keyframes coachIn { from { opacity: 0; transform: translate(-50%, 14px) scale(.9); } }
@keyframes coachBob { 50% { transform: translate(-50%, -5px); } }
@keyframes capPress { 40%, 60% { transform: translateY(4px); box-shadow: 0 1px 0 #8796a5; } }
@keyframes coachFlash { to { box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 0 10px rgba(255, 207, 74, .1); } }

/* ---------- banner: slam-in callouts ---------- */
.banner {
  position: absolute; z-index: 8; left: 50%; top: 42%; transform: translate(-50%, -50%);
  pointer-events: none; text-align: center; white-space: nowrap; opacity: 0;
}
.banner b {
  display: block; font: 700 clamp(44px, 8vw, 104px)/.9 var(--display); letter-spacing: .04em; color: var(--lime);
  -webkit-text-stroke: 2px #061006; text-shadow: 0 0 30px var(--lime-glow), 0 6px 0 #061006;
}
.banner small { display: block; margin-top: 6px; font: 700 18px var(--hud); letter-spacing: .14em; text-shadow: 0 2px 6px #000; }
.banner.bad b { color: var(--amber); text-shadow: 0 0 30px rgba(255, 207, 74, .5), 0 6px 0 #1a1000; }
.banner.show { animation: slam 1.5s cubic-bezier(.2, .9, .2, 1) forwards; }
.banner.static { opacity: 1; animation: none !important; }
@keyframes slam {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); filter: blur(6px); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(.96); filter: none; }
  20% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(1); }
}

/* ---------- game screens ---------- */
.overlay { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.overlay[hidden] { display: none; }
.ui { position: absolute; inset: 0; }
.ui button { pointer-events: auto; cursor: pointer; }
.ui:focus { outline: none; }
.go {
  pointer-events: auto; background: none; border: 0; padding: 6px 10px; cursor: pointer;
  font: 700 16px var(--hud); letter-spacing: .18em; color: var(--text); text-shadow: 0 2px 6px #000;
}
.go b { color: var(--lime); }
.motion .go { animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .45; } }
.go:focus-visible, .choice:focus-visible, .pin:focus-visible, .hud-pause:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

/* title */
.ui-title { display: grid; place-items: center; background: radial-gradient(60% 60% at 50% 45%, rgba(4, 7, 11, .55), rgba(4, 7, 11, .92)); pointer-events: auto; }
.title-wrap { text-align: center; }
.title-logo { width: 110px; height: auto; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .8)); }
.title-kicker { font: 700 13px var(--hud); letter-spacing: .4em; color: var(--muted); margin-top: 6px; }
.title-name {
  margin: 0; font: 700 clamp(64px, 11vw, 150px)/.85 var(--display); letter-spacing: .03em; text-transform: uppercase;
  color: #f4f8fb; -webkit-text-stroke: 2px #0b1520; text-shadow: 0 0 40px rgba(183, 245, 52, .35), 0 8px 0 #0b1520;
}
.title-name em { font-style: normal; color: var(--lime); }
.title-keys { display: flex; justify-content: center; gap: 22px; margin: 18px 0 26px; font-size: 14px; letter-spacing: .12em; color: var(--muted); flex-wrap: wrap; }
.title-foot { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 11px; letter-spacing: .08em; color: #6b7c8e; padding: 0 12px; }
.motion .title-name { animation: rise .7s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.96); } }

/* radio dialog lower third */
.dialog {
  position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); width: min(820px, 92%);
  padding: 16px 22px 34px 22px; background: linear-gradient(90deg, rgba(5, 12, 20, .94), rgba(5, 12, 20, .8));
  border-left: 4px solid var(--lime); clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  pointer-events: auto;
}
.speaker { display: inline-block; font: 700 12px var(--hud); letter-spacing: .24em; color: var(--deep); background: var(--lime); padding: 3px 10px; margin-bottom: 8px; }
.speaker.inspector { background: #6fd0ff; }
.dialog p { margin: 0; font: 600 clamp(18px, 2.2vw, 24px)/1.3 var(--hud); }
.dialog .go { position: absolute; right: 14px; bottom: 6px; }
.motion .dialog { animation: slideUp .3s cubic-bezier(.2, .9, .2, 1); }
@keyframes slideUp { from { opacity: 0; transform: translate(-50%, 30px); } }

/* HUD map */
.ui-map { display: grid; place-items: center; background: rgba(4, 7, 11, .45); }
.radar {
  position: relative; width: min(560px, 92vw); padding: 16px 18px 14px; pointer-events: auto;
  background: rgba(5, 12, 20, .9); border: 1px solid rgba(183, 245, 52, .4);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  box-shadow: 0 0 40px rgba(183, 245, 52, .12);
}
.radar h2 { margin: 0 0 6px; font: 600 34px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.radar .wo { font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.map-wrap { position: relative; margin: 8px 0; }
.map { width: 100%; height: auto; display: block; }
.beacon { position: absolute; width: 58px; height: 58px; transform: translate(-50%, -50%); pointer-events: none; background: url(assets/beacons/available.webp) 0 0 / 1200% 100% no-repeat; }
.beacon.selected { background-image: url(assets/beacons/selected.webp); width: 80px; height: 80px; }
.beacon.bad { filter: hue-rotate(-110deg) saturate(2); }
.motion .beacon { animation: beacon 1.8s steps(12, jump-none) infinite; }
.motion .beacon.selected { animation-duration: 2.4s; }
@keyframes beacon { to { background-position: 100% 0; } }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.legend { margin-top: 8px; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; letter-spacing: .14em; color: var(--muted); }

/* choices (map tabs, evidence and decision options, pause menu) */
.choice {
  display: block; width: 100%; text-align: left; padding: 10px 14px; margin: 0; border: 0;
  background: rgba(18, 30, 44, .88); color: var(--text); font: 600 16px/1.25 var(--hud);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
  transition: transform .1s, background .1s;
}
.choice .k { display: inline-block; width: 1.6em; color: var(--lime); font: 700 18px var(--display); }
.choice small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.choice.sel { background: var(--lime); color: var(--deep); }
.choice.sel .k, .choice.sel small { color: var(--deep); }
.motion .choice.sel { transform: translateX(8px); }
.tabs .choice { text-align: center; clip-path: none; font: 600 22px/1 var(--display); padding: 10px 6px 8px; }
.motion .tabs .choice.sel { transform: none; }
.choice.right { background: #1f4d14; color: #eaffd0; }
.choice.wrong { background: #4a1418; color: #ffd9dc; text-decoration: line-through; }
.choice[disabled] { cursor: default; }
.feedback { margin: 4px 0 0; padding: 8px 12px; font-size: 15px; background: rgba(31, 77, 20, .7); border-left: 3px solid var(--lime); }
.feedback.bad { background: rgba(74, 20, 24, .7); border-left-color: var(--amber); }
.motion .shake { animation: shake .36s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* evidence and decision panel */
.ui-ev .panel, .ui-decide .panel {
  position: absolute; right: 18px; top: 74px; bottom: 18px; width: min(460px, 42vw);
  display: flex; flex-direction: column; gap: 10px; pointer-events: auto;
  overflow: hidden auto; scrollbar-width: none;   /* short screens still scroll, with no browser scrollbar */
}
.ui-ev .panel::-webkit-scrollbar, .ui-decide .panel::-webkit-scrollbar { display: none; }
.ui-decide .panel { top: 50%; bottom: auto; transform: translateY(-50%); }
.ev-head { font: 700 12px var(--hud); letter-spacing: .24em; color: var(--lime); }
.ev-title { margin: 0; font: 600 34px/1 var(--display); letter-spacing: .03em; text-transform: uppercase; text-shadow: 0 2px 8px #000; }
.clip { position: relative; border: 1px solid rgba(111, 208, 255, .5); box-shadow: 0 0 30px rgba(111, 208, 255, .15); flex: none; }
.clip canvas { width: 100%; height: auto; display: block; }
/* no scanlines over the close-up: they read as pixelation (Brian, October 28) */
.clip-tag { position: absolute; left: 8px; top: 6px; z-index: 1; font: 700 12px var(--hud); letter-spacing: .1em; color: #fff; background: rgba(200, 30, 40, .9); padding: 1px 7px; }
.question { margin: 2px 0 0; font: 600 18px/1.25 var(--hud); text-shadow: 0 2px 6px #000; }
.options { display: flex; flex-direction: column; gap: 6px; }
.ui-ev .panel, .ui-decide .panel { padding-right: 8px; }   /* room for the selected answer's nudge; every row ends together */
/* panel actions are full-width game buttons, not loose text */
.panel .go {
  align-self: stretch; text-align: left; padding: 12px 16px; margin-top: 2px; letter-spacing: .14em;
  background: rgba(18, 30, 44, .9); border: 2px solid var(--lime); box-shadow: 0 0 18px rgba(183, 245, 52, .22);
}
.motion .panel .go { animation: goPulse 1.4s ease-in-out infinite; }
@keyframes goPulse { 50% { box-shadow: 0 0 30px rgba(183, 245, 52, .45); background: rgba(30, 48, 30, .95); } }
.panel .legend { margin-top: auto; }

/* tally after recording */
.ui-tally { display: grid; place-items: center start; padding-left: 6vw; background: linear-gradient(90deg, rgba(4, 7, 11, .85), transparent 70%); }
.tally { width: min(460px, 86vw); pointer-events: auto; }
.tally h2 { margin: 0 0 10px; font: 700 54px/.9 var(--display); color: var(--lime); text-shadow: 0 0 24px var(--lime-glow); text-transform: uppercase; }
.tally .line { display: flex; justify-content: space-between; padding: 8px 2px; border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: 17px; }
.tally .line b { font: 600 24px/1 var(--display); color: var(--lime); }
.tally .line.miss b { color: var(--amber); }
.motion .tally .line { animation: tallyIn .35s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes tallyIn { from { opacity: 0; transform: translateX(-30px); } }
.tally .go { margin-top: 14px; }

/* results */
.ui-results { display: grid; place-items: center; background: radial-gradient(60% 70% at 50% 45%, rgba(4, 7, 11, .7), rgba(4, 7, 11, .95)); pointer-events: auto; overflow: auto; }
.results { width: min(620px, 92vw); text-align: center; }
.results .done { font: 700 14px var(--hud); letter-spacing: .4em; color: var(--muted); }
.grade-row { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 6px 0 12px; }
.grade {
  width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center;
  font: 700 96px/1 var(--display); color: var(--deep); background: var(--lime); box-shadow: 0 0 40px var(--lime-glow), inset 0 -8px 0 rgba(0, 0, 0, .2);
}
.motion .grade { animation: gradeIn .6s cubic-bezier(.2, 1.6, .4, 1) .9s both; }
@keyframes gradeIn { from { transform: scale(0) rotate(-30deg); } }
.total { font: 700 92px/.85 var(--display); color: #fff; }
.total small { font-size: 32px; color: var(--muted); }
.bars { text-align: left; margin: 6px auto 14px; width: min(460px, 100%); }
.bar { display: grid; grid-template-columns: 150px 1fr 54px; gap: 10px; align-items: center; margin: 7px 0; font-size: 13px; letter-spacing: .08em; }
.bar .track { height: 10px; background: rgba(255, 255, 255, .08); }
.bar .fill { height: 100%; background: var(--lime); box-shadow: 0 0 10px var(--lime-glow); width: var(--w); }
.motion .bar .fill { animation: fill .9s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes fill { from { width: 0; } }
.bar b { text-align: right; font: 600 20px/1 var(--display); }
.medals { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.medal { padding: 6px 12px; font: 700 12px var(--hud); letter-spacing: .12em; text-transform: uppercase; border: 2px solid var(--lime); color: var(--lime); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); background: rgba(5, 10, 16, .8); }
.medal.off { border-color: #33465c; color: #4f6276; }
.motion .medal:not(.off) { animation: medal .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes medal { from { opacity: 0; transform: scale(.4); } }
.quote { color: #6fd0ff; font-style: italic; margin: 6px 0; }
.cta { pointer-events: auto; display: inline-block; margin-top: 10px; font-size: 12px; letter-spacing: .14em; color: var(--muted); text-decoration: none; border-bottom: 1px solid #3a516d; }
.results .fine { font-size: 11px; color: #5d6f82; margin-top: 10px; }

/* pause menu */
.ui-pause { display: grid; place-items: center; background: rgba(4, 7, 11, .78); pointer-events: auto; }
.pause-menu { width: min(380px, 86vw); display: flex; flex-direction: column; gap: 8px; }
.pause-menu h2 { margin: 0 0 8px; font: 700 64px/.9 var(--display); text-align: center; letter-spacing: .08em; }
.pause-menu .choice { font: 600 26px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; padding: 12px 16px 10px; }
.pause-menu .legend { justify-content: center; gap: 18px; }

/* touch pad: only on touch screens */
.touch-pad { display: none; }
.touch .touch-pad { display: block; }
.touch-pad .pad-left { position: absolute; z-index: 7; left: 14px; bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.pad {
  width: 74px; height: 74px; border-radius: 50%; border: 2px solid rgba(183, 245, 52, .7); cursor: pointer;
  background: rgba(5, 12, 20, .62); color: var(--lime); font: 700 26px var(--hud);
  touch-action: none; -webkit-touch-callout: none; backdrop-filter: blur(4px);
}
.pad.act { position: absolute; z-index: 7; right: 16px; bottom: 22px; width: 96px; height: 96px; font: 700 26px var(--display); letter-spacing: .06em; }
.pad.pressed, .pad.hint { background: var(--lime); color: var(--deep); }
.pad[disabled] { opacity: .3; }
.motion .pad.hint { animation: padPulse 1s ease-in-out infinite; }
@keyframes padPulse { 50% { box-shadow: 0 0 0 10px rgba(183, 245, 52, .18); } }
.touch .hud-gauge { left: 100px; }
.touch .hud-power { left: 100px; }

/* ---------- portrait and small screens ---------- */
@media (orientation: portrait), (max-aspect-ratio: 1/1) {
  .world { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .surface-cell { aspect-ratio: 1400 / 1115; width: 100%; max-height: 46vh; margin-top: 54px; }
  .feed { padding: 6px 10px 112px; }
  .feed-frame { border-radius: 18px; padding: 10px; }
  .feed-frame canvas { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
  .hud-objective { top: 62px; padding: 3px 18px; }
  .hud-objective span { display: none; }
  .hud-objective b { font-size: 18px; }
  .hud-score { top: 10px; }
  .hud-score b { font-size: 26px; }
  .hud-gauge, .hud-power { display: none; }
  .hud-sub { bottom: 132px; font-size: 15px; width: 92%; }
  .coach { bottom: 140px; font-size: 22px; }
  .coach .cap { height: 40px; min-width: 40px; font-size: 22px; }
  .ui-ev .panel, .ui-decide .panel { left: 10px; right: 10px; width: auto; top: 44%; bottom: 10px; transform: none; }
  .ev-title { font-size: 26px; }
  .question { font-size: 15px; }
  .choice { font-size: 14px; padding: 8px 12px; }
  .ui-tally { place-items: end center; padding: 0 0 12vh; background: linear-gradient(0deg, rgba(4, 7, 11, .92), transparent 70%); }
  .grade { width: 96px; height: 96px; font-size: 72px; }
  .total { font-size: 70px; }
  .bar { grid-template-columns: 110px 1fr 48px; font-size: 11px; }
  .title-keys { gap: 12px; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .hud-score { top: 6px; padding: 3px 12px 3px 8px; }
  .hud-score b { font-size: 22px; }
  .hud-objective { top: 6px; padding: 3px 18px; }
  .hud-objective span { display: none; }
  .hud-objective b { font-size: 16px; }
  .hud-pause { width: 36px; height: 36px; top: 6px; }
  .hud-gauge, .hud-power { display: none; }
  .feed { padding: 44px 10px 10px 0; }
  .feed-frame { padding: 8px; border-radius: 14px; }
  .feed-frame canvas { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
  .feed-tag { left: 18px; top: 16px; }
  .hud-sub { font-size: 13px; bottom: 4px; }
  .coach { bottom: 30px; font-size: 18px; padding: 4px 14px 4px 6px; }
  .coach .cap { height: 32px; min-width: 32px; font-size: 18px; }
  .pad { width: 56px; height: 56px; font-size: 20px; }
  .pad.act { width: 72px; height: 72px; font-size: 20px; bottom: 10px; }
  .touch-pad .pad-left { bottom: 8px; gap: 8px; }
  .ui-ev .panel, .ui-decide .panel { top: 42px; bottom: 6px; width: min(400px, 48vw); gap: 6px; }
  .ui-decide .panel { top: 50%; bottom: auto; }
  .ev-title { font-size: 22px; }
  .clip canvas { max-height: 24vh; width: auto; max-width: 100%; margin: 0 auto; }
  .question { font-size: 13px; }
  .choice { font-size: 13px; padding: 6px 10px; }
  .radar { padding: 8px 12px; }
  .radar h2 { font-size: 24px; }
  .map-wrap { width: min(100%, 46vh * 380 / 210); margin: 4px auto; }
  .tabs .choice { font-size: 18px; padding: 6px; }
  .title-logo { width: 56px; }
  .title-name { font-size: 64px; }
  .title-keys { margin: 8px 0 10px; }
  .dialog { bottom: 4%; padding: 10px 16px 28px; }
  .dialog p { font-size: 16px; }
  .results { transform: scale(.66); }
  .tally h2 { font-size: 36px; }
  .tally .line { padding: 4px 2px; font-size: 14px; }
  .pause-menu .choice { font-size: 20px; padding: 8px 12px; }
  .pause-menu h2 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .coach, .coach .cap, .go, .pad.hint, .title-name, .dialog, .choice, .tally .line, .medal, .grade, .bar .fill, .beacon, .hud-power span { animation: none !important; transition: none !important; }
}
.reduced .coach, .reduced .coach .cap, .reduced .go, .reduced .pad.hint { animation: none !important; }
.review-cell { z-index: 2; }
.phase-review .world, .phase-decide .world, .phase-result .world, .phase-reveal .world { visibility: hidden; }
/* the scene must never scroll: clip instead of hidden blocks programmatic scrolling too */
html, body, #app, .stage, .world { overflow: clip; }
/* touch pad only during play; menus are tapped directly */
.touch:not(.playing) .touch-pad { display: none; }
.touch .go b { display: none; }
@media (orientation: portrait), (max-aspect-ratio: 1/1) {
  .touch-pad .pad-left { flex-direction: row; bottom: 18px; }
  .feed { padding-bottom: 104px; }
  .hud-sub { display: none; }
  .coach { bottom: auto; top: calc(54px + min(46vh, 100vw * 1115 / 1400) + 14px); font-size: 20px; }
  .model-note { top: 96px; bottom: auto; left: 10px; right: 10px; font-size: 9px; text-align: center; }
  .results .done { letter-spacing: .2em; font-size: 12px; }
}

/* ---------- site map (MAPPING ART V2 aerial) ---------- */
.ui-map { display: grid; place-items: center; background: rgba(4, 7, 11, .62); }
.sitemap { width: min(1180px, 94vw, calc((100vh - 150px) * 1672 / 941 + 260px)); pointer-events: auto; }
.map-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.map-head h2 { margin: 0; font: 600 40px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; text-shadow: 0 2px 8px #000; }
.map-head .wo { order: 2; font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.map-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 250px;
  background: rgba(5, 12, 20, .94); border: 1px solid rgba(183, 245, 52, .28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.map-wrap { position: relative; width: 100%; aspect-ratio: 1672 / 941; overflow: hidden; }
.map-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: brightness(.8) saturate(.82) contrast(1.04); }
.map-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-overlay .utility { fill: none; stroke: rgba(225, 245, 200, .55); stroke-width: 3; stroke-dasharray: 14 10; }
.map-overlay .dock-label { font: 700 22px 'Chakra Petch', sans-serif; letter-spacing: 3px; fill: #dfe8f0; paint-order: stroke; stroke: rgba(5, 10, 16, .85); stroke-width: 8px; }
.map-overlay .north path { fill: #eef3f8; }
.map-overlay .north text { font: 700 20px 'Chakra Petch', sans-serif; fill: #eef3f8; }
.map-cap { position: absolute; left: 10px; bottom: 8px; font-size: 10px; letter-spacing: .14em; color: #c7d2dc; background: rgba(5, 10, 16, .78); padding: 3px 8px; }
.choice.mk {
  position: absolute; width: 48px; height: 48px; padding: 0; margin: 0; transform: translate(-50%, -50%);
  background: none; clip-path: none; display: grid; place-items: center; z-index: 1;
}
.motion .choice.mk.sel { transform: translate(-50%, -50%); }
.mk i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #f1f6fa; background: rgba(5, 10, 16, .55); box-shadow: 0 0 0 2px rgba(5, 10, 16, .6); }
.mk b {
  position: absolute; top: 40px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font: 700 13px var(--hud); letter-spacing: .08em; color: #eef3f8; background: rgba(5, 10, 16, .86); padding: 2px 7px;
}
.mk.sel i { border-color: var(--lime); background: var(--lime); }
.mk.sel b { color: var(--deep); background: var(--lime); }
.mk.sel::before {
  content: ''; position: absolute; inset: 2px;
  background:
    linear-gradient(var(--lime), var(--lime)) top left / 12px 2px, linear-gradient(var(--lime), var(--lime)) top left / 2px 12px,
    linear-gradient(var(--lime), var(--lime)) top right / 12px 2px, linear-gradient(var(--lime), var(--lime)) top right / 2px 12px,
    linear-gradient(var(--lime), var(--lime)) bottom left / 12px 2px, linear-gradient(var(--lime), var(--lime)) bottom left / 2px 12px,
    linear-gradient(var(--lime), var(--lime)) bottom right / 12px 2px, linear-gradient(var(--lime), var(--lime)) bottom right / 2px 12px;
  background-repeat: no-repeat;
}
.motion .mk.sel::before { animation: reticle 1.6s ease-in-out infinite; }
@keyframes reticle { 50% { opacity: .45; } }
.mk.bad i { border-color: var(--amber); background: var(--amber); }
.mk.bad b { background: var(--amber); color: #1a1000; }
.mk.sel.bad::before { filter: hue-rotate(-60deg); }
.asset-panel { display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 12px; border-left: 1px solid rgba(255, 255, 255, .08); }
.ap-k { font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.ap-id { font: 600 54px/.9 var(--display); color: #fff; }
.ap-where { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.asset-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0 0 8px; font-size: 13px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 10px; }
.asset-panel dt { color: var(--muted); }
.asset-panel dd { margin: 0; text-align: right; }
.asset-panel .legend { margin-top: auto; flex-direction: column; gap: 6px; }
.asset-panel .feedback { font-size: 13px; }
@media (orientation: portrait), (max-aspect-ratio: 1/1) {
  .sitemap { width: 96vw; }
  .map-head h2 { font-size: 30px; }
  .map-head .wo { display: none; }
  .map-body { grid-template-columns: 1fr; }
  .asset-panel { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .08); padding: 10px 12px; }
  .ap-id { font-size: 40px; }
  .asset-panel dl { display: none; }
  .mk b { font-size: 11px; top: 36px; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .map-head { margin-bottom: 2px; }
  .map-head h2 { font-size: 22px; }
  .map-body { grid-template-columns: minmax(0, 1fr) 200px; }
  .asset-panel { padding: 8px 10px; }
  .ap-id { font-size: 34px; }
  .asset-panel dl { font-size: 11px; gap: 3px 8px; padding-top: 6px; }
  .mk b { font-size: 10px; top: 34px; }
}
.phase-asset .hud-objective { display: none; }
@media (orientation: portrait), (max-aspect-ratio: 1/1) { .model-note { top: calc(44% - 22px); } }

/* music credit toast and small credits */
.toast {
  position: absolute; z-index: 9; right: 16px; bottom: 14px; max-width: min(420px, 70vw);
  font: 600 12px var(--hud); letter-spacing: .06em; color: #cfe0ec;
  background: rgba(5, 10, 16, .82); border-left: 2px solid var(--lime); padding: 6px 10px; pointer-events: none;
}
.toast[hidden] { display: none; }
.motion .toast:not([hidden]) { animation: tallyIn .35s cubic-bezier(.2, .9, .2, 1) both; }
.touch.playing .toast { bottom: auto; top: 64px; }
.phase-reveal .toast, .phase-review .toast, .phase-decide .toast, .phase-result .toast { bottom: 46px; }   /* clear of the key hints */
.credits { margin-top: 8px; font-size: 10px; letter-spacing: .06em; color: #5d6f82; }
.pause-menu .credits { text-align: center; }
.results .best { margin: 4px 0; font-size: 14px; }

/* ---------- job board: free choice of manhole, day/night, loadout ---------- */
.mk.done i { border-color: var(--lime); }
.mk b em { font-style: normal; color: var(--lime); margin-left: 3px; }
.mk.sel b em { color: var(--deep); }
.daynight { display: flex; gap: 6px; margin: 4px 0 6px; }
.daynight .choice { flex: 1; width: auto; text-align: center; clip-path: none; font: 600 20px/1 var(--display); letter-spacing: .1em; padding: 7px 6px 5px; }
.daynight .choice.on { background: var(--lime); color: var(--deep); }
.daynight.locked { flex-direction: column; gap: 2px; font-size: 11px; letter-spacing: .14em; color: var(--muted); border: 1px dashed rgba(255, 255, 255, .16); padding: 6px 8px; }
.daynight.locked small { letter-spacing: 0; font-size: 12px; }
.loadout { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 8px; margin-bottom: 6px; }
.kit { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.kit small { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; }
.kit.lr > img { width: 52px; height: 52px; object-fit: contain; flex: none; }
.kit .lr-logo { display: block; height: 20px; width: auto; margin-bottom: 2px; }
.kit.lr.on b::after { content: " \2713"; color: var(--lime); }
.cta.lr-link { color: #ff8a3d; font-size: 12px; }
.asset-panel .go, .reward .go { align-self: stretch; text-align: left; padding: 11px 14px; letter-spacing: .14em; background: rgba(18, 30, 44, .9); border: 2px solid var(--lime); box-shadow: 0 0 18px rgba(183, 245, 52, .22); }
.motion .asset-panel .go, .motion .reward .go { animation: goPulse 1.4s ease-in-out infinite; }
.asset-panel .legend { margin-top: 8px; }

/* x-ray sweep every 5 s: the yard turns skeletal and the pipe network underneath draws in */
.map-wrap .xray { position: absolute; inset: 0; pointer-events: none; }
.map-wrap .xray > img { filter: grayscale(1) brightness(.3) contrast(1.7) sepia(.35) hue-rotate(150deg); }
.xray > img, .xray > .pipes { position: absolute; inset: 0; width: 100%; height: 100%; clip-path: inset(0 100% 0 0); opacity: 0; }
.motion .xray > img, .motion .xray > .pipes { animation: xray 5s linear var(--xray-delay, 0s) infinite; }
@keyframes xray {
  0% { clip-path: inset(0 100% 0 0); opacity: 1; }
  30% { clip-path: inset(0 0 0 0); opacity: 1; }
  62% { clip-path: inset(0 0 0 0); opacity: 1; }
  78%, 100% { clip-path: inset(0 0 0 0); opacity: 0; }
}
.xray .scan { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; opacity: 0; background: var(--lime); box-shadow: 0 0 14px 4px rgba(183, 245, 52, .7), 0 0 60px 18px rgba(183, 245, 52, .25); }
.motion .xray .scan { animation: xscan 5s linear var(--xray-delay, 0s) infinite; }
@keyframes xscan { 0% { left: 0; opacity: 1; } 30% { left: 100%; opacity: 1; } 31%, 100% { left: 100%; opacity: 0; } }
.pipes { filter: drop-shadow(0 0 5px rgba(183, 245, 52, .45)); }
.pipes .p { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.motion .pipes .p { animation: pipeDraw 5s linear var(--xray-delay, 0s) infinite; }
@keyframes pipeDraw { 0%, 6% { stroke-dashoffset: 1; } 40%, 100% { stroke-dashoffset: 0; } }
.pipes .san { stroke: #b7f534; stroke-width: 7; }
.pipes .stm { stroke: #3fd6c6; stroke-width: 6; }
.pipes .wat { stroke: #4aa3ff; stroke-width: 5; }
.pipes .gas { stroke: #ffd23f; stroke-width: 3; }
.pipes .flow { fill: none; stroke: #f0ffd8; stroke-width: 3; }
.pipes .node { fill: #07140c; stroke: #b7f534; stroke-width: 3; }
.pipes .cb { fill: #061416; stroke: #3fd6c6; stroke-width: 3; }
.pipes .lbl { font: 700 15px "Chakra Petch", sans-serif; letter-spacing: 2px; paint-order: stroke; stroke: #03080c; stroke-width: 5px; }
.pipes .lbl.san { fill: #d6ff8a; }
.pipes .lbl.stm { fill: #8ff0e6; }
.pipes .lbl.wat { fill: #9cc9ff; }
.pipes .lbl.gas { fill: #ffe27a; }
.reduced .xray { display: none; }

/* the service van and the drive between manholes */
.van { position: absolute; z-index: 2; width: 3.4%; aspect-ratio: 2; transform: translate(-50%, -50%) rotate(-90deg); pointer-events: none; }
.van svg { width: 100%; height: 100%; overflow: visible; display: block; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .7)); }
.van .body { fill: #13294b; stroke: #dfe8f0; stroke-width: 1.2; }
.van .glass { fill: #8fb8d8; }
.van .stripe { fill: var(--lime); }
.van .bar { fill: #ffcf4a; }
.van .beam { fill: rgba(255, 244, 210, .3); opacity: 0; }
.ui-map.night .van .beam { opacity: 1; }
.route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.route path { fill: none; stroke: var(--lime); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 8px rgba(183, 245, 52, .9)); }
.ui-map.traveling .asset-panel { opacity: 0; transform: translateX(24px); transition: opacity .35s, transform .35s; pointer-events: none; }
.ui-map.traveling .xray > img, .ui-map.traveling .xray > .pipes { animation: none; clip-path: none; opacity: .55; }
.ui-map.traveling .pipes .p { animation: none; stroke-dashoffset: 0; }
.ui-map.traveling .xray .scan { display: none; }
.map-zoom { position: absolute; inset: 0; }
.ui-map.traveling .map-zoom { transform-origin: var(--tx) var(--ty); }
.motion .ui-map.traveling .map-zoom { animation: travelZoom 3.2s ease-in-out forwards; }
@keyframes travelZoom { from { transform: scale(1); } to { transform: scale(1.32); } }
.ui-map.arrived .mk.sel i { box-shadow: 0 0 0 7px rgba(183, 245, 52, .35), 0 0 26px 6px var(--lime); }
.motion .ui-map.arrived .mk.sel::before { animation: lockOn .45s ease-out both; }
@keyframes lockOn { from { transform: scale(2.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.motion .ui-map.dive .map-zoom { animation: dive .65s ease-in forwards; }
@keyframes dive { from { transform: scale(1.32); } to { transform: scale(9); opacity: 0; filter: blur(10px) brightness(1.8); } }
.motion .ui-map.dive { animation: diveOut .65s ease-in forwards; }
@keyframes diveOut { 60% { opacity: 1; } to { opacity: 0; } }
.ui-map.dive::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, rgba(220, 255, 160, .55), transparent 55%); opacity: 0; }
.motion .ui-map.dive::after { animation: flash .65s ease-out; }
@keyframes flash { 30% { opacity: 1; } to { opacity: 0; } }
/* night on the board: the yard goes dark, the van runs with headlights */
.ui-map.night .map-zoom > img { filter: brightness(.34) saturate(.55) hue-rotate(185deg); }

/* ---------- Light Ring equipment reward ---------- */
.ui-reward { display: grid; place-items: center; background: radial-gradient(circle at 50% 46%, #3a1c0a, #05080c 62%); pointer-events: auto; }
.reward { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: min(560px, 92vw); text-align: center; }
.rw-glow { position: absolute; left: 50%; top: 48%; width: 520px; height: 520px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 140, 50, .35), transparent 65%); pointer-events: none; }
.rw-logo { height: 66px; width: auto; }
.rw-kicker { font-size: 12px; letter-spacing: .32em; color: var(--lime); text-shadow: 0 0 10px var(--lime-glow); }
.reward h2 { margin: 0; font: 600 72px/.9 var(--display); letter-spacing: .04em; text-transform: uppercase; text-shadow: 0 4px 18px #000; }
.rw-prop { width: min(380px, 72vw); height: auto; aspect-ratio: 1206 / 864; object-fit: cover; filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .65)); }   /* GPT's render, its empty margins cropped */
.rw-line { margin: 0; font: 600 22px var(--hud); }
.rw-fine { margin: 0 0 8px; font-size: 12px; color: var(--muted); max-width: 440px; }
.reward .go { align-self: center; text-align: center; min-width: 260px; }
.motion .rw-prop { animation: rwProp .7s cubic-bezier(.2, .9, .2, 1.15) both .15s; }
@keyframes rwProp { from { transform: translateY(40px) scale(.7); opacity: 0; } }
.motion .reward h2, .motion .rw-logo { animation: tallyIn .45s cubic-bezier(.2, .9, .2, 1) both; }
.motion .rw-glow { animation: rwGlow 2.4s ease-in-out infinite; }
@keyframes rwGlow { 50% { opacity: .55; transform: translate(-50%, -50%) scale(1.08); } }
.ctas { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
@media (max-height: 560px) { .reward h2 { font-size: 46px; } .rw-prop { width: min(240px, 40vw); } .rw-logo { height: 44px; } }
/* short landscape screens: ring on the left, text and EQUIP on the right */
@media (max-height: 460px) {
  .reward { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); column-gap: 18px; row-gap: 2px; align-items: center; text-align: left; width: min(760px, 94vw); }
  .reward .rw-prop { grid-column: 1; grid-row: 1 / span 6; width: 100%; }
  .reward > :not(.rw-prop):not(.rw-glow) { grid-column: 2; justify-self: start; }
  .reward .go { justify-self: stretch; min-width: 0; }
  .reward h2 { font-size: 40px; }
  .rw-logo { height: 34px; }
}

/* ---------- Light Ring V2 on the surface: placed by js/ring.js, base fixed, lid swings shut ---------- */
.surface-stage .ring-l, .surface-stage .ring-glow { display: none; }
.ring .surface-stage .ring-l:not([hidden]), .ring .surface-stage .ring-glow { display: block; }
.surface-stage img.ring-l { height: auto; }
.surface-stage img#ringLid, .surface-stage img#ringLidBack { will-change: transform, opacity; }
/* light pool over the ring once it is on (about 400 ms), stronger at night */
.surface-stage .ring-glow {
  position: absolute;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 246, 222, .55), rgba(255, 236, 200, .16) 46%, transparent 70%);
  mix-blend-mode: screen; opacity: 0; pointer-events: none;
}
.ring.lit .surface-stage .ring-glow { opacity: .45; }
.ring.lit.night .surface-stage .ring-glow { opacity: 1; }
.motion .surface-stage .ring-glow { transition: opacity .4s ease-out; }
/* night: the surface scene darkens; the orange ring still catches some light */
.night .surface-stage > img, .night .surface-stage > #dynCanvas { filter: brightness(.4) saturate(.65) hue-rotate(8deg); }
.night .surface-stage > img.ring-l { filter: brightness(.6) saturate(.9); }
.night.lit .surface-stage > img.ring-l { filter: brightness(.85); }
.motion .surface-stage > img, .motion .surface-stage > #dynCanvas { transition: filter .4s ease-out; }

/* ---------- the rig decides the surface scene: tripod plate, or the pole plate with GPT's pole poses ---------- */
.surface-stage img.pole-plate { height: auto; display: none; }
.surface-stage img.pole-op { height: auto; }
.rig-mh360 .surface-stage img.pole-plate { display: block; }
.rig-mh360 .surface-stage #plate, .rig-mh360 .surface-stage #occLegs, .rig-mh360 .surface-stage img.operator:not(.pole-op),
.rig-tripod .surface-stage img.pole-op { display: none; }

/* job board on touch and short screens: no keyboard legend on touch, no score on the board, a larger map */
.touch .asset-panel .legend { display: none; }
.phase-asset .hud-score, .phase-travel .hud-score { display: none; }
.asset-panel { overflow: hidden auto; scrollbar-width: none; }
.asset-panel::-webkit-scrollbar { display: none; }
@media (max-height: 460px) {
  .sitemap { width: min(96vw, calc((100vh - 60px) * 1672 / 941 + 230px)); }
  .map-body { grid-template-columns: minmax(0, 1fr) 230px; }
  .map-head { margin-bottom: 4px; }
  .map-head h2 { font-size: 26px; }
  .asset-panel { gap: 2px; padding: 8px 10px; }
  .ap-id { font-size: 38px; }
  .ap-where { font-size: 12px; margin-bottom: 2px; }
  .daynight.locked small, .loadout .kit:not(.lr) { display: none; }
  .daynight .choice { font-size: 17px; padding: 5px; }
  .kit.lr > img { width: 38px; height: 38px; }
  .asset-panel .go { padding: 8px 10px; font-size: 14px; }
  .phase-asset .toast, .phase-travel .toast { bottom: auto; top: 10px; right: 64px; font-size: 10px; padding: 3px 7px; }
}

/* ---------- cinematic beats: establishing push-in on the scene, the board coming in, the slower dive ---------- */
.cine-establish .world { animation: establish 1.25s cubic-bezier(.16, .7, .2, 1) both; transform-origin: 38% 62%; }
@keyframes establish {
  from { transform: scale(1.42) translateY(-5%); filter: blur(9px) brightness(.25) saturate(.6); }
  55% { filter: blur(1px) brightness(.85) saturate(.95); }
  to { transform: none; filter: none; }
}
.motion .ui-map.enter .sitemap { animation: boardIn .8s cubic-bezier(.16, .8, .2, 1) both; }
@keyframes boardIn { from { opacity: 0; transform: scale(1.18); filter: blur(8px); } }
.motion .ui-map.dive .map-zoom { animation: dive 1.25s cubic-bezier(.55, 0, .8, .3) forwards; }
.motion .ui-map.dive { animation: diveOut 1.25s ease-in forwards; }
.motion .ui-map.dive::after { animation: flash 1.25s ease-out; }

/* ---------- rig selection: the same inspector with each rig on a half-ring turntable ---------- */
.ui-select {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; gap: 6px; padding: 16px 16px 14px;
  background: radial-gradient(75% 60% at 50% 66%, #1c2b39 0%, #0a1018 55%, #04070a 100%); pointer-events: auto; overflow: hidden;
}
.sel-head { text-align: center; }
.sel-head .wo { font: 700 12px var(--hud); letter-spacing: .42em; color: var(--lime); }
.sel-head h2 { margin: 2px 0 0; font: 600 clamp(36px, 5vw, 60px)/1 var(--display); letter-spacing: .04em; text-transform: uppercase; text-shadow: 0 4px 18px #000; }
.turntable { position: relative; width: min(1180px, 100%); height: 100%; min-height: 220px; }
.arc { position: absolute; left: 50%; bottom: 3%; width: 94%; height: 30%; transform: translateX(-50%); }
.arc i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(183, 245, 52, .32); box-shadow: 0 0 34px rgba(183, 245, 52, .14), inset 0 0 50px rgba(183, 245, 52, .1); }
.arc i:nth-child(2) { inset: 16% 12%; border-color: rgba(183, 245, 52, .18); box-shadow: none; background: radial-gradient(ellipse at 50% 50%, rgba(183, 245, 52, .12), transparent 70%); }
.arc i:nth-child(3) { border-color: rgba(183, 245, 52, .6); box-shadow: 0 0 22px rgba(183, 245, 52, .3); opacity: 0; }
.motion .arc i:nth-child(3) { animation: arcPulse 2.6s ease-out infinite; }
@keyframes arcPulse { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.08); opacity: 0; } }
.pod {
  position: absolute; left: 50%; bottom: 9%; width: 52%; height: 86%; padding: 0; border: 0; background: none; clip-path: none;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; cursor: pointer;
  transform: translateX(calc(-50% + var(--off) * 74%)) translateY(calc(var(--off) * var(--off) * -9%)) scale(calc(1 - var(--off) * var(--off) * .45));
  filter: brightness(calc(1 - var(--off) * var(--off) * .55)) saturate(calc(1 - var(--off) * var(--off) * .4));
  z-index: calc(2 - var(--off) * var(--off));
}
.motion .pod { transition: transform .65s cubic-bezier(.2, .9, .2, 1), filter .65s, opacity .4s; }
.pod img { width: 100%; height: calc(100% - 44px); object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .7)); }
.pod::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: 38px; height: 22%; border-radius: 50%; background: radial-gradient(ellipse at 50% 60%, rgba(183, 245, 52, .35), transparent 70%); opacity: 0; }
.pod.sel::before { opacity: 1; }
.motion .pod.sel::before { transition: opacity .5s .2s; }
.pod-name { display: flex; flex-direction: column; align-items: center; line-height: 1; margin-top: 4px; }
.pod-name b { font: 600 30px/1 var(--display); letter-spacing: .06em; color: var(--text); }
.pod-name small { font: 700 10px var(--hud); letter-spacing: .24em; color: var(--muted); }
.pod.sel .pod-name b { color: var(--lime); text-shadow: 0 0 18px rgba(183, 245, 52, .5); }
.pod:focus-visible { outline: none; }
.sel-info { width: min(720px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 18px; align-items: center; background: rgba(5, 10, 16, .72); border: 1px solid rgba(183, 245, 52, .25); padding: 10px 14px; }
.sel-name { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sel-name b { font: 600 36px/1 var(--display); letter-spacing: .05em; color: var(--lime); }
.sel-name span { font: 700 12px var(--hud); letter-spacing: .22em; color: var(--muted); }
.sel-info p { margin: 0; font-size: 15px; line-height: 1.35; }
.sel-stats { display: grid; gap: 3px; }
.sel-stats div { display: grid; grid-template-columns: 70px 90px minmax(0, 1fr); gap: 8px; align-items: center; font: 700 11px var(--hud); letter-spacing: .14em; color: var(--muted); }
.sel-stats i { height: 8px; background: linear-gradient(90deg, var(--lime) calc(var(--n) * 20%), rgba(255, 255, 255, .1) 0); }
.sel-stats em { font-style: normal; letter-spacing: .04em; color: var(--text); font-weight: 600; white-space: nowrap; }
.sel-info .go { grid-column: 1 / -1; align-self: stretch; text-align: center; padding: 11px 14px; letter-spacing: .14em; background: rgba(18, 30, 44, .9); border: 2px solid var(--lime); box-shadow: 0 0 18px rgba(183, 245, 52, .22); }
.motion .sel-info .go { animation: goPulse 1.4s ease-in-out infinite; }
.sel-info .legend { grid-column: 1 / -1; justify-content: center; }
.sel-fine { grid-column: 1 / -1; text-align: center; font-size: 11px; color: #6b7c8e; }
.touch .sel-info .legend { display: none; }
/* locked in: the chosen rig flares, the other leaves */
.ui-select.locked .pod.sel { filter: brightness(1.2) drop-shadow(0 0 24px rgba(183, 245, 52, .6)); }
.ui-select.locked .pod:not(.sel) { opacity: 0; }
.motion .ui-select.locked .pod.sel img { animation: lockPop .6s cubic-bezier(.2, .9, .2, 1); }
@keyframes lockPop { 30% { transform: scale(1.06); } }
.ui-select.locked .sel-info .go { background: var(--lime); color: var(--deep); animation: none; }
/* the stage comes in: floor rings sweep up, the pods glide in */
.cine-enter-select .arc { animation: arcIn .9s cubic-bezier(.16, .8, .2, 1) both; }
@keyframes arcIn { from { transform: translateX(-50%) scale(.3); opacity: 0; } }
.cine-enter-select .pod img { animation: podIn .9s cubic-bezier(.16, .8, .2, 1) both; }
.cine-enter-select .pod:not(.sel) img { animation-delay: .15s; }
@keyframes podIn { from { opacity: 0; transform: translateY(18%) scale(.9); } }
.cine-enter-select .sel-info, .cine-enter-select .sel-head { animation: rise .7s .25s cubic-bezier(.2, .9, .2, 1) both; }
@media (orientation: portrait) {
  .turntable { min-height: 240px; }
  .pod { width: 78%; height: 80%; transform: translateX(calc(-50% + var(--off) * 64%)) translateY(calc(var(--off) * var(--off) * -12%)) scale(calc(1 - var(--off) * var(--off) * .55)); }
  .sel-info { grid-template-columns: minmax(0, 1fr); padding: 8px 12px; }
  .sel-name b { font-size: 30px; }
  .sel-info p { font-size: 14px; }
}
@media (max-height: 520px) {
  .ui-select { padding: 8px 12px; gap: 2px; }
  .sel-head h2 { font-size: 30px; }
  .sel-head .wo { font-size: 10px; }
  .pod-name b { font-size: 22px; }
  .sel-info { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 6px 10px; gap: 2px 12px; }
  .sel-name b { font-size: 24px; }
  .sel-info p { font-size: 12px; }
  .sel-stats div { grid-template-columns: 58px 70px minmax(0, 1fr); font-size: 9px; }
  .sel-info .go { padding: 7px 10px; font-size: 13px; }
  .sel-fine { display: none; }
}

/* ---------- job board rows: Up and Down pick the row, Left and Right change it ---------- */
.rigrow { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 2px 0 4px; }
.rigrow .choice { width: auto; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 4px 3px; clip-path: none; font: 600 17px/1 var(--display); letter-spacing: .06em; }
.rigrow .choice img { width: 100%; height: 40px; object-fit: contain; object-position: 50% 100%; }
.rigrow .choice.on { background: rgba(183, 245, 52, .16); border-color: var(--lime); color: var(--lime); }
.asset-panel .row.focus, .asset-panel .ap-where.focus { outline: 2px solid var(--lime); outline-offset: 3px; }
.asset-panel .ap-where.focus { color: var(--text); }
@media (max-height: 460px) {
  .rigrow .choice { font-size: 14px; padding: 2px; flex-direction: row; justify-content: center; }
  .rigrow .choice img { width: 30px; height: 22px; }
}
.reduced .pod, .reduced .arc i, .reduced .pod img { animation: none !important; transition: none !important; }
/* the music credit sits top right on the rig selection, clear of the turntable and its button */
.phase-select .toast { bottom: auto; top: 12px; right: 64px; font-size: 10px; padding: 3px 7px; }

/* ---------- Light Ring card: in the game beside the real product (reward, and the board's Light Ring row) ---------- */
.ui-reward.ui-lr { display: flex; overflow-y: auto; padding: 18px 16px; }
.reward.lr-card { margin: auto; display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.5fr); column-gap: 30px; align-items: center; width: min(1040px, 94vw); text-align: left; }
.lr-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.lr-hero .rw-prop { width: 100%; max-width: 360px; }
.lr-body { position: relative; display: flex; flex-direction: column; gap: 10px; }
.lr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lr-cols section { background: rgba(8, 14, 22, .78); border: 1px solid rgba(255, 255, 255, .1); border-top: 3px solid var(--lime); border-radius: 8px; padding: 12px 14px 10px; }
.lr-cols .lr-real { border-top-color: #ff7a1f; }
.lr-cols h3 { margin: 0 0 8px; font: 600 15px var(--hud); letter-spacing: .2em; text-transform: uppercase; color: var(--lime); }
.lr-cols .lr-real h3 { color: #ff9a4d; }
.lr-cols ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.lr-cols li { font-size: 13.5px; line-height: 1.38; color: #dfe8f0; padding-left: 14px; position: relative; }
.lr-cols li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }
.lr-cols .lr-real li::before { background: #ff7a1f; }
.lr-cols li b { color: #fff; }
.lr-note { margin: 8px 0 0; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.lr-body .cta.lr-link { align-self: flex-start; font-size: 13px; }
.lr-body .go { align-self: stretch; text-align: center; min-width: 0; }
.motion .lr-cols section { animation: tallyIn .45s cubic-bezier(.2, .9, .2, 1) both .2s; }
.motion .lr-cols .lr-real { animation-delay: .32s; }
.lr-more { margin-top: 4px; padding: 3px 8px; font: 600 11px var(--hud); letter-spacing: .14em; color: #ff9a4d; background: transparent; border: 1px solid rgba(255, 154, 77, .6); border-radius: 4px; }
.lr-more:hover { background: rgba(255, 122, 31, .15); }
.lr-fact { margin: 4px auto 0; max-width: 620px; font-size: 13px; line-height: 1.4; color: #dfe8f0; text-align: center; }
.lr-fact b { color: #ff9a4d; }
@media (max-width: 760px) {
  .reward.lr-card { grid-template-columns: 1fr; row-gap: 10px; }
  .lr-hero .rw-prop { max-width: 240px; }
  .lr-hero h2 { font-size: 48px; }
  .lr-cols { grid-template-columns: 1fr; }
}
@media (max-height: 560px) and (min-width: 761px) {
  .reward.lr-card { column-gap: 18px; }
  .lr-hero h2 { font-size: 40px; }
  .lr-hero .rw-logo { height: 34px; }
  .lr-hero .rw-prop { max-width: 230px; }
  .lr-cols li { font-size: 12px; line-height: 1.3; }
  .lr-cols section { padding: 8px 10px 7px; }
  .lr-cols ul { gap: 4px; }
  .lr-note { font-size: 10.5px; }
}
/* phone landscape: the ring, its button and link on the left, the two lists side by side, all on one screen */
@media (max-height: 460px) {
  .ui-reward.ui-lr { padding: 10px 12px; }
  .reward.lr-card { grid-template-columns: minmax(0, .62fr) minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; row-gap: 6px; align-items: start; width: min(1000px, 97vw); }
  .reward.lr-card > :not(.rw-prop):not(.rw-glow) { justify-self: stretch; }
  .lr-body, .lr-cols { display: contents; }
  .reward.lr-card .lr-hero { grid-column: 1; grid-row: 1; }
  .lr-cols .lr-game { grid-column: 2; grid-row: 1 / span 3; }
  .lr-cols .lr-real { grid-column: 3; grid-row: 1 / span 3; }
  .lr-body .cta.lr-link { grid-column: 1; grid-row: 2; justify-self: center; font-size: 11px; }
  .lr-body .go { grid-column: 1; grid-row: 3; padding: 8px 6px; font-size: 12px; letter-spacing: .08em; }
  .lr-hero h2 { font-size: 30px; }
  .lr-hero .rw-logo { height: 26px; }
  .lr-hero .rw-kicker { font-size: 9px; letter-spacing: .24em; }
  .lr-hero .rw-prop { max-width: 150px; }
  .lr-cols section { padding: 7px 9px 6px; }
  .lr-cols h3 { font-size: 12px; margin-bottom: 5px; }
  .lr-cols li { font-size: 11px; line-height: 1.28; padding-left: 11px; }
  .lr-cols li::before { width: 5px; height: 5px; }
  .lr-cols ul { gap: 3px; }
  .lr-note { font-size: 9.5px; margin-top: 5px; }
}
@media (max-width: 760px) and (min-height: 461px) { .lr-hero .rw-prop { max-width: 200px; } .lr-hero h2 { font-size: 42px; } .lr-hero .rw-logo { height: 44px; } }
.lr-card .rw-glow { width: min(520px, 90vw); height: min(520px, 90vh); }

/* ---------- camera system stats: green bars, each system's edges and what they do in play ---------- */
sup.tm { font-size: .42em; vertical-align: super; line-height: 0; margin-left: 1px; letter-spacing: 0; font-family: var(--hud); font-weight: 700; }
.sel-info { width: min(1000px, 100%); grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 6px 22px; align-items: start; }
.sel-about p { margin: 0 0 6px; font-size: 14px; line-height: 1.35; }
.sel-edges { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.sel-edges li { font-size: 12px; line-height: 1.32; color: #c3cfda; padding-left: 9px; border-left: 2px solid var(--lime); }
.sel-edges li b { font: 700 11px var(--hud); letter-spacing: .14em; color: var(--lime); margin-right: 3px; }
.sel-edges li em { font-style: normal; color: #f2f7ec; }
.sel-bars { display: grid; gap: 5px; align-content: start; padding-top: 2px; }
.bar-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 42px; gap: 8px; align-items: center; font: 700 11px var(--hud); letter-spacing: .14em; color: var(--muted); }
.bar-row i { position: relative; height: 11px; background: rgba(255, 255, 255, .08); border-radius: 2px; overflow: hidden; }
.bar-row i::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 1%); background: linear-gradient(90deg, #3f7a10, #9fd83a); box-shadow: 0 0 10px rgba(183, 245, 52, .3); }
.motion .bar-row i::before { animation: barFill .8s cubic-bezier(.2, .9, .2, 1) both; animation-delay: inherit; }
@keyframes barFill { from { width: 0; } }
.bar-row.lead span { color: var(--text); }
.bar-row.lead i::before { background: linear-gradient(90deg, #5fae16, #d8ff73); box-shadow: 0 0 14px rgba(183, 245, 52, .55); }
.bar-row b { justify-self: start; font: 700 9px var(--hud); letter-spacing: .14em; color: var(--deep); background: var(--lime); padding: 2px 4px 1px; }
.bar-row b:empty { display: none; }
.sel-info .go, .sel-info .legend, .sel-fine { grid-column: 1 / -1; }
.sel-fine { line-height: 1.35; }
@media (orientation: portrait) {
  .turntable { min-height: 190px; }
  .sel-info { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .sel-edges .why, .sel-about p { display: none; }
  .sel-edges li { font-size: 11.5px; }
  .bar-row { grid-template-columns: 88px minmax(0, 1fr) 38px; }
}
@media (max-height: 520px) {
  .sel-info { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3px 12px; width: min(980px, 100%); }
  .sel-about p, .sel-edges .why { display: none; }
  .sel-edges { gap: 2px; }
  .sel-edges li { font-size: 10.5px; line-height: 1.25; padding-left: 6px; }
  .sel-edges li b { font-size: 9px; }
  .sel-bars { gap: 2px; }
  .bar-row { grid-template-columns: 74px minmax(0, 1fr) 32px; font-size: 9px; gap: 6px; }
  .bar-row i { height: 7px; }
  .bar-row b { font-size: 7.5px; padding: 1px 3px 0; }
}

/* ---------- legal notice (pause menu) ---------- */
.legal-card { width: min(760px, 92vw); max-height: 86vh; overflow: auto; gap: 10px; background: rgba(5, 10, 16, .92); border: 1px solid rgba(183, 245, 52, .25); padding: 18px 20px; }
.legal-card h2 { font-size: 40px; }
.legal-card p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #c8d4df; }
.legal-card .choice { align-self: center; min-width: 220px; text-align: center; }
@media (max-height: 520px) { .legal-card h2 { font-size: 26px; } .legal-card p { font-size: 11.5px; line-height: 1.4; } .legal-card { padding: 10px 14px; gap: 6px; } }
.title-foot { line-height: 1.45; }
/* phone landscape: the turntable keeps its room; bars in two columns, the edges shown by their EDGE marks */
@media (max-height: 520px) {
  .ui-select .turntable { min-height: 96px; }
  .sel-info { grid-template-columns: minmax(0, 1fr); padding: 5px 10px; }
  .sel-about { display: none; }
  .sel-bars { grid-template-columns: 1fr 1fr; column-gap: 18px; }
  .sel-name b { font-size: 20px; }
}
@media (max-height: 520px) { .sel-info .go { margin-top: 4px; } }

/* ---------- blueprint behind the SewerAI-inspired model screens: faint, drifting slowly, a slow scan ---------- */
.blueprint { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: .11; }
/* fainter still behind the evidence and decision panels, so the answers stay clean */
.phase-review .blueprint, .phase-decide .blueprint, .phase-result .blueprint { -webkit-mask-image: linear-gradient(90deg, #000 45%, rgba(0, 0, 0, .35) 62%); mask-image: linear-gradient(90deg, #000 45%, rgba(0, 0, 0, .35) 62%); }
.blueprint svg { position: absolute; inset: -5%; width: 110%; height: 110%; }
.blueprint svg * { vector-effect: non-scaling-stroke; }
.blueprint .bp-art, .blueprint .bp-art rect, .blueprint .bp-art path, .blueprint .bp-art circle, .blueprint .bp-art ellipse, .blueprint .bp-art line { fill: none; stroke: #8fd8ff; stroke-width: 1.1; }
.blueprint .bp-art .bp-heavy { stroke-width: 1.8; }
.blueprint .bp-art .bp-thin, .blueprint .bp-art .bp-thin * { stroke-width: .7; }
.blueprint .bp-dash { stroke-dasharray: 5 6; }
.blueprint .bp-art .bp-water { stroke: #5fb8ff; stroke-dasharray: 10 6; }
.blueprint .bp-flow, .blueprint .bp-flow-soft { stroke-dasharray: 7 7; }
.blueprint .bp-grid { fill: none; stroke: #4c90c0; stroke-width: .5; opacity: .35; }
.blueprint .bp-grid2 { fill: none; stroke: #5aa6d8; stroke-width: .9; opacity: .5; }
.blueprint .bp-fill, .blueprint .bp-art .bp-dot { fill: #8fd8ff; stroke: none; }
.blueprint text { fill: #a9e2ff; stroke: none; font: 600 13px var(--hud); letter-spacing: .14em; }
.blueprint .bp-small { font-size: 11px; letter-spacing: .16em; fill: #86c9ee; }
.blueprint .bp-title { font-size: 16px; letter-spacing: .2em; fill: #c6ecff; }
.blueprint::after { content: ""; position: absolute; left: 0; right: 0; top: -30%; height: 26%; background: linear-gradient(180deg, transparent, rgba(143, 216, 255, .16), transparent); }
.motion .blueprint svg { animation: bpDrift 80s ease-in-out infinite alternate; }
@keyframes bpDrift { from { transform: translate(-2%, -1.2%) scale(1); } to { transform: translate(2%, 1.2%) scale(1.05); } }
.motion .blueprint::after { animation: bpScan 16s linear infinite; }
@keyframes bpScan { to { top: 110%; } }
.motion .blueprint .bp-flow { animation: bpFlow 5s linear infinite; }
.motion .blueprint .bp-flow-soft { animation: bpFlow 9s linear infinite reverse; }
@keyframes bpFlow { to { stroke-dashoffset: -140; } }
.motion .blueprint .bp-ring { animation: bpRing 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.motion .blueprint .bp-ring2 { animation-delay: -3.5s; }
@keyframes bpRing { 50% { transform: scale(1.12); opacity: .4; } }
.motion .blueprint .bp-spin { animation: bpSpin 40s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes bpSpin { to { transform: rotate(360deg); } }

/* damage close-ups: a larger panel and clip, with a lit frame (Brian, October 28: more prominent and clear) */
.ui-ev .panel { width: min(580px, 47vw); }
.clip { border: 2px solid rgba(111, 208, 255, .7); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 10px 40px rgba(0, 0, 0, .55), 0 0 34px rgba(111, 208, 255, .22); }
.clip canvas { image-rendering: auto; }
.motion .ui-ev .clip { animation: clipIn .5s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes clipIn { from { transform: scale(.94); opacity: 0; } }
@media (max-height: 460px) { .ui-ev .panel { width: min(460px, 52vw); } .clip canvas { max-height: 34vh; } }

/* ---------- the Light Ring before it is earned: grayed and locked, with what it will give (Brian, October 28) ---------- */
svg.lock { width: 1em; height: 1.15em; vertical-align: -.15em; color: #9aa7b4; }
.daynight.locked span svg.lock { margin-left: 4px; }
.kit.lr.locked { position: relative; border: 1px dashed rgba(255, 255, 255, .2); padding: 6px 8px; background: rgba(255, 255, 255, .03); }
.kit.lr.locked .lr-thumb { position: relative; flex: none; width: 52px; height: 52px; }
.kit.lr.locked .lr-thumb img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) brightness(.55) contrast(.9); }
.kit.lr.locked .lr-thumb svg.lock { position: absolute; left: 50%; top: 50%; width: 22px; height: 26px; transform: translate(-50%, -50%); color: #e6edf3; filter: drop-shadow(0 2px 4px #000); }
.motion .kit.lr.locked .lr-thumb svg.lock { animation: lockNudge 2.8s ease-in-out infinite; }
@keyframes lockNudge { 0%, 80%, 100% { transform: translate(-50%, -50%); } 84% { transform: translate(-50%, -50%) rotate(-12deg); } 88% { transform: translate(-50%, -50%) rotate(10deg); } 92% { transform: translate(-50%, -50%) rotate(-6deg); } }
.kit.lr.locked b { color: #b9c4ce; }
.kit.lr.locked small em { font-style: normal; font-weight: 700; color: #ff9a4d; letter-spacing: .08em; }
@media (max-height: 460px) { .kit.lr.locked .lr-thumb { width: 38px; height: 38px; } .kit.lr.locked small { font-size: 10px; } }

/* HUD chip during the first job: the reward waiting at the end of it */
.hud-unlock { display: none; position: absolute; left: 14px; top: 58px; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; background: linear-gradient(90deg, rgba(5, 10, 16, .82), rgba(5, 10, 16, .3)); border-left: 3px solid #ff7a1f; }
.tease .hud-unlock { display: flex; }
.phase-title .hud-unlock, .phase-select .hud-unlock, .phase-asset .hud-unlock, .phase-travel .hud-unlock, .phase-reward .hud-unlock,
.phase-reveal .hud-unlock, .phase-review .hud-unlock, .phase-decide .hud-unlock, .phase-result .hud-unlock { display: none; }   /* the review screens and results carry their own cues */
.hud-unlock .hu-ring { position: relative; width: 30px; height: 30px; }
.hud-unlock .hu-ring img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) brightness(.6); }
.hud-unlock small { display: block; font: 700 9px var(--hud); letter-spacing: .22em; color: #ff9a4d; }
.hud-unlock b { display: block; font: 600 16px/1 var(--display); letter-spacing: .05em; }
.hud-unlock em { display: block; font: 600 10px var(--hud); font-style: normal; color: var(--muted); letter-spacing: .06em; }
.motion .hud-unlock .hu-ring::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid rgba(255, 122, 31, .5); animation: huPulse 2.4s ease-out infinite; }
@keyframes huPulse { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
@media (max-height: 460px) { .hud-unlock { top: 46px; padding: 2px 8px 2px 4px; } .hud-unlock em { display: none; } .hud-unlock .hu-ring { width: 22px; height: 22px; } .hud-unlock b { font-size: 13px; } }

/* results of the first job: the unlock is on its way */
.unlock-tease { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 auto 6px; padding: 6px 16px; width: fit-content; border: 1px solid rgba(255, 122, 31, .6); background: rgba(255, 122, 31, .1); overflow: hidden; font: 700 12px var(--hud); letter-spacing: .22em; color: #ffb27a; }
.unlock-tease b { font: 600 22px/1 var(--display); letter-spacing: .05em; color: #fff; }
.unlock-tease svg.lock { color: #ffb27a; }
.unlock-tease i { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #ff7a1f; transform-origin: left; }
.motion .unlock-tease i { animation: teaseBar 2.4s linear both; }
@keyframes teaseBar { from { transform: scaleX(0); } }
.motion .unlock-tease { animation: teasePulse 1.2s ease-in-out infinite; }
@keyframes teasePulse { 50% { box-shadow: 0 0 26px rgba(255, 122, 31, .45); } }

/* ---------- the unlock ceremony (about 3 s): charge, rattle, the lock springs off, the ring lights, the title slams ---------- */
.ceremony { display: none; }
.motion .ui-lr.ceremony-on .ceremony { position: absolute; inset: 0; z-index: 3; display: grid; grid-template: 100% / 100%; overflow: hidden; place-items: center; cursor: pointer; background: radial-gradient(circle at 50% 50%, rgba(40, 18, 6, .6), #030508 70%); animation: cerOut .45s ease-in 2.75s forwards; }
.ui-lr.skip .ceremony { display: none !important; }
@keyframes cerOut { to { opacity: 0; visibility: hidden; } }
.ceremony > * { grid-area: 1 / 1; }
.cer-rays { width: min(110vmin, 1100px); aspect-ratio: 1; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 170, 80, .22) 0 6deg, transparent 6deg 18deg); -webkit-mask-image: radial-gradient(circle, #000 15%, transparent 68%); mask-image: radial-gradient(circle, #000 15%, transparent 68%); opacity: 0; animation: cerRays 1s ease-out 1.25s forwards, cerSpin 18s linear 1.25s infinite; }
@keyframes cerRays { to { opacity: 1; } }
@keyframes cerSpin { to { rotate: 360deg; } }
.cer-charge { width: min(58vmin, 520px); aspect-ratio: 1; transform: rotate(-90deg); }
.cer-charge circle { fill: none; stroke: #ff8a2b; stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 10px rgba(255, 138, 43, .9)); animation: cerCharge 1s cubic-bezier(.6, 0, .4, 1) .1s forwards, cerFade .4s ease-out 1.25s forwards; }
@keyframes cerCharge { to { stroke-dashoffset: 0; } }
@keyframes cerFade { to { opacity: 0; } }
.cer-ring { width: min(46vmin, 420px); height: auto; aspect-ratio: 1206 / 864; object-fit: cover; filter: grayscale(1) brightness(.35); animation: cerRing .8s cubic-bezier(.2, .9, .2, 1.2) 1.25s forwards; }
@keyframes cerRing { 0% { filter: grayscale(1) brightness(1.8); transform: scale(.92); } 60% { transform: scale(1.06); } to { filter: grayscale(0) brightness(1) drop-shadow(0 0 40px rgba(255, 140, 50, .55)); transform: scale(1); } }
.cer-lock { color: #f1f5f8; font-size: min(14vmin, 110px); filter: drop-shadow(0 6px 18px #000); animation: cerShake .25s linear 1s 1, cerPop .5s cubic-bezier(.3, 0, .8, .2) 1.25s forwards; }
.cer-lock svg.lock { color: inherit; }
.cer-lock .shackle { transform-box: fill-box; transform-origin: 100% 100%; animation: cerShackle .18s ease-out 1.2s forwards; }
@keyframes cerShake { 20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
@keyframes cerShackle { to { transform: translateY(-3px) rotate(28deg); } }
@keyframes cerPop { 0% { transform: none; opacity: 1; } to { transform: translateY(-38vmin) rotate(-30deg) scale(.6); opacity: 0; } }
.cer-sparks { position: relative; width: 2px; height: 2px; }
.cer-sparks i { position: absolute; left: 0; top: 0; width: 6px; height: 34px; margin: -17px 0 0 -3px; border-radius: 3px; background: linear-gradient(#fff, #ff9a3c); opacity: 0; transform: rotate(var(--a)) translateY(0); animation: cerSpark .7s cubic-bezier(.1, .7, .3, 1) calc(1.25s + var(--d)) forwards; }
@keyframes cerSpark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(-20px) scaleY(.4); } to { opacity: 0; transform: rotate(var(--a)) translateY(-34vmin) scaleY(1); } }
.cer-flash { width: 100%; height: 100%; background: radial-gradient(circle, rgba(255, 245, 220, .95), rgba(255, 180, 90, .4) 40%, transparent 70%); opacity: 0; animation: cerFlash .6s ease-out 1.25s; pointer-events: none; }
@keyframes cerFlash { 0% { opacity: 0; } 15% { opacity: 1; } to { opacity: 0; } }
.cer-title { align-self: end; margin-bottom: 9vh; text-align: center; opacity: 0; animation: cerTitle .5s cubic-bezier(.2, .9, .2, 1.3) 1.55s forwards; }
.cer-title small { display: block; font: 700 13px var(--hud); letter-spacing: .4em; color: var(--lime); text-shadow: 0 0 12px var(--lime-glow); }
.cer-title b { display: block; font: 600 clamp(48px, 9vmin, 96px)/1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: #fff; text-shadow: 0 0 30px rgba(255, 140, 50, .7), 0 4px 18px #000; }
.cer-title span { display: block; margin-top: 4px; font: 700 14px var(--hud); letter-spacing: .3em; color: #ffb27a; }
@keyframes cerTitle { from { opacity: 0; transform: scale(1.7); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.cer-skip { align-self: end; margin-bottom: 2.5vh; font: 700 10px var(--hud); letter-spacing: .3em; color: rgba(255, 255, 255, .45); }
.motion .ui-lr.ceremony-on:not(.skip) .lr-card { animation: cerCard .6s cubic-bezier(.2, .9, .2, 1) 2.85s both; }
@keyframes cerCard { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.motion .ui-lr.ceremony-on:not(.skip) { animation: cerQuake .35s linear 1.25s 1; }
@keyframes cerQuake { 20% { transform: translate(6px, -4px); } 40% { transform: translate(-5px, 3px); } 60% { transform: translate(4px, 2px); } 80% { transform: translate(-2px, -2px); } }
@media (max-height: 460px) { .cer-title { margin-bottom: 5vh; } .cer-title b { font-size: 40px; } .cer-title small, .cer-title span { font-size: 10px; } }
@media (max-height: 460px) { .cer-title { margin-bottom: 6vh; } .cer-skip { align-self: start; margin: 3vh 0 0; } }

/* ---------- evidence detail stills (GPT DAMAGE HD V2): a square close-up beside the question ---------- */
.ev-qa { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ui-ev .panel.has-detail { width: min(1060px, 60vw); }
.has-detail .ev-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ev-body { display: flex; flex-direction: column; gap: 10px; }
.detail { position: relative; margin: 0; width: min(100%, calc(100vh - 200px)); aspect-ratio: 1 / 1; justify-self: center; border: 2px solid rgba(111, 208, 255, .75); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 12px 40px rgba(0, 0, 0, .6), 0 0 34px rgba(111, 208, 255, .22); background: #05080c; overflow: hidden; }
.detail img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; user-select: none; }
.detail .clip-tag { background: rgba(10, 60, 90, .9); }
.detail figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 10px 6px; font: 600 11px var(--hud); letter-spacing: .04em; color: #d6e4ef; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .78)); }
.detail-scan { position: absolute; left: 0; right: 0; top: -12%; height: 12%; background: linear-gradient(180deg, transparent, rgba(143, 216, 255, .55), transparent); opacity: 0; pointer-events: none; }
/* opening a spot: the panel cuts to the detail view with an iris, a flash and one scan pass (no zoom from the chamber) */
.motion .detail.enter { animation: detailFrame .5s cubic-bezier(.2, .9, .2, 1) both; }
.motion .detail.enter img { animation: detailIris .75s cubic-bezier(.2, .9, .2, 1) .08s both; }
.motion .detail.enter .detail-scan { animation: detailScan .9s ease-in-out .35s 1 both; }
.motion .detail.enter .clip-tag, .motion .detail.enter figcaption { animation: detailLabel .4s ease-out .55s both; }
@keyframes detailFrame { from { opacity: 0; transform: translateY(10px); } }
@keyframes detailIris { from { clip-path: circle(4% at 50% 50%); filter: brightness(2.2) saturate(.3); } 70% { filter: brightness(1.15); } to { clip-path: circle(75% at 50% 50%); filter: none; } }
@keyframes detailScan { 0% { top: -12%; opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes detailLabel { from { opacity: 0; transform: translateY(6px); } }
@media (orientation: portrait) {
  .has-detail .ev-body { grid-template-columns: minmax(0, 1fr); }
  .detail { width: min(100%, 34vh); }
}
@media (max-height: 460px) {
  .ui-ev .panel.has-detail { width: min(680px, 64vw); }
  .has-detail .ev-body { gap: 10px; }
  .detail { width: min(100%, calc(100vh - 110px)); }
  .detail figcaption { font-size: 9px; padding: 10px 6px 4px; }
  .ev-qa { gap: 6px; }
}
@media (orientation: portrait) { .ui-ev .panel.has-detail { width: auto; } }

/* ---------- Start over (pause menu): asks first, Cancel selected ---------- */
.legal-card.startover-card { width: min(520px, 92vw); }
.startover-card .choice { align-self: stretch; }

/* ---------- October 28 (latest): sites, stars, the shift, the findings report and the new-site unlock ---------- */
/* site tabs on the job board: the open site lit, a locked one dashed with its padlock and what opens it */
.map-head { flex-wrap: wrap; row-gap: 6px; }
.sites { display: flex; gap: 6px; margin-left: auto; order: 3; align-self: center; }
.sites .choice.site-tab { width: auto; clip-path: none; padding: 5px 12px 4px; text-align: left; font: 600 21px/1 var(--display); letter-spacing: .06em; border: 1px solid rgba(255, 255, 255, .14); }
.site-tab small { font: 700 10px/1.2 var(--hud); letter-spacing: .12em; margin-top: 2px; }
.site-tab.on { background: var(--lime); color: var(--deep); border-color: var(--lime); }
.site-tab.on small { color: var(--deep); }
.site-tab.locked { background: rgba(8, 14, 22, .92); color: #8494a5; border-style: dashed; }
.site-tab.locked small { color: #8a97a5; }
.site-tab.locked svg.lock { width: 9px; height: 11px; margin-right: 3px; vertical-align: -1px; }
.motion .choice.site-tab { transform: none; }
.motion .site-tab.nope { animation: shake .36s; }
.sites.focus { outline: 2px solid var(--lime); outline-offset: 3px; }
@media (orientation: portrait), (max-aspect-ratio: 1/1) {
  .sites { margin-left: 0; width: 100%; }
  .sites .choice.site-tab { flex: 1; font-size: 19px; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .sites .choice.site-tab { font-size: 16px; padding: 3px 8px 2px; }
  .site-tab small { font-size: 8px; }
}

/* three stars per manhole: inspected, grade A, night shift */
.stars3 { display: flex; gap: 6px; margin: 2px 0 6px; }
.stars3 .st { display: flex; align-items: center; gap: 4px; font-size: 9px; letter-spacing: .1em; color: #4f6276; }
.stars3 .st i { font-style: normal; font-size: 17px; line-height: 1; color: #33465c; }
.stars3 .st.on { color: var(--muted); }
.stars3 .st.on i { color: var(--amber); text-shadow: 0 0 10px rgba(255, 207, 74, .6); }
.motion .stars3 .st.new i { display: inline-block; animation: starNew .8s cubic-bezier(.2, 1.6, .4, 1) 1.4s both; }
@keyframes starNew { from { transform: scale(3) rotate(-40deg); opacity: 0; } }
.results .stars3 { justify-content: center; margin: 0 0 6px; }
.results .stars3 .st { font-size: 11px; }
.results .stars3 .st i { font-size: 24px; }
.world-line { font: 700 11px var(--hud); letter-spacing: .16em; color: #b9c7d4; margin: 0 0 8px; }
@media (max-height: 460px) { .stars3 { margin: 0 0 2px; } .stars3 .st small { display: none; } }

/* the shift: day standard, night hard, with what that means under it */
.shift { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px; }
.shift .daynight { margin: 0; }
.daynight .choice small { display: block; font: 700 9px var(--hud); letter-spacing: .18em; margin-top: 1px; }
.daynight .choice.on small { color: var(--deep); }
.shift-why { margin: 2px 0 0; font-size: 11px; line-height: 1.3; color: var(--muted); }
.shift-why b { color: var(--text); }
@media (max-height: 460px) { .shift-why { display: none; } .daynight .choice small { font-size: 7px; } }

/* ---------- findings report: a MACP-style sheet, filled in line by line, then stamped ---------- */
.ui-report { display: grid; place-items: center; overflow: hidden auto; padding: 16px; pointer-events: auto; background: radial-gradient(70% 80% at 50% 40%, rgba(8, 18, 30, .86), rgba(3, 6, 10, .97)); scrollbar-width: none; }
.ui-report::-webkit-scrollbar { display: none; }
.rp-sheet { position: relative; width: min(980px, 96vw); padding: 18px 22px 14px; overflow: hidden; border: 1px solid rgba(183, 245, 52, .35); box-shadow: 0 30px 80px rgba(0, 0, 0, .7); background-color: #0a1724; background-image: linear-gradient(rgba(120, 170, 220, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 170, 220, .045) 1px, transparent 1px); background-size: 22px 22px; }
.rp-scan { position: absolute; left: 0; right: 0; top: -10%; height: 70px; pointer-events: none; background: linear-gradient(transparent, rgba(183, 245, 52, .14), transparent); opacity: 0; }
.motion .rp-scan { animation: rpScan 1.8s ease-in .2s 1; }
@keyframes rpScan { 0% { top: -10%; opacity: 1; } 100% { top: 105%; opacity: 0; } }
.rp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 2px solid var(--lime); padding-bottom: 8px; }
.rp-k { display: block; font: 700 11px var(--hud); letter-spacing: .26em; color: var(--lime); }
.rp-head h2 { margin: 2px 0 0; font: 600 46px/.9 var(--display); letter-spacing: .03em; }
.rp-head h2 small { font: 600 16px var(--hud); letter-spacing: .04em; color: var(--muted); margin-left: 8px; }
.rp-logo { height: 44px; width: auto; opacity: .9; }
.rp-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 10px 0; border: 1px solid rgba(255, 255, 255, .1); }
.rp-meta div { padding: 5px 9px; border-right: 1px solid rgba(255, 255, 255, .08); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.rp-meta dt { font: 700 9px var(--hud); letter-spacing: .2em; color: var(--muted); }
.rp-meta dd { margin: 1px 0 0; font: 600 14px var(--hud); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-body { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: start; }
.rp-elev { width: 100%; height: auto; }
.rp-wall { fill: rgba(111, 208, 255, .06); stroke: #8fd3ff; stroke-width: 2; }
.rp-water { stroke: #4aa3ff; stroke-width: 2; stroke-dasharray: 4 3; }
.rp-tick { stroke: #5d6f82; stroke-width: 1.5; }
.rp-ax { font: 700 9px var(--hud); fill: #7d8fa2; }
.rp-ax.l { text-anchor: end; }
.rp-pin path { stroke: var(--lime); stroke-width: 1.5; stroke-dasharray: 3 2; }
.rp-pin circle { fill: var(--lime); stroke: #061016; stroke-width: 2; }
.rp-pin text { font: 800 11px var(--hud); fill: #061016; text-anchor: middle; }
.rp-pin.note circle { fill: #9aa7b4; }
.rp-pin.note path { stroke: #9aa7b4; }
.motion .rp-pin { animation: rpPin .4s cubic-bezier(.2, 1.6, .4, 1) both; transform-box: fill-box; transform-origin: center; }
@keyframes rpPin { from { opacity: 0; transform: scale(.2); } }
.rp-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rp-row { position: relative; display: grid; grid-template-columns: 128px 30px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px; background: rgba(5, 12, 20, .78); border-left: 3px solid #ff8a3d; }
.rp-row.note { border-left-color: #9aa7b4; }
.motion .rp-row, .motion .rp-next { animation: rpRow .45s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes rpRow { from { opacity: 0; transform: translateX(-26px); clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.rp-row canvas { width: 128px; height: 96px; display: block; border: 1px solid rgba(111, 208, 255, .35); background: #000; }
.rp-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lime); color: #061016; font: 800 15px var(--hud); }
.rp-row.note .rp-n { background: #9aa7b4; }
.rp-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rp-top b { font: 600 24px/1 var(--display); letter-spacing: .05em; }
.rp-top span { font-size: 12px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.rp-status { margin-left: auto; font: 700 10px var(--hud); font-style: normal; letter-spacing: .16em; padding: 2px 7px; background: rgba(255, 138, 61, .16); color: #ffb27a; border: 1px solid rgba(255, 138, 61, .5); }
.rp-row.note .rp-status { background: rgba(154, 167, 180, .12); color: #c7d2dc; border-color: rgba(154, 167, 180, .4); }
.rp-main p { margin: 4px 0; font-size: 13px; line-height: 1.35; color: #d7e2ec; }
.rp-call { font: 700 10px var(--hud); letter-spacing: .16em; }
.rp-call.ok { color: var(--lime); }
.rp-call.miss { color: #ffb347; }
.rp-next { margin: 10px 0 0 134px; padding: 8px 12px; border: 1px solid rgba(183, 245, 52, .4); background: rgba(20, 40, 16, .45); }
.rp-next p { margin: 2px 0 3px; font-size: 15px; }
.rp-stamp { position: absolute; right: 34px; top: 92px; display: grid; place-items: center; padding: 6px 18px 4px; border: 4px solid #ff5a3c; color: #ff5a3c; transform: rotate(-12deg); opacity: 0; pointer-events: none; }
.rp-stamp b { font: 700 54px/.9 var(--display); letter-spacing: .12em; }
.rp-stamp small { font: 800 11px var(--hud); letter-spacing: .22em; }
.stamped .rp-stamp { opacity: .92; }
.motion .stamped .rp-stamp { animation: rpStamp .32s cubic-bezier(.3, 0, .2, 1.4) both; }
@keyframes rpStamp { from { opacity: 0; transform: rotate(-12deg) scale(2.6); } to { opacity: .92; transform: rotate(-12deg) scale(1); } }
.motion .stamped .rp-sheet { animation: cerQuake .25s linear 1; }
.rp-foot { margin: 10px 0 8px; font-size: 10px; line-height: 1.4; color: #6e8194; }
.rp-sheet .go { display: block; width: 100%; text-align: center; padding: 11px 14px; letter-spacing: .14em; background: rgba(18, 30, 44, .9); border: 2px solid var(--lime); box-shadow: 0 0 18px rgba(183, 245, 52, .22); }
.motion .rp-sheet .go { animation: goPulse 1.4s ease-in-out infinite; }
@media (orientation: portrait), (max-aspect-ratio: 1/1) {
  .ui-report { place-items: start center; padding: 10px 8px; }
  .rp-sheet { padding: 12px 12px 10px; }
  .rp-head h2 { font-size: 36px; }
  .rp-head h2 small { display: block; margin: 2px 0 0; font-size: 13px; }
  .rp-logo { height: 30px; }
  .rp-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-body { grid-template-columns: 1fr; }
  .rp-elev { display: none; }
  .rp-row { grid-template-columns: 84px minmax(0, 1fr); }
  .rp-row canvas { width: 84px; height: 63px; grid-row: 1 / span 2; }
  .rp-n { position: absolute; left: 2px; top: 2px; width: 22px; height: 22px; font-size: 12px; }
  .rp-top b { font-size: 20px; }
  .rp-status { margin-left: 0; }
  .rp-next { margin-left: 0; }
  .rp-stamp { top: 64px; right: 12px; }
  .rp-stamp b { font-size: 38px; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .ui-report { place-items: start center; padding: 6px; }
  .rp-sheet { padding: 8px 12px; width: min(980px, 98vw); }
  .rp-head h2 { font-size: 30px; }
  .rp-logo { height: 26px; }
  .rp-meta { margin: 5px 0; grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .rp-meta div { padding: 3px 5px; }
  .rp-meta dd { font-size: 11px; }
  .rp-meta dt { font-size: 7px; letter-spacing: .12em; }
  .rp-body { grid-template-columns: 70px minmax(0, 1fr); gap: 8px; }
  .rp-rows { gap: 4px; }
  .rp-row { grid-template-columns: 76px 24px minmax(0, 1fr); padding: 4px; gap: 6px; }
  .rp-row canvas { width: 76px; height: 57px; }
  .rp-n { width: 22px; height: 22px; font-size: 12px; }
  .rp-top b { font-size: 18px; }
  .rp-main p { font-size: 11px; margin: 2px 0; }
  .rp-next { margin: 6px 0 0 78px; padding: 4px 8px; }
  .rp-next p { font-size: 12px; }
  .rp-foot { margin: 5px 0; font-size: 8px; }
  .rp-sheet .go { padding: 7px; font-size: 13px; }
  .rp-stamp { top: 40px; }
  .rp-stamp b { font-size: 34px; }
}

/* ---------- new site unlocked: the lock flies, the aerial sweeps in with its covers pinging, then the card ---------- */
.ui-world { background: radial-gradient(circle at 50% 46%, #10301a, #05080c 62%); }
.motion .ui-world.ceremony-on .ceremony { position: absolute; inset: 0; z-index: 3; display: grid; grid-template: 100% / 100%; overflow: hidden; place-items: center; cursor: pointer; background: radial-gradient(circle at 50% 50%, rgba(10, 30, 14, .7), #030508 70%); animation: cerOut .45s ease-in 2.75s forwards; }
.ui-world.skip .ceremony { display: none !important; }
.motion .ui-world.ceremony-on:not(.skip) .wu-card { animation: cerCard .6s cubic-bezier(.2, .9, .2, 1) 2.85s both; }
.motion .ui-world.ceremony-on:not(.skip) { animation: cerQuake .35s linear 1.25s 1; }
.wu-cer .cer-rays { background: repeating-conic-gradient(rgba(183, 245, 52, .2) 0 6deg, transparent 6deg 18deg); }
.wu-map { position: relative; width: min(70vmin, 640px); aspect-ratio: 1672 / 941; opacity: 0; border: 2px solid var(--lime); box-shadow: 0 0 40px rgba(183, 245, 52, .4); animation: wuMap .8s cubic-bezier(.2, .9, .2, 1.1) 1.25s forwards; }
.wu-map img { width: 100%; height: 100%; display: block; filter: brightness(.75) saturate(.8); }
.wu-scan { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--lime); box-shadow: 0 0 14px 4px rgba(183, 245, 52, .7); opacity: 0; animation: wuScan 1s linear 1.35s forwards; }
.wu-pin { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--lime); opacity: 0; animation: wuPin 1.2s ease-out both; }
@keyframes wuMap { from { opacity: 0; transform: scale(.6) rotate(-4deg); filter: brightness(2.5) blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes wuScan { 0% { left: 0; opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes wuPin { 0% { opacity: 0; transform: scale(.2); } 30% { opacity: 1; transform: scale(1.3); box-shadow: 0 0 0 0 rgba(183, 245, 52, .8); } 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 22px rgba(183, 245, 52, 0); } }
.wu-cer .cer-title { margin-bottom: 7vh; }
.wu-cer .cer-title b { text-shadow: 0 0 30px rgba(183, 245, 52, .6), 0 4px 18px #000; }
.wu-cer .cer-title span { color: var(--lime); }
.reward.wu-card { width: min(720px, 94vw); gap: 6px; }
.wu-shot { position: relative; width: 100%; aspect-ratio: 1672 / 941; border: 1px solid rgba(183, 245, 52, .45); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); }
.wu-shot img { width: 100%; height: 100%; display: block; filter: brightness(.82) saturate(.85); }
.wu-tag { position: absolute; transform: translate(-50%, -7px); display: grid; justify-items: center; gap: 3px; font: 700 12px var(--hud); letter-spacing: .08em; color: #eef3f8; }
.wu-tag i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; background: var(--lime); }
.wu-card p { margin: 2px 0; font-size: 14px; }
.wu-card p b { color: var(--lime); }
.wu-card p.wu-note { color: var(--muted); font-size: 12px; }
.wu-card .next-opts { display: flex; gap: 8px; width: 100%; margin-top: 4px; }
.wu-card .next-opts .choice { flex: 1; text-align: center; clip-path: none; font: 600 22px/1 var(--display); letter-spacing: .08em; padding: 10px 8px 8px; }
.motion .wu-card .next-opts .choice.sel { transform: none; }
@media (max-height: 460px) {
  .reward.wu-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; text-align: left; align-items: center; }
  .wu-card .wu-shot { grid-column: 1; grid-row: 1 / span 5; }
  .wu-card > :not(.wu-shot) { grid-column: 2; }
  .reward.wu-card h2 { font-size: 38px; }
  .wu-card .next-opts .choice { font-size: 17px; padding: 7px 6px 5px; }
}

/* board: a little wider so the map is as tall as the panel; the keys and the star key sit in a strip under the map */
.sitemap { width: min(1260px, 94vw, calc((100vh - 170px) * 1672 / 941 + 260px)); }
.map-col { display: flex; flex-direction: column; min-width: 0; }
.map-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 7px 12px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.map-foot .legend { margin: 0; gap: 14px; }
.mf-stars { color: #b9c7d4; }
.touch .map-foot .legend { display: none; }
@media (max-height: 460px) { .map-foot { padding: 3px 8px; font-size: 9px; } .map-foot .legend { display: none; } }
/* the report's stamp lands on the empty right of the next-step box, clear of the header */
.rp-stamp { top: auto; bottom: 86px; right: 40px; }
@media (orientation: portrait), (max-aspect-ratio: 1/1) { .rp-stamp { top: auto; bottom: 96px; right: 14px; } }
@media (max-height: 460px) and (orientation: landscape) { .rp-stamp { top: auto; bottom: 52px; right: 24px; } }
.phase-report .toast { top: auto; bottom: 6px; left: 6px; right: auto; font-size: 10px; padding: 3px 7px; }

/* phones: the board fits; START stays pinned in reach while the panel or the board scrolls */
.asset-panel .go { position: sticky; bottom: 0; z-index: 2; }
@media (max-height: 460px) and (orientation: landscape) {
  .sitemap { width: min(96vw, calc((100vh - 52px) * 1672 / 941 + 230px)); }
  .map-head { flex-wrap: nowrap; align-items: center; margin-bottom: 4px; }
  .map-head .wo { display: none; }
  .sites { margin-left: auto; }
  .sites .choice.site-tab { font-size: 15px; padding: 2px 8px 1px; }
  .site-tab small { font-size: 7px; letter-spacing: .08em; }
  .map-foot { display: none; }
  .asset-panel { height: 0; min-height: 100%; }
  .phase-asset .toast, .phase-travel .toast { top: auto; bottom: 6px; left: 8px; right: auto; }
}
@media (orientation: portrait), (max-aspect-ratio: 1/1) {
  .ui-map { place-items: start center; overflow: hidden auto; padding: 8px 0 12px; pointer-events: auto; scrollbar-width: none; }
  .ui-map::-webkit-scrollbar { display: none; }
  .map-head h2 { font-size: 26px; }
  .asset-panel { overflow: visible; }
  .asset-panel .go { bottom: 10px; box-shadow: 0 0 0 6px rgba(5, 12, 20, .95), 0 0 18px rgba(183, 245, 52, .22); }
  .phase-asset .toast { top: 6px; bottom: auto; right: 66px; max-width: calc(100vw - 80px); font-size: 10px; padding: 3px 7px; }
}

/* ---------- loading screen: the camera goes down into a manhole while the sonar pings; real progress from main.js ---------- */
#loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: radial-gradient(70% 60% at 50% 42%, #10233a, #04070b 72%); color: #eef3f8; font: 600 14px/1.3 var(--hud); transition: opacity .5s ease, visibility .5s ease; }
#loader.done { opacity: 0; visibility: hidden; }
.ld { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(520px, 92vw); text-align: center; }
.ld-logo { width: 84px; height: auto; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .6)); }
.ld-kicker { font-size: 11px; letter-spacing: .4em; color: var(--muted); }
.ld-title { font: 600 clamp(40px, 9vw, 72px)/.9 var(--display); letter-spacing: .04em; color: #fff; text-shadow: 0 0 24px rgba(183, 245, 52, .25); }
.ld-title em { font-style: normal; color: var(--lime); }
.ld-hole { position: relative; width: 190px; height: 132px; margin: 6px 0 2px; }
.ld-hole > i { position: absolute; display: block; }
.ld-pit { left: 20px; right: 20px; bottom: 6px; height: 46px; border-radius: 50%; background: radial-gradient(ellipse at 50% 35%, #2a2f35, #050708 70%); box-shadow: inset 0 8px 14px rgba(0, 0, 0, .9); }
.ld-rim { left: 14px; right: 14px; bottom: 0; height: 58px; border-radius: 50%; border: 7px solid #7a4a2c; border-top-color: transparent; border-left-color: #6a3f25; border-right-color: #6a3f25; box-shadow: 0 6px 10px rgba(0, 0, 0, .5); }
.ld-cable { left: 50%; top: 0; width: 3px; height: 50px; margin-left: -1.5px; background: #ecc81e; transform-origin: 50% 0; }
.ld-cam { left: 50%; top: 46px; width: 16px; height: 30px; margin-left: -8px; border-radius: 4px; background: linear-gradient(#2b2f35, #111417); box-shadow: inset 0 -9px 0 #1b1f24, 0 0 14px 4px rgba(255, 246, 200, .45); }
.ld-cam::after { content: ''; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle, #fff6c8, #b7f534 60%, #29400a); }
.ld-ring { left: 50%; bottom: 20px; width: 60px; height: 18px; margin-left: -30px; border: 2px solid rgba(183, 245, 52, .9); border-radius: 50%; opacity: 0; }
.ld-cable { animation: ldCable 2.4s ease-in-out infinite; }
.ld-cam { animation: ldCam 2.4s ease-in-out infinite; }
.ld-ring { animation: ldRing 1.2s ease-out infinite; }
.ld-ring.r2 { animation-delay: .6s; }
@keyframes ldCable { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.9); } }
@keyframes ldCam { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(44px); } }
@keyframes ldRing { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.2); } }
.ld-bar { position: relative; width: 100%; height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(183, 245, 52, .35); }
.ld-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #7fb51f, var(--lime)); box-shadow: 0 0 12px rgba(183, 245, 52, .7); transition: width .25s ease; }
.ld-bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: ldShine 1.2s linear infinite; }
@keyframes ldShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.ld-text { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: #cfe0ec; }
.ld-text b { color: var(--lime); }
.ld-tip { min-height: 2.6em; max-width: 440px; font-size: 13px; letter-spacing: .02em; color: var(--muted); transition: opacity .3s; }
.ld-tip.swap { opacity: 0; }
#loader.error .ld-text { color: #ffb347; letter-spacing: .06em; text-transform: none; }
@media (prefers-reduced-motion: reduce) { .ld-cable, .ld-cam, .ld-ring, .ld-bar i::after { animation: none; } .ld-ring { opacity: .5; } }
@media (max-height: 460px) { .ld { gap: 4px; } .ld-logo { width: 54px; } .ld-hole { transform: scale(.7); margin: -18px 0 -16px; } .ld-title { font-size: 38px; } }
