/* Jazz Guitar Gym — After Hours. One rule drives the palette: colour = musical function.
   Root = brass, 3rd = coral, 5th = teal, 7th = violet, colour tones = sky. */
:root {
  color-scheme: dark;
  --bg: #0b0d12; --bg-2: #10131a; --surface: #151922; --surface-2: #1c212c; --surface-3: #252b38;
  --line: #2b3240; --line-2: #3a4252;
  --text: #f4efe4; --muted: #aaa497; --faint: #8f897d;
  --brass: #eab35b; --brass-2: #ffd48a; --on-brass: #1a1206;
  --root: #eab35b; --third: #ff8a73; --fifth: #4fd1bd; --seventh: #ab8cff; --color: #6cb6ff;
  --ok: #4fd1bd; --bad: #ff7a70;
  --board-1: #3b2717; --board-2: #22160d; --fret: #c9c2b5; --string: #e2d6c2; --inlay: #d8cfc0;
  --dot-text: #15110a;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px -20px rgba(0,0,0,.65);
  --radius: 16px;
  --display: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --swing: cubic-bezier(.16, 1, .3, 1);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f1e7; --bg-2: #efe8db; --surface: #fffdf8; --surface-2: #f4eee3; --surface-3: #e9e1d2;
  --line: #ddd3c2; --line-2: #c9bda8;
  --text: #1c1915; --muted: #5d574d; --faint: #665f53;
  --brass: #8e5a0c; --brass-2: #6f4608; --on-brass: #fffaf0;
  --root: #e0a443; --third: #f2735b; --fifth: #2eb5a1; --seventh: #8e6cf0; --color: #4a9ef0;
  --ok: #0f7263; --bad: #c8382d;
  --board-1: #4a311c; --board-2: #2c1d11;
  --shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 18px 40px -22px rgba(60,40,10,.35);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f1e7; --bg-2: #efe8db; --surface: #fffdf8; --surface-2: #f4eee3; --surface-3: #e9e1d2;
    --line: #ddd3c2; --line-2: #c9bda8;
    --text: #1c1915; --muted: #5d574d; --faint: #665f53;
    --brass: #8e5a0c; --brass-2: #6f4608; --on-brass: #fffaf0;
    --root: #e0a443; --third: #f2735b; --fifth: #2eb5a1; --seventh: #8e6cf0; --color: #4a9ef0;
    --ok: #0f7263; --bad: #c8382d;
    --board-1: #4a311c; --board-2: #2c1d11;
    --shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 18px 40px -22px rgba(60,40,10,.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.55 var(--sans); font-feature-settings: 'cv11', 'ss01';
  background-image:
    radial-gradient(1100px 600px at 78% -10%, color-mix(in oklab, var(--brass) 14%, transparent), transparent 70%),
    radial-gradient(900px 500px at -10% 20%, color-mix(in oklab, var(--seventh) 9%, transparent), transparent 70%);
  background-attachment: fixed;
}
a { color: inherit; }
::selection { background: color-mix(in oklab, var(--brass) 38%, transparent); color: var(--text); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--brass); color: var(--on-brass); padding: 10px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }

/* ── Top bar ───────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px;
  padding: 12px clamp(16px, 4vw, 40px); backdrop-filter: blur(16px) saturate(1.4);
  background: color-mix(in oklab, var(--bg) 78%, transparent); border-bottom: 1px solid color-mix(in oklab, var(--line) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand span { display: grid; line-height: 1.05; }
.brand strong { font: 700 16px/1.1 var(--sans); letter-spacing: -.01em; }
.brand em { font: italic 500 14px/1.1 var(--display); color: var(--brass); }
.nav { display: flex; gap: 4px; margin-inline: auto; background: var(--surface); border: 1px solid var(--line); padding: 4px; border-radius: 999px; }
.nav a { white-space: nowrap; display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14.5px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { background: var(--text); color: var(--bg); }
.nav .i { display: inline-flex; }
.tools { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--muted); transition: color .2s, border-color .2s, transform .2s; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn[aria-pressed="true"] { color: var(--bad); }
.account-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 650; font-size: 14px; text-decoration: none; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.account-chip:hover { border-color: var(--line-2); }
.subnav { display: flex; gap: 8px; flex-wrap: wrap; max-width: 1320px; margin: 18px auto 0; padding: 0 clamp(16px, 4vw, 40px); }
.subnav[hidden] { display: none; }
.subnav a { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 650; font-size: 14px; color: var(--muted); }
.subnav a b { font-weight: 700; color: var(--faint); margin-right: 4px; }
.subnav a:hover { color: var(--text); }
.subnav a[aria-current="page"] { background: var(--brass); border-color: transparent; color: var(--on-brass); }
.subnav a[aria-current="page"] b { color: inherit; opacity: .7; }

/* ── Layout ────────────────────────────────────────────── */
main:focus, main:focus-visible { outline: none; }
main { display: block; padding: 0 clamp(16px, 4vw, 40px) 40px; max-width: 1320px; margin: 0 auto; outline: none; }
.section { margin-top: clamp(56px, 8vw, 104px); }
.eyebrow { font: 700 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; margin: 0; font-variation-settings: 'opsz' 144; }
h1 { font-size: clamp(44px, 7.4vw, 6rem); line-height: .96; }
h2 { font-size: clamp(32px, 4.2vw, 56px); line-height: 1; }
h3 { font-size: 24px; line-height: 1.1; }
h1 em, h2 em { color: var(--brass); font-style: italic; font-weight: 500; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 60ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; padding: clamp(28px, 5vw, 56px) 0 24px; }
.page-head h1 { font-size: clamp(40px, 6vw, 76px); }
.page-head p { margin: 14px 0 0; }

