/* The public site's palette and typeface (src/index.css, site-*), with its night tone for the player. */
@font-face { font-family: Geist; src: url(/fonts/geist-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --canvas: #f5f6fa; --surface: #fff; --ink: #0e1330; --soft: #4b5272; --line: #e2e5ef;
  --accent: #3b4fd4; --deep: #02006c; --wash: #eef0fc;
  --night: #0c1033; --night-2: #171d4c; --night-line: #2a3260; --night-ink: #eef0fa; --night-soft: #aab1d6; --night-accent: #8e9bff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.6 Geist, Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.stage :focus-visible, .top :focus-visible { outline-color: var(--night-accent); }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 20; padding: 8px 16px; border-radius: 8px; background: var(--surface); }
.t, .time, .n { font-variant-numeric: tabular-nums; }

.top { position: sticky; top: 0; z-index: 10; background: var(--night); color: var(--night-ink); border-bottom: 1px solid var(--night-line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.logo b { font-weight: 600; color: var(--night-accent); }
.logo-sub { padding-left: 11px; border-left: 1px solid var(--night-line); font-weight: 400; color: var(--night-soft); }
.top nav { display: flex; align-items: center; gap: 22px; font-size: 14.5px; }
.top nav > a:not(.btn), .find { color: var(--night-soft); text-decoration: none; }
.top nav > a:not(.btn):hover, .find:hover { color: var(--night-ink); }
.find { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; border: 0; background: none; }
.btn { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 14.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #2f41bd; }

.stage { padding: 44px 0 56px; background: var(--night); color: var(--night-ink); }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 600; line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }
.lead { margin-top: 14px; max-width: 58ch; font-size: 17.5px; color: var(--soft); }
.stage .lead { color: var(--night-soft); }
.crumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; font-size: 14.5px; color: var(--night-soft); }
.crumb a { text-underline-offset: 3px; }
.plan { margin-top: 8px; max-width: 70ch; font-size: 14.5px; color: var(--night-soft); }
.plan b { margin-right: 6px; font-weight: 500; color: var(--night-ink); }
.note { margin-top: 18px; max-width: 70ch; padding: 12px 16px; border-radius: 10px; background: var(--night-2); font-size: 15px; }

.player { margin-top: 28px; min-width: 0; }
.frame { position: relative; overflow: hidden; border-radius: 12px 12px 0 0; background: #000; }
.frame video { display: block; width: 100%; height: auto; aspect-ratio: 16/9; }
.big { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 84px; height: 84px; padding: 0 0 0 5px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 0 0 10px rgb(59 79 212 / .28); transition: scale .15s; }
.big svg { width: 34px; height: 34px; }
.big:hover { scale: 1.06; }
.bar { display: flex; gap: 2px; height: 18px; padding-top: 2px; overflow: hidden; border-radius: 0 0 12px 12px; }
.bar button { position: relative; flex: 1 1 0; min-width: 3px; padding: 0; border: 0; background: var(--night-line); transition: background-color .15s; }
.bar button:hover { background: #46508a; }
.bar button:focus-visible { outline-offset: -3px; border-radius: 0; }
.bar i { position: absolute; inset: 0; background: var(--night-accent); transform: scaleX(0); transform-origin: left; }
.now { min-height: 24px; margin-top: 10px; font-size: 14.5px; color: var(--night-soft); }
.now button { padding: 8px 14px; border: 0; border-radius: 8px; background: var(--night-2); color: var(--night-ink); font-weight: 500; }
.now button:hover { background: var(--night-line); }

.theater { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
.rail { position: relative; margin-top: 28px; }
.rail-head { display: flex; justify-content: space-between; padding: 0 10px 10px 4px; font-size: 15px; border-bottom: 1px solid var(--night-line); }
.rail-head b { font-weight: 600; }
.rail-head span { color: var(--night-soft); font-variant-numeric: tabular-nums; }
.rail ol { position: absolute; inset: 36px 0 34px; overflow-y: auto; scrollbar-color: var(--night-line) transparent; scrollbar-width: thin; }
.rail a { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; padding: 9px 10px 9px 4px; border-radius: 8px; font-size: 14.5px; line-height: 1.4; text-decoration: none; color: var(--night-soft); }
.rail a:hover { background: var(--night-2); color: var(--night-ink); }
.rail a[aria-current] { background: var(--night-2); color: #fff; font-weight: 500; }
.rail a:focus-visible { outline-offset: -2px; }
.rail .n { text-align: right; }

.chapters { padding-block: 72px 56px; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 600; line-height: 1.12; letter-spacing: -.03em; }
.group { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }
.group h3 { font-size: 19px; font-weight: 600; letter-spacing: -.015em; }
.group ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 32px 24px; margin-top: 18px; }
.group a { display: block; text-decoration: none; }
.shot { position: relative; display: block; overflow: hidden; border-radius: 10px; background: var(--night); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.time, .seen { position: absolute; bottom: 8px; padding: 1px 8px; border-radius: 6px; background: rgb(12 16 51 / .88); color: #fff; font-size: 13px; }
.time { right: 8px; }
.seen { left: 8px; background: #0f7a4f; }
.title { display: block; margin-top: 12px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.group a:hover .title { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.sum { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.5; color: var(--soft); }

.reading { display: grid; grid-template-columns: 300px minmax(0, 68ch); gap: 64px; padding-block: 56px 24px; }
.reading h2 { font-size: 1.45rem; }
.steps { align-self: start; position: sticky; top: 92px; }
.steps ol { margin-top: 14px; }
.steps a { display: grid; grid-template-columns: 46px 1fr; margin-left: -10px; padding: 8px 10px; border-radius: 8px; line-height: 1.45; text-decoration: none; }
.steps a:hover, .steps a[aria-current] { background: var(--wash); }
.steps a[aria-current] { font-weight: 500; color: var(--deep); }
.steps .t { color: var(--soft); font-weight: 400; }
.script p { display: grid; grid-template-columns: 54px 1fr; margin: 6px -12px 0; padding: 5px 12px; border-radius: 8px; }
.script h2 { margin-bottom: 8px; }
.script p.on { background: var(--wash); }
.script p a { color: var(--accent); font-variant-numeric: tabular-nums; text-decoration: none; }
.script p a:hover { text-decoration: underline; text-underline-offset: 3px; }

.turn { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-block: 32px 72px; }
.turn a { padding: 18px 0; border-top: 1px solid var(--line); font-size: 18px; font-weight: 600; letter-spacing: -.015em; text-decoration: none; }
.turn a:hover { color: var(--accent); border-color: var(--accent); }
.turn span { display: block; font-size: 14.5px; font-weight: 400; letter-spacing: 0; color: var(--soft); }
.turn .next { text-align: right; }

.foot { padding: 28px 0; border-top: 1px solid var(--line); background: var(--surface); font-size: 14.5px; color: var(--soft); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.foot p { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.lost { padding-block: 120px; }
.lost .btn { margin-top: 24px; }

dialog.search { width: min(680px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 120px)); margin: 72px auto auto; padding: 0; overflow-y: auto; border: 0; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgb(12 16 51 / .5); }
dialog.search::backdrop { background: rgb(12 16 51 / .6); }
.search form { position: sticky; top: 0; display: flex; gap: 8px; padding: 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.search input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid #c9cede; border-radius: 10px; font: inherit; color: inherit; }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; border-radius: 10px; }
.search .close { padding: 0 14px; border: 0; border-radius: 10px; background: var(--wash); }
.search-note { padding: 10px 18px 0; font-size: 14px; color: var(--soft); }
.search-note:empty { display: none; }
.search ol { padding: 6px 8px 12px; }
.search ol:empty { display: none; }
.search li a { display: block; padding: 10px; border-radius: 8px; line-height: 1.45; text-decoration: none; }
.search li a:hover, .search li a:focus-visible { background: var(--wash); outline-offset: -2px; }
.search li b { display: block; font-weight: 600; }
.search li span { font-size: 15px; color: var(--soft); }
.search mark { border-radius: 3px; background: #dfe3ff; color: inherit; }

@media (max-width: 1000px) {
  .theater { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rail { margin-top: 20px; }
  .rail ol { position: relative; inset: auto; max-height: 320px; }
  .reading { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .steps { position: static; }
}
@media (max-width: 720px) {
  .wrap { padding-inline: 16px; }
  .top nav { gap: 14px; }
  .top nav > a:not(.btn), .find span, .logo-sub { display: none; }
  .find { padding: 10px; }
  .stage { padding: 28px 0 40px; }
  .stage .player { margin-inline: -16px; }
  .frame, .bar { border-radius: 0; }
  .now { padding-inline: 16px; }
  .big { width: 64px; height: 64px; }
  .turn { grid-template-columns: 1fr; gap: 8px; }
  .turn .next { text-align: left; }
  .script p { grid-template-columns: 48px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .big, .bar button { transition: none; }
  .big:hover { scale: 1; }
}
