/* The short version is a film. It is never a timed gate to the chapters.
   These rules are page-scoped; the server-rendered transcript remains the
   no-JavaScript and print edition. No scroll-driven playback or scroll locks. */
.story {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.5rem);
}
.story__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.world .story__top h2 { font: .78rem/1.4 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; }
.story__screen { position: relative; margin-block: 1rem; }
.story__video { display: none; }
.story__poster { display: block; }
.story__poster img { display: block; width: 100%; height: auto; }
.story__transport, .story__chapters, .story__skip, .story__ending { display: none; }
.story__transcript { max-width: 65ch; margin-top: 1rem; }
.story__transcript summary { cursor: pointer; font-size: .78rem; color: var(--ink-soft); }
.world .story__transcript p, .world .story__transcript ol { margin-block: 1rem; }
.world .story__transcript li { margin-block: .7rem; }
.story__notice:empty { display: none; }

html[data-state]:not([data-state="story"]) .story { display: none; }
html[data-state="story"] :is(.world__sheet, .world__ink) { display: none; }
html[data-state="story"] .story {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-block: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-bottom));
}
html[data-state="story"] .story__screen {
  flex: none;
  align-self: center;
  width: min(100%, calc(68svh * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #171815;
  overflow: clip;
}
html[data-state="story"] .story__video {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
html[data-state="story"] .story__poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
html[data-state="story"] .story__poster img { width: 100%; height: 100%; object-fit: contain; }
html[data-state="story"] .story__skip { display: inline-flex; gap: .75rem; align-items: center; min-height: 44px; font-size: .82rem; }
html[data-state="story"] .story__transport { display: flex; align-items: center; gap: 1rem; }
.world .story__transport button { min-width: 4.5rem; min-height: 44px; font-size: .78rem; text-align: left; }
.world .story__transport button:last-child { text-align: right; }
.story__transport input { flex: 1; accent-color: var(--vermillion); height: 28px; cursor: pointer; }
.story__transport input:focus-visible { outline: 2px solid var(--vermillion); outline-offset: 5px; }
.story__time { font: .72rem/1.4 ui-monospace, monospace; min-width: 6.5em; }
html[data-state="story"] .story__chapters { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; }
.world .story__chapters button {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 48px;
  border-top: 1px solid var(--rule);
  font-size: .76rem;
  text-align: left;
  color: var(--ink-soft);
}
.world .story__chapters button[aria-current] { border-color: var(--vermillion); color: var(--ink); }
.story__number { font: .62rem/1 ui-monospace, monospace; opacity: .65; }
.world .story__chapters button:hover { border-color: var(--ink); color: var(--ink); }
.story__notice { color: var(--vermillion); font-size: .85rem; }
html[data-state="story"] .story[data-finished] .story__ending { display: block; padding-top: .75rem; }
.world .story__ending button { font: 500 clamp(1.2rem, 3vw, 1.7rem)/1.2 var(--font-display); min-height: 44px; }
.story__ending button span { display: inline-block; margin-left: 1rem; }
html[data-state="story"] .story__transcript { margin-top: .3rem; }

html[data-state="story"] .story[data-layout="portrait"] .story__screen {
  width: min(100%, calc(68svh * 3 / 4));
  aspect-ratio: 3 / 4;
}

@media (max-width: 600px) {
  .story { padding-inline: 1rem; }
  html[data-state="story"] .story__screen { margin-block: .5rem; }
  html[data-state="story"] .story__chapters { grid-template-columns: repeat(4, 1fr); gap: 0 .65rem; }
  .world .story__chapters button { font-size: .75rem; gap: .3rem; }
  .story__number { display: none; }
  .story__time { display: none; }
  .world .story__top h2 { font-size: .7rem; }
}

@media print {
  html[data-state] .story { display: block !important; min-height: auto; }
  .story__video, .story__poster, .story__transport, .story__chapters,
  .story__skip, .story__ending, .world__watch { display: none !important; }
  .story__screen { display: none !important; }
  .story__transcript { display: block; }
  .story__transcript::details-content { content-visibility: visible; }
  .story__transcript summary { display: none; }
}