/* ── Buttons & controls ────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 650; text-decoration: none; cursor: pointer; transition: transform .25s var(--swing), background .2s, border-color .2s; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--brass); border-color: transparent; color: var(--on-brass); box-shadow: 0 10px 30px -10px color-mix(in oklab, var(--brass) 70%, transparent); }
.btn.primary:hover { background: var(--brass-2); }
.btn.big { min-height: 56px; padding: 0 26px; font-size: 17px; border-radius: 14px; }
.btn.round { width: 56px; padding: 0; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; }
.seg button { white-space: nowrap; border: 0; background: transparent; padding: 8px 13px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
select.select { appearance: none; min-height: 44px; padding: 0 40px 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23aaa497' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; font-weight: 600; cursor: pointer; }
input[type="range"] { accent-color: var(--brass); width: 100%; }

/* ── Key dial ──────────────────────────────────────────── */
.dial { position: relative; width: 236px; height: 236px; flex: none; }
.dial::before { content: ''; position: absolute; inset: 22px; border-radius: 50%; border: 1px dashed var(--line-2); }
.dial button { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); font: 600 15px var(--display); cursor: pointer; transform: rotate(var(--a)) translateY(-96px) rotate(calc(-1 * var(--a))); transition: background .2s, transform .35s var(--swing), color .2s; }
.dial button:hover { border-color: var(--brass); }
.dial button[aria-pressed="true"] { background: var(--brass); color: var(--on-brass); border-color: transparent; transform: rotate(var(--a)) translateY(-96px) rotate(calc(-1 * var(--a))) scale(1.18); }
.dial .hub { position: absolute; inset: 64px; border-radius: 50%; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at 30% 25%, var(--surface-3), var(--bg-2)); border: 1px solid var(--line); }
.dial .hub strong { font: 600 40px/1 var(--display); display: block; }
.dial .hub span { font-size: 11px; color: var(--faint); letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }

/* ── Fretboard ─────────────────────────────────────────── */
.board-wrap { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; border-radius: 16px; }
.fretboard { display: block; width: 100%; min-width: 760px; height: auto; user-select: none; -webkit-user-select: none; touch-action: pan-x; }
.fretboard .board { filter: drop-shadow(0 18px 24px rgba(0,0,0,.35)); }
.fretboard .frets line { stroke: var(--fret); stroke-width: 2.6; opacity: .75; }
.fretboard .nut { fill: #efe6d6; }
.fretboard .strings line { stroke: var(--string); opacity: .85; }
.fretboard .inlays circle { fill: var(--inlay); opacity: .22; }
.fretboard .open-name { fill: var(--faint); font: 700 15px var(--sans); }
.fretboard .fret-numbers text { fill: var(--faint); font: 600 13px var(--sans); text-anchor: middle; }
.fretboard .hit { fill: transparent; cursor: pointer; }
.fretboard .hit:hover { fill: color-mix(in oklab, var(--text) 8%, transparent); }
.fretboard .dots, .fretboard .ghosts, .fretboard .fx { pointer-events: none; }
.dot circle { fill: var(--muted); stroke: rgba(0,0,0,.35); stroke-width: 1.5; }
.dot text { fill: var(--dot-text); font: 750 13px var(--sans); text-anchor: middle; letter-spacing: -.02em; }
.dot.root circle { fill: var(--root); } .dot.third circle { fill: var(--third); } .dot.fifth circle { fill: var(--fifth); }
.dot.seventh circle { fill: var(--seventh); } .dot.color circle { fill: var(--color); }
.dot.dim { opacity: .22; }
.dot.lit circle { stroke: #fff; stroke-width: 3; }
.dot.correct circle { fill: var(--ok); } .dot.wrong circle { fill: var(--bad); }
.ghosts .dot circle { fill: none; stroke: var(--text); stroke-width: 2; stroke-dasharray: 3 3; opacity: .55; }
.ghosts .dot text { display: none; }
.dot circle, .dot text { transform-box: fill-box; transform-origin: center; animation: pop-inner .5s var(--swing) both; animation-delay: calc(var(--i) * 14ms); }
@keyframes pop-inner { from { opacity: 0; transform: scale(.2); } }
.ripple circle { fill: none; stroke: var(--text); stroke-width: 2; transform-origin: center; transform-box: fill-box; animation: ripple .7s ease-out forwards; }
.ripple.root circle { stroke: var(--root); } .ripple.third circle { stroke: var(--third); } .ripple.fifth circle { stroke: var(--fifth); } .ripple.seventh circle { stroke: var(--seventh); } .ripple.color circle { stroke: var(--color); }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* ── Legend ────────────────────────────────────────────── */
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 13px; height: 13px; border-radius: 50%; display: inline-block; }
.legend .root i { background: var(--root); } .legend .third i { background: var(--third); } .legend .fifth i { background: var(--fifth); } .legend .seventh i { background: var(--seventh); } .legend .color i { background: var(--color); }

/* ── Home ──────────────────────────────────────────────── */
.hero { display: grid; gap: 34px; padding-top: clamp(36px, 7vw, 84px); }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 32px; align-items: end; }
.hero-copy .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.stage { position: relative; padding: 22px; overflow: hidden; background: linear-gradient(180deg, var(--surface), var(--bg-2)); }
.stage::after { content: ''; position: absolute; inset: auto -20% -60% -20%; height: 120%; background: radial-gradient(closest-side, color-mix(in oklab, var(--brass) 12%, transparent), transparent); pointer-events: none; }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; position: relative; z-index: 1; }
.chord-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.chord-strip .chip { position: relative; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); font: 600 22px/1 var(--display); color: var(--muted); transition: all .35s var(--swing); min-width: 88px; text-align: center; }
.chord-strip .chip small { display: block; font: 700 10.5px/1 var(--sans); letter-spacing: .14em; color: var(--faint); margin-top: 6px; text-transform: uppercase; }
.chord-strip .chip.now { color: var(--on-brass); background: var(--brass); border-color: transparent; transform: translateY(-3px); box-shadow: 0 12px 30px -12px var(--brass); }
.chord-strip .chip.now small { color: color-mix(in oklab, var(--on-brass) 70%, transparent); }
.motion-line { position: relative; z-index: 1; min-height: 26px; margin-top: 12px; color: var(--muted); font-size: 15px; display: flex; gap: 8px 22px; flex-wrap: wrap; }
.motion-line b { color: var(--text); font-weight: 650; }
.beat-dots { display: flex; gap: 6px; }
.beat-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); transition: background .1s, transform .15s; }
.beat-dots i.on { background: var(--brass); transform: scale(1.35); }
.studios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.studio { position: relative; padding: 26px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; overflow: hidden; transition: transform .45s var(--swing), border-color .3s; min-height: 280px; }
.studio:hover { transform: translateY(-6px); border-color: var(--line-2); }
.studio p { margin: 0; color: var(--muted); }
.studio .go { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brass); }
.studio .art { height: 110px; margin: -6px -6px 6px; border-radius: 14px; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.studio .art svg { width: 100%; height: 100%; }
@keyframes float { to { transform: translateY(-5px); } }
.studio .art circle { transform-box: fill-box; }
.method { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 30px; counter-reset: step; }
.method li { list-style: none; padding: 24px 22px 6px 0; border-top: 2px solid var(--line); position: relative; }
.method li::before { counter-increment: step; content: '0' counter(step); position: absolute; top: -13px; left: 0; background: var(--bg); padding-right: 10px; font: 700 13px var(--sans); color: var(--brass); letter-spacing: .1em; }
.method h3 { margin-bottom: 8px; }
.method p { color: var(--muted); margin: 0; }
.ring { --p: 0; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brass) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; }
.ring::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); }
.ring strong { position: relative; font: 600 30px/1 var(--display); text-align: center; }
.ring strong small { display: block; font: 700 10px var(--sans); letter-spacing: .12em; color: var(--faint); margin-top: 4px; }

