/* The Impossible Upgrade: storyboard. Theme: videos/_research/hagrid-frame.md (dark navy dashboard). */
:root {
  --bg: #0B1220; --card: #131E30; --th: #19263B; --line: #2B384C;
  --ink: #E6EDF7; --ink-soft: #DCE7F8; --muted: #A7B4C8;
  --blue: #94B6FF; --active: #315DD1; --subtab: #243B62; --subtab-border: #597DBB;
  --gold: #F6C667; --teal: #75DFC0; --now: #FF5CA8; --violet: #C4A0FF; --pink: #FF91BC; --orange: #F7943D;
  --hero-a: #1D3157; --hero-b: #182540; --hero-c: #123B3B;
  --radius: 10px; --shadow: rgba(2, 8, 23, 0.2) 0 8px 30px 0;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --nav-h: 56px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
body.player-open { overflow: hidden; }
a { color: var(--blue); }
code { font: 600 0.92em ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-soft); background: var(--th); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--active); color: #fff; padding: 8px 12px; border-radius: var(--radius); }
.skip-link:focus { left: 12px; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 28px 64px; }
.muted { color: var(--muted); font-weight: 400; }
.label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.tc { font-variant-numeric: tabular-nums; white-space: nowrap; }
.loading { padding: 80px 0; color: var(--muted); }
.note { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }

