:root {
  color-scheme: dark;
  --void: oklch(0.105 0.012 250);
  --void-2: oklch(0.15 0.018 250);
  --panel: oklch(0.18 0.018 250 / 0.9);
  --panel-2: oklch(0.23 0.02 250 / 0.86);
  --line: oklch(0.92 0.012 95 / 0.18);
  --line-strong: oklch(0.92 0.012 95 / 0.34);
  --paper: oklch(0.94 0.014 95);
  --paper-dim: oklch(0.74 0.018 95);
  --paper-muted: oklch(0.58 0.016 250);
  --ink: oklch(0.13 0.012 250);
  --signal: oklch(0.84 0.18 90);
  --signal-2: oklch(0.75 0.16 70);
  --aqua: oklch(0.68 0.13 190);
  --radius: 8px;
  --max-card: 760px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--void);
  color: var(--paper);
  font-family: "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  letter-spacing: 0;
}

button,
a,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}

a {
  color: inherit;
}

.game {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 38%, oklch(0.84 0.18 90 / 0.14), transparent 34rem),
    linear-gradient(180deg, var(--void), var(--void-2));
}

.game::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, oklch(0.95 0.01 95 / 0.035) 1px, transparent 1px),
    linear-gradient(0deg, oklch(0.95 0.01 95 / 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, black, transparent 88%);
}

.game::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 8px, oklch(0.94 0.012 95 / 0.025) 9px);
  mix-blend-mode: screen;
}

.setup-screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: clamp(20px, 5vw, 64px);
  text-align: center;
  background:
    radial-gradient(circle at 50% 44%, oklch(0.84 0.18 90 / 0.18), transparent 24rem),
    oklch(0.08 0.012 250 / 0.96);
  transition: opacity 360ms ease, visibility 360ms ease;
}

.setup-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.setup-mark {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  place-items: center;
  background: var(--signal);
  color: var(--ink);
  clip-path: polygon(50% 0, 100% 26%, 88% 100%, 12% 100%, 0 26%);
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--signal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 18px;
  color: var(--paper);
  font-size: clamp(58px, 13vw, 150px);
  font-weight: 900;
  line-height: 0.84;
  text-transform: uppercase;
}

.setup-copy {
  max-width: 680px;
  margin-bottom: 26px;
  color: var(--paper-dim);
  font-size: clamp(17px, 2.2vw, 23px);
  line-height: 1.55;
}

.setup-panel {
  display: grid;
  width: min(460px, calc(100vw - 40px));
  gap: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 18px;
  background: oklch(0.94 0.012 95 / 0.055);
  backdrop-filter: blur(18px);
}

.setup-label {
  display: block;
  margin-bottom: 10px;
  color: var(--paper-muted);
  font-size: 11px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mode-button,
.choice-button,
.button,
.icon-button {
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: oklch(0.94 0.012 95 / 0.04);
  color: var(--paper);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.mode-button[aria-pressed="true"],
.choice-button:hover,
.choice-button:focus-visible,
.icon-button[aria-pressed="true"] {
  border-color: var(--signal);
  background: var(--signal);
  color: var(--ink);
}

.sound-option {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--paper-dim);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.sound-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--signal);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  text-decoration: none;
}

.setup-start,
.button:not(.button-dark) {
  border-color: var(--signal);
  background: var(--signal);
  color: var(--ink);
}

.button-dark {
  background: oklch(0.94 0.012 95 / 0.045);
  color: var(--paper);
}

.button-teal {
  border-color: var(--aqua);
  background: var(--aqua);
  color: var(--ink);
}

.setup-note {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--paper-muted);
  font-size: 11px;
  line-height: 1.5;
  text-transform: uppercase;
}

.scene-screen {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding: 0;
}

.hud {
  z-index: 2;
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(14px, 3vw, 34px);
  background: oklch(0.105 0.012 250 / 0.78);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: var(--signal);
  color: var(--ink);
  clip-path: polygon(50% 0, 100% 26%, 88% 100%, 12% 100%, 0 26%);
}