/* ── Studio layouts ────────────────────────────────────── */
.studio-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { padding: 22px; display: grid; gap: 20px; }
.panel h3 { font-size: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); background: var(--bg-2); border-radius: 999px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .2s; }
.chips button:hover { color: var(--text); border-color: var(--line-2); }
.chips button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: transparent; }
.readout { padding: 22px 24px; display: grid; gap: 18px; }
.readout-head { display: flex; justify-content: space-between; align-items: start; gap: 18px; flex-wrap: wrap; }
.readout-head h2 { font-size: clamp(36px, 4.6vw, 60px); }
.readout-head p { margin: 6px 0 0; color: var(--muted); max-width: 52ch; }
.tones { display: flex; gap: 8px; flex-wrap: wrap; }
.tone { display: grid; place-items: center; min-width: 64px; padding: 10px 10px 8px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); cursor: pointer; transition: transform .3s var(--swing); }
.tone:hover { transform: translateY(-3px); }
.tone b { font: 600 24px/1 var(--display); }
.tone small { font-size: 12px; font-weight: 700; margin-top: 5px; padding: 2px 8px; border-radius: 999px; color: var(--dot-text); }
.tone.root small { background: var(--root); } .tone.third small { background: var(--third); } .tone.fifth small { background: var(--fifth); } .tone.seventh small { background: var(--seventh); } .tone.color small { background: var(--color); }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.window-ctl { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); min-width: 260px; flex: 1; max-width: 420px; }
.window-ctl .seg { flex: none; }
.window-ctl output { font-weight: 700; color: var(--text); white-space: nowrap; }

