:root { color-scheme: dark; --background: #0b0b0a; --text: #edeadd; --muted: #b8ae97; --accent: #ffd42a; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); font: 14px/1.5 system-ui, sans-serif; }
main { max-width: 1680px; margin: auto; padding: 20px 28px 36px; }
.presentation { max-width: 1500px; margin: auto; }
#stage { width: 100%; aspect-ratio: 16 / 9; background: #10100f; box-shadow: 0 16px 60px #0004; }
/* Use the actual browser viewport, including short laptop windows. Keep the
   player wide enough for its controls while the SVG scales without cropping. */
@media (min-width: 900px) {
  #stage { max-height: max(160px, calc(100svh - 210px)); }
}
#frame { width: 100%; height: 100%; display: block; }
.transport { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
button, select { border: 1px solid #595443; border-radius: 7px; color: var(--text); background: #22221e; padding: 10px 14px; font: inherit; cursor: pointer; min-height: 44px; }
button:hover:not(:disabled), select:hover { border-color: var(--accent); }
button:disabled { opacity: .35; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
#play { background: var(--accent); color: #171400; border-color: var(--accent); min-width: 128px; font-weight: 650; }
#clock { font-variant-numeric: tabular-nums; color: var(--muted); margin-left: 8px; margin-right: auto; }
label { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
input[type="checkbox"], input[type="range"] { accent-color: var(--accent); }
input[type="checkbox"] { width: 18px; height: 18px; }
#seek { display: block; width: 100%; margin: 16px 0; height: 24px; cursor: pointer; }
.step-status { margin: 8px 0; font-weight: 600; }
.hint { color: var(--muted); font-size: 12px; margin: 8px 0 14px; }
.step-notes { border-top: 1px solid #363328; border-bottom: 1px solid #363328; padding: 12px 0; margin-bottom: 18px; }
summary { cursor: pointer; color: var(--muted); }
.step-notes p { max-width: 100ch; }
#stepLinks a { display: inline-block; margin: 0 20px 8px 0; }
a { color: var(--accent); text-underline-offset: 4px; }
#frame a:hover text, #frame a:focus text { fill: #fff5bb; }
#frame a:hover rect, #frame a:focus rect { stroke: #fff5bb; }
#chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 9px; }
#chapters button { text-align: left; font-size: 12px; min-height: 68px; color: #c8bfa9; }
#chapters button b { display: block; color: #e4dfd0; margin-bottom: 3px; }
#chapters button[aria-current="step"] { border-color: var(--accent); background: #38301a; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.presentation:fullscreen { max-width: none; width: 100%; height: 100%; padding: 12px 20px; overflow: auto; background: var(--background); }
.presentation:fullscreen #stage { max-height: max(100px, calc(100svh - 210px)); }
.presentation:fullscreen .hint, .presentation:fullscreen .step-notes { display: none; }
@media (max-width: 650px) {
  main { padding: 8px 10px 24px; }
  .transport { gap: 7px; }
  button, select { padding: 9px 10px; }
  #clock { margin-left: 0; }
  #chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hint { line-height: 1.7; }
}
