/* MPC Sample 图文教程 —— 暗色 hip-hop 风格（配色与原教程 Page 一致） */
:root {
  --bg: #0B0B0D; --panel: #16161B; --panel2: #202027; --line: #34343D;
  --yellow: #FFE500; --red: #FF3B3B; --cyan: #00E5FF; --white: #F5F5F5; --gray: #B4B4BE; --black: #0B0B0D;
  --font: "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--white); font-family: var(--font); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.gh-only { display: none !important; }   /* 仅在 github.com 上浏览 Markdown 时显示的后备内容 */

/* ---------- header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 18px; background: rgba(11,11,13,.94); border-bottom: 2px solid var(--line); backdrop-filter: blur(6px); }
.brand { font-weight: 900; font-style: italic; text-transform: uppercase; color: var(--yellow); font-size: 20px; letter-spacing: -.01em; text-shadow: 2px 2px 0 var(--red); }
.brand span { color: var(--white); text-shadow: none; font-style: normal; font-size: 15px; margin-left: 4px; }
.chapter-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.chapter-nav a { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2); color: var(--white); border: 2px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 800; font-size: 14px; }
.chapter-nav a b { background: var(--red); color: var(--white); border: 2px solid var(--black); border-radius: 999px; min-width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.chapter-nav a.on, .chapter-nav a:hover { background: var(--yellow); color: var(--black); border-color: var(--yellow); text-decoration: none; }

/* ---------- layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 18px 60px; }
.site-footer { border-top: 2px solid var(--line); color: var(--gray); font-size: 13px; text-align: center; padding: 18px; }

/* ---------- typography ---------- */
h1 { font-size: clamp(40px, 8vw, 84px); font-weight: 900; font-style: italic; letter-spacing: -.02em; line-height: .98; color: var(--yellow); text-shadow: 4px 4px 0 var(--red), 8px 8px 0 var(--black); margin: 0 0 18px; text-transform: uppercase; }
h1.cover-title { font-size: clamp(44px, 9vw, 96px); line-height: .95; margin: 0; }
.cover-sub { font-size: clamp(22px, 4vw, 34px); font-weight: 900; margin: 10px 0 22px; }
.cover-sub .dot { color: var(--cyan); }
h2 { font-size: clamp(28px, 5vw, 46px); font-weight: 900; font-style: italic; text-transform: uppercase; color: var(--white); text-shadow: 3px 3px 0 var(--red); margin: 56px 0 14px; line-height: 1.08; }
h3 { font-size: clamp(22px, 3.6vw, 32px); font-weight: 900; font-style: italic; margin: 40px 0 12px; line-height: 1.15; }
h4 { font-size: 22px; font-weight: 900; font-style: italic; color: var(--yellow); margin: 28px 0 6px; }
p, li { color: var(--white); }
blockquote { margin: 16px 0; padding: 12px 16px; background: var(--panel); border: 2px solid var(--cyan); border-radius: 16px; color: var(--white); }
blockquote p { margin: 6px 0; }
hr { border: 0; border-top: 2px dashed var(--line); margin: 40px 0; }
code { background: var(--panel2); color: var(--yellow); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
strong { color: var(--yellow); }
em { color: var(--cyan); font-style: normal; }

/* 区域标题前的 A–F 方块：<span class="region-key">A</span> */
.region-key { background: var(--cyan); color: var(--black); font-weight: 900; font-style: normal; font-size: .9em; min-width: 1.6em; height: 1.6em; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 4px 4px 0 var(--red); margin-right: 10px; text-shadow: none; vertical-align: middle; }

/* ---------- tapes / chips / cards ---------- */
.tapes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.tape { display: inline-block; background: var(--yellow); color: var(--black); font-weight: 900; padding: 4px 12px; font-size: 15px; letter-spacing: .04em; box-shadow: 3px 3px 0 var(--black); transform: rotate(-2deg); font-style: normal; text-shadow: none; }
.tapes .tape:nth-child(2) { transform: rotate(2deg); }
.tapes .tape:nth-child(3) { transform: rotate(-1deg); }
.tape-yellow { background: var(--yellow); } .tape-cyan { background: var(--cyan); } .tape-red { background: var(--red); }
.tape-dark { background: var(--panel2); color: var(--white); }
.card { background: var(--panel); border: 2px solid var(--line); border-radius: 16px; padding: 16px; }
.chips, .chips ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; padding: 0; list-style: none; }
.chips ul { margin: 0; }
.chips li { margin: 0; }
.chips a, .chip { display: inline-flex; align-items: center; gap: 8px; background: var(--panel2); color: var(--white); border: 2px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 800; font-size: 15px; cursor: pointer; font-family: var(--font); }
.chips a:hover, .chip:hover { border-color: var(--yellow); text-decoration: none; }
.chip.on { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.chips a b, .chips a strong { background: var(--cyan); color: var(--black); border-radius: 6px; padding: 0 7px; font-weight: 900; }

/* ---------- figures ---------- */
.fig-wrap { margin: 0 0 12px; padding: 10px; background: var(--panel); border: 2px solid var(--line); border-radius: 16px; }
#fig-overview { border-color: var(--yellow); }
.fig-wrap svg { font-family: var(--font); }
.fig-wrap .marker { cursor: help; }
.fig-wrap .marker:hover circle { fill: var(--yellow); }
.fig-wrap .marker:hover text { fill: var(--black); }
p > img { border-radius: 14px; border: 2px solid var(--line); }
.caption, .note { color: var(--gray); font-size: 14px; margin-top: 8px; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; color: var(--white); margin: 10px 0 18px; display: block; overflow-x: auto; background: var(--panel); border: 2px solid var(--line); border-radius: 16px; }
thead, tbody { width: 100%; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 16px; text-align: left; }
th { color: var(--yellow); font-weight: 900; font-size: 15px; letter-spacing: .04em; }
td { color: var(--gray); }
td:first-child { color: var(--white); font-weight: 800; }
tr:last-child td { border-bottom: 0; }
@media (min-width: 720px) { table { display: table; } }

/* 编号 1–40 表：第一列由 site.js 换成红色圆点（与标注图同款） */
.legend td:first-child { width: 64px; text-align: center; }
.marker { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 4px; border-radius: 999px; background: var(--red); color: var(--white); font-weight: 900; font-size: 15px; border: 3px solid var(--black); }

/* ---------- outline / pager ---------- */
.outline { display: grid; gap: 10px; }
.outline-item summary { cursor: pointer; font-weight: 900; font-size: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.outline-item summary a { color: var(--white); }
.outline-item ul { margin: 10px 0 0; padding: 0; list-style: none; }
.outline-item li { padding: 6px 0; color: var(--gray); border-bottom: 1px solid var(--line); }
.outline-item li:last-child { border-bottom: 0; }
.pager { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 56px; }
.pager a { flex: 1 1 260px; color: var(--white); font-weight: 900; }
.pager a small { display: block; color: var(--cyan); font-weight: 800; }
.pager a.next { text-align: right; }
.pager a:hover { border-color: var(--yellow); text-decoration: none; }

/* ---------- 待确认 ---------- */
.todo ul { list-style: none; margin: 0; padding: 16px; background: var(--panel); border: 2px solid var(--red); border-radius: 16px; }
.todo li { padding: 7px 0 7px 22px; border-bottom: 1px solid var(--line); position: relative; }
.todo li:last-child { border-bottom: 0; }
.todo li::before { content: "!"; position: absolute; left: 4px; color: var(--red); font-weight: 900; }

/* ---------- 术语表 ---------- */
.glossary-controls { margin: 0 0 6px; }
.glossary.view-enzh .col-ja, .glossary.view-enja .col-zh { display: none; }
.glossary .hidden { display: none; }

/* ---------- details ---------- */
details > summary { cursor: pointer; font-weight: 800; color: var(--cyan); padding: 6px 0; }

/* ---------- 第一章 新手教程：按键 / 概念卡 / 步骤卡 / 小结 / 视频 ---------- */
kbd { display: inline-block; font-family: var(--font); font-weight: 900; font-size: .82em; line-height: 1.45; color: var(--black); background: var(--yellow); border: 2px solid var(--black); border-bottom-width: 4px; border-radius: 7px; padding: 0 .45em; margin: 0 1px; white-space: nowrap; vertical-align: .08em; box-shadow: 0 0 0 1px rgba(255,229,0,.35); }
.concept, .step, .recap { position: relative; margin: 22px 0; padding: 14px 18px 8px; border-radius: 16px; background: var(--panel); }
.concept { border: 2px solid var(--cyan); }
.concept > p:first-child strong, .concept p strong:first-child { color: var(--cyan); }
.step { border: 2px solid var(--line); border-left: 8px solid var(--yellow); }
.step h4 { margin: 4px 0 8px; }
.step > ul { list-style: none; padding-left: 0; margin: 0 0 8px; }
.step > ul > li { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.step > ul > li:last-child { border-bottom: 0; }
.step ol, .step ul ul { padding-left: 22px; margin: 6px 0; }
.step li strong:first-child { color: var(--yellow); }
.recap { border: 2px dashed var(--yellow); background: #18170D; }
.recap::before { content: "本节小结"; display: inline-block; background: var(--yellow); color: var(--black); font-weight: 900; font-size: 14px; padding: 2px 10px; transform: rotate(-2deg); box-shadow: 3px 3px 0 var(--black); margin-bottom: 4px; }
.recap ul { margin: 6px 0 4px; padding-left: 22px; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 18px 0 6px; border-radius: 14px; overflow: hidden; border: 2px solid var(--line); background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
video.local-video { display: block; width: 100%; height: auto; margin: 18px 0 6px; border-radius: 14px; border: 2px solid var(--yellow); background: #000; }
.video-note { color: var(--gray); font-size: 15px; margin-top: 4px; }
.checklist ul { list-style: none; padding: 14px 18px; margin: 0; background: var(--panel); border: 2px solid var(--line); border-radius: 16px; }
.checklist li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist input[type=checkbox] { transform: scale(1.3); margin-right: 8px; accent-color: var(--yellow); }
details { background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 4px 16px; margin: 10px 0; }
details[open] { border-color: var(--cyan); }
[id^="s1-"], [id^="region-"] { scroll-margin-top: 110px; }

/* concept card figures (chapter 1) */
.concept img.cfig { display: block; max-width: 640px; width: 100%; height: auto; margin: 8px auto 10px; border-radius: 12px; }
/* annotated screen figures */
img.sfig { display: block; max-width: 760px; width: 100%; height: auto; margin: 10px auto; border-radius: 10px; }
/* “按下去 → 屏幕变成这样”配图（动手卡片内） */
.step img.rfig { display: block; max-width: 760px; width: 100%; height: auto; margin: 6px auto 12px; border-radius: 10px; }

/* ---------- 3+ 节奏网格实验室 v2：手风琴 · 左视频 / 右标签页（assets/js/beat-lab.js） ---------- */
.lab-media { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 18px; align-items: start; margin: 14px 0 4px; }
img.lab-grid { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid #ddd; }
.lab-toc a.on { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.lab-accs { margin-top: 18px; }
.lab-acc { margin: 0 0 12px; border: 2px solid var(--line); border-radius: 16px; background: var(--panel); scroll-margin-top: 96px; }
.lab-acc.open { border-color: var(--yellow); }
.lab-acc [id] { scroll-margin-top: 96px; }
h2.lab-acc-h { margin: 0; font-size: inherit; text-shadow: none; font-style: normal; text-transform: none; }
.lab-acc-btn { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; background: none; border: 0; color: var(--white); font: inherit; text-align: left; padding: 12px 16px; cursor: pointer; }
.lab-acc-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: -3px; border-radius: 14px; }
.lab-acc-btn::after { content: "＋"; margin-left: auto; color: var(--yellow); font-weight: 900; font-size: 22px; }
.lab-acc.open .lab-acc-btn::after { content: "－"; }
.lab-num { background: var(--red); color: var(--white); font-weight: 900; border: 2px solid var(--black); border-radius: 10px; padding: 0 10px; font-size: 18px; box-shadow: 3px 3px 0 var(--black); }
.lab-t { font-size: clamp(19px, 2.6vw, 26px); font-weight: 900; font-style: italic; }
.lab-meta { color: var(--cyan); font-weight: 800; font-size: 14px; }
.lab-acc-body { padding: 0 16px 16px; }
.lab-scroll { max-height: 78vh; overflow: auto; }
.lab-params { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; background: var(--panel2); border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; margin: 0 0 12px; }
.lab-params.hot { border-color: var(--yellow); box-shadow: 4px 4px 0 var(--red); }
.lab-params .lp-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lab-params .lp { display: inline-flex; flex-direction: column; background: var(--yellow); color: var(--black); border-radius: 10px; padding: 2px 12px; line-height: 1.15; }
.lab-params .lp small { font-size: 11px; font-weight: 800; }
.lab-params .lp b { font-size: 20px; font-weight: 900; color: var(--black); }
.lab-params p { flex: 1 1 360px; margin: 0; font-size: 14px; color: var(--gray); }
.lab-params p b { color: var(--white); }
.lab-cols { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
.lab-left video.local-video.portrait { width: 100%; max-width: 300px; aspect-ratio: 9 / 16; margin: 0; }
.bl-vctl { margin-top: 8px; }
.bl-vrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.bl-vctl .chip, .lab-right .chip { padding: 4px 10px; font-size: 13px; gap: 4px; }
.bl-seg small { color: var(--gray); font-weight: 700; font-size: 11px; }
.bl-seg.on small, .bl-rate.on small { color: var(--black); }
.chip.cur { box-shadow: 0 0 0 2px var(--cyan); }
.chip.on.cur { box-shadow: 0 0 0 2px var(--cyan), 3px 3px 0 var(--red); }
.bl-speed { display: inline-flex; gap: 4px; margin-left: auto; }
.bl-chk { font-size: 13px; color: var(--gray); display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.bl-chk input { accent-color: var(--yellow); }
.bl-vnow { font-size: 13px; color: var(--cyan); margin: 4px 0; min-height: 1.4em; }
.bl-small, .bl-vnote { font-size: 13px; color: var(--gray); }
.bl-warn { font-size: 13px; background: #2a1a12; border: 2px solid var(--red); border-radius: 12px; padding: 8px 10px; }
.lab-right { min-width: 0; }
.bl-js .lab-right { border: 2px solid var(--line); border-radius: 14px; background: var(--bg); display: flex; flex-direction: column; height: min(76vh, 680px); }
.lab-tabs { display: none; }
.bl-js .lab-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 2px solid var(--line); }
.lab-tab { background: var(--panel2); color: var(--white); border: 2px solid var(--line); border-radius: 999px; padding: 3px 11px; font: 800 13px var(--font); cursor: pointer; }
.lab-tab:hover { border-color: var(--yellow); }
.lab-tab.on { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.lab-tab:focus-visible, .bl-cell:focus-visible, .chip:focus-visible, .bl-pad:focus-visible, .term:focus-visible { outline: 3px solid var(--cyan); outline-offset: 1px; }
.lab-pane { padding: 10px 12px; }
.bl-js .lab-pane { overflow: auto; flex: 1 1 auto; min-height: 0; }
.lab-pane[hidden] { display: none; }
.lab-steps h3 { font-size: 21px; margin: 18px 0 8px; }
.lab-steps h4 { font-size: 18px; margin: 16px 0 6px; }
.lab-steps pre { overflow-x: auto; background: var(--panel2); padding: 8px; border-radius: 10px; font-size: 12px; }
/* grid */
.bl-gbar { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 8px; font-size: 13px; color: var(--gray); }
.bl-gbar input[type=range] { accent-color: var(--yellow); vertical-align: middle; width: 120px; }
.bl-swv { color: var(--yellow); }
.bl-ginfo { color: var(--cyan); font-weight: 800; }
.chip.bl-play { background: var(--red); border-color: var(--red); }
.chip.bl-play.on { background: var(--cyan); color: var(--black); border-color: var(--cyan); }
.bl-grid { overflow-x: auto; }
.bl-row { display: grid; grid-template-columns: 92px repeat(16, minmax(20px, 1fr)); gap: 3px; margin-bottom: 3px; min-width: 470px; }
.bl-lab { font-size: 13px; font-weight: 800; display: flex; flex-direction: column; justify-content: center; line-height: 1.1; }
.bl-lab small { color: var(--gray); font-weight: 600; font-size: 11px; }
.bl-step { font-size: 11px; color: var(--gray); text-align: center; }
.bl-step.beat { color: var(--yellow); font-weight: 900; }
.bl-step.now { color: var(--cyan); }
.bl-cell { height: 32px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel2); color: var(--black); font: 900 13px var(--font); cursor: pointer; padding: 0; }
.bl-cell.alt { background: #18181d; }
.bl-cell.s-X { background: var(--yellow); }
.bl-cell.s-x, .bl-cell.s-O { background: #b8a61a; }
.bl-cell.s-g { background: #5d5520; color: var(--white); }
.bl-cell.s-r, .bl-cell.s-3, .bl-cell.s-t { background: var(--red); color: var(--white); font-size: 11px; }
.bl-cell.now { outline: 2px solid var(--cyan); outline-offset: -2px; box-shadow: 0 0 10px var(--cyan); }
.bl-legend { font-size: 12px; color: var(--gray); margin: 6px 0 0; }
.bl-legend b { color: var(--yellow); }
/* score */
.bl-score-scroll { overflow-x: auto; background: #f5f2ea; border-radius: 12px; padding: 6px; }
.bl-score-svg { display: block; height: auto; max-width: none; font-family: var(--font); }
.bl-score-svg .st, .bl-score-svg .bl { stroke: #222; stroke-width: 1; }
.bl-score-svg .bl { stroke-width: 1.4; }
.bl-score-svg .clef, .bl-score-svg .beam { fill: #111; }
.bl-score-svg .ts { font: 900 22px var(--font); fill: #111; }
.bl-score-svg .tt { font: 800 12px var(--font); fill: #333; }
.bl-score-svg .lbl { font: 700 10px var(--font); fill: #555; }
.bl-score-svg .nh { fill: #111; }
.bl-score-svg .xh, .bl-score-svg .stem, .bl-score-svg .flag, .bl-score-svg .rst { stroke: #111; stroke-width: 1.5; fill: none; }
.bl-score-svg .rst { stroke-width: 2.2; }
.bl-score-svg .rstd { fill: #111; }
.bl-score-svg .gh { font: 700 13px var(--font); fill: #111; }
.bl-score-svg .nt.now .nh, .bl-score-svg .nt.now .rstd { fill: #e0362f; }
.bl-score-svg .nt.now .xh, .bl-score-svg .nt.now .stem { stroke: #e0362f; }
.bl-score-svg .gc { fill: #e4e0d6; }
.bl-score-svg .gc.g-alt { fill: #d6d1c4; }
.bl-score-svg .gc.g-on { fill: #c9a400; }
.bl-score-svg .gc.g-mid { fill: #d9c766; }
.bl-score-svg .gc.g-gh { fill: #ece3b3; stroke: #b9a64a; }
.bl-score-svg .gc.now { stroke: #e0362f; stroke-width: 2; }
.bl-score-cap { font-size: 13px; color: var(--gray); }
/* pads */
.bl-pitch { border-bottom: 1px dashed var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.bl-pitch h4 { margin: 4px 0 8px; font-size: 18px; }
.bl-pitch h4 small { color: var(--gray); font-style: normal; font-size: 13px; }
.bl-pitch-cols { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 12px; align-items: start; }
.bl-nrow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 6px; }
.bl-nbar { font-size: 12px; color: var(--cyan); font-weight: 800; min-width: 44px; }
.chip.bl-note b { color: var(--yellow); }
.chip.bl-note.fold { border-style: dashed; }
.chip.bl-note.chord { border-color: var(--cyan); }
.bl-pads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.bl-pad { aspect-ratio: 1; border-radius: 8px; border: 2px solid var(--line); background: var(--panel2); color: var(--gray); font: 800 12px var(--font); cursor: pointer; position: relative; padding: 0; }
.bl-pad small { position: absolute; left: 4px; top: 2px; font-size: 9px; font-weight: 600; }
.bl-pad.used { background: #3a3510; color: var(--yellow); border-color: #6b621d; }
.bl-pad.base { border-color: var(--cyan); }
.bl-pad.hit { animation: blhit .9s ease-out; background: var(--yellow); color: var(--black); }
@keyframes blhit { 0% { box-shadow: 0 0 0 0 rgba(255,229,0,.9); transform: scale(1.06); } 100% { box-shadow: 0 0 0 10px rgba(255,229,0,0); transform: scale(1); } }
/* simulator */
.bl-sim-top { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 10px; align-items: start; }
.bl-panel { position: relative; }
.bl-panel img { display: block; width: 100%; border-radius: 10px; }
.bl-ov { position: absolute; inset: 0; width: 100%; height: 100%; }
.bl-ov .hit { fill: transparent; }
.bl-ov .ring { fill: none; stroke: none; }
.bl-ov .badge { display: none; }
.bl-ov .hs.on .ring { stroke: var(--yellow); stroke-width: 14; fill: rgba(255,229,0,.18); transform-box: fill-box; transform-origin: center; animation: blring 1.4s ease-out infinite; }
.bl-ov .hs.on .ring.r2 { stroke: var(--red); stroke-width: 8; fill: none; animation-delay: .7s; }
.bl-ov .hs.on .badge { display: inline; }
.bl-ov .badge circle { fill: var(--red); stroke: var(--black); stroke-width: 6; }
.bl-ov .badge text { fill: var(--white); font: 900 40px var(--font); }
.bl-ov .hs:hover .hit { fill: rgba(0,229,255,.18); }
@keyframes blring { 0% { transform: scale(.85); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.bl-sim-h { margin: 0 0 6px; font-weight: 900; font-size: 15px; }
.bl-sim-h b { color: var(--black); background: var(--yellow); border-radius: 6px; padding: 0 6px; }
.bl-scr { position: relative; border: 3px solid #333; border-radius: 10px; background: #000; overflow: visible; }
.bl-scr.img img { display: block; width: 100%; border-radius: 7px; }
.bl-mk { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 999px; background: var(--red); color: var(--white); font: 900 12px var(--font); border: 2px solid var(--black); margin-left: 4px; vertical-align: middle; }
.bl-mk.abs { position: absolute; transform: translate(-50%, -50%); margin: 0; box-shadow: 0 0 0 3px rgba(255,59,59,.35); }
.bl-src { font-size: 11px; color: var(--gray); margin: 4px 0 0; }
.bl-scr.sim { font-family: "DejaVu Sans Mono", ui-monospace, monospace; color: #eee; padding: 8px 10px; font-size: 13px; aspect-ratio: 4 / 3; display: flex; flex-direction: column; justify-content: space-between; }
.bl-scr.sim .r { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.bl-scr .mk-on { outline: 2px dashed var(--red); outline-offset: 2px; border-radius: 4px; }
.bl-scr.seq .bpm { font-size: 22px; } .bl-scr.seq .bpm sup { font-size: 11px; }
.bl-scr .box { border: 1px solid #ddd; border-radius: 3px; padding: 0 5px; font-size: 11px; }
.bl-scr .rq em { color: #ff4d6a; font-style: normal; }
.bl-scr .rq.on { background: #fff; color: #000; }
.bl-scr .seqn { color: #f7a600; font-size: 20px; }
.bl-scr .ci { color: #777; font-weight: 900; } .bl-scr .ci.on { color: #ff2d55; }
.bl-scr .r4 { background: #333; border-radius: 4px; padding: 4px 8px; }
.bl-scr .r4.recst { background: #6b1020; }
.bl-scr .r4 .rec { color: #ff4d6a; font-style: normal; }
.bl-scr .pos { font-size: 18px; } .bl-scr .tk { font-size: 10px; }
.bl-scr .sw b { color: var(--yellow); }
.bl-scr .pop { position: absolute; inset: 18% 10%; background: #000; border: 2px solid #ddd; display: flex; align-items: center; }
.bl-scr .popin { display: flex; flex-direction: column; width: 100%; padding: 6px 10px; }
.bl-scr .popin b { align-self: flex-end; font-size: 30px; color: #49b8ff; }
.bl-scr.list ul { list-style: none; margin: 4px 0; padding: 0; flex: 1; }
.bl-scr.list li { padding: 3px 4px; color: #ddd; }
.bl-scr.list .sel { display: block; background: #333; }
.bl-scr .foot { font-size: 11px; color: #aaa; }
.bl-scr .tabs .tab { font-size: 12px; padding: 0 6px; } .bl-scr .tabs .tab.on { background: #fff; color: #000; }
.bl-scr .pname { color: #f7a600; font-size: 12px; }
.bl-scr .wave { display: block; height: 34%; border: 1px solid #c69214; }
.bl-scr .wave svg { width: 100%; height: 100%; display: block; }
.bl-scr .wave path { stroke: #f7c600; fill: none; stroke-width: .6; }
.bl-scr .wave line { stroke: #fff; stroke-width: .6; }
.bl-scr .knobs .kn { display: flex; flex-direction: column; font-size: 11px; flex: 1; border-top: 3px solid #555; padding-top: 2px; }
.bl-scr .knobs .kn b { color: var(--yellow); font-size: 13px; }
.bl-scr.msg { justify-content: center; }
.bl-scr .msgbox { border: 2px solid #ddd; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.bl-scr .mt { font-size: 18px; } .bl-scr .mb { font-size: 12px; color: #bbb; }
.bl-sim-text { margin-top: 8px; font-size: 14px; }
.bl-sim-text .tag { display: inline-block; background: var(--cyan); color: var(--black); font-weight: 900; font-size: 12px; padding: 0 7px; border-radius: 6px; margin-right: 4px; }
.bl-sim-text ol { margin: 4px 0 6px; padding-left: 22px; }
.bl-sim-text li { margin: 2px 0; color: var(--white); }
.bl-press, .bl-next-t { margin: 4px 0; }
.bl-ref { font-size: 12px; color: var(--gray); margin: 4px 0; }
.bl-ref b { color: var(--red); }
.bl-sim-grid .bl-row { min-width: 420px; grid-template-columns: 80px repeat(16, minmax(18px, 1fr)); }
.bl-sim-grid .bl-cell { height: 24px; }
.bl-sim-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; position: sticky; bottom: -10px; background: var(--bg); padding: 6px 0; }
.bl-dots { display: inline-flex; flex-wrap: wrap; gap: 4px; flex: 1; justify-content: center; }
.bl-dot { width: 12px; height: 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--panel2); padding: 0; cursor: pointer; }
.bl-dot.done { background: #6b621d; }
.bl-dot.on { background: var(--yellow); border-color: var(--yellow); transform: scale(1.25); }
/* history */
.bl-hist-card { background: var(--panel); border: 2px solid var(--line); border-left: 8px solid var(--yellow); border-radius: 14px; padding: 8px 12px; margin: 0 0 10px; }
.bl-hist-card p { margin: 4px 0; font-size: 14px; }
.bl-hist-h b { font-size: 18px; color: var(--yellow); margin-right: 6px; }
.bl-hist-h .tape { font-size: 12px; }
.bl-hist-t { color: var(--cyan) !important; font-weight: 800; }
.bl-hist-src { font-size: 12px !important; color: var(--gray) !important; }
.bl-yt { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 2px; }
.bl-yt-link { font-weight: 800; font-size: 13px; }
.bl-yt-frame { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); }
.bl-yt-frame iframe { width: 100%; height: 100%; border: 0; }
/* term popover */
.term { border-bottom: 1px dotted var(--cyan); cursor: help; }
.term:hover, .term[aria-expanded="true"] { background: rgba(0,229,255,.12); border-bottom-style: solid; }
.bl-pop { position: fixed; z-index: 50; background: var(--panel2); border: 2px solid var(--cyan); border-radius: 12px; padding: 8px 12px; box-shadow: 4px 4px 0 var(--black); font-size: 14px; color: var(--white); }
.bl-pop-h { display: flex; align-items: center; gap: 8px; }
.bl-pop-h b { color: var(--yellow); }
.bl-lv { font-size: 11px; font-weight: 900; border-radius: 6px; padding: 0 6px; background: var(--cyan); color: var(--black); }
.bl-lv.lv-1 { background: var(--yellow); } .bl-lv.lv-2 { background: var(--red); color: var(--white); }
.bl-pop-x { margin-left: auto; background: none; border: 0; color: var(--gray); font-size: 18px; cursor: pointer; }
.bl-pop p { margin: 6px 0; color: var(--white); }
.bl-pop-d { color: var(--gray) !important; border-top: 1px dashed var(--line); padding-top: 6px; }
.bl-pop-more { background: none; border: 0; color: var(--cyan); font: 800 13px var(--font); cursor: pointer; padding: 0; }
@media (max-width: 760px) {
  .lab-media, .lab-cols { grid-template-columns: 1fr; }
  .lab-left video.local-video.portrait { margin: 0 auto; max-width: 240px; }
  .bl-js .lab-right { height: auto; }
  .bl-js .lab-pane { max-height: 75vh; }
  .bl-sim-top, .bl-pitch-cols { grid-template-columns: 1fr; }
  .bl-panel { max-width: 260px; margin: 0 auto; }
  .lab-acc-body { padding: 0 8px 12px; }
  .bl-speed { margin-left: 0; }
}

.bl-score-bar{margin:0 0 8px}

.lab-acc [hidden], .bl-pop [hidden], .bl-pop[hidden]{display:none !important}

/* ch1 screenshot gallery */
.shot-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0 0 16px; }
.shot { margin: 0 0 12px; padding: 8px; background: var(--panel); border: 2px solid var(--line); border-radius: 12px; }
.shot-gallery .shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 8px; }
.shot figcaption { font-size: .9em; margin-top: 6px; }
.video-moved .shot { max-width: 420px; }

/* ===== 第一章 11/8 批注修订（只作用于本章新增 class） ===== */
.site-hero { position: relative; overflow: hidden; margin: 8px 0 30px; padding: 30px 26px 24px; border-radius: 22px;
  background: radial-gradient(circle at 88% 12%, rgba(255,59,59,.45), transparent 42%), radial-gradient(circle at 8% 92%, rgba(0,229,255,.35), transparent 45%), #111116;
  border: 3px solid var(--yellow); box-shadow: 8px 8px 0 var(--red); }
.site-hero::after { content: "♪ ♩ ♫"; position: absolute; right: 18px; bottom: 6px; font-size: 3.2em; opacity: .12; letter-spacing: .2em; pointer-events: none; }
.site-hero .hero-title { margin: 0 0 16px; border: 0; padding: 0; }
.site-hero .hero-kicker { display: inline-block; font-size: .42em; font-weight: 900; letter-spacing: .12em; background: var(--cyan); color: var(--black); padding: 4px 12px; border-radius: 999px; transform: rotate(-2deg); margin-bottom: 10px; }
.site-hero .hero-slogan { display: block; font-size: clamp(2.4em, 7vw, 4.2em); font-weight: 900; line-height: 1.05; color: var(--yellow); text-shadow: 4px 4px 0 var(--red); animation: heroBeat 1.2s ease-in-out infinite; transform-origin: left center; }
@keyframes heroBeat { 0%,100% { transform: scale(1); } 12% { transform: scale(1.035); } 24% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .site-hero .hero-slogan { animation: none; } }
.hero-lead p { font-size: 1.1em; line-height: 1.8; }
.hero-lead .hero-big { font-size: 1.22em; font-weight: 700; }
.hero-pains { list-style: none; counter-reset: pain; padding: 0; margin: 14px 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.hero-pains li { counter-increment: pain; position: relative; padding: 14px 14px 14px 56px; background: rgba(255,255,255,.06); border: 2px solid var(--line); border-radius: 14px; line-height: 1.7; }
.hero-pains li::before { content: counter(pain); position: absolute; left: 12px; top: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); color: var(--black); font-weight: 900; display: flex; align-items: center; justify-content: center; }
.hero-pains li:nth-child(2)::before { background: var(--cyan); }
.hero-pains li:nth-child(3)::before { background: var(--red); color: #fff; }
.hero-lead .hero-go { font-weight: 900; color: var(--cyan); font-size: 1.2em; }
.hero-sign { margin: 18px 0 0; padding-top: 12px; border-top: 2px dashed var(--line); font-weight: 700; }
.hero-sign a { color: var(--yellow); }

.hover-gallery { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.hovercard { position: relative; min-height: 190px; padding: 0; overflow: hidden; cursor: pointer; }
.hovercard .hc-text { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 18px; transition: opacity .2s; }
.hovercard .hc-text b { font-size: 1.45em; color: var(--yellow); }
.hovercard .hc-text span { font-size: 1.15em; line-height: 1.6; }
.hovercard .hc-text em { font-size: .9em; opacity: .65; font-style: normal; }
.hovercard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0B0B0D; opacity: 0; transition: opacity .2s; border-radius: 10px; }
@media (hover: hover) { .hovercard:hover img { opacity: 1; } .hovercard:hover .hc-text { opacity: 0; } }
@media (hover: none) { .hovercard .hc-text em { font-size: 0; } .hovercard .hc-text em::after { content: "点按看图"; font-size: .9rem; }
  .hovercard.show img, .hovercard:focus-within img { opacity: 1; } .hovercard.show .hc-text, .hovercard:focus-within .hc-text { opacity: 0; } }

.zone-tip { font-weight: 700; }
.zone-map { position: relative; max-width: 900px; margin: 10px auto 16px; }
.zone-map img { display: block; width: 100%; height: auto; border-radius: 12px; }
.zone-hot { position: absolute; border-radius: 10px; border: 3px solid transparent; transition: background .15s, border-color .15s; }
.zone-hot:hover, .zone-hot:focus { outline: none; }
.zone-a:hover, .zone-a:focus { background: rgba(255,229,0,.28); border-color: #FFE500; }
.zone-b:hover, .zone-b:focus { background: rgba(255,59,59,.28); border-color: #FF3B3B; }
.zone-c:hover, .zone-c:focus { background: rgba(0,229,255,.28); border-color: #00E5FF; }
.zone-d:hover, .zone-d:focus { background: rgba(140,255,90,.28); border-color: #8CFF5A; }
.zone-e:hover, .zone-e:focus { background: rgba(255,140,0,.28); border-color: #FF8C00; }
.zone-e { z-index: 1; }
.region-key.rk-a { background: #FFE500; }
.region-key.rk-b { background: #FF3B3B; color: #fff; box-shadow: 4px 4px 0 #FFE500; }
.region-key.rk-c { background: #00E5FF; }
.region-key.rk-d { background: #8CFF5A; }
.region-key.rk-e { background: #FF8C00; }
.concept img.cfig.cfig-wide { max-width: 900px; }
.concept img.cfig.cfig-xl { max-width: 1040px; }
img.sfig.sfig-xl { max-width: 1040px; }

.s01-hot { position: relative; max-width: 760px; margin: 10px auto 4px; }
.s01-hot img { display: block; width: 100%; height: auto; margin: 0; border-radius: 10px; }
.s01-dot { position: absolute; width: 5.5%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; cursor: help; z-index: 2; }
.s01-dot:hover, .s01-dot:focus { box-shadow: 0 0 0 3px var(--yellow); outline: none; }
.s01-tip { display: none; position: absolute; left: 50%; top: 110%; transform: translateX(-50%); width: 240px; padding: 8px 10px; background: #0B0B0D; color: #F5F5F5; border: 2px solid var(--yellow); border-radius: 10px; font-size: .92rem; line-height: 1.5; text-align: left; z-index: 5; }
.s01-dot:hover .s01-tip, .s01-dot:focus .s01-tip { display: block; }
.s01-dot[style*="left:96%"] .s01-tip { left: auto; right: 0; transform: none; }
.s01-dot[style*="left:3.9%"] .s01-tip { left: 0; transform: none; }
.s01-dot[style*="top:91.3%"] .s01-tip { top: auto; bottom: 110%; }
.s01-hint { text-align: center; font-size: .9em; opacity: .8; margin: 0 0 12px; }
.trim-cue { display: grid; grid-template-columns: minmax(180px, 320px) 1fr; gap: 14px; align-items: center; margin: 10px 0 14px; padding: 12px; border: 2px solid var(--line); border-radius: 12px; }
.trim-cue img { width: 100%; border-radius: 8px; }
@media (max-width: 640px) { .trim-cue { grid-template-columns: 1fr; } }

.keycue { margin: 10px 0 16px; border: 2px solid var(--line); border-radius: 12px; padding: 10px; }
.keycue > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; font-weight: 700; }
.keycue > summary::-webkit-details-marker { display: none; }
.keycue > summary img { width: 200px; max-width: 40%; border-radius: 8px; border: 2px solid var(--yellow); }
.keycue[open] > summary span::after { content: "（已展开，再点收起）"; font-weight: 400; opacity: .7; }
.sync-note b:first-child { color: var(--yellow); }

.v5-howto { font-size: 1.05em; }
.v5-seqexplain { line-height: 1.7; margin-top: 12px; }
.v5-projcard .v5-btn.on { box-shadow: 0 0 0 3px var(--red); transform: translateY(-1px); }
.v5-projcard .v5-btn:active { transform: scale(.95); }
.v5-flash { animation: v5Flash .6s ease-out; }
@keyframes v5Flash { 0% { box-shadow: 0 0 0 4px var(--yellow); background-color: rgba(255,229,0,.18); } 100% { box-shadow: 0 0 0 0 transparent; background-color: transparent; } }
.v5-projcard .v5-status { font-weight: 700; font-size: 1.02em; }
.v5-midihelp { margin-top: 10px; padding: 8px 12px; border: 2px dashed var(--line); border-radius: 10px; }
.v5-midihelp summary { cursor: pointer; font-weight: 700; }
.v5-midihelp ol { line-height: 1.7; }