/* Changes */
.transport { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tempo { display: grid; gap: 4px; min-width: 200px; flex: 1; max-width: 300px; }
.tempo label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-weight: 600; }
.tempo output { color: var(--text); font-weight: 750; }
.mixer { display: flex; gap: 6px; }
.chart-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bar { display: flex; gap: 6px; min-height: 86px; padding: 8px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); position: relative; }
.bar::before { content: attr(data-n); position: absolute; top: 6px; left: 10px; font-size: 11px; font-weight: 700; color: var(--faint); }
.bar button { flex: 1; border: 0; border-radius: 10px; background: transparent; font: 600 clamp(18px, 2vw, 26px)/1 var(--display); cursor: pointer; padding-top: 14px; transition: background .25s, color .25s, transform .3s var(--swing); }
.bar button:hover { background: var(--surface-2); }
.bar button.now { background: var(--brass); color: var(--on-brass); transform: scale(1.03); }
.big-chord { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.big-chord strong { font: 600 clamp(56px, 8vw, 104px)/.9 var(--display); letter-spacing: -.03em; }
.big-chord .next { color: var(--faint); font: 500 22px var(--display); }
.big-chord .next b { color: var(--muted); font-weight: 600; }
.motion { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.motion div { display: flex; align-items: center; gap: 10px; }
.motion i { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* Ear gym */
.ear-stage { padding: clamp(22px, 4vw, 40px); display: grid; gap: 26px; text-align: center; justify-items: center; }
.ear-stage > .board-wrap { justify-self: stretch; }
.studio-grid > *, .ear-stage > * { min-width: 0; max-width: 100%; }
.listen { width: 128px; height: 128px; border-radius: 50%; border: 0; background: var(--brass); color: var(--on-brass); cursor: pointer; display: grid; place-items: center; position: relative; box-shadow: 0 20px 50px -18px var(--brass); transition: transform .3s var(--swing); }
.listen:hover { transform: scale(1.05); }
.listen:active { transform: scale(.95); }
.listen.playing::before, .listen.playing::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brass); animation: halo 1.2s ease-out infinite; }
.listen.playing::after { animation-delay: .6s; }
@keyframes halo { to { transform: scale(1.7); opacity: 0; } }
.answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; width: 100%; max-width: 900px; }
.answer { position: relative; padding: 16px 10px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; display: grid; gap: 2px; transition: transform .3s var(--swing), border-color .2s, background .2s; }
.answer:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--line-2); }
.answer b { font: 600 24px/1.1 var(--display); }
.answer span { font-size: 12.5px; color: var(--muted); }
.answer kbd { position: absolute; top: 7px; right: 9px; font: 700 10.5px var(--sans); color: var(--faint); }
.answer.right { background: color-mix(in oklab, var(--ok) 22%, var(--bg-2)); border-color: var(--ok); animation: bounce .5s var(--swing); }
.answer.wrong { background: color-mix(in oklab, var(--bad) 18%, var(--bg-2)); border-color: var(--bad); animation: shake .4s; }
.answer:disabled { cursor: default; }
@keyframes bounce { 40% { transform: scale(1.08); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.stat { padding: 10px 18px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); min-width: 104px; }
.stat b { display: block; font: 600 28px/1 var(--display); }
.stat span { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.stat.hot b { color: var(--brass); }
.feedback { min-height: 54px; max-width: 640px; font-size: 16px; color: var(--muted); }
.feedback strong { color: var(--text); font-size: 20px; font-family: var(--display); display: block; }
.burst { position: fixed; pointer-events: none; z-index: 60; width: 8px; height: 8px; border-radius: 2px; animation: burst .9s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes burst { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

.notice { padding: 20px 22px; color: var(--muted); }

/* ── Curriculum: shared pieces ─────────────────────────── */
.muted { color: var(--muted); }
.small { font-size: 14px; }
.loading { display: flex; align-items: center; gap: 14px; padding: 26px; margin-top: 40px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--brass); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice h1 { font-size: clamp(32px, 4vw, 48px); margin: 10px 0; }
.notice .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 26px; font-size: 14px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--brass); }
.crumbs + .page-head { padding-top: 14px; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter span { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, var(--brass), var(--brass-2)); transition: width .8s var(--swing); }
.status-pill { display: inline-flex; align-items: center; white-space: nowrap; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); color: var(--muted); }
.status-pill.done { background: color-mix(in oklab, var(--ok) 18%, transparent); border-color: color-mix(in oklab, var(--ok) 45%, transparent); color: var(--text); }
.status-pill.started { background: color-mix(in oklab, var(--brass) 18%, transparent); border-color: color-mix(in oklab, var(--brass) 50%, transparent); color: var(--text); }
.status-pill.again { background: color-mix(in oklab, var(--third) 16%, transparent); border-color: color-mix(in oklab, var(--third) 45%, transparent); color: var(--text); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 32px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head .lede { margin: 0; max-width: 46ch; font-size: 16px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--muted); font-weight: 650; text-decoration: none; cursor: pointer; }
.link-btn:hover { color: var(--brass); }
kbd { font: 700 11px var(--sans); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); background: var(--bg-2); }
.lane-num { font: italic 500 40px/1 var(--display); color: var(--brass); }

