/* =========================================================
   听音乐玩 · 儿童音乐练习 App
   设计系统 (Design System)
   - 品牌主色锁定：sunny orange #FF8A3D（所有按钮/激活态）
   - 糖果多色仅用于「音符/琴键」等游戏元素（功能性配色）
   - 圆角体系：按钮 pill / 卡片 24px / 输入 16px
   - 动效尊重 prefers-reduced-motion
   ========================================================= */

:root {
  /* 品牌色（UI 主色，全站统一） */
  --brand: #FF8A3D;
  --brand-dark: #F2721C;
  --brand-soft: #FFE7D3;

  /* 中性 */
  --bg: #FFF7EF;
  --bg-2: #FFEFE0;
  --surface: #FFFFFF;
  --surface-2: #FFF3E8;
  --ink: #3A2E27;
  --ink-soft: #7A6A5E;
  --line: #F0DCC8;
  --muted: #A99687;

  /* 功能糖果色（琴键 / 音符） */
  --c-pink: #FF7EB6;
  --c-red: #FF6B6B;
  --c-orange: #FFA94D;
  --c-yellow: #FFD43B;
  --c-green: #51CF85;
  --c-teal: #3DCCC7;
  --c-blue: #4DA3FF;
  --c-purple: #B197FC;

  /* 阴影（带色相，不用纯黑） */
  --shadow-sm: 0 4px 14px rgba(255, 138, 61, 0.12);
  --shadow-md: 0 10px 30px rgba(255, 138, 61, 0.18);
  --shadow-lg: 0 20px 50px rgba(255, 138, 61, 0.22);

  --radius-card: 24px;
  --radius-input: 16px;
  --font: "Baloo 2", "ZCOOL KuaiLe", "Comic Sans MS", "Chalkboard SE",
    "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1E1A24;
    --bg-2: #251F2E;
    --surface: #2A2433;
    --surface-2: #322A3D;
    --ink: #F4ECE4;
    --ink-soft: #C7B9AE;
    --line: #3A3145;
    --muted: #8C7E88;
    --brand-soft: #4A3320;
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.42);
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--bg-2), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, #FFE3EC, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.5;
}

.wrap { width: 90%; max-width: 1500px; margin: 0 auto; padding: 0 18px 60px; }

/* ---------- 顶栏 HUD ---------- */
.hud {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface) 80%, transparent));
  backdrop-filter: blur(10px);
  border-bottom: 2px solid color-mix(in srgb, var(--brand) 35%, var(--line));
}
.hud .logo { font-weight: 800; font-size: 20px; color: var(--brand); display: flex; align-items: center; gap: 6px; }
.hud .spacer { flex: 1; }
.hud .stat {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 2px solid var(--line);
  padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 15px;
}
.hud .stat .ic { font-size: 18px; }