/* buttons, pills, tags */
.btn { font: 700 14px var(--font); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; cursor: pointer; }
.btn:hover { border-color: var(--subtab-border); }
.btn-primary { background: var(--active); border-color: var(--active); color: #fff; }
.btn-primary:hover { background: #3a68e0; }
.btn-ghost { background: transparent; padding: 5px 10px; font-size: 13px; color: var(--blue); }
.btn-play { background: var(--active); border-color: var(--active); color: #fff; padding: 6px 14px; }
.muted-in { opacity: 0.75; font-weight: 400; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); background: var(--th); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.pill.status { color: var(--muted); }
.part-pill.part-1 { color: var(--muted); }
.part-pill.part-2 { color: var(--teal); border-color: #2c5a52; background: #12302b; }
.ftag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: 0.03em; border-radius: 6px; padding: 0 6px; line-height: 18px; border: 1px solid; white-space: nowrap; vertical-align: 1px; cursor: help; }
.ftag-D { color: var(--violet); border-color: #6f5a9c; background: #241b38; }
.ftag-U { color: var(--orange); border-color: #8a5524; background: #2e2116; }
.ftag-T { color: var(--blue); border-color: #4a6296; background: #18243d; }
.qual { color: var(--muted); }

/* top nav */
.topnav { position: sticky; top: 0; z-index: 20; background: rgba(11, 18, 32, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topnav-inner { max-width: 1440px; margin: 0 auto; padding: 0 28px; height: var(--nav-h); display: flex; align-items: center; gap: 22px; }
.brand { color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 700; }
.topnav-links { display: flex; gap: 4px; }
.topnav-links a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px; padding: 6px 10px; border-radius: var(--radius); }
.topnav-links a:hover { color: var(--ink); background: var(--card); }
.topnav-current { margin-left: auto; color: var(--ink-soft); font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topnav-mini { display: flex; width: 220px; height: 8px; gap: 1px; flex: none; }
.topnav-mini span { height: 100%; background: var(--line); border-radius: 2px; }
.topnav-mini span.part-2 { background: #24504a; }
.topnav-mini span.current { background: var(--blue); }

/* hero */
.hero { padding: 36px 0 8px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
h1 { font-size: 36px; font-weight: 700; letter-spacing: -0.035em; margin: 6px 0 8px; }
.message { font-size: 19px; line-height: 1.5; color: var(--ink-soft); max-width: 70em; margin: 0 0 22px; }
.statbar { display: grid; grid-template-columns: repeat(4, 1fr); background: linear-gradient(90deg, var(--hero-a), var(--hero-b) 55%, var(--hero-c)); border: 1px solid var(--subtab-border); border-radius: var(--radius); }
.stat { padding: 16px 22px; border-left: 1px solid rgba(89, 125, 187, 0.35); }
.stat:first-child { border-left: 0; }
.stat .label { color: var(--ink-soft); opacity: 0.85; }
.stat .value { font-size: 44px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin: 4px 0 2px; }
.stat .value-sm { font-size: 30px; line-height: 1.45; }
.value.gold { color: var(--gold); } .value.teal { color: var(--teal); }
.stat .sub { color: var(--muted); font-size: 12.5px; }
.hero-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; margin: 18px 0 14px; }
.hero-meta div { display: grid; grid-template-columns: 78px 1fr; gap: 10px; font-size: 13.5px; }
.hero-meta div:last-child { grid-column: 1 / -1; }
.hero-meta dt { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.hero-meta dd { margin: 0; color: var(--ink-soft); }
.swatches { display: inline-flex; gap: 3px; vertical-align: -3px; margin-left: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); }
.arc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.arc-item { color: var(--ink-soft); font-weight: 600; padding: 1px 6px; }
.arc-arrow { color: var(--line); font-weight: 800; }
.arc-pivot { display: inline-flex; margin: 0 6px; padding: 2px 10px; border-radius: 999px; background: #12302b; border: 1px solid var(--teal); }
.arc-pivot .arc-item { color: var(--teal); font-weight: 800; letter-spacing: 0.04em; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.budget { font-size: 12.5px; color: var(--muted); }
.budget.ok::first-letter { color: var(--teal); }
.budget.bad { color: #ff8a8a; }

/* panels */
.panel { margin-top: 34px; }
.panel-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2 { font-size: 22px; letter-spacing: -0.02em; margin: 0; }
.panel-head p { margin: 0; font-size: 13.5px; }

/* master timeline */
.tl { display: grid; grid-template-columns: 96px 1fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 34px 12px; }
.tl-labels { display: grid; grid-template-rows: 24px 30px 76px 40px 64px; row-gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tl-labels > span { display: flex; flex-direction: column; justify-content: center; }
.tl-labels small { font-size: 9.5px; letter-spacing: 0.06em; font-weight: 700; color: var(--blue); text-transform: none; }
.tl-tracks { position: relative; display: grid; grid-template-rows: 24px 30px 76px 40px 64px; row-gap: 6px; }
.tl-tracks > div { position: relative; }
.tl-tracks > .tl-pivot { position: absolute; }
.tl-ruler { border-bottom: 1px solid var(--line); }
.tick { position: absolute; bottom: 0; width: 1px; height: 5px; background: var(--line); }
.tick.major { height: 9px; background: var(--muted); }
.tick b { position: absolute; bottom: 10px; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-weight: 700; }
.tick:first-child b { transform: none; }
.tick:last-child b { transform: translateX(-100%); }
.tl-part { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-radius: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; white-space: nowrap; overflow: hidden; }
.tl-part.part-1 { background: #162238; color: var(--ink-soft); }
.tl-part.part-2 { background: linear-gradient(90deg, #14403a, #12302b); color: var(--teal); margin-left: 2px; }
.tl-part .range { color: var(--muted); font-weight: 700; letter-spacing: 0.02em; }
.tl-block { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 6px 6px 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--th); color: var(--ink); text-decoration: none; overflow: hidden; min-width: 0; margin-right: 2px; transition: border-color .15s, background .15s; }
.tl-block.part-2 { background: #14302d; border-color: #2c5a52; }
.tl-block:hover, .tl-block:focus-visible { border-color: var(--blue); background: var(--subtab); z-index: 2; }
.tl-block.current { border-color: var(--blue); box-shadow: inset 0 -3px 0 var(--blue); }
.tl-block .n { font-weight: 800; font-size: 14px; color: var(--gold); line-height: 1; }
.tl-block .t { font-size: 11px; font-weight: 700; line-height: 1.2; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.tl-block .time { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.tl-music .cue { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--violet); padding: 2px 6px 2px 5px; overflow: hidden; background: linear-gradient(90deg, rgba(196,160,255,0.12), rgba(196,160,255,0.02)); font-size: 11px; line-height: 1.25; }
.tl-music .cue.part-2 { border-left-color: var(--teal); background: linear-gradient(90deg, rgba(117,223,192,0.14), rgba(117,223,192,0.02)); }
.tl-music .cue:nth-child(even) { background-color: rgba(255,255,255,0.015); }
.cue-t { display: block; font-weight: 800; color: var(--ink-soft); }
.cue-x { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-music .cue:hover, .tl-music .cue:focus-visible { z-index: 3; overflow: visible; }
.tl-music .cue:hover .cue-x, .tl-music .cue:focus-visible .cue-x { position: absolute; left: -2px; top: 100%; z-index: 4; white-space: normal; width: 260px; background: var(--th); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; color: var(--ink-soft); box-shadow: var(--shadow); }
.tl-music .cue:last-child:hover .cue-x, .tl-music .cue:nth-last-child(2):hover .cue-x { left: auto; right: 0; }
.tl-energy svg { width: 100%; height: 100%; display: block; }
.en-note { position: absolute; bottom: 2px; transform: translateX(calc(-100% - 6px)); font-size: 10.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tl-pivot { position: absolute; top: 30px; bottom: -14px; width: 0; border-left: 2px solid var(--teal); z-index: 3; pointer-events: none; }
.tl-pivot::before { content: ""; position: absolute; top: -6px; left: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); }
.tl-pivot span { position: absolute; bottom: 0; transform: translate(-50%, 100%); white-space: nowrap; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--bg); background: var(--teal); border-radius: 6px; padding: 2px 8px; }
.cue-list { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 14px; }
.cue-col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.cue-col.part-2 { border-color: #2c5a52; }
.cue-col h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: 0.1em; color: var(--ink-soft); }
.cue-col ol { list-style: none; margin: 0; padding: 0; columns: 1; }
.cue-col li { display: grid; grid-template-columns: 82px 1fr; gap: 8px; font-size: 13px; padding: 3px 0; border-top: 1px solid rgba(43,56,76,0.6); }
.cue-col li:first-child { border-top: 0; }
.cue-col .tc { color: var(--gold); font-weight: 800; }

/* frame cards */
.frames { margin-top: 40px; }
.frame { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; overflow: hidden; scroll-margin-top: calc(var(--nav-h) + 12px); }
.frame.part-2 { border-color: #2f4f57; }
.frame-head { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "num titles time" "num flags flags"; gap: 4px 18px; align-items: start; padding: 16px 20px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #162238, var(--card) 60%); }
.frame.part-2 .frame-head { background: linear-gradient(90deg, #13302c, var(--card) 60%); }
.frame-num { grid-area: num; font-size: 44px; font-weight: 800; color: var(--gold); line-height: 1; letter-spacing: -0.03em; padding-top: 2px; }
.frame-titles { grid-area: titles; min-width: 0; }
.frame-titles h3 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.frame-titles .scene { margin: 2px 0 0; color: var(--ink-soft); font-size: 14.5px; }
.frame-time { grid-area: time; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.frame-time .tc { font-size: 20px; font-weight: 800; }
.frame-time .dur { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 0.08em; }
.frame-flags { grid-area: flags; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.frame-flags .btn-ghost { margin-left: auto; }
.frame-body { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 20px; padding: 18px 20px 6px; }
.sketch-wrap { margin: 0; }
.sketch-wrap figcaption { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; margin-top: 7px; color: var(--ink-soft); }
.sketch-wrap figcaption > span:first-child { font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; color: var(--muted); }
.concept { margin: 0 0 14px; padding: 12px 16px 14px; border-left: 4px solid var(--gold); background: #1a2333; border-radius: 0 var(--radius) var(--radius) 0; }
.concept .label { color: var(--gold); }
.concept p { margin: 4px 0 0; font-size: 19px; line-height: 1.45; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.specs { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec { display: grid; grid-template-columns: 72px 1fr; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.spec:first-child { border-top: 0; }
.spec:nth-child(odd) { background: rgba(25, 38, 59, 0.55); }
.spec dt { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); padding-top: 3px; }
.spec dd { margin: 0; color: var(--ink-soft); }
.frame-lower { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.32fr); gap: 20px; padding: 14px 20px 16px; }
.ost-box, .beats-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--bg); }
.ost-box { border-color: #6e5a2e; background: #15140f; }
.ost-box > .label, .beats-box > .label { margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ost-only { color: var(--gold); letter-spacing: 0.06em; border: 1px solid #6e5a2e; border-radius: 999px; padding: 0 8px; font-size: 10px; }
.ost-body { line-height: 2; font-size: 14px; }
.ost { quotes: "“" "”"; font-weight: 700; color: var(--ink); background: var(--th); border: 1px solid #6e5a2e; border-radius: 6px; padding: 2px 7px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ost-note { color: var(--muted); font-size: 13px; }
.ost-arrow { color: var(--gold); font-weight: 800; }
.ost-sep { color: var(--line); font-weight: 800; }
.beat-ruler { margin: 4px 0 10px; }
.beat-track { position: relative; height: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
.beat-bar { position: absolute; top: 3px; bottom: 3px; background: var(--subtab); border: 1px solid var(--subtab-border); border-radius: 4px; margin-right: 2px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.beat-bar:nth-child(even) { background: #1f3354; }
.beat-bar i, .beat-pin i { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--ink-soft); }
.beat-pin { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px solid var(--gold); z-index: 2; }
.beat-pin i { position: absolute; top: -12px; left: -5px; color: var(--gold); }
.beat-ticks { position: relative; height: 16px; }
.beat-ticks span { position: absolute; top: 2px; transform: translateX(-50%); font-size: 10px; color: var(--muted); }
.beat-ticks span:first-child { transform: none; }
.beat-ticks .poster-tick { top: -30px; color: var(--teal); font-weight: 800; font-size: 9.5px; white-space: nowrap; background: var(--bg); padding: 0 3px; border-radius: 3px; z-index: 3; border-bottom: 2px solid var(--teal); }
.beat-list { list-style: none; margin: 0; padding: 0; }
.beat-list li { display: grid; grid-template-columns: 20px 84px 1fr; gap: 8px; padding: 5px 0; border-top: 1px solid rgba(43, 56, 76, 0.7); font-size: 13.5px; }
.beat-list li:first-child { border-top: 0; }
.beat-i { font-size: 11px; font-weight: 800; color: var(--muted); padding-top: 2px; }
.beat-range { color: var(--gold); font-weight: 800; font-size: 12.5px; padding-top: 1px; }
.beat-text { color: var(--ink-soft); }
.beat-label { color: var(--ink); }
.frame-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); background: rgba(11, 18, 32, 0.5); }
.meta { padding: 10px 20px; border-left: 1px solid var(--line); font-size: 13px; }
.meta:first-child { border-left: 0; }
.meta dt { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: 2px 0 0; color: var(--ink-soft); }
.meta-source { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
.meta-source dd { color: var(--muted); }

/* sketches */
.sketch { position: relative; aspect-ratio: 16 / 9; width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; container-type: inline-size; box-shadow: var(--shadow); }
.sk-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sk-svg text { font-family: var(--font); font-variant-numeric: tabular-nums; }
.sk-svg .ann { fill: var(--blue); font-size: 22px; font-weight: 700; letter-spacing: 0.02em; paint-order: stroke; stroke: rgba(11,18,32,0.85); stroke-width: 6px; stroke-linejoin: round; }
.sk-html { position: absolute; inset: 0; font-family: var(--font); }
.sk-tag { position: absolute; font-size: 1.15cqw; line-height: 1.6cqw; padding: 0 0.5cqw; border-radius: 0.4cqw; }
.sk-type { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1.4cqw; text-align: center; }
.sk-line { position: relative; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; }
.sk-line-main { font-size: 4.6cqw; }
.sk-ghost { font-size: 2.3cqw; color: var(--muted); opacity: 0.55; font-weight: 600; }
.sk-t { position: absolute; right: calc(100% + 1.4cqw); top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 1.25cqw; font-weight: 800; letter-spacing: 0.04em; color: var(--blue); opacity: 1; }
.sk-ghost .sk-t { opacity: 1; }
.gold-ul { position: relative; }
.gold-ul::after { content: ""; position: absolute; left: 0; right: 0; bottom: -0.5cqw; height: 0.35cqw; border-radius: 1cqw; background: var(--gold); }
.sk-attrib { position: absolute; bottom: 9%; font-size: 1.35cqw; color: var(--muted); opacity: 0.8; }
.sk-type-17 { gap: 1.8cqw; padding: 0 9%; }
.sk-line-17 { font-size: 3.5cqw; line-height: 1.3; max-width: 30em; }
.sk-line-gold { font-size: 4.2cqw; color: var(--gold); font-weight: 800; }
.sk-endcard { position: absolute; bottom: 7%; display: flex; align-items: center; }
.sk-endcard .sk-t { right: calc(100% + 1cqw); }
.sk-statbar { font-size: 1.5cqw; font-weight: 800; color: var(--ink); background: linear-gradient(90deg, var(--hero-a), var(--hero-b), var(--hero-c)); border: 1px solid var(--subtab-border); border-radius: 0.7cqw; padding: 0.7cqw 1.6cqw; white-space: nowrap; }
.sk-subline { position: absolute; left: 0; right: 0; bottom: 3.2%; text-align: center; font-size: 2cqw; color: var(--muted); font-weight: 600; }
.sk-subline .ftag { font-size: 1.15cqw; line-height: 1.7cqw; }
.sk-monitor { position: absolute; background: #10203f; border: 0.25cqw solid var(--blue); border-radius: 0.8cqw; padding: 1cqw 1.2cqw 1.1cqw; box-shadow: 0 0 3cqw rgba(148, 182, 255, 0.25); }
.sk-mon-label { font-size: 1.05cqw; font-weight: 800; letter-spacing: 0.08em; color: var(--blue); margin-bottom: 0.8cqw; }
.sk-input { background: var(--card); border: 1px solid var(--line); border-radius: 0.6cqw; padding: 0.9cqw 1cqw; font-size: 1.55cqw; line-height: 1.4; color: var(--ink); font-weight: 600; }
.caret { display: inline-block; width: 0.18cqw; height: 1.6cqw; background: var(--ink); vertical-align: -0.3cqw; margin-left: 0.2cqw; animation: blink 1s steps(1) infinite; }
.sk-mon-foot { display: flex; align-items: center; gap: 0.9cqw; margin-top: 0.9cqw; font-size: 1.4cqw; color: var(--muted); }
.sk-mon-foot .ftag { font-size: 1.05cqw; line-height: 1.6cqw; margin-left: auto; }
.kbd { border: 1px solid var(--line); border-radius: 0.4cqw; padding: 0 0.6cqw; background: var(--th); color: var(--ink); }
.teal-dot { width: 1.4cqw; height: 1.4cqw; border-radius: 50%; background: var(--teal); box-shadow: 0 0 1.4cqw var(--teal); }
.sk-3d { perspective: 90cqw; }
.sk-panel { position: absolute; margin: 0; transform: rotateY(var(--ry)) rotateZ(var(--rz)); transform-style: preserve-3d; }
.sk-panel img { display: block; width: 100%; border-radius: 0.6cqw; border: 1px solid var(--line); box-shadow: 0 2cqw 4cqw rgba(2, 8, 23, 0.6); }
.sk-panel figcaption { margin-top: 0.6cqw; font-size: 1.25cqw; font-weight: 800; color: var(--blue); letter-spacing: 0.03em; }
.pulse { animation: pulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.pulse-ring { animation: ring 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { transform: scale(1.25); opacity: 0.75; } }
@keyframes ring { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(1.4); opacity: 0; } }

/* design system */
.sub-h { font-size: 15px; font-weight: 700; margin: 26px 0 10px; color: var(--ink); }
.sub-h .muted { font-size: 13px; margin-left: 6px; }
.callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.callout { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius); padding: 12px 16px; }
.callout p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.callout strong { color: var(--ink); }
.callout-spoiler { border-left-color: var(--now); background: linear-gradient(90deg, #2a1424, var(--card) 45%); grid-row: span 2; }
.callout-spoiler .label { color: var(--now); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.systable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.systable th { text-align: left; background: var(--th); color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.systable td { padding: 7px 12px; border-top: 1px solid var(--line); color: var(--ink-soft); }
.systable tr:first-child td { border-top: 0; }
.systable td.num a { color: var(--gold); font-weight: 800; text-decoration: none; }
.systable tr.part-2 td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
.systable td:nth-child(2) { font-weight: 700; color: var(--ink); }
.systable .tc { color: var(--muted); }
.prose p, p.prose { color: var(--ink-soft); font-size: 13.5px; margin: 8px 0; }
.motif-grid { display: grid; min-width: 1100px; }
.mg-corner, .mg-col, .mg-name, .mg-cell { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.mg-corner { background: var(--th); font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 7px 10px; border-top: 0; border-left: 0; }
.mg-col { background: var(--th); text-align: center; color: var(--gold); font-weight: 800; font-size: 13px; padding: 7px 0; text-decoration: none; border-top: 0; }
.mg-col.part-2 { background: #14302d; }
.mg-name { padding: 8px 10px; border-left: 0; display: flex; flex-direction: column; justify-content: center; }
.mg-name b { font-size: 12px; letter-spacing: 0.06em; }
.mg-name small { color: var(--muted); font-size: 11px; }
.mg-cell { padding: 6px 5px; font-size: 10.5px; line-height: 1.3; color: var(--ink-soft); min-height: 64px; }
.mg-cell.on { background: rgba(117, 223, 192, 0.08); box-shadow: inset 0 3px 0 var(--c, var(--teal)); }
.mg-cell.m0 { --c: var(--teal); } .mg-cell.m1 { --c: var(--blue); } .mg-cell.m2 { --c: var(--ink-soft); } .mg-cell.m3 { --c: var(--pink); } .mg-cell.m4 { --c: var(--gold); }
.mg-cell.m1 { background: rgba(148, 182, 255, 0.08); } .mg-cell.m2.on { background: rgba(220, 231, 248, 0.06); } .mg-cell.m3.on { background: rgba(255, 145, 188, 0.08); } .mg-cell.m4.on { background: rgba(246, 198, 103, 0.08); }
.mg-cell:not(.on) { background: transparent; }
.motif-notes { margin: 12px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.motif-notes b { color: var(--ink-soft); }
.motif-notes li { margin: 3px 0; }
.arcs { display: grid; gap: 8px; }
.arc-row { display: grid; grid-template-columns: 100px 1fr; gap: 12px; align-items: stretch; }
.arc-name { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 10px; }
.arc-band { display: grid; gap: 3px; }
.arc-seg { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 12px; line-height: 1.3; color: var(--ink-soft); min-width: 0; }
.arc-seg.s1 { background: #172338; } .arc-seg.s2 { background: #1a2740; } .arc-seg.s3 { background: #15283a; }
.arc-range { display: block; font-size: 10.5px; font-weight: 800; color: var(--gold); }
.arc-flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; color: var(--ink-soft); }
.ds-two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.guard { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-soft); }
.guard li { margin: 4px 0; }
.guard-sub { padding-left: 16px; margin: 4px 0; color: var(--muted); }
.sfx-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sfx { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink-soft); font-size: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px 3px 4px; }
.sfx:hover { border-color: var(--blue); }
.sfx-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: var(--th); color: var(--gold); font-weight: 800; font-size: 11.5px; }
.tag-legend { display: grid; gap: 6px; font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
.sources { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-soft); }
.sources li { margin: 3px 0; }
.site-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* animatic player */
.player { position: fixed; inset: 0; z-index: 50; background: #070B15; display: flex; flex-direction: column; padding: 14px 28px 16px; gap: 10px; }
.player[hidden] { display: none; }
.pl-top { display: flex; align-items: center; gap: 18px; }
.pl-title { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; min-width: 0; }
.pl-num { font-size: 30px; font-weight: 800; color: var(--gold); }
.pl-clock { margin-left: auto; font-size: 18px; font-weight: 800; color: var(--ink-soft); }
.pl-stage { flex: 1; min-height: 0; display: grid; place-items: center; container-type: size; }
.pl-stage .sketch { width: min(100cqw, 100cqh * 16 / 9); }
.pl-caption { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pl-ost, .pl-beat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; height: 112px; overflow-y: auto; font-size: 13.5px; color: var(--ink-soft); }
.pl-ost { border-color: #6e5a2e; background: #15140f; }
.pl-ost .label, .pl-beat .label { margin-bottom: 2px; }
.pl-ost .ost-body { line-height: 1.85; }
.pl-beat .tc { color: var(--gold); margin-left: 6px; }
.pl-cue { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.pl-timeline { position: relative; height: 34px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; touch-action: none; }
.pl-block { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; background: var(--th); border: 1px solid var(--line); margin-right: 2px; display: grid; place-items: center; overflow: hidden; }
.pl-block.part-2 { background: #14302d; border-color: #2c5a52; }
.pl-block.current { border-color: var(--blue); background: var(--subtab); }
.pl-block b { font-size: 11px; color: var(--gold); }
.pl-pivot { position: absolute; top: -6px; bottom: -6px; border-left: 2px solid var(--teal); }
.pl-pivot i { position: absolute; bottom: calc(100% + 1px); left: -2px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; color: var(--teal); white-space: nowrap; }
.pl-head { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1px; background: var(--now); border-radius: 2px; box-shadow: 0 0 8px var(--now); }
.pl-controls { display: flex; align-items: center; gap: 10px; }
.pl-scrub { flex: 1; display: flex; }
.pl-scrub input { width: 100%; accent-color: var(--now); }
.pl-hint { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* responsive */
@media (max-width: 1100px) {
  .frame-body, .frame-lower { grid-template-columns: 1fr; }
  .callouts, .ds-two, .cue-list { grid-template-columns: 1fr; }
  .callout-spoiler { grid-row: auto; }
  .topnav-mini, .topnav-current { display: none; }
  .tl-block .t { display: none; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px 48px; }
  .statbar { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .hero-meta { grid-template-columns: 1fr; }
  .topnav-links { display: none; }
  .frame-meta { grid-template-columns: 1fr; }
  .meta { border-left: 0; border-top: 1px solid var(--line); }
  .tl { grid-template-columns: 64px 1fr; overflow-x: auto; }
  .tl-tracks { min-width: 900px; }
  .pl-caption { grid-template-columns: 1fr; }
  .pl-hint { display: none; }
}