/* Coverage card (drills, learn) */
.coverage { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; padding: clamp(22px, 3vw, 32px); align-items: center; }
.coverage h2 { font-size: clamp(26px, 3vw, 38px); margin: 10px 0 16px; }
.coverage .muted { margin: 12px 0 0; font-size: 14.5px; }
.coverage .muted a { color: var(--brass); }
.coverage-next { display: grid; gap: 6px; justify-items: start; padding: 20px 22px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.coverage-next strong { font: 600 24px/1.15 var(--display); }
.coverage-next span { color: var(--muted); font-size: 14.5px; margin-bottom: 8px; }

/* Lane cards */
.lane-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; }
.lane { display: flex; flex-direction: column; overflow: hidden; transition: transform .45s var(--swing), border-color .3s; }
.lane:hover { transform: translateY(-4px); border-color: var(--line-2); }
.lane-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; padding: 22px 22px 16px; text-decoration: none; flex: 1; }
.lane-main .lane-num { grid-row: span 2; }
.lane-main h3 { align-self: end; }
.lane-main p { margin: 0; color: var(--muted); font-size: 15px; }
.lane-count { grid-column: 1 / -1; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--faint); letter-spacing: .04em; }
.lane-main .meter { grid-column: 1 / -1; }
.lane-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 22px 20px; border-top: 1px solid var(--line); }
.lane-actions .btn { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.focus-note { font-size: 13px; color: var(--muted); }

/* Lane page */
.lane-head { align-items: stretch; }
.lane-head > div:first-child { flex: 1 1 420px; }
.lane-summary { flex: 0 1 360px; padding: 22px; display: grid; gap: 12px; align-content: start; }
.lane-summary strong { font: 600 40px/1 var(--display); }
.lane-summary strong small { font: 600 15px var(--sans); color: var(--muted); }
.lane-summary .lane-actions { padding: 0; border: 0; }
.lane-summary .muted { margin: 0; font-size: 14px; }
.levels { display: grid; gap: 10px; padding: 0; margin: 0; }
.level { list-style: none; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 18px; align-items: center; padding: 16px 20px; }
.level-num { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); font: 600 20px var(--display); }
.level.done .level-num { background: var(--ok); color: var(--dot-text); border-color: transparent; }
.level.started .level-num { background: var(--brass); color: var(--on-brass); border-color: transparent; }
.level.again .level-num { border-color: var(--third); }
.level h3 { font-size: 20px; }
.level p { margin: 4px 0; color: var(--muted); font-size: 14.5px; }
.level small { color: var(--faint); font-size: 13px; }
.level .btn { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.level.locked { opacity: .75; }
.mastery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.mastery { padding: 18px; display: grid; gap: 10px; justify-items: start; }
.mastery .meter { width: 100%; }
.mastery small { color: var(--faint); font-size: 13px; }
.recog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.recog { padding: 20px; display: grid; gap: 6px; text-decoration: none; transition: border-color .2s, transform .3s var(--swing); }
.recog:hover { border-color: var(--brass); transform: translateY(-3px); }
.recog strong { font: 600 21px/1.15 var(--display); }
.recog span { color: var(--muted); font-size: 14.5px; }
.recog small { color: var(--brass); font-weight: 650; font-size: 13px; margin-top: 4px; }

/* Home: what's next */
.practice-band { margin-top: clamp(40px, 6vw, 72px); }
.next-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 14px; }
.next-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; text-decoration: none; transition: transform .45s var(--swing), border-color .3s; min-height: 200px; }
.next-card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.next-card h3 { font-size: 23px; }
.next-card p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 14.5px; }
.next-card .meter { margin-top: 6px; }
.next-card .go { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brass); }
.next-card.primary { background: radial-gradient(420px 220px at 100% 0%, color-mix(in oklab, var(--brass) 22%, transparent), transparent 70%), var(--surface); border-color: color-mix(in oklab, var(--brass) 40%, var(--line)); }
.next-card.primary h3 { font-size: 28px; }
.method li a { text-decoration: none; display: block; }
.method li a:hover h3 { color: var(--brass); }

/* Daily Drills */
.daily-today { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 26px 30px; }
.daily-today h2 { font-size: clamp(26px, 3vw, 36px); margin: 8px 0; }
.daily-today .muted { margin: 0; }
.daily-blocks { display: grid; gap: 10px; padding: 0; margin: 0 0 14px; }
.daily-block { list-style: none; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 20px; }
.daily-block h3 { font-size: 21px; margin-top: 6px; }
.daily-block .muted { margin: 4px 0 0; font-size: 14.5px; }
.daily-block.done .level-num { background: var(--ok); color: var(--dot-text); border-color: transparent; }

/* Learn */
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 16px; margin-top: clamp(32px, 5vw, 56px); }
.chapter { padding: 22px; display: grid; gap: 14px; align-content: start; }
.chapter header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.chapter h2 { font-size: 26px; margin-top: 6px; }
.chapter header .muted { margin: 6px 0 0; font-size: 14.5px; }
.studies { display: grid; gap: 6px; padding: 0; margin: 0; }
.studies li { list-style: none; }
.studies a { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, transform .3s var(--swing); }
.studies a:hover { border-color: var(--brass); transform: translateX(3px); }
.studies strong { display: block; font-weight: 650; font-size: 15.5px; }
.studies small { color: var(--muted); font-size: 13.5px; }
.studies .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; }
.studies .done .tick { background: var(--ok); border-color: transparent; color: var(--dot-text); }
.studies .mins { color: var(--faint); font-size: 13px; font-weight: 650; white-space: nowrap; }