/* ---------- 按钮 ---------- */
.btn {
  font-family: var(--font); font-weight: 800; font-size: 16px;
  border: none; cursor: pointer; border-radius: 999px;
  padding: 12px 22px; line-height: 1; transition: transform .12s ease, box-shadow .2s ease, background .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  user-select: none;
}
.btn:active { transform: translateY(2px) scale(.98); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { font-size: 20px; padding: 16px 30px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn[disabled]:active { transform: none; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--radius-card); box-shadow: var(--shadow-sm);
  padding: 24px;
}

/* ---------- 标题 ---------- */
h1, h2, h3 { margin: 0; line-height: 1.15; }
.title-xl { font-size: clamp(30px, 6vw, 52px); font-weight: 800; color: var(--ink); }
.title-lg {
  font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; letter-spacing: .01em;
  background: linear-gradient(110deg, var(--brand), #FF5C8A 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--ink-soft); font-size: 17px; max-width: 60ch; }

/* ---------- 首页游戏入口 ---------- */
.game-grid { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 22px; }
@media (min-width: 720px) { .game-grid { grid-template-columns: 1fr 1fr; } }

.game-card {
  position: relative; overflow: hidden; cursor: pointer;
  border-radius: var(--radius-card); border: 2px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow-sm);
  padding: 24px; transition: transform .15s ease, box-shadow .2s ease;
}
.game-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.game-card .emoji { font-size: 64px; line-height: 1; }
.game-card h3 { font-size: 26px; margin: 14px 0 6px; }
.game-card p { color: var(--ink-soft); margin: 0 0 16px; }
.game-card .deco { position: absolute; right: -20px; bottom: -20px; font-size: 150px; opacity: .12; pointer-events: none; }

/* ---------- 钢片琴 ---------- */
.celesta-stage {
  margin-top: 22px;
  display: grid; gap: 28px; align-items: start;
  grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
}
.stage-left { position: sticky; top: 72px; }   /* 键盘吸顶，右边的谱子滚动时手不离开琴键 */
.stage-right { min-width: 0; }
@media (max-width: 900px) {
  .celesta-stage { grid-template-columns: 1fr; gap: 18px; }
  .stage-left { position: static; }
}
.celesta-stage.is-single { grid-template-columns: 1fr; }
.celesta-stage.is-single .stage-right { display: none; }
.mode-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.mode-tab {
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 10px 16px; font-weight: 700; cursor: pointer;
  font-family: var(--font); font-size: 15px; transition: all .15s ease;
}
.mode-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.keyboard {
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  padding: 18px 8px 10px; background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 2px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
/* 每个八度一行（高八度在上），避免 2 八度横向溢出 */
.kb-row { display: flex; gap: 8px; justify-content: center; width: 100%; }
@media (max-width: 560px) {
  .key { min-width: 40px; max-width: 64px; height: 168px; }
  .key .jp { font-size: 24px; }
  .key .nm { font-size: 11px; }
  .key .pf { font-size: 9px; }
}
.key {
  flex: 1 1 0; min-width: 56px; max-width: 96px;
  height: 200px; border: none; border-radius: 0 0 16px 16px;
  cursor: pointer; position: relative; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding-bottom: 14px; font-weight: 800; font-family: var(--font);
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.12), var(--shadow-sm);
  transition: transform .08s ease, filter .15s ease;
  user-select: none;
}
.key:active, .key.pressed { transform: translateY(8px) scaleY(.97); filter: brightness(1.08); }
.key .jp { font-size: 30px; text-shadow: 0 2px 4px rgba(0,0,0,.25); }
.key .nm { font-size: 13px; opacity: .95; margin-top: 2px; }
.key .pf { font-size: 10px; opacity: .7; margin-top: 1px; }
.key .kk {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 800; opacity: .9; letter-spacing: 1px;
  background: rgba(0,0,0,.22); border-radius: 6px; padding: 1px 6px;
}
.key.k0 { background: var(--c-red); }
.key.k1 { background: var(--c-orange); }
.key.k2 { background: var(--c-yellow); color: #6b4e00; }
.key.k3 { background: var(--c-green); }
.key.k4 { background: var(--c-teal); }
.key.k5 { background: var(--c-blue); }
.key.k6 { background: var(--c-purple); }
.key.k7 { background: var(--c-pink); }

/* 飘起的音符 */
.float-note {
  position: absolute; bottom: 220px; font-size: 34px; pointer-events: none;
  animation: floatUp 1s ease-out forwards; z-index: 30;
}
@keyframes floatUp {
  0% { opacity: 0; transform: translateY(0) scale(.6); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-160px) scale(1.2) rotate(12deg); }
}

/* 分句乐谱：每句一个块，随播放/弹奏自动滚动；简谱与五线谱上下成一套 */
.score-book {
  position: relative;
  max-height: 60vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  margin: 14px 0; padding: 6px 2px 10px;
  scroll-behavior: smooth;
}
.phrase-block {
  position: relative; padding: 12px 14px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-card);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.phrase-block.active { border-color: var(--brand); border-left-width: 6px; box-shadow: var(--shadow-md); background: var(--brand-soft); }
.phrase-head { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .04em; margin-bottom: 8px; }
.phrase-block.active .phrase-head { color: var(--brand); }
.seq-row { display: flex; gap: 8px; align-items: stretch; margin-bottom: 8px; }
.seq-pill {
  flex: 1 1 0; min-width: 38px; height: 52px; border-radius: 14px; padding: 4px 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 22px; font-weight: 800; background: var(--surface-2); border: 2px solid var(--line); color: var(--ink);
  transition: all .15s ease;
}
.seq-pill .jp { line-height: 1; }
.seq-pill.long { background: var(--brand-soft); border-color: var(--brand); }
.seq-pill.short { background: var(--surface-2); }
.seq-pill.correct { background: var(--c-green); color: #fff; border-color: var(--c-green); }
.seq-pill.current { background: var(--brand); color: #fff; border-color: var(--brand); transform: scale(1.1); box-shadow: var(--shadow-md); }
.seq-pill.wrong { animation: shake .4s; background: var(--c-red); color: #fff; }
/* 歌词：每音下面对应一个字，示范/跟弹时随当前音高亮（卡拉OK式） */
.seq-pill .ly {
  font-size: 12px; font-weight: 800; line-height: 1.1; color: var(--muted);
  margin-top: 2px; min-height: 14px; letter-spacing: .02em;
  transition: color .15s ease, transform .15s ease;
}
.seq-pill.current .ly, .seq-pill.correct .ly { color: #fff; transform: scale(1.14); }
.score-book.no-lyric .ly { display: none; }
.staff-mini { overflow-x: auto; }
.staff-mini .staff-svg { display: block; width: 100%; min-width: 300px; height: auto; }
.staff-note { transition: none; }
.staff-playhead { stroke: var(--brand); stroke-width: 2; }

/* abcjs 渲染的标准五线谱 */
.staff-mini svg { width: 100%; height: auto; display: block; }
.staff-mini .abcjs-note { cursor: default; }
/* 跟弹 / 听示范时高亮当前音 */
.staff-mini .note-current path { fill: var(--brand); stroke: var(--brand); }
.staff-mini .note-current text { fill: var(--brand); }
.staff-mini .note-current { filter: drop-shadow(0 0 4px rgba(255, 138, 61, .75)); }

/* 五线谱小知识 */
.staff-guide {
  background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--radius-card); padding: 4px 16px; margin: 12px 0;
}
.staff-guide summary {
  cursor: pointer; font-weight: 800; color: var(--brand);
  padding: 10px 0; list-style: none; user-select: none;
}
.staff-guide summary::-webkit-details-marker { display: none; }
.staff-guide-body {
  padding: 4px 4px 14px; color: var(--ink-soft);
  font-size: 14px; line-height: 1.7;
}
.staff-guide-body b { color: var(--ink); }
.staff-guide-body ul { margin: 6px 0; padding-left: 18px; }
.staff-guide-body .muted { color: var(--muted); font-size: 13px; }
.staff-guide-body .lead { color: var(--ink); font-weight: 600; margin-bottom: 10px; }
.staff-fig { margin: 12px 0; }
.staff-fig figcaption { font-size: 13px; font-weight: 700; color: var(--brand); margin-bottom: 6px; }
.staff-fig svg { width: 100%; height: auto; display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-sizing: border-box; }
.staff-fig .ln { stroke: var(--ink-soft); stroke-width: 1.2; }
.staff-fig .led { stroke: var(--ink-soft); stroke-width: 1.2; }
.staff-fig .clef { fill: var(--brand); font-size: 40px; }
.staff-fig .nh { fill: var(--brand); }
.staff-fig .nh-open { fill: #fff; stroke: var(--brand); stroke-width: 2; }
.staff-fig .stem { stroke: var(--ink); stroke-width: 2; fill: none; }
.staff-fig .num { fill: #fff; font-size: 11px; font-weight: 800; text-anchor: middle; }
.staff-fig .lbl { fill: var(--ink); font-size: 13px; font-weight: 700; text-anchor: middle; }
.staff-fig .sol { fill: var(--muted); font-size: 12px; text-anchor: middle; }
.staff-fig .cap { fill: var(--muted); font-size: 12px; text-anchor: middle; }

/* ---------- 音符消消乐 ---------- */
.match-board { display: grid; gap: 12px; justify-content: center; margin-top: 16px; }
.note-card {
  background: var(--surface); border: 3px solid var(--line); border-radius: 18px;
  min-height: clamp(64px, 16vw, 92px); min-width: clamp(46px, 13vw, 84px);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(16px, 5vw, 30px); font-weight: 800; cursor: pointer; color: var(--ink);
  transition: transform .15s ease, background .2s ease, opacity .3s ease; user-select: none;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.note-card:hover { background: var(--surface-2); }
.note-card.selected { background: var(--brand); color: #fff; border-color: var(--brand); transform: scale(1.05); }
.note-card.matched { opacity: 0; transform: scale(.4) rotate(20deg); pointer-events: none; }
.note-card .q { font-size: 34px; color: var(--brand); }
.note-card.pop { animation: pop .35s ease; }
@keyframes pop { 0%{transform:scale(1)} 50%{transform:scale(1.18)} 100%{transform:scale(1)} }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-8px)} 75%{transform:translateX(8px)} }

/* 连击提示 */
.combo {
  position: fixed; left: 50%; top: 30%; transform: translate(-50%,-50%);
  font-size: 48px; font-weight: 900; color: var(--brand); pointer-events: none; z-index: 120;
  text-shadow: 0 4px 0 #fff, 0 6px 10px rgba(0,0,0,.15); opacity: 0;
}
.combo.show { animation: comboPop .9s ease-out; }
@keyframes comboPop {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.5); }
  30% { opacity: 1; transform: translate(-50%,-50%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%,-90%) scale(1); }
}

/* ---------- 进度 / 星级 ---------- */
.progress { height: 14px; background: var(--surface-2); border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 999px; transition: width .3s ease; }
.stars { font-size: 30px; letter-spacing: 6px; color: var(--c-yellow); }
.stars .off { color: var(--line); }

/* ---------- 吉祥物 ---------- */
.mascot {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 96px; height: 96px; display: flex; align-items: center; justify-content: center;
  font-size: 60px; cursor: pointer; transition: transform .2s ease;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.18));
}
.mascot:hover { transform: scale(1.08) rotate(-4deg); }
.mascot.bounce { animation: mascotBounce .6s ease; }
@keyframes mascotBounce { 0%,100%{transform:translateY(0)} 30%{transform:translateY(-18px) scale(1.1)} 60%{transform:translateY(0)} }
.mascot-bubble {
  position: fixed; right: 120px; bottom: 40px; z-index: 60; max-width: 240px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 18px;
  padding: 12px 16px; box-shadow: var(--shadow-md); font-weight: 600; font-size: 15px;
  opacity: 0; transform: translateY(10px) scale(.95); transition: all .25s ease; pointer-events: none;
}
.mascot-bubble.show { opacity: 1; transform: translateY(0) scale(1); }

/* ---------- 弹窗 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(40, 28, 20, .5);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.modal {
  position: relative;
  background: var(--surface); border-radius: var(--radius-card); border: 2px solid var(--line);
  box-shadow: var(--shadow-lg); padding: 28px; max-width: 380px; width: 100%; text-align: center;
  transform: translateY(12px) scale(.97); transition: transform .2s ease;
}
.modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface-2);
  color: var(--ink-soft); font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.modal-close:hover { background: #ffe3e3; color: #d33; border-color: #ffc9c9; }
.modal-close:active { transform: translateY(1px) scale(.96); }
.overlay.show .modal { transform: translateY(0) scale(1); }
.modal h2 { font-size: 26px; margin-bottom: 8px; color: var(--brand); }
.modal p { color: var(--ink-soft); margin: 0 0 18px; }

/* 表单 */
.field { text-align: left; margin-bottom: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.field input {
  width: 100%; font-family: var(--font); font-size: 17px; color: var(--ink);
  background: var(--surface-2); border: 2px solid var(--line); border-radius: var(--radius-input);
  padding: 12px 14px; outline: none; transition: border-color .15s ease;
}
.field input:focus { border-color: var(--brand); }
.field .err { color: var(--c-red); font-size: 13px; margin-top: 6px; min-height: 16px; font-weight: 600; }

/* 提示条 */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 700;
  z-index: 130; opacity: 0; transition: all .25s ease; box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 彩带 */
.confetti {
  position: fixed; top: -20px; width: 10px; height: 16px; z-index: 110; border-radius: 2px;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: .9; }
}

/* 工具 */
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.center { text-align: center; }
.mt { margin-top: 18px; }
.hidden { display: none !important; }
.tip-line { color: var(--ink-soft); font-weight: 600; min-height: 24px; }

/* 倒计时放大 + 紧张时脉动 */
#timerStat { font-size: 16px; padding: 8px 18px; }
#timer { font-size: 28px; font-weight: 900; letter-spacing: .5px; display: inline-block; }
#timer.low { animation: tpulse .6s ease-in-out infinite; }
@keyframes tpulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.22); } }

