@font-face {
  font-family: "Instrument Serif";
  src: url("./assets/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("./assets/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f5f3ec;
  --ink: #182d26;
  --muted: #4f6158;
  --line: #d8ddd2;
  --accent: #234d3e;
  --accent-hover: #16382d;
  --focus: #27634d;
  --wrap: 1250px;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button { font: inherit; }
button:focus-visible, video:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.site-header, .site-footer, .guide { width: min(var(--wrap), calc(100% - 88px)); margin-inline: auto; }
.site-header {
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wordmark { display: flex; align-items: center; gap: 9px; font-size: .86rem; font-weight: 700; letter-spacing: .2em; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; background: var(--accent); color: #fff; font-family: "Instrument Serif", Georgia, serif; font-size: 1.42rem; font-weight: 400; letter-spacing: 0; padding-bottom: 1px; }
.header-label { font-size: .78rem; font-weight: 600; color: var(--muted); letter-spacing: .055em; }
.header-label span { margin-inline: 5px; }
.guide {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr);
  grid-template-areas: "player intro" "player chapters";
  column-gap: clamp(42px,6vw,97px);
  align-items: start;
  margin-block: clamp(28px,5vw,66px) 49px;
}
.intro { grid-area: intro; padding-top: 12px; }
h1 { margin: 0; font-family: "Instrument Serif", Georgia, serif; font-size: clamp(58px,6.4vw,103px); font-weight: 400; line-height: 1; letter-spacing: -.035em; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: .9rem; margin: 21px 0 0; }
.separator { width: 3px; height: 3px; background: currentColor; border-radius: 50%; }
.stage {
  grid-area: player;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 626px;
  position: relative;
  overflow: hidden;
  padding: 20px;
  background: radial-gradient(ellipse at 45% 25%, #e9efdf 0, #dbe6d3 49%, #cbdcca 100%);
  border: 1px solid #d2ddce;
  border-radius: 25px;
}
.video-shell {
  position: relative;
  width: min(100%, clamp(340px, 42.7vh, 382px));
  background: #edf2e8;
  overflow: hidden;
  box-shadow: 0 18px 52px #233d2e27;
  border-radius: 16px;
  isolation: isolate;
}
.video-frame { position: relative; aspect-ratio: 2 / 3; }
video { display: block; width: 100%; height: 100%; object-fit: contain; }
.player-controls { display: flex; align-items: center; gap: 3px; min-height: 44px; padding-inline: 2px; color: #fff; background: #182d26; }
.player-controls button { display: grid; place-items: center; min-height: 44px; min-width: 44px; color: inherit; background: transparent; border: 0; cursor: pointer; }
.player-controls button:focus-visible, .player-controls input:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.player-controls input { flex: 1; min-width: 40px; height: 44px; margin: 0 5px 0 0; accent-color: #b1d8c6; }
.player-controls span { font-size: .78rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.control-pause, .is-playing .control-play { display: none; }
.is-playing .control-pause { display: initial; }
.video-shell:fullscreen { display: grid; grid-template-rows: minmax(0,1fr) auto; justify-items: center; width: 100%; height: 100%; border-radius: 0; background: #0b1a14; }
.video-shell:fullscreen .video-frame { height: 100%; min-height: 0; width: 100%; min-width: 0; aspect-ratio: auto; }
.video-shell:fullscreen .player-controls { width: min(620px, 100%); }
.player-cover { position: absolute; inset: 0; display: flex; align-items: end; justify-content: center; padding: 0 12px 23%; background: linear-gradient(transparent 69%, #2e503619 100%); }
.play {
  min-height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 12px 19px;
  border: 0;
  border-radius: 100vw;
  background: var(--accent);
  color: #fff;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.play:hover { background: var(--accent-hover); transform: translateY(-2px); }
.play:focus-visible { outline-color: #fff; box-shadow: 0 0 0 5px var(--focus); }
.player-message { margin: 14px 0 0; max-width: 32ch; color: var(--ink); font-size: .9rem; text-align: center; }
.chapter-panel { grid-area: chapters; margin-top: 31px; }
h2 { margin: 0 0 10px; font-size: 1.14rem; font-weight: 700; letter-spacing: -.018em; }
.chapters { list-style: none; padding: 0; margin: 0; }
.chapters li { border-top: 1px solid var(--line); }
.chapters li:last-child { border-bottom: 1px solid var(--line); }
.chapter {
  display: grid;
  grid-template-columns: 64px minmax(0,1fr) auto 18px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 67px;
  padding: 8px 5px 8px 0;
  border: 0;
  background: transparent;
  text-align: start;
  color: var(--ink);
  cursor: pointer;
  transition: background .18s ease;
}
.chapter:hover { background: #e9ede2; }
.chapter[aria-current="true"] { color: var(--accent-hover); background: #e1eadc; }
.chapter img { display: block; object-fit: cover; border-radius: 7px; background: #e6eeed; }
.chapter-name { display: block; font-size: .94rem; font-weight: 650; line-height: 1.18; }
.chapter-time { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.chapter > svg { color: var(--accent); }
.site-footer { display: flex; justify-content: space-between; gap: 12px; padding-block: 18px 23px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }

@media (max-width: 820px) {
  .site-header, .site-footer, .guide { width: min(520px, calc(100% - 32px)); }
  .site-header { min-height: 57px; }
  .guide { grid-template-columns: minmax(0,1fr); grid-template-areas: "intro" "player" "chapters"; row-gap: 20px; margin-block: 20px 35px; }
  .intro { padding: 0; }
  h1 { font-size: clamp(48px,11vw,75px); line-height: .96; }
  .meta { margin-top: 12px; }
  .stage { min-height: auto; border-radius: 18px; padding: 12px; }
  .video-shell { width: min(100%, max(187px, min(36svh, 79.33vw, 367px))); border-radius: 12px; }
  .chapter-panel { margin-top: 3px; }
  .chapter { min-height: 64px; }
}
@media (max-width: 360px) {
  .chapter { gap: 7px; }
  .chapter-name { font-size: .86rem; }
  .header-label { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
