/* =============================================================================
   /story/ — the 8-bit cutscene page. Loaded only on that page (see head.html),
   so it never touches style.css.
   ============================================================================= */
.page-story { padding-block: var(--space-xl) 0; }
.story-lead { color: var(--color-text-muted); margin: var(--space-sm) 0 0; }

/* The stage breaks out of the 72ch text column: the cutscene is the page. */
.story-stage-wrap {
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: var(--space-md);
}
.story-stage {
  position: relative;
  margin: 0;
  padding: clamp(6px, 1.2vw, 14px);
  background: #0a0d0a;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.story-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 2.5 / 1.9;          /* the scene's own frame */
  border-radius: 4px;
  background: #06120b;
}

/* Captions: under the picture, not burnt into it, so they stay readable and selectable. */
.story-caption {
  min-height: 3.4em;                 /* no layout jump between scenes */
  padding: var(--space-sm) var(--space-xs) var(--space-xs);
  font-family: var(--font-mono);
  color: #e7fff0;
  line-height: 1.45;
}
.story-caption strong {
  display: block;
  color: #e8a33d;                    /* brand amber, lifted for contrast on the black bezel */
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Play button on the still title frame (reduced motion): it sits exactly over the scene's own
   "PRESS START" line (71% down the screen), so the button IS the start prompt. */
.story-screen { position: relative; }
.story-play {
  position: absolute;
  top: 71%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  padding: var(--space-sm) var(--space-lg);
  font: 700 1.1rem var(--font-mono);
  color: #46d17a;
  background: #06120b;               /* opaque: the scene's blinking PRESS START is right behind it */
  border: 2px solid #46d17a;
  border-radius: 6px;
  cursor: pointer;
}
.story-play:hover { background: #0d2a18; }

.story-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
.story-btn {
  padding: var(--space-xs) var(--space-md);
  font: 600 0.95rem var(--font-sans);
  color: var(--color-accent);
  background: transparent;
  border: 2px solid var(--color-accent);
  border-radius: 4px;
  cursor: pointer;
}
.story-btn:hover { background: var(--color-accent); color: #fff; }
.story-progress {
  margin-left: auto;
  align-self: center;
  color: var(--color-text-muted);
  font: 0.875rem var(--font-mono);
}

/* Chapter list: the text version of the story, and a way to jump to a scene. */
.story-chapters-h { margin-top: var(--space-xl); }
.story-chapters {
  display: grid;
  gap: var(--space-xs);
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: chapter;
}
.story-chapters button {
  display: grid;
  grid-template-columns: 2.2em 1fr;
  width: 100%;
  padding: var(--space-sm);
  font: inherit;
  text-align: left;
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-left: 3px solid var(--color-border);
  cursor: pointer;
}
.story-chapters button::before {
  counter-increment: chapter;
  content: counter(chapter);
  grid-row: span 2;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}
.story-chapters button:hover { border-left-color: var(--color-accent-hover); }
.story-chapters button[aria-current="step"] { border-left-color: var(--color-accent); background: #f3f7ff; }
.story-chapter-title { font-weight: 600; }
.story-chapter-note { color: var(--color-text-muted); }
