:root {
  --paper: #f7f5ee; --ink: #242b27; --muted: #666c64; --line: #dedfd4;
  --green: #174d40; --green-light: #285e50; --on-green: #fffdf5;
  --sage: #c7d7be; --gold: #e2c98e; --white: #ffffff; --error: #ffe0ce;
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: var(--paper); font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select, input[type="checkbox"], input[type="radio"], input[type="range"] { cursor: pointer; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled, select:disabled, input:disabled { cursor: wait; opacity: .55; }
button, select { touch-action: manipulation; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; text-wrap: pretty; }
.page { max-width: 680px; margin: auto; padding: 28px 24px max(28px, env(safe-area-inset-bottom)); }
.brand-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: Georgia, "Songti SC", serif; font-size: 18px; }
.brand small { display: block; margin-top: 3px; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-size: 10px; letter-spacing: 1.7px; color: var(--muted); }
.brand-mark { width: 21px; height: 29px; border-left: 3px solid var(--green); border-right: 3px solid var(--green); transform: skew(-14deg); }
.edition { font-size: 11px; color: var(--muted); white-space: nowrap; }
.edition b { margin-left: 4px; font-family: ui-monospace, monospace; font-size: 17px; color: var(--green); font-weight: 500; }
.intro { padding: 42px 0 26px; }
.eyebrow { font-size: 11px; color: var(--green); letter-spacing: 1.3px; font-weight: 600; }
.eyebrow span { display: inline-block; margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); color: var(--muted); font-weight: 400; letter-spacing: 0; }
h1 { font-size: clamp(29px, 7.5vw, 40px); letter-spacing: -.8px; line-height: 1.35; margin: 12px 0; font-weight: 650; }
.lead { max-width: 440px; font-size: 14px; color: var(--muted); line-height: 1.9; }
.lesson-meta { display: flex; gap: 0; margin-top: 16px; font-size: 11px; color: var(--muted); }
.lesson-meta span + span::before { content: "·"; padding: 0 11px; }
.player { background: var(--green); color: var(--on-green); border-radius: var(--radius); padding: 24px; }
.player-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-label { font-size: 10px; letter-spacing: 1.4px; color: var(--sage); margin-bottom: 7px; }
.player h2 { font-size: 21px; font-weight: 550; }
.tempo { font-size: 9px; font-family: ui-monospace, monospace; color: var(--sage); white-space: nowrap; }
.tempo strong { font-size: 23px; font-weight: 400; color: var(--gold); }
.track-picker { border: 0; padding: 4px; margin: 20px 0 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; border-radius: 11px; background: var(--green-light); }
.track-picker label { position: relative; min-width: 0; }
.track-picker input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; }
.track-picker span { display: block; padding: 12px 2px; border-radius: 8px; font-size: 12px; text-align: center; color: var(--sage); pointer-events: none; }
.track-picker input:checked + span { background: var(--on-green); color: var(--green); font-weight: 600; }
.track-picker input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 1px; }
.track-hint { min-height: 38px; font-size: 11px; line-height: 1.7; color: var(--sage); }
.score-preview { margin: 13px 0 20px; padding: 15px 0; border-top: 1px solid var(--green-light); border-bottom: 1px solid var(--green-light); }
.score-row { display: grid; grid-template-columns: 25px 1fr; gap: 8px; align-items: center; }
.score-row + .score-row { margin-top: 8px; }
.score-row > span { font-size: 9px; color: var(--sage); }
.music-bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.music-bar { display: flex; align-items: center; justify-content: space-evenly; min-width: 0; padding: 9px 2px; border-radius: 5px; color: var(--sage); font-family: ui-monospace, monospace; font-size: 10px; background: var(--green-light); }
.music-bar.active { background: var(--gold); color: var(--green); }
.music-bar .rest { opacity: .5; }
.score-caption { margin-top: 10px; color: var(--sage); font-size: 9px; line-height: 1.7; }
.transport { display: flex; align-items: center; gap: 13px; }
.play-button { width: 52px; height: 52px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--gold); color: var(--green); font-size: 20px; display: grid; place-items: center; }
.play-button:hover { background: var(--on-green); }
.play-button:active { transform: scale(.96); }
.transport-info { flex: 1; min-width: 0; }
.transport-info strong { display: block; font-size: 13px; font-weight: 550; }
.transport-info > span { display: block; color: var(--sage); font-size: 10px; margin-top: 4px; }
.duration { font-size: 11px; font-family: ui-monospace, monospace; color: var(--sage); }
.beat-dots { display: flex; gap: 5px; margin-top: 7px; }
.beat-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--sage); opacity: .4; }
.beat-dots i.active { background: var(--gold); opacity: 1; }
.seek { display: block; width: 100%; margin: 14px 0; height: 24px; accent-color: var(--gold); }
.playback-options { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 10px; color: var(--sage); }
.speed-label { display: flex; gap: 5px; align-items: center; }
select { border: 1px solid var(--sage); border-radius: 7px; background: var(--green); color: var(--on-green); min-height: 40px; max-width: 160px; padding: 0 6px; font-size: 10px; }
.loop-label { display: flex; gap: 5px; align-items: center; min-height: 40px; }
.loop-label input { width: 17px; height: 17px; accent-color: var(--gold); margin: 0; }
.player-status { margin-top: 12px; font-size: 11px; line-height: 1.6; color: var(--sage); min-height: 18px; }
.player-status.error { color: var(--error); }
.audio-note { margin-top: 8px; font-size: 9px; line-height: 1.8; color: var(--sage); }
.practice-guide { padding: 32px 0 0; }
.section-heading h2 { margin-top: 9px; font-size: 22px; font-weight: 600; }
.steps { list-style: none; margin: 20px 0 0; padding: 0; }
.steps li { display: flex; gap: 16px; border-bottom: 1px solid var(--line); padding: 17px 0; }
.step-number { font-family: ui-monospace, monospace; font-size: 13px; color: var(--green); line-height: 1.6; }
.steps h3 { font-size: 14px; font-weight: 600; }
.steps p { font-size: 12px; line-height: 1.9; color: var(--muted); margin-top: 5px; }
.listening-note { display: flex; gap: 14px; padding: 22px 0; }
.note-symbol { font-size: 28px; color: var(--green); }
.listening-note h3 { font-size: 13px; font-weight: 600; }
.listening-note p { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.finish { border-top: 1px solid var(--line); padding-top: 24px; }
.finish h2 { font-size: 20px; font-weight: 600; }
.finish > p { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.complete-button { width: 100%; min-height: 50px; display: flex; justify-content: center; align-items: center; gap: 10px; background: var(--green); color: var(--on-green); border: 1px solid var(--green); border-radius: 11px; margin-top: 18px; font-size: 13px; }
.complete-button[aria-pressed="true"] { background: var(--sage); color: var(--green); border-color: var(--sage); }
.finish .privacy-note { font-size: 10px; margin-top: 11px; }
.copy-button { background: none; color: var(--green); border: 0; padding: 14px 0; min-height: 44px; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.finish .copy-status { font-size: 10px; min-height: 16px; margin-top: 0; }
textarea { width: 100%; min-height: 150px; border: 1px solid var(--line); padding: 10px; border-radius: 8px; font-size: 12px; background: var(--white); color: var(--ink); }
footer { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); }
footer span { font-size: 10px; }
footer p { margin-top: 7px; font-size: 9px; line-height: 1.9; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 20px; top: -80px; background: var(--on-green); color: var(--green); padding: 10px; z-index: 2; }
.skip-link:focus { top: 12px; }
@media (min-width: 600px) { .page { padding: 38px 38px; } .intro { padding-top: 52px; } .player { padding: 30px; } .track-hint { min-height: 19px; } .music-bar { font-size: 12px; } }
@media (max-width: 350px) { .page { padding-left: 16px; padding-right: 16px; } .player { padding: 17px; } .track-picker span { font-size: 11px; } }
@media (prefers-reduced-motion: no-preference) { button, .music-bar { transition: background-color 150ms ease, transform 150ms ease; } }
