:root {
  color-scheme: dark;
  --bg: #101719;
  --fg: #eff4f1;
  --muted: #a4b7b8;
  --line: #304043;
  --cyan: #89ddd2;
  --amber: #e5b96d;
  --paper: #182225;
  --sans: "Source Sans 3", Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1rem/1.6 var(--sans); }
button, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--cyan); }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible, video:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(82rem, calc(100% - 7rem)); margin: 0 auto; }
.skip { position: absolute; z-index: 2; left: 1rem; top: -8rem; padding: .65rem 1rem; color: #101719; background: var(--cyan); }
.skip:focus { top: 1rem; }
.mast { border-bottom: 1px solid var(--line); }
.mast-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; }
.wordmark { display: inline-flex; align-items: center; gap: .8rem; font: 600 1.55rem/1 Georgia, serif; letter-spacing: -.06em; }
.linkage { width: 1.42rem; height: 2px; margin: 0 .12rem; background: var(--cyan); position: relative; transform: rotate(-32deg); }
.linkage::before, .linkage::after { content: ""; display: block; position: absolute; top: 50%; width: .56rem; height: .56rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); transform: translate(-30%, -50%); }
.linkage::after { left: 100%; width: .4rem; height: .4rem; transform: translate(-60%, -50%); border-color: var(--amber); }
.mast nav { display: flex; align-items: center; gap: clamp(.95rem, 2.5vw, 2.4rem); font-size: .88rem; }
.mast nav > a { padding: .65rem 0; color: var(--muted); }
.mast nav > a:hover { color: var(--fg); }
.share { border: 1px solid #5c7576; background: transparent; border-radius: .35rem; color: var(--fg); padding: .35rem .8rem; }
.share:hover { border-color: var(--cyan); color: var(--cyan); }
.intro { padding: clamp(2.5rem,5vw,4.6rem) 0 clamp(1.6rem,3vw,2.8rem); }
.intro-type { color: var(--cyan); font-size: .88rem; letter-spacing: .09em; font-weight: 600; }
.intro-type span { margin: 0 .55em; color: #718d8e; }
h1, h2, p { margin: 0; }
h1 { font-family: var(--serif); font-weight: 600; letter-spacing: .015em; font-size: clamp(2.65rem,5.5vw,5rem); line-height: 1.25; margin: .24em 0 .15em; }
.intro p { color: #bdcccb; font-size: clamp(1rem,1.35vw,1.17rem); line-height: 1.8; }
.trace-jump { display: inline-block; margin-left: .35rem; color: var(--cyan); font-size: .92em; text-decoration: underline; text-underline-offset: .22em; }
.watch-grid, .notes-grid { display: grid; grid-template-columns: minmax(0, 2.35fr) minmax(16.5rem, 1fr); gap: clamp(1.2rem, 2.85vw, 2.8rem); align-items: start; }
.film { min-width: 0; }
.screen { overflow: hidden; background: #040b0d; position: relative; border-radius: .4rem; border: 1px solid var(--line); }
video { display: block; width: 100%; aspect-ratio: 16/9; background: #040b0d; object-fit: contain; }
.hero-play { position: absolute; right: 1rem; top: 1rem; width: 3.25rem; height: 3.25rem; display: grid; place-items: center; border-radius: 50%; color: #172221; background: #ace9df; border: 1px solid #c3fff3; box-shadow: 0 .15rem 1rem #0007; }
.hero-play:hover { background: #c5fff2; }
.hero-play::after { content: ""; border-top: .43rem solid transparent; border-bottom: .43rem solid transparent; border-left: .68rem solid #122220; margin-left: .14rem; }
.film-bar { min-height: 4.2rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; border-bottom: 1px solid var(--line); }
.current, .speed { display: flex; align-items: center; gap: .62rem; }
.label, .speed { flex-shrink: 0; font-size: .82rem; color: var(--muted); }
.current strong { color: var(--fg); line-height: 1.35; font-size: .97rem; font-weight: 540; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); position: absolute; width: .35rem; height: .35rem; right: .61rem; top: 41%; pointer-events: none; }
select { appearance: none; padding: .28rem 1.55rem .28rem .55rem; border: 1px solid var(--line); border-radius: .25rem; background: var(--paper); color: var(--fg); cursor: pointer; font-family: var(--mono); font-size: .86rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
h2 { font-family: var(--serif); font-size: 1.48rem; font-weight: 600; line-height: 1.4; }
.metadata, .stamp { color: var(--muted); font-family: var(--mono); font-size: .82rem; font-variant-numeric: tabular-nums; }
.chapter-list { list-style: none; padding: .25rem 0 0; margin: 0; }
.chapter-list li + li { border-top: 1px solid #243336; }
.chapter { display: grid; grid-template-columns: 3rem 1fr; gap: .67rem; align-items: center; padding: .66rem .5rem .66rem .6rem; line-height: 1.45; border-left: 2px solid transparent; font-size: .97rem; }
.chapter strong { font-weight: 500; }
.chapter:hover { background: var(--paper); }
.chapter[aria-current] { border-left-color: var(--amber); background: linear-gradient(90deg,#292b23,transparent); color: var(--fg); }
.chapter[aria-current] .stamp { color: var(--amber); }
.notes-grid { margin-top: clamp(2.7rem,5vw,5rem); padding-bottom: 5rem; }
.transcript details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; display: flex; justify-content: space-between; gap: .5rem; align-items: center; padding: 1rem .2rem; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font: 1.25rem/1 var(--mono); }
details[open] summary::after { content: "−"; }
summary:hover { color: var(--cyan); }
.beat { display: grid; grid-template-columns: 3.3rem minmax(0,1fr); align-items: baseline; gap: .8rem; margin: .05rem 0 1.1rem; }
.beat p { color: #c4d1d0; line-height: 1.9; }
.beat.untimed { display: block; }
.beat .stamp { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.resource { display: block; padding: .87rem 0; border-bottom: 1px solid var(--line); }
.resource strong, .resource span { display: block; }
.resource strong { font-size: 1rem; font-weight: 520; }
.resource span { color: var(--muted); font-size: .86rem; margin-top: .18rem; }
.resource.primary strong { color: var(--cyan); }
.error, .status { color: var(--muted); font-size: .9rem; margin: .65rem 0; }
.error button, dialog > a { color: var(--cyan); border: 0; text-decoration: underline; text-underline-offset: .2em; background: none; }
dialog { max-width: min(21rem, calc(100vw - 2rem)); width: 100%; border: 1px solid #576b6b; color: var(--fg); background: var(--paper); padding: 1.3rem; border-radius: .6rem; text-align: center; }
dialog::backdrop { background: rgb(0 0 0 / .72); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; text-align: left; }
.dismiss { width: 2.4rem; height: 2.4rem; font: 1.75rem/1 var(--sans); background: transparent; border: 0; color: var(--muted); }
dialog img { display: block; margin: 0 auto 1rem; max-width: 90%; height: auto; background: white; }
dialog p { margin: .5rem 0; font-size: .95rem; color: var(--muted); }
dialog > a { font-size: .9rem; }
.article { max-width: 60rem; margin-bottom: 5rem; line-height: 1.9; overflow-wrap: anywhere; }
.article p { margin: 0 0 1.2rem; color: #cad5d4; }
.article h2 { margin: 2.2rem 0 .8rem; }
.article table { width: 100%; margin: 1.4rem 0; border-collapse: collapse; }
.article th, .article td { border: 1px solid var(--line); padding: .65rem .8rem; vertical-align: top; text-align: left; }
.article th { color: var(--cyan); background: var(--paper); font-weight: 550; }
.article td { color: #cad5d4; }
.article code { font-family: var(--mono); font-size: .87em; }
.article a { color: var(--cyan); border-bottom: 1px solid #43847d; }
@media (max-width: 70rem) { .shell { width: calc(100% - 4rem); } }
@media (max-width: 52rem) {
  .shell { width: calc(100% - 2.5rem); }
  .watch-grid, .notes-grid { grid-template-columns: minmax(0,1fr); gap: 2rem; }
  .notes-grid { margin-top: 2.5rem; }
  .chapter { min-height: 2.9rem; }
}
@media (max-width: 30rem) {
  .shell { width: calc(100% - 2rem); }
  .mast-inner { min-height: 3.8rem; }
  .mast nav { gap: .6rem; }
  .mast nav > a:first-child { display: none; }
  .intro { padding: 1.8rem 0 1.3rem; }
  .intro p { font-size: .95rem; }
  .current { display: block; }
  .current strong { display: block; font-size: .9rem; }
  .label { display: block; font-size: .75rem; margin-bottom: .1rem; }
  .beat { grid-template-columns: 2.9rem minmax(0,1fr); gap: .4rem; }
  .article table { display: block; overflow-x: auto; }
  .article th, .article td { min-width: 5rem; padding: .5rem; }
  .mast nav[aria-label="影片导航"] > a:first-child { display: inline-block; }
}