.brand span span {
  display: block;
  color: var(--paper-muted);
  font-size: 9px;
}

.hud-status {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper-dim);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.icon-button {
  min-height: 34px;
  padding: 0 11px;
}

.stage {
  position: relative;
  min-height: 0;
}

.map-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 44%, oklch(0.84 0.18 90 / 0.14), transparent 16rem),
    linear-gradient(90deg, oklch(0.95 0.01 95 / 0.055) 1px, transparent 1px),
    linear-gradient(0deg, oklch(0.95 0.01 95 / 0.055) 1px, transparent 1px),
    oklch(0.09 0.012 250);
  background-size: auto, 58px 58px, 58px 58px, auto;
}

.map-stage::before {
  content: "";
  position: absolute;
  inset: 12% 6%;
  background: linear-gradient(135deg, transparent 3%, oklch(0.84 0.18 90 / 0.13), transparent 68%);
  clip-path: polygon(2% 72%, 23% 50%, 42% 36%, 60% 18%, 88% 35%, 72% 52%, 92% 83%, 50% 70%, 20% 90%);
}

.scene-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.scene-visual > * {
  position: absolute;
}

.story-illustration {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--signal);
}

.story-illustration text {
  font-family: "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  letter-spacing: 0;
}

.svg-grid {
  stroke: oklch(0.94 0.012 95 / 0.07);
  stroke-width: 1;
}

.svg-object,
.svg-door {
  fill: oklch(0.08 0.012 250 / 0.58);
  stroke: oklch(0.94 0.012 95 / 0.34);
  stroke-width: 4;
}

.svg-door {
  fill: oklch(0.15 0.018 250 / 0.82);
}

.svg-door-line {
  stroke: oklch(0.94 0.012 95 / 0.16);
  stroke-width: 2;
}

.svg-knob,
.svg-point,
.svg-sun {
  fill: var(--signal);
  filter: drop-shadow(0 0 22px oklch(0.84 0.18 90 / 0.6));
}

.svg-signal,
.svg-route {
  fill: none;
  stroke: var(--signal);
  stroke-linecap: round;
  stroke-width: 14;
  filter: drop-shadow(0 0 16px oklch(0.84 0.18 90 / 0.54));
}

.svg-signal.wide {
  stroke-width: 9;
}

.svg-route {
  stroke: var(--aqua);
  stroke-width: 12;
}

.svg-beam {
  fill: oklch(0.84 0.18 90 / 0.22);
  transform-origin: center;
}

.svg-tunnel,
.svg-loop {
  fill: none;
  stroke: oklch(0.84 0.18 90 / 0.24);
  stroke-width: 4;
}

.svg-tunnel.thin {
  stroke: oklch(0.94 0.012 95 / 0.12);
  stroke-width: 2;
}

.svg-screen-wall rect {
  fill: oklch(0.12 0.014 250 / 0.74);
  stroke: oklch(0.94 0.012 95 / 0.18);
  stroke-width: 3;
}

.svg-bridge-left,
.svg-bridge-right {
  fill: oklch(0.94 0.012 95 / 0.13);
  stroke: oklch(0.94 0.012 95 / 0.18);
  stroke-width: 3;
}

.svg-gap {
  fill: oklch(0.09 0.012 250 / 0.8);
}

.svg-ray {
  fill: none;
  stroke: oklch(0.84 0.18 90 / 0.24);
  stroke-linecap: round;
  stroke-width: 10;
}

.svg-small,
.svg-chip,
.svg-word {
  fill: var(--signal);
  font-weight: 900;
  text-transform: uppercase;
}

.svg-small {
  font-size: 28px;
}

.svg-chip {
  fill: var(--paper-dim);
  font-size: 26px;
}

