:root {
  color-scheme: dark;
  --page: #171917;
  --ink: #e9e9df;
  --muted: #969b91;
  --line: #3a3e36;
  --accent: #aabfa2;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--ink); }
button, input { font: inherit; }
button, a, summary, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; }
button:disabled, input:disabled { cursor: default; opacity: .35; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.skip-link { position: absolute; z-index: 10; top: -70px; left: 24px; padding: 12px 16px; background: var(--ink); color: var(--page); }
.skip-link:focus { top: 12px; }
.site-header, main, .site-footer { width: min(1480px, calc(100% - 96px)); margin-inline: auto; }
.site-header { min-height: 106px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-size: 40px; font-weight: 800; letter-spacing: -2.6px; line-height: 1; text-decoration: none; }
.brand span { color: var(--accent); }
.episode-label { margin: 0; display: flex; gap: 28px; font-size: 10px; font-weight: 500; letter-spacing: 2.2px; line-height: 1.5; }
.episode-label span:last-child { color: var(--muted); }
.film-frame { position: relative; overflow: hidden; background: #10120f; aspect-ratio: 16 / 9; max-height: calc(100svh - 258px); min-height: 180px; }
video { display: block; width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; }
.media-message { position: absolute; inset: auto 0 18px; margin: 0; color: var(--ink); text-align: center; font-size: 12px; letter-spacing: .04em; text-shadow: 0 1px 10px #000; pointer-events: none; }
.player-controls { display: flex; align-items: center; gap: 22px; min-height: 62px; }
.transport { display: flex; align-items: center; flex: 0 0 auto; gap: 4px; }
.icon-button { display: grid; place-items: center; width: 40px; height: 42px; padding: 10px; background: none; border: 0; }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.icon-button .play-icon { fill: currentColor; stroke: none; width: 18px; }
.pause-icon { display: none; }
.is-playing .play-icon { display: none; }
.is-playing .pause-icon { display: block; }
.time-display { margin-left: 14px; font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: .6px; color: var(--muted); white-space: nowrap; }
.time-divider { margin-inline: 8px; color: #60665b; }
.timeline-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.timeline { --progress: 0%; width: 100%; min-width: 0; height: 30px; margin: 0; padding: 0; appearance: none; background: transparent; cursor: pointer; }
.timeline::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--accent) var(--progress), var(--line) var(--progress)); }
.timeline::-moz-range-track { height: 2px; background: var(--line); }
.timeline::-moz-range-progress { height: 2px; background: var(--accent); }
.timeline::-webkit-slider-thumb { appearance: none; width: 9px; height: 9px; margin-top: -3.5px; border-radius: 50%; border: 0; background: var(--ink); }
.timeline::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; border: 0; background: var(--ink); }
.stage-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stage-nav button { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 58px; padding: 0 18px; border: 0; background: transparent; color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.stage-nav button:first-child { padding-left: 0; }
.stage-nav button:last-child { padding-right: 0; }
.stage-nav button + button { border-left: 1px solid #2a2e27; }
.stage-index { font-size: 9px; font-variant-numeric: tabular-nums; letter-spacing: .08em; opacity: .7; }
.stage-nav button[aria-current] { color: var(--ink); }
.stage-nav button[aria-current]::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--accent); }
.site-footer { min-height: 72px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-block: 24px; color: var(--muted); font-size: 9px; line-height: 1.6; letter-spacing: .04em; }
.reference-credit { max-width: 420px; text-align: right; }
.reference-credit summary { cursor: pointer; list-style: none; font-size: 8px; letter-spacing: 1.4px; }
.reference-credit summary::-webkit-details-marker { display: none; }
.reference-credit summary span { display: inline-block; margin-left: 8px; font-size: 12px; line-height: 1; }
.reference-credit[open] summary span { transform: rotate(45deg); }
.reference-credit p { margin: 14px 0 0; font-size: 10px; line-height: 1.9; letter-spacing: 0; }
.reference-credit a { display: inline-block; margin-top: 5px; text-underline-offset: 4px; }
@media (hover: hover) {
  button:not(:disabled):hover, .reference-credit summary:hover { color: #fff; }
  .timeline::-webkit-slider-thumb { opacity: .2; }
  .timeline:hover::-webkit-slider-thumb, .timeline:focus-visible::-webkit-slider-thumb { opacity: 1; }
}
@media (min-width: 1600px) { .site-header { min-height: 126px; } }
@media (max-width: 720px) {
  .site-header, main, .site-footer { width: calc(100% - 40px); }
  .site-header { min-height: 88px; gap: 20px; }
  .brand { font-size: 34px; letter-spacing: -2px; }
  .episode-label { flex-direction: column; gap: 5px; text-align: right; font-size: 8px; letter-spacing: 1.6px; }
  .film-frame { min-height: 0; max-height: none; }
  .player-controls { gap: 16px; min-height: 62px; }
  .transport { gap: 0; }
  .icon-button { width: 44px; height: 44px; padding: 11px; }
  .time-display { margin-left: 6px; font-size: 9px; }
  .time-divider { margin-inline: 5px; }
  .stage-nav button { flex-direction: column; justify-content: center; gap: 7px; min-height: 61px; padding: 8px 0; font-size: 10px; letter-spacing: 0; }
  .stage-index { font-size: 8px; }
  .site-footer { gap: 18px; min-height: 72px; padding-block: 24px; font-size: 8px; }
  .reference-credit { max-width: 270px; }
}
@media (max-width: 360px) {
  .site-header, main, .site-footer { width: calc(100% - 28px); }
  .player-controls { gap: 10px; }
  .time-display { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.film-frame:fullscreen, .film-frame.is-expanded { aspect-ratio: auto; width: 100vw; height: 100dvh; max-height: none; background: #000; }
.film-frame.is-expanded { position: fixed; inset: 0; z-index: 100; }
.has-expanded-film { overflow: hidden; }
.close-expanded { display: none; position: absolute; z-index: 2; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); width: 44px; height: 44px; border: 1px solid #ffffff45; border-radius: 50%; background: #151713cc; color: #fff; font-size: 28px; line-height: 1; }
.film-frame:fullscreen .close-expanded, .film-frame.is-expanded .close-expanded { display: block; }

/* Embedded film: the public shell supplies the brand, menu and credits. */
main { width:100%; margin:0; }
.film-frame { aspect-ratio:auto; height:calc(100svh - 124px); max-height:none; min-height:0; }
.player-controls,.stage-nav { margin-inline:12px; }
.player-controls { gap:12px; }
.film-frame:fullscreen,.film-frame.is-expanded { height:100dvh; }
@media(max-width:360px){.player-controls,.stage-nav{margin-inline:8px}.player-controls{gap:8px}.icon-button{width:38px}.time-display{margin-left:2px}}
