/* Fretwork design system: Databuddy-style quiet dark UI. Light primary buttons; amber only for progress and playback. */
:root {
  /* Same neutrals as the Databuddy dashboard (dark). Amber marks progress and the note being played. */
  --bg: #19191d;
  --surface: #1e1e23;
  --surface-2: #25252b;
  --surface-3: #2f2f37;
  --line: #2c2c34;
  --line-strong: #3b3b45;
  --text: #e7e8eb;
  --muted: #a3a4ab;
  --faint: #75767e;
  --primary: #e7e8eb;
  --primary-ink: #27282d;
  --accent: #f0ba4d;
  --accent-soft: rgba(240, 186, 77, 0.12);
  --accent-ink: #1f1806;
  --hot: #d4658a;
  --hot-soft: rgba(212, 101, 138, 0.14);
  --good: #4ebf7b;
  --good-soft: rgba(78, 191, 123, 0.12);
  --bad: #ef4444;
  --bad-soft: rgba(239, 68, 68, 0.12);
  --wood: #2a2420;
  --glass: rgba(25, 25, 29, 0.9);
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 3px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
  --font-display: 'Geist', system-ui, sans-serif;
  --font: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --max: 1080px;
  --side-w: 232px;
  --gutter: clamp(16px, 4vw, 32px);
  --tabbar-h: 0px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
  padding-bottom: var(--tabbar-h);
}
body.has-pathbar { padding-bottom: calc(var(--tabbar-h) + 76px); }
img, svg { max-width: 100%; }
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* links inside text: underlined so they read as links without a colour */
:is(p, li, dd) a:not(.btn) { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
:is(p, li, dd) a:not(.btn):hover { text-decoration-color: var(--text); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .4em; letter-spacing: -0.015em; font-weight: 600; }
h1 { font-size: clamp(24px, 3vw, 28px); }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; height: 58px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font: 600 17px/1 var(--font-display); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 20px; height: 20px; }
.nav { display: flex; gap: 2px; flex: 1; }
.nav a { color: var(--muted); font-weight: 500; font-size: 14.5px; padding: 7px 12px; border-radius: 8px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--surface-3); }
.tabbar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* sidebar (wide screens): replaces the top bar and section sub-menu */
.sidebar { display: none; }
@media (min-width: 1000px) {
  :root { --side-off: var(--side-w); }
  body { padding-left: var(--side-off); }
  .topbar, .subnav { display: none !important; }
  .sidebar { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--side-w); padding: 14px 10px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
  .sidebar .brand { padding: 6px 10px 16px; }
}
.sidenav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidenav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; font-size: 14px; }
.sidenav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.sidenav a.active { color: var(--text); background: var(--surface-3); }
.sidenav svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-group { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.side-label { padding: 0 10px 6px; font: 500 11px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.side-path { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--text); font-size: 13px; }
.side-path:hover { text-decoration: none; border-color: var(--line-strong); }
.side-path > span { display: flex; justify-content: space-between; }
.side-path b { font-weight: 500; }
.side-path > span > span { font-family: var(--mono); color: var(--muted); }

/* bottom tab bar (phones) */
.tabbar { display: none; }
@media (max-width: 760px) {
  :root { --tabbar-h: calc(62px + env(safe-area-inset-bottom)); }
  .nav { display: none; }
  .topbar-inner { height: 52px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: var(--tabbar-h); padding-bottom: env(safe-area-inset-bottom);
    background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); font: 600 11px var(--font); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.active { color: var(--text); }
}

/* path step bar */
.pathbar { position: fixed; left: var(--side-off, 0px); right: 0; bottom: var(--tabbar-h); z-index: 55; padding: 10px var(--gutter); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.pathbar[hidden] { display: none; }
.pathbar-inner { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.pb-step { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--text); }
.pb-step:hover { text-decoration: none; }
.pb-count { font: 700 12px var(--mono); color: var(--accent); background: var(--accent-soft); padding: 4px 7px; border-radius: 6px; flex-shrink: 0; }
.pb-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-done { min-width: 110px; }

/* ---------- layout ---------- */
.view { flex: 1; width: 100%; outline: none; }
.page { max-width: var(--max); margin: 0 auto; padding: clamp(24px, 4vw, 44px) var(--gutter) 56px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { color: var(--muted); margin: 0; }
.section { margin-top: 40px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.spacer { flex: 1; }
.back { display: inline-flex; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.back:hover { color: var(--text); text-decoration: none; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 4px; }
.panel { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; }
.empty { text-align: center; padding: 56px 16px; color: var(--muted); }
.empty h1, .empty h2 { color: var(--text); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
details > summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '›'; display: inline-block; transition: transform .15s; font-size: 18px; line-height: 1; }
details[open] > summary::before { transform: rotate(90deg); }
details > summary:hover { color: var(--text); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  font: 500 14px/1 var(--font); cursor: pointer; white-space: nowrap; box-shadow: var(--shadow); transition: background .12s, transform .06s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: #fff; }
.btn-hot { background: var(--hot); border-color: var(--hot); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-lg { height: 42px; padding: 0 18px; font-size: 14.5px; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
.btn-icon { width: 36px; padding: 0; }
.btn-ghost { box-shadow: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 13px/1 var(--font); cursor: pointer; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active, .chip[aria-pressed="true"] { background: var(--surface-3); border-color: var(--line-strong); color: var(--text); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font: 600 11.5px/1 var(--font); }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.tag.good { background: var(--good-soft); color: var(--good); }

.seg { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; gap: 2px; flex-wrap: wrap; }
.seg button, .seg a { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 500 13px/1 var(--font); cursor: pointer; }
.seg button:hover, .seg a:hover { color: var(--text); text-decoration: none; }
.seg button.active, .seg button[aria-pressed="true"], .seg a.active { background: var(--surface-3); color: var(--text); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font: 600 12px/1 var(--font); color: var(--muted); }
.input, select.input { height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); padding: 0 12px; font: 500 14px var(--font); }
.input:focus { outline: none; border-color: var(--muted); box-shadow: 0 0 0 3px rgba(231, 232, 235, 0.08); }

.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 99px; background: var(--surface-3); outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--text); cursor: pointer; }
.slider::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--text); cursor: pointer; }


.progress { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }

.diff { display: inline-flex; gap: 3px; vertical-align: middle; }
.diff i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); }
.diff i.on { background: var(--muted); }

.i-play { width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.is-playing .i-play { width: 10px; height: 12px; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }

/* ---------- tab player ---------- */
.tabplayer { display: flex; flex-direction: column; gap: 12px; position: relative; }
.tp-controls { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.tp-play { min-width: 96px; height: 40px; }
.tp-speed-box { display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); height: 40px; padding: 0 2px; }
.tp-speed-box .btn-icon { width: 34px; height: 34px; box-shadow: none; border: 0; background: transparent; font-size: 18px; }
.tp-speed-val { display: flex; flex-direction: column; align-items: center; min-width: 62px; line-height: 1.1; }
.tp-speed { font: 700 14px var(--mono); }
.tp-bpm { font-size: 11px; color: var(--faint); }
.tp-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.tp-tab { display: flex; flex-direction: column; gap: 8px; overflow-x: auto; }
.tp-count { position: absolute; inset: 64px 0 auto 0; text-align: center; font: 600 64px/1 var(--font-display); color: var(--accent); pointer-events: none; opacity: 0; transition: opacity .1s; text-shadow: 0 4px 30px rgba(0,0,0,.9); z-index: 2; }
.tp-count.show { opacity: 1; }
@media (max-width: 600px) { .tp-play { flex: 1; } }

/* ---------- chord diagram ---------- */
.chord-svg { width: 120px; height: auto; display: block; }
.chord-svg .cd-name { font: 600 14px var(--font-display); fill: var(--text); }
.chord-svg .cd-fret { stroke: var(--line-strong); stroke-width: 1.2; }
.chord-svg .cd-nut { stroke: var(--text); stroke-width: 4; }
.chord-svg .cd-string { stroke: var(--muted); stroke-width: 1.1; }
.chord-svg .cd-dot { fill: var(--accent); }
.chord-svg .cd-finger { font: 700 9.5px var(--font); fill: var(--accent-ink); }
.chord-svg .cd-open { fill: none; stroke: var(--text); stroke-width: 1.5; }
.chord-svg .cd-mark { font: 600 12px var(--font); fill: var(--faint); }
.chord-svg .cd-base { font: 600 9.5px var(--font); fill: var(--muted); }

/* ---------- fretboard ---------- */
.fb-wrap { overflow-x: auto; padding-bottom: 4px; }
.fb-svg { display: block; width: 100%; min-width: 720px; height: auto; user-select: none; }
.fb-svg .fb-wood { fill: var(--wood); }
.fb-svg .fb-fret { stroke: #8e8576; stroke-width: 2; }
.fb-svg .fb-nut { stroke: #e9dfcd; stroke-width: 6; }
.fb-svg .fb-string { stroke: #cbbfa9; }
.fb-svg .fb-inlay { fill: #5a4632; }
.fb-svg .fb-num { font: 600 10px var(--font); fill: var(--faint); }
.fb-svg .fb-sname { font: 700 11px var(--mono); fill: var(--muted); }
.fb-svg .fb-hit { fill: transparent; cursor: pointer; }
.fb-svg .fb-hit:hover { fill: var(--accent-soft); }
.fb-svg .fb-mark circle { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.fb-svg .fb-mark text { font: 700 10px var(--font); fill: var(--accent-ink); pointer-events: none; }
.fb-svg .fb-mark { pointer-events: none; }
.fb-svg .fb-mark.root circle { fill: var(--hot); }
.fb-svg .fb-mark.root text { fill: #fff; }
.fb-svg .fb-mark.good circle { fill: var(--good); }
.fb-svg .fb-mark.bad circle { fill: var(--bad); }
.fb-svg .fb-mark.ghost circle { fill: var(--surface-3); stroke: var(--line-strong); }
.fb-svg .fb-mark.ghost text { fill: var(--muted); }

/* ---------- amp panel ---------- */
.amp-panel { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px 10px; }
.amp-label { font: 600 12px var(--font); color: var(--muted); margin-bottom: 8px; }
.amp-knobs { display: flex; gap: 8px; flex-wrap: wrap; }
.knob { display: flex; flex-direction: column; align-items: center; width: 50px; }
.knob svg { width: 40px; height: 40px; }
.knob-ring { fill: none; stroke: var(--surface-3); stroke-width: 3; }
.knob-arc { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.knob-cap { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1.5; }
.knob-ptr { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; }
.knob b { font: 700 13px var(--mono); margin-top: 2px; }
.knob span { font: 500 10.5px var(--font); color: var(--muted); text-transform: capitalize; }

/* ---------- path (home) ---------- */
.path-page { max-width: 720px; }
.path-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.path-head h1 { margin: 0; }
.path-progress { display: flex; align-items: center; gap: 10px; font: 700 13px var(--mono); color: var(--muted); }
.path-progress .progress { width: 140px; }
.next-card { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 16px; align-items: center; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); }
.next-card:hover { text-decoration: none; border-color: var(--line-strong); }
.next-kind { font: 500 13px var(--font); color: var(--accent); }
.next-title { grid-column: 1; font: 600 clamp(20px, 3vw, 24px)/1.2 var(--font-display); letter-spacing: -0.02em; }
.next-go { grid-column: 2; grid-row: 1 / 3; }
.done-card { grid-template-columns: 1fr auto; }
@media (max-width: 520px) { .next-card { grid-template-columns: 1fr; } .next-go { grid-column: 1; grid-row: auto; margin-top: 12px; width: 100%; } }

.levels { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.level-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.level-head h2 { margin: 0; font-size: 15px; font-weight: 500; }
.level-head span { font: 600 12px var(--mono); color: var(--faint); }
.steps { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.step { display: flex; align-items: center; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step a { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px 11px 4px; color: var(--text); min-width: 0; }
.step a:hover { text-decoration: none; }
.step:hover { background: var(--surface-2); }
.step-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-kind { font: 500 12px var(--font); color: var(--faint); flex-shrink: 0; }
.step-check { width: 44px; height: 42px; flex-shrink: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.step-check::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); box-sizing: border-box; }
.step-check:hover::before { border-color: var(--muted); }
.step.is-done .step-check::before { background: var(--good); border-color: var(--good); content: '✓'; color: var(--bg); font: 600 11px/15px var(--font); text-align: center; }
.step.is-done .step-title { color: var(--muted); }
.step.is-next { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.step.is-next .step-check::before { border-color: var(--accent); border-width: 2px; }
.kind-riff { color: var(--hot); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* tab player on/off chips: clear state */
.tp-opt[aria-pressed="false"] { color: var(--faint); background: transparent; border-color: var(--line); text-decoration: line-through; text-decoration-color: var(--faint); }
.tp-opt[aria-pressed="true"] { color: var(--text); background: var(--surface-3); }
.tp-opt[aria-pressed="true"]::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }

/* chord written as tab (default chord view) */
.chord-tab .ct-line { font: 600 17px var(--mono); fill: var(--faint); white-space: pre; }
.chord-tab .ct-str { fill: var(--muted); }
.chord-tab .ct-fret { fill: var(--text); font-weight: 700; }
.chord-tab .ct-mute { fill: var(--bad); }
.chord-view { flex-shrink: 0; }
/* chord names above song tabs */

/* compact tab player: play button only (used for small examples) */
.tp-compact .tp-speed-box, .tp-compact .tp-toggles { display: none; }
.tp-compact .tp-play { height: 34px; min-width: 0; padding: 0 12px; font-size: 13px; flex: none; }
.tp-compact .tp-count { display: none; }
.tp-compact { gap: 8px; }

/* "?" link from every full tab player to the tab guide */
.tp-help { margin-left: auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--muted); font: 700 13px var(--font); }
.tp-help:hover { color: var(--text); text-decoration: none; border-color: var(--muted); }

/* ---------- read tabs guide ---------- */
.tg-page { max-width: 920px; }
.tg-h { margin: 44px 0 14px; }
.tg-basics { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.tg-points { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.tg-points b { color: var(--text); font-weight: 600; }
.tg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tg-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; padding: 16px; background: var(--surface); border-radius: var(--radius); }
.tg-sym { grid-row: 1 / 3; display: grid; place-items: center; min-height: 64px; border-radius: 10px; background: var(--surface-2); font: 700 18px/1.15 var(--mono); color: var(--accent); text-align: center; }
.tg-text h3 { margin: 2px 0 2px; }
.tg-text p { margin: 0; font-size: 14px; color: var(--muted); }
.tg-ex { grid-column: 2; margin-top: 8px; min-width: 0; }
.tg-ex .tabplayer, .tg-rhythm-ex .tabplayer { flex-direction: row; align-items: flex-start; }
.tg-ex .tp-controls, .tg-rhythm-ex .tp-controls { flex-shrink: 0; }
.tg-ex .tp-tab, .tg-rhythm-ex .tp-tab { flex: 1; min-width: 0; }
.tg-also { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
.tg-also > div { display: flex; gap: 12px; align-items: baseline; font-size: 14px; color: var(--muted); }
.tg-also code { flex-shrink: 0; min-width: 76px; font: 700 13px var(--mono); color: var(--accent); }
.tg-also b { color: var(--text); font-weight: 600; }
.tg-note-line { margin: -6px 0 14px; }
.tg-rhythm { display: flex; flex-direction: column; gap: 8px; }
.tg-rhythm-row { display: grid; grid-template-columns: 34px 170px minmax(0, 1fr); gap: 14px; align-items: center; padding: 8px 12px; background: var(--surface); border-radius: var(--radius-sm); }
.tg-rhythm-name { display: flex; flex-direction: column; line-height: 1.3; }
.tg-rhythm-name span { font: 500 12.5px var(--mono); color: var(--muted); }
.tg-note { width: 28px; height: 40px; }
.tg-note .fill, .tg-staff .fill { fill: var(--text); }
.tg-note .hollow { fill: none; stroke: var(--text); stroke-width: 2; }
.tg-note .stem, .tg-staff .stem { stroke: var(--text); stroke-width: 1.6; }
.tg-note .flag { fill: none; stroke: var(--text); stroke-width: 2; }
.tg-sheet { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.tg-staff { width: 100%; height: auto; background: var(--surface); border-radius: var(--radius); padding: 8px; }
.tg-staff .staff-line { stroke: var(--muted); stroke-width: 1; }
.tg-staff .clef { font: 44px serif; fill: var(--text); }
.tg-staff .clef8 { font: 600 10px var(--font); fill: var(--muted); }
.tg-staff .note-name { font: 700 12px var(--font); fill: var(--accent); }
.tg-staff .tab-line { stroke: var(--line-strong); }
.tg-staff .tab-str { font: 700 10px var(--mono); fill: var(--muted); }
.tg-staff .tab-bg { fill: var(--surface); }
.tg-staff .tab-num { font: 700 12px var(--mono); fill: var(--text); }
@media (max-width: 760px) {
  .tg-basics, .tg-grid, .tg-also, .tg-sheet { grid-template-columns: 1fr; }
  .tg-rhythm-row { grid-template-columns: 30px minmax(0, 1fr); }
  .tg-rhythm-ex { grid-column: 1 / -1; }
  .tg-ex .tabplayer, .tg-rhythm-ex .tabplayer { flex-direction: column; }
}
.tp-compact .tp-help, .tg-page .tp-help { display: none; }
.tg-staff .clef { font-size: 60px; }
/* tabs must show every character as typed: no "|-" or "->" ligatures */
.chord-tab, .tg-sym, .tg-also code { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
@media (max-width: 760px) {
  .tg-card { grid-template-columns: 48px minmax(0, 1fr); }
  .tg-sym { grid-row: auto; min-height: 48px; font-size: 15px; }
  .tg-ex { grid-column: 1 / -1; }
}

/* engraved tab (alphaTab) */
.tp-tab { position: relative; overflow: visible; background: var(--surface); border-radius: var(--radius-sm); padding: 6px 4px; cursor: pointer; min-height: 80px; }
.tp-compact .tp-tab { background: var(--bg); }
.tp-tab .at-surface { position: relative; }
.tp-cursor { position: absolute; z-index: 1; pointer-events: none; border-radius: 6px; background: rgba(240, 186, 77, 0.18); box-shadow: inset 0 0 0 1.5px var(--accent); opacity: 0; transition: left .06s linear, top .06s; }
.tp-cursor.show { opacity: 1; }
/* Listen: a dot above each judged note, green = right note in time, red = missed */
.tp-marks { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.tp-mark { position: absolute; width: 9px; height: 9px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2px var(--surface); }
.tp-mark.bad { background: var(--bad); }
.tab-view { margin-left: auto; }
.tab-view + .tp-help { margin-left: 0; }
.tg-sym { font: italic 700 15px/1.2 'Times New Roman', serif; color: var(--text); flex-direction: column; display: flex; align-items: center; justify-content: center; gap: 2px; }
.tg-sym .arc { display: block; width: 30px; height: 10px; border: 2px solid var(--text); border-bottom: 0; border-radius: 30px 30px 0 0; }
.tg-sym .slash { display: block; width: 30px; height: 2px; background: var(--text); transform: rotate(-20deg); margin-top: 6px; }
.tg-sym .wavy { font-style: normal; letter-spacing: -4px; }
.tp-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.tp-right .tab-view, .tp-right .tp-help { margin-left: 0; }
.tp-compact .tp-right { display: none; }

/* tab guide: symbol cards link to a lesson per symbol */
a.tg-sym { color: var(--text); text-decoration: none; transition: background .12s; }
a.tg-sym:hover { background: var(--surface-3); }
.tg-text h3 a { color: var(--text); }
.tg-learn { display: inline-block; margin-top: 6px; font-weight: 600; font-size: 14px; }
.tg-rhythm-name small { color: var(--faint); font-size: 12px; }
.tg-detail { max-width: 960px; }
.detail-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.detail-nav .back { margin: 0; white-space: nowrap; }
@media (max-width: 640px) { .detail-nav .btn span { display: none; } } /* phones: arrows only */
.tg-detail-head { display: flex; gap: 20px; align-items: center; margin-bottom: 28px; }
.tg-detail-head h1 { margin-bottom: 6px; }
.tg-sym-lg { width: 96px; min-height: 96px; flex-shrink: 0; font-size: 22px; border-radius: 16px; }
.tg-sym-lg .arc { width: 44px; height: 14px; }
.tg-sym-lg .slash { width: 44px; }
.tg-means { font-size: 17px; color: var(--text); margin: 0 0 6px; max-width: 640px; }
.tg-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.tg-detail-grid h2 { font-size: 18px; margin-bottom: 12px; }
.tg-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
.tg-steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 10px; line-height: 1.5; }
.tg-steps li::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 13px var(--font); }
.tg-mistake { margin-top: 18px; padding: 10px 14px; border-left: 2px solid var(--hot); color: var(--muted); }
.tg-mistake b { color: var(--hot); }
.tg-riffs { display: flex; flex-wrap: wrap; gap: 8px; }
.tg-riffs .chip { height: 36px; }
@media (max-width: 760px) {
  .tg-detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .tg-detail-head { align-items: flex-start; gap: 14px; }
  .tg-sym-lg { width: 64px; min-height: 64px; font-size: 16px; }
  .tg-means { font-size: 16px; }
}

/* tab guide: glossary, animations, videos */
.tg-words { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 0; }
.tg-words div { padding: 10px 14px; background: var(--surface); border-radius: var(--radius-sm); }
.tg-words dt { font-weight: 700; margin-bottom: 2px; }
.tg-words dd { margin: 0; color: var(--muted); font-size: 14px; }
.tg-anim { margin: 0; background: var(--surface); border-radius: var(--radius); padding: 14px 12px 10px; }
.tg-anim figcaption { color: var(--faint); font-size: 12.5px; text-align: center; margin-top: 6px; }
.an { display: block; width: 100%; height: auto; }
.an .an-neck { fill: var(--wood); }
.an .an-body { fill: #1b1611; }
.an .an-bridge { fill: #8e8576; }
.an .an-wire { stroke: #8e8576; stroke-width: 3; }
.an .an-string { stroke: #6f6658; }
.an .an-string.main { stroke: #cbbfa9; }
.an .an-fret { font: 600 11px var(--font); fill: var(--muted); }
.an .an-side { font: 500 10.5px var(--font); fill: var(--faint); }
.an .an-ring, .an .an-bent { fill: none; stroke: var(--accent); stroke-width: 2.4; }
.an .an-finger circle { fill: var(--hot); stroke: var(--bg); stroke-width: 2; }
.an .an-finger text { font: 700 12px var(--font); fill: #fff; }
.an .an-finger.light circle { fill: var(--hot-soft); stroke: var(--hot); stroke-dasharray: 4 3; }
.an .an-pick path { fill: var(--text); }
.an .an-burst { fill: none; stroke: var(--accent); stroke-width: 2; }
.an .an-palm { fill: rgba(231, 232, 235, 0.16); stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 5 4; }
.tg-check { margin-top: 18px; padding: 10px 14px; border-left: 2px solid var(--good); color: var(--muted); }
.tg-check b { color: var(--good); }
.tg-mistake { margin-top: 10px; }
.tg-video { position: relative; display: block; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: #000; cursor: pointer; }
.tg-video img { width: 100%; height: 100%; object-fit: cover; opacity: .75; transition: opacity .15s; }
.tg-video:hover img { opacity: .95; }
.tg-video-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: var(--accent); }
.tg-video-play::after { content: ''; position: absolute; left: 26px; top: 20px; border-left: 18px solid var(--accent-ink); border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.tg-video-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; text-align: left; font-size: 13.5px; color: var(--text); background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.tg-video iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 760px) { .tg-words { grid-template-columns: 1fr; } }
.an .an-say { font: 700 13px var(--font); fill: var(--accent); }

/* ---------- section sub-menu ---------- */
.subnav { position: sticky; top: 58px; z-index: 45; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.subnav[hidden] { display: none; }
.subnav-inner { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter); display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav a { flex-shrink: 0; padding: 6px 12px; border-radius: var(--radius-sm); color: var(--muted); font: 500 13.5px var(--font); }
.subnav a:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.subnav a.active { color: var(--text); background: var(--surface-3); }
@media (max-width: 760px) { .subnav { top: 52px; } }

/* ---------- tap-to-explain ---------- */
.xp { display: inline; padding: 0; margin: 0; border: 0; background: none; font: inherit; color: inherit; cursor: help; text-decoration: underline dotted; text-decoration-color: var(--faint); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.xp:hover { color: var(--text); text-decoration-color: var(--accent); }
.knob[data-explain] { cursor: help; }
.knob[data-explain] span { text-decoration: underline dotted; text-decoration-color: var(--faint); text-underline-offset: 2px; }
.xp-pop { position: fixed; z-index: 90; width: min(340px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; padding: 16px 16px 14px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 18px 50px -10px rgba(0, 0, 0, 0.8); font-size: 14.5px; }
.xp-pop[hidden] { display: none; }
.xp-pop h4 { margin: 0 28px 6px 0; font-size: 16px; }
.xp-pop p { margin: 0 0 10px; color: var(--muted); line-height: 1.5; }
.xp-pop p:last-child { margin-bottom: 0; }
.xp-pop .row { margin-top: 10px; }
.xp-close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--surface-3); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.xp-link { font-weight: 600; font-size: 14px; }
.xp-notes { margin: 0 0 10px; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.xp-fx { color: var(--muted); font-size: 13.5px; }
.xp-len { font-size: 13.5px; }
.xp-chord-shape { display: flex; justify-content: center; margin: 4px 0 8px; }
@media (max-width: 760px) {
  .xp-pop { left: 0 !important; right: 0; top: auto !important; bottom: var(--tabbar-h); width: 100%; border-radius: 18px 18px 0 0; max-height: 60vh; padding-bottom: 18px; }
}
.tp-what { margin: -4px 0 0; font-size: 13px; color: var(--muted); }
.tp-what .xp { color: var(--muted); }
.tp-what .xp:hover { color: var(--text); }

/* Player status: the bars you're looping, your best clean run, "was that clean?" */
.tp-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.tp-status:empty { display: none; }
.tp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--surface-3); color: var(--text); font-weight: 600; }
.tp-x { width: 22px; height: 22px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
.tp-x:hover { background: var(--surface); color: var(--text); }
.tp-best b { color: var(--accent); font-family: var(--mono); }
.tp-heard { color: var(--text); }
.tp-heard b { font-family: var(--mono); }
.tp-ask { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text); }
.sg-best { margin-right: 8px; font: 600 12px var(--mono); color: var(--accent); }

/* Home: today's practice */
.today { margin: 18px 0 8px; }
.today-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 8px; }
.today-head h2 { margin: 0; font-size: 18px; }
.today-week { font-size: 13px; color: var(--muted); }
.today-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.today-list li + li { border-top: 1px solid var(--line); }
.today-row { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 4px 16px; padding: 12px 16px; color: var(--text); }
.today-row:hover { text-decoration: none; background: var(--surface-3); }
.today-kind { font: 600 12px var(--font); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.today-title { font-weight: 600; min-width: 0; }
.today-title .muted { font-weight: 400; }
.today-meta { font: 600 12px var(--mono); color: var(--accent); }
@media (max-width: 520px) { .today-row { grid-template-columns: 1fr auto; } .today-kind { grid-column: 1 / -1; } }
.today-row, .today-row * { text-decoration: none !important; }
/* Hornet panel: model name, then the amp's knobs; effect knobs show the type picked */
.amp-panel.hornet .amp-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; }
.amp-kind { font: 600 11px var(--font); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 2px 6px; border-radius: 4px; background: var(--surface-3); }
.knob small { display: block; font-size: 10.5px; color: var(--faint); margin-top: 1px; }
.knob-off { opacity: .55; }
.amp-model { margin: 10px 0 0; font-size: 12.5px; }
