:root {
  color-scheme: dark;
  --ink: #f1eee4;
  --muted: #a6b5ac;
  --line: #39504b;
  --accent: #ffa27a;
  --field: #102322;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  font-family: "Inter", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--field); }
body { margin: 0; color: var(--ink); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .28; cursor: default; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #ffe2bc; outline-offset: 3px; }
button, a, input { touch-action: manipulation; }
button svg, a svg, .identity svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icons { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.js-control { display: none; }
.page { max-width: 1730px; margin: 0 auto; padding: 0 clamp(17px, 4.3vw, 84px) clamp(20px, 3vw, 58px); }
.masthead { display: flex; min-height: clamp(58px, 5.1vw, 79px); align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.mode-selector { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 24px; padding: 3px; }
.mode-selector button { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 630; border-radius: 20px; padding: 7px 15px; }
.mode-selector button[aria-pressed="true"] { background: #d7dfd0; color: #17312b; }
.mode-selector button:hover:not([aria-pressed="true"]) { color: var(--ink); }
.identity, .sheet-link { display: inline-flex; align-items: center; }
.identity { gap: 10px; font-weight: 720; letter-spacing: -.055em; font-size: 16px; }
.identity .wordmark { width: 36px; height: 26px; color: var(--accent); margin-top: 4px; }
.sheet-link { gap: 8px; min-height: 44px; font-weight: 620; font-size: 12px; }
.sheet-link svg { width: 18px; height: 18px; }
.sheet-link .cross-arrow { width: 15px; height: 15px; color: var(--accent); }
.sheet-link:hover, .modal-top a:hover { color: var(--accent); }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: clamp(20px, 3.3vw, 54px) 0 clamp(22px, 2.7vw, 42px); }
h1 { margin: 0; font-family: "Instrument Serif", "Baskerville", "Times New Roman", serif; font-weight: 400; font-size: clamp(69px, 7.8vw, 132px); letter-spacing: -.072em; line-height: .88; }
h1 span { color: var(--accent); font-style: italic; margin-left: .017em; }
.film-info { text-align: right; padding-bottom: 3px; }
.film-info p { margin: 0; }
.film-info p:first-child { font-weight: 650; font-size: clamp(15px, 1.6vw, 22px); letter-spacing: -.07em; margin-bottom: 8px; }
.film-info p:last-child { display: flex; align-items: center; justify-content: end; gap: 7px; color: var(--muted); font-size: 11px; }
.film-info i { display: inline-block; width: 2px; height: 2px; border-radius: 50%; background: currentColor; }
.screening { display: grid; grid-template-columns: minmax(0, 3.5fr) minmax(210px, 1fr); gap: clamp(20px, 2.55vw, 42px); align-items: start; }
.film { min-width: 0; }
.player { position: relative; background: #091615; }
.screen { position: relative; background: #091615 url("poster.jpg") center / cover no-repeat; aspect-ratio: 16 / 9; isolation: isolate; }
video { display: block; width: 100%; height: 100%; object-fit: contain; }
.ready .screen { cursor: pointer; }
.ready .center-play { display: grid; place-items: center; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; width: clamp(56px, 5.3vw, 80px); height: clamp(56px, 5.3vw, 80px); background: #12201dbd; border: 1px solid #fff9; color: #fffbec; backdrop-filter: blur(4px); transition: background .15s; }
.center-play svg { width: 37%; height: 37%; margin-left: -1px; }
.center-play:hover { background: #142925ef; }
.message { position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%); width: max-content; max-width: 85%; margin: 0; background: #102322ed; color: #fff9e8; border-radius: 3px; padding: 8px 12px; font-size: 13px; text-align: center; pointer-events: none; }
.ready .transport { display: block; padding: 0 clamp(8px, 1.1vw, 18px) 4px; }
.timeline { position: relative; height: 21px; display: flex; align-items: center; }
.track { pointer-events: none; height: 3px; width: 100%; background: #5a6860; overflow: hidden; }
.progress { width: var(--played, 0%); height: 100%; background: var(--accent); }
.timeline::after { content: ""; position: absolute; inset: calc(50% - 1.5px) 0 auto; height: 3px; background: repeating-linear-gradient(to right, transparent 0, transparent calc(10% - 2px), #091615 calc(10% - 2px), #091615 10%); pointer-events: none; }
.timeline input { position: absolute; inset: 0; width: 100%; height: 100%; appearance: none; background: transparent; cursor: pointer; margin: 0; z-index: 1; }
.timeline input::-webkit-slider-thumb { appearance: none; background: var(--accent); height: 10px; width: 10px; border: 0; border-radius: 50%; }
.timeline input::-moz-range-thumb { background: var(--accent); height: 10px; width: 10px; border: 0; border-radius: 50%; }
.transport-row, .transport-left, .transport-right { display: flex; align-items: center; }
.transport-row { justify-content: space-between; min-height: 37px; }
.transport-left { gap: 1px; }
.transport-right { gap: 6px; }
.icon-button { flex: none; border: 0; padding: 0; display: grid; width: 36px; height: 36px; place-items: center; background: transparent; border-radius: 4px; }
.icon-button:hover:enabled { color: var(--accent); background: #fff1; }
.icon-button svg { width: 20px; height: 20px; }
.play-toggle { color: var(--accent); }
.counter, .frame-range, .slug, .index-title span, .shot small, .shot-number { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.counter { margin-left: 7px; font-size: 11px; color: var(--muted); letter-spacing: .018em; white-space: nowrap; }
.counter #elapsed { color: var(--ink); }
.divider { padding: 0 7px; color: #6f8277; }
#volume { appearance: none; background: linear-gradient(to right,var(--ink) var(--volume, 100%),#54635c var(--volume,100%)) center / 100% 2px no-repeat; color: var(--ink); width: 50px; height: 30px; margin: 0 5px 0 -5px; cursor: pointer; }
#volume::-webkit-slider-thumb { appearance: none; background: currentColor; width: 8px; height: 8px; border-radius: 50%; }
#volume::-moz-range-thumb { background: currentColor; width: 8px; height: 8px; border: 0; border-radius: 50%; }
.frame-caption { display: flex; align-items: center; gap: 11px; min-height: 55px; }
.slug { border: 1px solid #60726b; border-radius: 2px; color: #cfd7c9; font-size: 10px; padding: 4px 6px; letter-spacing: .055em; white-space: nowrap; }
.slug b { font-weight: 500; }
#current-shot { font-size: 14px; font-weight: 560; letter-spacing: -.04em; }
.caption-rule { flex: 1; height: 1px; background: var(--line); margin: 0 1px; }
.frame-range { color: var(--muted); font-size: 10px; }
.shot-index { min-width: 0; border-top: 1px solid #93a198; }
.index-title { display: flex; align-items: center; justify-content: space-between; height: clamp(38px, 3.5vw, 50px); }
h2 { font-size: 17px; font-weight: 680; letter-spacing: -.07em; margin: 0; }
.index-title span { font-size: 9px; letter-spacing: .125em; color: var(--muted); }
.shots { display: grid; border-bottom: 1px solid var(--line); }
.shot { display: grid; width: 100%; grid-template-columns: 18px clamp(43px, 4.15vw, 68px) minmax(0,1fr) auto; align-items: center; gap: clamp(5px, .55vw, 10px); text-align: left; border: 0; border-top: 1px solid var(--line); background: transparent; padding: clamp(5px, .54vw, 9px) 3px; }
.shot:hover { background: #213430; }
.shot:focus-visible { outline-offset: -2px; }
.shot[aria-current="true"] { background: #263832; }
.shot[aria-current="true"] .shot-number { color: var(--accent); }
.shot-number { font-size: 10px; line-height: 1; text-align: center; color: #9eaea2; }
.shot[aria-current="true"] .shot-number::before { content: "▸"; font-size: 14px; display: block; }
.shot[aria-current="true"] .shot-number { font-size: 0; }
.thumbnail { background-image: url("shots.jpg"); background-color: #324b46; background-size: 1000% 100%; aspect-ratio: 16 / 9; width: 100%; display: block; border-radius: 1px; }
.shot-name { font-size: clamp(11px, 1.05vw, 15px); letter-spacing: -.065em; font-weight: 550; }
.shot[aria-current="true"] .shot-name { color: var(--accent); }
.shot small { font-size: 10px; color: var(--muted); }
.live-screen { aspect-ratio: 16/9; position: relative; overflow: hidden; background: #173b41; }
#flight-canvas { width: 100%; height: 100%; display: block; }
#flight-canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.flight-hud { pointer-events: none; position: absolute; left: 14px; bottom: 12px; display: flex; gap: 1px; font-family: var(--mono); font-size: 10px; color: #cddace; }
.flight-hud span { padding: 6px 9px; background: #102f2ed9; }
.flight-hud b { margin-left: 4px; color: #fff7df; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.flight-message { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 15px; background: #152e2ee6; gap: 12px; }
.flight-message p { margin: 0; font-size: 14px; text-align: center; }
.flight-message button { background: #2f4842; border: 1px solid var(--line); border-radius: 3px; padding: 8px 12px; font-size: 12px; }
.flight-message:not([hidden]) + .flight-hud { display: none; }
.live-transport, .live-transport div, .live-transport button { display: flex; align-items: center; }
.live-transport { background: #091615; min-height: 51px; padding: 0 13px; justify-content: space-between; }
.live-transport button { min-height: 42px; background: none; border: 0; gap: 6px; font-size: 12px; }
.live-transport button:hover:enabled { color: var(--accent); }
.live-transport .live-pause svg { color: var(--accent); width: 18px; height: 18px; }
.live-transport .flight-sound { color: var(--muted); }
.flight-sound svg { width: 19px; height: 19px; }
.flight-sound[aria-pressed="true"] { color: var(--ink); }
.live-transport div { gap: 8px; }
.flight-guide { border-top: 1px solid #93a198; }
.flight-guide p { color: var(--muted); font-size: 13px; line-height: 1.65; letter-spacing: -.03em; margin: 1px 0 14px; }
.flight-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; max-width: 260px; }
.flight-pad button { border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: #1b302c; padding: 4px 2px 5px; font-size: 10px; min-height: 45px; line-height: 1.15; user-select: none; touch-action: none; }
.flight-pad strong { display: block; font-size: 17px; font-family: system-ui, sans-serif; font-weight: 500; color: var(--accent); margin-bottom: 2px; }
.flight-pad button.active, .flight-pad button:active { background: #ffe4c1; color: #142923; border-color: #ffe4c1; }
.flight-pad button.active strong, .flight-pad button:active strong { color: #763519; }
.flight-pad [data-fly="up"] { grid-column: 2; }
.flight-pad [data-fly="left"] { grid-row: 2; grid-column: 1; }
.flight-pad [data-fly="down"] { grid-row: 2; grid-column: 2; }
.flight-pad [data-fly="right"] { grid-row: 2; grid-column: 3; }
dialog { width: min(1120px, 95vw); max-width: none; padding: 0; border: 1px solid var(--line); background: var(--field); color: var(--ink); }
dialog::backdrop { background: #020908df; backdrop-filter: blur(4px); }
.modal-top, .modal-top div, .modal-top a { display: flex; align-items: center; }
.modal-top { justify-content: space-between; min-height: 54px; padding: 6px 14px 6px 20px; }
.modal-top div { gap: 12px; }
.modal-top a { font-size: 12px; gap: 2px; }
.modal-top a svg { width: 16px; height: 16px; }
dialog img { width: 100%; max-height: calc(92dvh - 58px); object-fit: contain; display: block; background: #0a1515; }
body.modal-open { overflow: hidden; }
.player:fullscreen { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.player:fullscreen .screen { width: 100%; flex: 1; min-height: 0; background-size: contain; }
.player:fullscreen .transport { flex-shrink: 0; padding-bottom: max(8px,env(safe-area-inset-bottom)); }
@media(min-width: 1440px) { .shot { min-height: 51px; } }
@media(max-width: 850px) {
  .screening { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .shots { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
  .shot { min-height: 52px; grid-template-columns: 22px 58px minmax(0,1fr) auto; gap: 9px; }
  .shot-name { font-size: 14px; }
  .index-title { height: 44px; }
  .page { padding-bottom: 34px; }
}
@media(max-width: 530px) {
  .masthead { min-height: 55px; }
  .identity { gap: 4px; font-size: 13px; }
  .identity .wordmark { width: 23px; height: 17px; }
  .sheet-link { gap: 4px; font-size: 11px; }
  .sheet-link .cross-arrow { display: none; }
  .sheet-link svg { width: 15px; height: 15px; }
  .mode-selector { padding: 2px; gap: 0; }
  .mode-selector button { padding: 6px 8px; font-size: 10px; }
  .flight-guide { margin-top: 12px; }
  .flight-pad { max-width: 100%; }
  .flight-guide p { margin-bottom: 8px; }
  .title-row { flex-wrap: wrap; gap: 13px; padding: 23px 0 18px; }
  h1 { font-size: clamp(62px, 16vw, 85px); }
  .film-info { display: flex; gap: 11px; align-items: baseline; flex-wrap: wrap; width: 100%; text-align: left; padding: 0; }
  .film-info p:first-child { font-size: 14px; margin: 0; }
  .film-info p:last-child { font-size: 10px; gap: 6px; }
  .film-info p:last-child::before { content: ""; display: inline-block; width: 13px; height: 1px; background: #62736a; }
  .screening { gap: 4px; }
  .frame-caption { min-height: 49px; }
  .shots { gap: 0 9px; }
  .shot { position: relative; grid-template-columns: 42px minmax(0,1fr); grid-template-rows: auto auto; column-gap: 8px; row-gap: 2px; justify-items: start; padding: 8px 3px; }
  .shot[aria-current="true"] .shot-number, .shot-number { display: none; }
  .thumbnail { grid-row: 1 / 3; }
  .shot-name { grid-column: 2; font-size: 12px; }
  .shot small { grid-column: 2; font-size: 9px; }
  .shot[aria-current="true"] { box-shadow: inset 2px 0 var(--accent); }
  .ready .transport { padding-bottom: 1px; }
  .timeline { height: 24px; }
  .icon-button { width: 33px; height: 40px; }
  .counter { margin-left: 3px; font-size: 10px; }
  .divider { padding: 0 4px; }
  #volume { width: 35px; }
  .transport-right { gap: 1px; }
}
@media(max-width: 350px) { #volume { display: none; } .shot { grid-template-columns: 34px minmax(0,1fr); } }
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