.svg-word {
  fill: var(--signal);
  font-size: 42px;
}

.svg-word.huge,
.svg-ghost.huge {
  font-size: 122px;
}

.svg-word.smallish {
  fill: var(--aqua);
  font-size: 52px;
}

.svg-word.center {
  text-anchor: start;
}

.svg-ghost {
  fill: oklch(0.94 0.014 95 / 0.11);
  font-weight: 900;
}

.float-a {
  animation: svg-float 5.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.slow {
  animation: svg-breathe 5.8s ease-in-out infinite;
}

.flicker-a {
  animation: signal-flicker 4.2s ease-in-out infinite;
}

.flicker-b {
  animation: signal-flicker 5.1s ease-in-out infinite reverse;
}

.flicker-c {
  animation: signal-flicker 4.7s ease-in-out infinite;
}

.pulse-text {
  animation: svg-pulse 4.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.visual-beam {
  inset: 8% -12% 4% 8%;
  background: linear-gradient(115deg, transparent 0 24%, oklch(0.84 0.18 90 / 0.34) 42%, transparent 66%);
  clip-path: polygon(0 55%, 82% 0, 100% 34%, 20% 100%);
  filter: blur(1px);
  opacity: 0.74;
  transform-origin: 12% 80%;
  animation: beam-sweep 5.8s ease-in-out infinite;
}

.visual-phone {
  left: clamp(46px, 9vw, 150px);
  bottom: clamp(140px, 23vh, 230px);
  z-index: 2;
  width: clamp(110px, 18vw, 210px);
  aspect-ratio: 9 / 16;
  border: 2px solid var(--line-strong);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 78%, oklch(0.84 0.18 90 / 0.18), transparent 42%),
    oklch(0.07 0.012 250);
  box-shadow: 0 28px 80px oklch(0.02 0.012 250 / 0.56);
  transform: rotate(-9deg);
}

.visual-phone span {
  position: absolute;
  right: 18px;
  top: 18px;
  color: var(--signal);
  font-size: 13px;
  font-weight: 900;
}

.visual-phone i {
  position: absolute;
  inset: 38% 18% auto;
  height: 9px;
  border-radius: 999px;
  background: var(--signal);
  box-shadow: 0 0 40px var(--signal);
}

.visual-wall-text,
.visual-word,
.visual-cross-name,
.visual-route {
  z-index: 2;
  color: oklch(0.94 0.014 95 / 0.12);
  font-size: clamp(48px, 11vw, 170px);
  font-weight: 900;
  line-height: 0.86;
  text-transform: uppercase;
}

.visual-wall-text {
  left: 8vw;
  top: 18vh;
  max-width: 55vw;
}

.visual-corridor-lines {
  inset: 8% 5% 16%;
  perspective: 700px;
}

.visual-corridor-lines i {
  position: absolute;
  inset: 0;
  border: 1px solid oklch(0.84 0.18 90 / 0.16);
}

.visual-corridor-lines i:nth-child(1) { transform: translateZ(-90px) scale(0.88); }
.visual-corridor-lines i:nth-child(2) { transform: translateZ(-180px) scale(0.76); }
.visual-corridor-lines i:nth-child(3) { transform: translateZ(-270px) scale(0.64); }
.visual-corridor-lines i:nth-child(4) { transform: translateZ(-360px) scale(0.52); }

.visual-noise {
  inset: 18% 8% auto auto;
  z-index: 3;
  display: grid;
  gap: 12px;
}

.visual-noise span,
.visual-screen-grid i,
.visual-questions i {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  background: oklch(0.94 0.012 95 / 0.045);
  color: var(--paper-dim);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  animation: signal-flicker 4.4s ease-in-out infinite;
}

.visual-screen-grid {
  left: 6vw;
  top: 14vh;
  z-index: 2;
  display: grid;
  width: min(560px, 48vw);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.visual-word {
  right: 8vw;
  bottom: 22vh;
  color: oklch(0.84 0.18 90 / 0.22);
}

.visual-door {
  left: clamp(70px, 14vw, 250px);
  top: 12vh;
  z-index: 2;
  width: clamp(180px, 24vw, 330px);
  height: clamp(290px, 48vh, 520px);
  border: 2px solid var(--line-strong);
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(90deg, oklch(0.84 0.18 90 / 0.18), transparent 50%),
    oklch(0.12 0.014 250 / 0.92);
  box-shadow: 0 0 90px oklch(0.84 0.18 90 / 0.16);
}

.visual-door span {
  position: absolute;
  left: 50%;
  top: 42%;
  color: var(--signal);
  font-size: clamp(18px, 3vw, 34px);
  font-weight: 900;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
}

.visual-questions {
  right: 8vw;
  top: 20vh;
  z-index: 3;
  display: grid;
  gap: 12px;
}

.visual-map-lines {
  inset: 18% 8% 18% 6%;
  z-index: 2;
}

.visual-map-lines i {
  position: absolute;
  width: 44%;
  height: 28%;
  border: 2px solid oklch(0.94 0.014 95 / 0.16);
  border-radius: 999px;
}

.visual-map-lines i:nth-child(1) { left: 2%; top: 28%; transform: rotate(13deg); }
.visual-map-lines i:nth-child(2) { left: 22%; top: 18%; transform: rotate(-18deg); }
.visual-map-lines i:nth-child(3) { left: 42%; top: 34%; transform: rotate(9deg); }

.visual-route {
  left: 10vw;
  bottom: 19vh;
  color: oklch(0.68 0.13 190 / 0.26);
  font-size: clamp(32px, 6vw, 96px);
}

.visual-bridge {
  inset: auto 8vw 24vh 7vw;
  z-index: 2;
  height: 120px;
}

.visual-bridge i {
  position: absolute;
  top: 48px;
  width: 38%;
  height: 22px;
  background: oklch(0.94 0.014 95 / 0.16);
  clip-path: polygon(0 12%, 100% 0, 94% 100%, 0 78%);
}

.visual-bridge i:first-child {
  left: 0;
}

.visual-bridge i:last-child {
  right: 0;
}

.visual-cross-name {
  left: 43%;
  top: 34vh;
  color: var(--signal);
  font-size: clamp(52px, 9vw, 140px);
  text-shadow: 0 0 50px oklch(0.84 0.18 90 / 0.42);
}

.visual-horizon {
  inset: 9vh 8vw 18vh;
  z-index: 2;
}

.visual-horizon i {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 3px;
  height: 72%;
  background: linear-gradient(180deg, transparent, oklch(0.84 0.18 90 / 0.5));
  transform-origin: bottom center;
}

.visual-horizon i:nth-child(1) { transform: rotate(-44deg); }
.visual-horizon i:nth-child(2) { transform: rotate(-24deg); }
.visual-horizon i:nth-child(3) { transform: rotate(0); }
.visual-horizon i:nth-child(4) { transform: rotate(24deg); }
.visual-horizon i:nth-child(5) { transform: rotate(44deg); }

.map-pieces {
  position: absolute;
  inset: clamp(28px, 6vw, 74px);
  z-index: 2;
  opacity: 0.62;
}

.map-piece {
  position: absolute;
  display: grid;
  width: 26%;
  height: 18%;
  place-items: center;
  border: 1px solid oklch(0.94 0.012 95 / 0.08);
  background: oklch(0.65 0.12 75 / 0.28);
  color: oklch(0.94 0.012 95 / 0.5);
  clip-path: polygon(8% 15%, 88% 0, 100% 70%, 20% 100%);
  font-size: 16px;
  font-weight: 900;
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), background-color 520ms ease, opacity 520ms ease;
}

.map-piece.is-complete {
  background: oklch(0.53 0.12 190 / 0.62);
  color: var(--paper);
}

.map-piece.is-active {
  background: var(--signal);
  color: var(--ink);
  opacity: 1;
  transform: translateY(-10px) scale(1.08);
  box-shadow: 0 0 44px oklch(0.84 0.18 90 / 0.28);
}

.map-piece:nth-child(1) { left: 8%; top: 64%; transform: rotate(-7deg); }
.map-piece:nth-child(2) { left: 21%; top: 48%; transform: rotate(8deg); }
.map-piece:nth-child(3) { left: 36%; top: 35%; transform: rotate(-5deg); }
.map-piece:nth-child(4) { left: 50%; top: 22%; transform: rotate(10deg); }
.map-piece:nth-child(5) { left: 64%; top: 36%; transform: rotate(-8deg); }
.map-piece:nth-child(6) { left: 53%; top: 58%; transform: rotate(8deg); }
.map-piece:nth-child(7) { left: 70%; top: 68%; transform: rotate(-6deg); }

.traveler {
  position: absolute;
  left: var(--traveler-x, 17%);
  top: var(--traveler-y, 72%);
  z-index: 3;
  width: clamp(16px, 2.5vw, 28px);
  height: clamp(16px, 2.5vw, 28px);
  border-radius: 999px;
  background: var(--signal);
  box-shadow: 0 0 22px var(--signal), 0 0 80px oklch(0.84 0.18 90 / 0.38);
  transition: left 650ms cubic-bezier(0.22, 1, 0.36, 1), top 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.map-label {
  position: absolute;
  left: clamp(16px, 3vw, 34px);
  bottom: clamp(92px, 12vh, 132px);
  z-index: 2;
  color: var(--paper);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.scene-card {
  position: absolute;
  right: clamp(14px, 4vw, 54px);
  bottom: clamp(74px, 10vh, 96px);
  z-index: 4;
  width: min(var(--max-card), calc(100vw - 28px));
  max-height: calc(100svh - 154px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: clamp(16px, 3vw, 26px);
  background: linear-gradient(180deg, var(--panel), oklch(0.13 0.014 250 / 0.92));
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 90px oklch(0.03 0.01 250 / 0.48);
}

.scene-card h2 {
  margin: 0 0 12px;
  color: var(--paper);
  font-size: clamp(30px, 4.4vw, 50px);
  font-weight: 900;
  line-height: 0.94;
  text-transform: uppercase;
}

.narrator {
  margin-bottom: 18px;
  color: var(--signal);
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 900;
  line-height: 1.55;
}

.narrative,
.truth,
.decision-block p,
.choice-response,
.final-panel p {
  color: var(--paper-dim);
  font-size: clamp(14px, 1.45vw, 16px);
  line-height: 1.58;
}

.truth {
  color: var(--paper);
  font-weight: 900;
}

.scripture-block {
  display: grid;
  gap: 8px;
  border: 1px solid oklch(0.84 0.18 90 / 0.42);
  border-radius: var(--radius);
  margin: 12px 0;
  padding: 14px;
  background: oklch(0.84 0.18 90 / 0.1);
}

.scripture-block span,
.final-panel h3 {
  color: var(--paper-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.scripture-block strong {
  color: var(--paper);
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.48;
}

.choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.choice-button {
  min-height: 54px;
  padding: 12px;
  text-align: left;
}

.choice-response {
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: oklch(0.94 0.012 95 / 0.055);
}

.final-panel {
  display: grid;
  gap: 12px;
  border: 2px solid var(--signal);
  border-radius: 10px;
  margin-top: 16px;
  padding: 16px;
  background: oklch(0.84 0.18 90 / 0.1);
}

.final-panel h3 {
  margin: 0;
  color: var(--signal);
}

.final-verse {
  display: grid;
  gap: 8px;
  border: 1px solid oklch(0.68 0.13 190 / 0.42);
  border-radius: var(--radius);
  padding: 12px;
  background: oklch(0.68 0.13 190 / 0.1);
}

.final-verse span {
  color: var(--aqua);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.final-verse strong {
  color: var(--paper);
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.45;
}

.minor-guardrail {
  border: 1px solid oklch(0.84 0.18 90 / 0.35);
  border-radius: var(--radius);
  padding: 12px;
  background: oklch(0.84 0.18 90 / 0.16);
  font-weight: 900;
}

.final-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bottom-progress {
  z-index: 5;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 10px clamp(14px, 3vw, 34px) 14px;
  background: oklch(0.105 0.012 250 / 0.84);
  backdrop-filter: blur(16px);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--paper-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.scene-progress {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.scene-dot {
  display: block;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: oklch(0.94 0.012 95 / 0.12);
  transition: background-color 240ms ease, transform 240ms ease;
}

.scene-dot.is-complete {
  background: var(--aqua);
}

.scene-dot.is-active {
  background: var(--signal);
  transform: scaleY(1.5);
}

@keyframes beam-sweep {
  0%,
  100% {
    opacity: 0.46;
    transform: rotate(-4deg) translate3d(-2%, 2%, 0);
  }
  50% {
    opacity: 0.82;
    transform: rotate(2deg) translate3d(2%, -1%, 0);
  }
}

@keyframes signal-flicker {
  0%,
  100% {
    opacity: 0.54;
    transform: translate3d(0, 0, 0);
  }
  45% {
    opacity: 0.92;
    transform: translate3d(-4px, 0, 0);
  }
  48% {
    opacity: 0.34;
    transform: translate3d(4px, 0, 0);
  }
  62% {
    opacity: 0.8;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes svg-float {
  0%,
  100% {
    opacity: 0.82;
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }
  50% {
    opacity: 1;
    transform: translate3d(0, -18px, 0) rotate(1deg);
  }
}

@keyframes svg-breathe {
  0%,
  100% {
    opacity: 0.46;
  }
  50% {
    opacity: 0.92;
  }
}

@keyframes svg-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.035);
  }
}

@media (max-width: 760px) {
  .hud {
    min-height: 62px;
  }

  .brand {
    font-size: 11px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .hud-status span {
    display: none;
  }

  .stage {
    min-height: 0;
  }

  .map-pieces {
    inset: 34px 18px 160px;
    opacity: 0.4;
  }

  .map-label {
    bottom: 48svh;
  }

  .visual-phone {
    left: 26px;
    bottom: 52vh;
    width: 94px;
  }

  .visual-wall-text,
  .visual-word,
  .visual-cross-name {
    font-size: clamp(42px, 15vw, 74px);
  }

  .visual-wall-text {
    left: 34px;
    top: 18vh;
  }

  .visual-screen-grid {
    left: 24px;
    top: 13vh;
    width: calc(100vw - 48px);
    gap: 8px;
  }

  .visual-noise,
  .visual-questions {
    right: 20px;
    top: 14vh;
  }

  .visual-door {
    left: 34px;
    top: 12vh;
    width: 150px;
    height: 270px;
  }

  .visual-cross-name {
    left: 24px;
    top: 18vh;
  }

  .visual-route {
    left: 24px;
    bottom: 54vh;
    font-size: clamp(30px, 11vw, 56px);
  }

  .scene-card {
    right: 12px;
    left: 12px;
    bottom: 78px;
    width: auto;
    max-height: 58svh;
    padding: 16px;
  }

  .scene-card h2 {
    font-size: clamp(28px, 8vw, 42px);
  }

  .choice-list,
  .final-actions {
    grid-template-columns: 1fr;
  }

  .setup-screen {
    justify-items: stretch;
    text-align: left;
  }

  .setup-screen > * {
    width: min(330px, calc(100vw - 40px));
    justify-self: center;
  }

  .setup-mark {
    justify-self: start;
  }

  h1 {
    font-size: clamp(58px, 18vw, 86px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