/* 背景音符墙纸（品牌点缀，置于内容之下） */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='130'%3E%3Ctext x='22' y='86' font-size='48' fill='%23FF8A3D'%3E%E2%99%AA%3C/text%3E%3C/svg%3E");
  background-size: 150px 150px; opacity: .06;
}

/* 键盘/控件可见焦点（无障碍） */
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

/* 琴键悬浮微交互 + 键位提示高亮 */
.key:hover { filter: brightness(1.07); transform: translateY(-3px); }
.key .kk { transition: background .15s ease, transform .15s ease; }
.key:hover .kk { background: rgba(0,0,0,.32); transform: translateX(-50%) scale(1.08); }

/* 键盘演奏提示 */
.key-hint { text-align: center; color: var(--ink-soft); font-weight: 600; font-size: 14px; margin: 10px 0 0; }
.key-hint b { color: var(--brand); letter-spacing: 2px; }
@media (max-width: 520px) { .key-hint { font-size: 13px; } }

/* 分段控件（难度 / 音域 / 简谱·五线谱 / 单句·完整） */
.ctl-label { font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--surface-2); border: 2px solid var(--line); border-radius: 999px;
}
.seg-btn {
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font); font-weight: 800; font-size: 14px; color: var(--ink-soft);
  padding: 7px 14px; border-radius: 999px; transition: background .15s ease, color .15s ease, transform .1s ease;
}
.seg-btn:active { transform: scale(.96); }
.seg-btn.active { background: var(--brand); color: #fff; }
.seg-btn:disabled { opacity: .4; cursor: not-allowed; }
.seg-btn:disabled:active { transform: none; }

/* 节拍条（节奏可视化） */
.beat-bar { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 14px 0 4px; min-height: 30px; }
.beat-cell {
  width: 16px; height: 30px; border-radius: 6px;
  background: var(--surface-2); border: 2px solid var(--line);
  transition: background .12s ease, transform .12s ease, border-color .12s ease;
}
.beat-cell.played { background: var(--c-green); border-color: var(--c-green); }
.beat-cell.current { background: var(--brand); border-color: var(--brand); transform: scale(1.18); box-shadow: var(--shadow-sm); }

/* 五线谱容器 */
.staff-wrap {
  margin: 12px 0; padding: 14px; overflow-x: auto;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-card);
}
.staff-svg { display: block; width: 100%; min-width: 320px; height: auto; }
.staff-note { transition: none; }
.staff-playhead { stroke: var(--brand); stroke-width: 2; }

/* 课程列表 */
.course-list { display: grid; gap: 12px; margin-top: 16px; }
.course-step {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-card);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.course-step .badge {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px;
  background: var(--brand-soft); color: var(--brand);
}
.course-step.done .badge { background: var(--c-green); color: #fff; }
.course-step .body { flex: 1; }
.course-step .body h3 { font-size: 19px; margin: 0 0 2px; }
.course-step .body p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.course-step .goal { font-size: 13px; color: var(--brand); font-weight: 700; margin-top: 4px; }
.course-step.locked { opacity: .55; }
.course-step .how {
  font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin-top: 6px;
  background: var(--surface-2); border-radius: 10px; padding: 8px 10px;
}
.course-step .btn:disabled { opacity: .5; cursor: not-allowed; }
.course-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.course-progress-bar {
  flex: 1; height: 12px; background: var(--surface-2);
  border: 2px solid var(--line); border-radius: 999px; overflow: hidden;
}
.course-progress-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s ease; }
.course-progress span { font-weight: 800; color: var(--brand); white-space: nowrap; }
.course-finish {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-card);
  background: var(--brand-soft); color: var(--brand); font-weight: 800; text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .float-note, .confetti, .combo { display: none !important; }
}
