* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #100e12;
  color: #f6e5cd;
  --gold: #edb77e;
  --muted: #b9a795;
  --edge: #584346;
  --panel: #221c23;
}
body { margin: 0; }
[hidden] { display: none !important; }
.cinema {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 16rem;
  background: #100e12;
}
.cinema:fullscreen { width: 100%; height: 100%; min-height: 0; grid-template-rows: minmax(0, 1fr); background: #000; }
.cinema:fullscreen .masthead, .cinema:fullscreen .controls { position: absolute; z-index: 1; inset-inline: 0; }
.cinema:fullscreen .masthead { top: 0; background: linear-gradient(#100e12f2, #100e1200); border: 0; }
.cinema:fullscreen .controls { bottom: 0; background: linear-gradient(#100e1200, #100e12f2); border: 0; }
.masthead {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  padding: .7rem clamp(.75rem, 3vw, 2rem);
  border-bottom: 1px solid #352a32;
  background: #17141a;
  z-index: 1;
}
h1 { margin: 0; color: #f1d2a9; font: normal clamp(1.15rem, 3vw, 1.85rem) Georgia, serif; }
#scene-title { margin: .25rem 0 0; font-size: .83rem; color: var(--muted); }
.screen { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; background: #08070a; }
video { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
#status { position: absolute; inset: auto 1rem .8rem; margin: 0 auto; max-width: 36rem; color: #ffdfb3; background: #272029; text-align: center; border-radius: .35rem; padding: .7rem; pointer-events: none; }
#status:empty { display: none; }
.controls { padding: .5rem clamp(.6rem, 3vw, 2rem) max(.55rem, env(safe-area-inset-bottom)); border-top: 1px solid #352a32; background: #17141a; }
.timeline { display: flex; align-items: center; gap: .7rem; padding-inline: .15rem; }
.timeline output { min-width: 2.2rem; color: var(--muted); font: .78rem ui-monospace, monospace; }
#duration { text-align: right; }
#seek { width: 100%; min-width: 0; height: 1.9rem; margin: 0; accent-color: var(--gold); cursor: pointer; }
.transport, .button-group { display: flex; align-items: center; gap: .35rem; }
.transport { justify-content: space-between; flex-wrap: wrap; }
button, summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .34rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: .32rem .64rem;
  border: 1px solid transparent;
  border-radius: .35rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .84rem;
  cursor: pointer;
}
button:hover:not(:disabled), summary:hover { border-color: var(--edge); background: #29212a; }
button:focus-visible, summary:focus-visible, #seek:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button:disabled { opacity: .42; cursor: default; }
button[aria-pressed="true"] { color: var(--gold); border-color: #84634e; background: #37282b; }
button svg { width: 1.12rem; height: 1.12rem; fill: currentColor; flex-shrink: 0; }
button.play-button { background: #e3ae77; border-color: #e3ae77; color: #20161b; min-width: 5.3rem; }
button.play-button:hover:not(:disabled) { background: #f2c391; border-color: #f2c391; }
summary { list-style: none; border-color: var(--edge); }
summary::-webkit-details-marker { display: none; }
nav { position: absolute; right: clamp(.75rem, 3vw, 2rem); top: calc(100% + .45rem); width: min(19rem, calc(100vw - 1.5rem)); max-height: min(50vh, 26rem); overflow: auto; padding: .4rem; border-radius: .45rem; border: 1px solid var(--edge); background: var(--panel); }
ol { display: grid; gap: .25rem; list-style: none; margin: 0; padding: 0; }
nav button { width: 100%; justify-content: space-between; text-align: left; }
nav button[aria-current="true"] { border-color: #84634e; color: #f7c58d; background: #37282b; }
small { color: var(--muted); }
@media (max-width: 25rem) {
  button { padding-inline: .43rem; }
  .transport, .button-group { gap: .15rem; }
  button.play-button { min-width: 4.25rem; }
}