/* ── Drill runner ──────────────────────────────────────── */
.drill-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; flex-wrap: wrap; padding: 14px 0 18px; }
.drill-head h1 { font-size: clamp(32px, 4.4vw, 56px); margin-top: 10px; }
.drill-meta { display: flex; gap: 10px; align-items: center; }
.step-count { font-size: 15px; color: var(--muted); }
.step-count b { font: 600 30px var(--display); color: var(--text); }
.points { padding: 7px 13px; border-radius: 999px; background: color-mix(in oklab, var(--brass) 18%, transparent); color: var(--text); font-weight: 700; font-size: 14px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; padding: 0; margin: 0 0 18px; }
.steps li { list-style: none; }
.steps button { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.steps button.answered { background: color-mix(in oklab, var(--ok) 22%, var(--surface)); border-color: color-mix(in oklab, var(--ok) 50%, transparent); color: var(--text); }
.steps button.current { border-color: var(--brass); color: var(--text); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brass) 30%, transparent); }
.practice-note { color: var(--muted); margin: 0 0 16px; max-width: 70ch; }
.drill-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.drill-grid > * { min-width: 0; }
.drill-card { padding: clamp(18px, 2.6vw, 28px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.drill-card > * { min-width: 0; }
.drill-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.drill-top .btn { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.drill-card h2 { font: 600 clamp(20px, 2vw, 25px)/1.3 var(--sans); letter-spacing: -.01em; }
.drill-card h2:focus { outline: none; }
.target-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.target { font: 600 clamp(56px, 7vw, 88px)/.95 var(--display); letter-spacing: -.03em; }
.target.long { font-size: clamp(36px, 4.5vw, 56px); }
.notation { margin: 0; color: var(--text); max-width: 100%; overflow-x: auto; }
.notation svg { display: block; max-width: 100%; height: auto; }
.notation figcaption { font-size: 12px; color: var(--faint); max-width: 260px; }
.sub { margin: 0; color: var(--muted); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.choices[hidden] { display: none; }
.choice { position: relative; text-align: left; padding: 16px 16px 16px 46px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); font: 600 17px var(--sans); cursor: pointer; transition: border-color .2s, background .2s, transform .3s var(--swing); }
.choice kbd { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.choice:hover:not(:disabled) { border-color: var(--line-2); transform: translateY(-2px); }
.choice.selected { border-color: var(--color); background: color-mix(in oklab, var(--color) 14%, var(--bg-2)); }
.choice.correct { background: color-mix(in oklab, var(--ok) 20%, var(--bg-2)); border-color: var(--ok); }
.choice.wrong { background: color-mix(in oklab, var(--bad) 16%, var(--bg-2)); border-color: var(--bad); animation: shake .4s; }
.choice:disabled { cursor: default; }
.sequence { display: flex; gap: 8px; flex-wrap: wrap; }
.sequence[hidden] { display: none; }
.sequence span { padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); font-weight: 650; color: var(--muted); }
.sequence .played { background: color-mix(in oklab, var(--color) 20%, var(--bg-2)); border-color: var(--color); color: var(--text); }
.sequence .current { border-color: var(--brass); color: var(--text); }
.board-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 10px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.key.root { background: var(--root); }
.toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; font-weight: 650; font-size: 13.5px; color: var(--muted); cursor: pointer; min-height: 36px; }
.toggle i { width: 32px; height: 18px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .2s; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: transform .25s var(--swing), background .2s; }
.toggle[aria-pressed="true"] i { background: color-mix(in oklab, var(--brass) 55%, var(--surface-3)); }
.toggle[aria-pressed="true"] i::after { transform: translateX(14px); background: var(--brass); }
#instrument .fretboard { min-width: 1700px; }
#instrument .fretboard:focus { outline: none; }
#instrument .fretboard:focus-visible { outline: 3px solid var(--brass); outline-offset: -3px; border-radius: 12px; }
.board-note { margin: 8px 0 0; font-size: 13px; color: var(--faint); display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.fretboard .muted rect { fill: color-mix(in oklab, #0b0805 58%, transparent); }
.dot.pick circle { fill: var(--color); } .dot.answer circle { fill: var(--fifth); } .dot.bad circle { fill: var(--bad); }
.dot.hint circle { fill: color-mix(in oklab, var(--board-2) 70%, transparent); stroke: color-mix(in oklab, var(--string) 35%, transparent); }
.dot.hint text { fill: var(--string); font-size: 11.5px; }
.ripple.pick circle { stroke: var(--color); }
.cursor circle { fill: none; stroke: var(--brass-2); stroke-width: 3; }
.picked { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.picked[hidden] { display: none; }
.picked .chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--color); background: color-mix(in oklab, var(--color) 14%, var(--bg-2)); font-weight: 650; cursor: pointer; }
.picked .chip:disabled { cursor: default; }
.picked .root-chip { border-color: var(--root); background: color-mix(in oklab, var(--root) 16%, var(--bg-2)); cursor: default; }
.picked .root-chip small { color: var(--muted); font-weight: 600; }
.picked-label, .picked-empty { color: var(--muted); }
.picked-count { margin-left: auto; font-weight: 700; color: var(--faint); font-size: 13px; }
.drill-actions { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.drill-actions .spacer { flex: 1; }
.drill-actions .btn[hidden], .link-btn[hidden] { display: none; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.feedback-card { padding: 22px; display: grid; gap: 10px; position: sticky; top: 88px; transition: background .3s; }
.feedback-card .fb-symbol { font: 600 30px/1 var(--display); color: var(--muted); }
.feedback-card h3 { font-size: 22px; }
.feedback-card p { margin: 0; color: var(--muted); }
.feedback-card.success { background: color-mix(in oklab, var(--ok) 10%, var(--surface)); } .feedback-card.success .fb-symbol { color: var(--ok); }
.feedback-card.error { background: color-mix(in oklab, var(--bad) 9%, var(--surface)); } .feedback-card.error .fb-symbol { color: var(--bad); }
.feedback-card.hint { background: color-mix(in oklab, var(--brass) 9%, var(--surface)); } .feedback-card.hint .fb-symbol { color: var(--brass); }
.feedback-card .link-btn { justify-self: start; padding: 0; color: var(--brass); }
.solution { padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.solution[hidden] { display: none; }
.solution h4 { margin: 0 0 6px; font-size: 15px; }
.solution p + p { margin-top: 8px; }
.drill-foot { display: flex; justify-content: space-between; align-items: start; gap: 12px 24px; flex-wrap: wrap; margin-top: 18px; }
.notes { flex: 1 1 300px; max-width: 640px; color: var(--muted); }
.notes summary { cursor: pointer; font-weight: 650; color: var(--text); min-height: 40px; display: flex; align-items: center; }
.notes h4 { color: var(--text); margin: 6px 0; }
.kbd-hint { font-size: 13px; color: var(--faint); min-height: 40px; display: flex; align-items: center; gap: 6px; }
.recognition-diagram { background: var(--bg-2); border-color: var(--line); color: var(--text); }
.recognition-diagram .recognition-board-surface { fill: var(--board-1); }
.recognition-diagram :is(.recognition-fret, .recognition-string) { stroke: var(--fret); }
.recognition-diagram .recognition-position { fill: var(--color); stroke: var(--color); }
.recognition-diagram .recognition-open { fill: var(--surface); }
.finish { padding: clamp(26px, 5vw, 56px); margin-top: 18px; display: grid; justify-items: center; text-align: center; gap: 14px; }
.finish-medal { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--brass); color: var(--on-brass); box-shadow: 0 18px 44px -14px var(--brass); animation: bounce .7s var(--swing); }
.finish .lede { margin: 0; }
.finish-stats { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 10px 0; }
.finish-stats div { padding: 14px 22px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); min-width: 130px; }
.finish-stats strong { display: block; font: 600 34px/1 var(--display); }
.finish-stats span { font-size: 12.5px; color: var(--muted); }
.guitar-task { display: flex; gap: 16px; text-align: left; max-width: 640px; padding: 18px 20px; border-radius: 16px; background: color-mix(in oklab, var(--brass) 10%, var(--bg-2)); border: 1px solid color-mix(in oklab, var(--brass) 35%, var(--line)); }
.guitar-task > span { font-size: 28px; color: var(--brass); }
.guitar-task h2 { font-size: 22px; }
.guitar-task p { margin: 6px 0 0; color: var(--muted); }
.finish .cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; margin-top: 8px; }
.finish-note { color: var(--muted); font-size: 14.5px; margin: 6px 0 0; }
.finish-note a { color: var(--brass); }
#save-status.error { color: var(--bad); }

/* ── Footer ────────────────────────────────────────────── */
.footer { max-width: 1320px; margin: 40px auto 0; padding: 26px clamp(16px, 4vw, 40px) 40px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer p { margin: 0; max-width: 70ch; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1160px) {
  .nav a { padding: 8px 11px; }
  .nav { margin-inline: auto 0; }
}
@media (max-width: 1080px) {
  .studios { grid-template-columns: 1fr 1fr; }
  .next-grid { grid-template-columns: 1fr 1fr; }
  .drill-grid { grid-template-columns: 1fr; }
  .feedback-card { position: static; }
  .coverage { grid-template-columns: 1fr; }
  .studio-grid { grid-template-columns: 1fr; }
  .studio-grid > section { order: -1; }
  .hero-copy { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  /* backdrop-filter would make the fixed tab bar position against the header. */
  .topbar { gap: 10px; backdrop-filter: none; background: var(--bg); }
  .nav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); margin: 0; justify-content: space-around; z-index: 30; box-shadow: 0 18px 40px -10px rgba(0,0,0,.6); }
  .nav a { flex-direction: column; gap: 2px; padding: 7px 4px; font-size: 11px; flex: 1; border-radius: 16px; }
  .brand { flex: 0 1 auto; min-width: 0; }
  .brand svg { flex: none; }
  .brand span { min-width: 0; }
  .brand em { display: none; }
  .tools { margin-left: auto; }
  body { padding-bottom: 92px; }
  .method { grid-template-columns: 1fr 1fr; row-gap: 26px; }
  .chart-grid { grid-template-columns: repeat(2, 1fr); }
    .swatches { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
}
@media (max-width: 560px) {
  .studios { grid-template-columns: 1fr; }
  .next-grid { grid-template-columns: 1fr; }
  .next-card { min-height: 0; }
  .level { grid-template-columns: 44px minmax(0, 1fr); gap: 10px 14px; padding: 14px 16px; }
  .level .status-pill { grid-column: 2; justify-self: start; }
  .level .btn { grid-column: 1 / -1; }
  .daily-today { grid-template-columns: 1fr; justify-items: start; padding: 22px; gap: 16px; }
  .daily-block { grid-template-columns: 44px minmax(0, 1fr); padding: 14px 16px; gap: 12px; }
  .daily-block .status-pill { grid-column: 2; justify-self: start; }
  .chapter header { grid-template-columns: auto minmax(0, 1fr); }
  .chapter header .status-pill { grid-column: 2; justify-self: start; }
  .drill-actions .spacer { display: none; }
  .drill-actions .btn { flex: 1 1 100%; }
  .account-chip { padding: 0 12px; max-width: 110px; }
  .studio { min-height: 0; }
  .method { grid-template-columns: 1fr; }
    .window-ctl { min-width: 0; flex: 1 1 100%; max-width: none; flex-wrap: wrap; }
  .dial { transform: scale(.88); margin: -14px auto; }
  .stage { padding: 16px; }
  .chord-strip .chip { min-width: 0; flex: 1; font-size: 18px; padding: 9px 8px; }
}
@media (max-width: 380px) {
  .brand strong { font-size: 14px; }
  .brand span { display: none; }
  .tools { gap: 6px; }
  .icon-btn { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Home: skill domains */
.drill-resume { display: flex; align-items: center; gap: 12px; padding: 16px 20px; margin: 18px 0 0; text-decoration: none; border-color: color-mix(in oklab, var(--brass) 45%, var(--line)); }
.drill-resume span { font-size: 13px; font-weight: 700; color: var(--brass); }
.drill-resume strong { font: 600 20px/1.2 var(--display); margin-right: auto; }
.domain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; margin-top: 20px; }
.domain { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 20px; text-decoration: none; transition: border-color .2s, transform .3s var(--swing); }
.domain:hover { border-color: var(--brass); transform: translateY(-3px); }
.domain h3 { font-size: 21px; }
.domain p { margin: 6px 0 8px; color: var(--muted); font-size: 14.5px; }
.domain-detail { font-size: 13px; font-weight: 650; color: var(--faint); }
.domain > svg { color: var(--brass); margin-top: 4px; }

/* Streak strip: the very top of every page */
.streak-strip { display: flex; align-items: center; justify-content: center; gap: 10px 14px; flex-wrap: wrap; padding: 8px clamp(16px, 4vw, 40px); background: color-mix(in oklab, var(--brass) 16%, var(--bg)); border-bottom: 1px solid color-mix(in oklab, var(--brass) 35%, var(--line)); font-size: 14px; color: var(--muted); }
.streak-strip[hidden] { display: none; }
.streak-flame { display: grid; color: var(--brass); }
.streak-copy strong { color: var(--text); font-weight: 700; }
.streak-copy a { color: var(--brass); font-weight: 650; }
.streak-where { color: var(--muted); }
.streak-cta { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 14px; border-radius: 10px; background: var(--brass); color: var(--on-brass); font-weight: 700; text-decoration: none; }
.streak-cta:hover { background: var(--brass-2); }
.streak-strip.done { background: color-mix(in oklab, var(--ok) 12%, var(--bg)); border-bottom-color: color-mix(in oklab, var(--ok) 35%, var(--line)); }
.streak-strip.done .streak-flame { color: var(--ok); }
@media (max-width: 560px) { .streak-strip { justify-content: flex-start; font-size: 13px; } .streak-where { display: block; } }

/* Explorer: chord shapes */
.shape-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.shape-bar[hidden], .window-ctl[hidden], .field[hidden] { display: none; }
.shape-info { flex: 1; display: grid; gap: 2px; text-align: center; }
.shape-info strong { font: 700 20px/1.2 ui-monospace, 'SF Mono', Consolas, monospace; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.shape-info span { font-size: 13.5px; color: var(--muted); }
.shape-bar .icon-btn:disabled { opacity: .35; cursor: default; }
.flip { display: inline-flex; transform: scaleX(-1); }

/* Classic features hosted inside v2 keep v2's page frame. */
main#view { width: auto; }
.classic-embed { padding-top: 24px; }
.classic-embed .course-view { width: auto; max-width: none; margin: 0; padding: 0; }
.static-home { padding-top: clamp(36px, 7vw, 84px); max-width: 860px; }
.static-home p { margin: 14px 0 0; }

/* Changes Player: chart builder and comp-along */
.chart-editor textarea { width: 100%; min-height: 110px; resize: vertical; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: 600 15px/1.6 var(--sans); }
.chart-editor small { color: var(--muted); font-size: 13px; }
.chart-error { margin: 0; min-height: 1em; color: var(--bad); font-size: 13.5px; font-weight: 600; }
.chart-error:empty { display: none; }
.chart-save { display: flex; gap: 8px; }
.chart-save input { flex: 1; min-width: 0; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; }
.chart-save .btn { min-height: 40px; padding: 0 16px; }
.saved-chart { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); }
.saved-chart button { border: 0; background: none; color: var(--text); padding: 7px 10px 7px 12px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.saved-chart .remove { padding: 7px 10px 7px 4px; color: var(--muted); display: grid; place-items: center; }
.comp { display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.comp[hidden] { display: none; }
.comp-note, .comp-summary { margin: 0; font-size: 14.5px; color: var(--muted); }
.comp-summary { color: var(--text); font-weight: 600; }
.comp-pad { min-height: 96px; border-radius: 14px; border: 2px solid var(--brass); background: var(--surface); color: var(--text); font: 700 20px var(--sans); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.comp-pad small { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.comp-pad.hit { animation: comp-hit .12s ease-out; }
@keyframes comp-hit { from { background: color-mix(in oklab, var(--brass) 30%, var(--surface)); } }
.comp-bars { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.comp-bars span { padding: 4px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; border: 1px solid var(--line); }
.comp-bars .good { background: color-mix(in oklab, var(--ok) 20%, transparent); border-color: color-mix(in oklab, var(--ok) 50%, transparent); }
.comp-bars .off { background: color-mix(in oklab, var(--bad) 14%, transparent); border-color: color-mix(in oklab, var(--bad) 45%, transparent); }
#modes { justify-self: start; }

/* Review what slipped */
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.review-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 200px) auto; align-items: center; gap: 18px; padding: 18px 22px; }
.review-item h3 { font-size: 20px; margin: 2px 0 4px; }
.review-item.needs-practice { border-color: color-mix(in oklab, var(--third) 45%, var(--line)); }
.review-card { min-height: 0; }
@media (max-width: 860px) { .review-item { grid-template-columns: 1fr; gap: 12px; } .review-item .btn { justify-self: start; } }

/* Metronome */
.metronome { display: grid; gap: 22px; justify-items: center; padding: clamp(22px, 4vw, 40px); max-width: 720px; margin: 0 auto; text-align: center; }
.met-tempo { display: flex; align-items: center; gap: 18px; }
.met-tempo output { font-family: var(--display); font-size: clamp(64px, 14vw, 104px); line-height: 1; font-variant-numeric: tabular-nums; min-width: 3ch; }
.met-tempo output small { display: block; font-family: var(--sans); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.met-tempo .btn { width: 52px; height: 52px; padding: 0; justify-content: center; font-size: 26px; border-radius: 999px; }
.metronome input[type="range"] { width: min(100%, 520px); accent-color: var(--brass); }
.met-dots { display: flex; gap: 12px; }
.met-dots span { width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--line-2); transition: transform .08s, background .08s; }
.met-dots span.click { border-color: var(--brass); }
.met-dots span.on { background: var(--line-2); transform: scale(1.2); }
.met-dots span.click.on { background: var(--brass); }
.met-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.met-actions #tap.hit { animation: tap-hit .18s var(--swing); }
@keyframes tap-hit { 50% { transform: scale(.96); } }
.met-settings { display: grid; gap: 16px; justify-items: center; }
.met-settings .field { display: grid; gap: 8px; justify-items: center; }
.met-settings .check { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
.met-settings .check:has(input:disabled) { opacity: .5; }

.studio-extras { margin: 18px 0 0; color: var(--muted); }
.studio-extras a { color: var(--brass); font-weight: 650; }
