/* Guitar Lab · Vintage music studio / instrument workshop.
   Tokens on :root, dark values under prefers-color-scheme. Text colours are
   chosen for ≥ 4.5:1 on --paper and --card in both schemes. */
:root {
  color-scheme: light dark;
  --paper: #f5f0e4;
  --card: #fffcf5;
  --ink: #2b2620;
  --ink-muted: #5f574b;
  --line: #d9cfbc;
  --line-strong: #9c8f78;
  --wood: #6b4a2f;
  --wood-soft: #efe3cf;
  --olive: #4f5f3c;
  --copper: #a5532a;
  --copper-ink: #fff;
  --focus: #1f5f3c;
  --fret-bg: #ead9bd;
  --fret-wire: #b7a383;
  --string: #8c7b62;
  --role-root: #a5532a;
  --role-third: #3c6e8f;
  --role-fifth: #4f5f3c;
  --role-seventh: #7a4c7f;
  --role-ext: #8a6a1f;
  --role-scale: #6b6457;
  --role-note: #e4d7c0;
  --role-note-ink: #3a3228;
  --role-picked: #2b2620;
  --ok: #2f6b3a;
  --warn-bg: #fbefd9;
  --warn-line: #d8b26e;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  accent-color: var(--copper);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1d1914;
    --card: #26211b;
    --ink: #efe6d6;
    --ink-muted: #c3b8a5;
    --line: #463d32;
    --line-strong: #7d6f5b;
    --wood: #d9b48a;
    --wood-soft: #3a3027;
    --olive: #a9bb8a;
    --copper: #e08a5c;
    --copper-ink: #1d1914;
    --focus: #9fd3a8;
    --fret-bg: #3b2f23;
    --fret-wire: #7f6c52;
    --string: #a8957a;
    --role-root: #e08a5c;
    --role-third: #7fb4d6;
    --role-fifth: #a9bb8a;
    --role-seventh: #c99acb;
    --role-ext: #e0bf6a;
    --role-scale: #b8ad9b;
    --role-note: #4a3f33;
    --role-note-ink: #efe6d6;
    --role-picked: #efe6d6;
    --ok: #8fd19b;
    --warn-bg: #3a2f1c;
    --warn-line: #8a6a2f;
  }
}

* { box-sizing: border-box; }
html { scrollbar-color: var(--line-strong) var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
a { color: var(--wood); text-underline-offset: 3px; }
a:hover { color: var(--copper); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 5.5vw, 62px); margin: 10px 0 12px; }
h1 em { color: var(--copper); font-weight: 400; }
h2 { font-size: clamp(22px, 2.6vw, 28px); margin: 4px 0 14px; }
h3 { font-size: 19px; margin: 26px 0 10px; }
small { color: var(--ink-muted); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: var(--paper); font-weight: 700; }
.skip-link:focus { top: 12px; }

.site-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px max(16px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: .14em; font-weight: 800; }
.site-head a { color: var(--ink); text-decoration: none; }
.brand small { color: var(--copper); margin-left: 6px; letter-spacing: .1em; }
.site-nav { border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 5; }
.site-nav ul { list-style: none; margin: 0 auto; padding: 0 max(8px, calc((100vw - 1180px) / 2)); display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; max-width: 100vw; }
.site-nav a { display: block; padding: 13px 12px; white-space: nowrap; text-decoration: none; color: var(--ink-muted); font-size: 14px; font-weight: 600; border-bottom: 3px solid transparent; }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--copper); }
main { max-width: 1180px; margin: 0 auto; padding: 28px 16px 60px; }
.site-foot { font-size: 11px; color: var(--ink-muted); letter-spacing: .06em; border-top: 1px solid var(--line); padding: 22px max(16px, calc((100vw - 1180px) / 2)); }
.loading { color: var(--ink-muted); }

.eyebrow { font-size: 11px; letter-spacing: .18em; font-weight: 800; color: var(--wood); margin: 0; text-transform: uppercase; }
.lead { max-width: 70ch; font-size: 17px; color: var(--ink-muted); margin: 0 0 18px; }
.lead-sm { color: var(--ink-muted); margin: 0 0 8px; }
.hint { color: var(--ink-muted); font-size: 13.5px; }
.view-head { margin-bottom: 14px; }
.hero { padding: 26px 0 10px; }
.context-now { font-size: 14px; color: var(--ink-muted); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0 0 18px; min-width: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.split.wide-left { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.split.narrow-left { grid-template-columns: minmax(200px, .55fr) minmax(0, 2fr); }
.split.even { grid-template-columns: 1fr 1fr; }
.stack { display: grid; gap: 0; min-width: 0; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
label.grow { flex: 1; }
label.check { flex-direction: row; align-items: center; font-weight: 500; font-size: 14px; gap: 8px; }
input, select, textarea { font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 11px; min-height: 42px; width: 100%; }
textarea { min-height: 90px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
button, .button { font: inherit; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 16px; border-radius: 9px; border: 1px solid var(--wood); background: var(--wood); color: var(--card); cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: var(--copper); border-color: var(--copper); color: var(--copper-ink); }
button.ghost, .button.ghost { background: transparent; color: var(--wood); }
button.ghost:hover, .button.ghost:hover { color: var(--copper-ink); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.mini { min-height: 34px; padding: 4px 10px; font-size: 13px; background: transparent; color: var(--wood); }
button.mini:hover { color: var(--copper-ink); }
button.danger { color: var(--copper); border-color: var(--copper); }
button[aria-pressed="true"] { background: var(--olive); border-color: var(--olive); color: var(--card); }
.mini-link { font-size: 13px; font-weight: 600; }

.context-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 14px; margin: 0 0 18px; background: var(--wood-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.context-bar label { min-width: 120px; flex: 1 1 120px; max-width: 220px; }
.context-bar button { flex: 0 0 auto; }
.share-status { font-size: 13px; color: var(--ok); flex-basis: 100%; min-height: 0; overflow-wrap: anywhere; }
.share-status:empty { display: none; }
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 12px 0; }
.filter-row label { min-width: 130px; flex: 0 1 200px; }
.search-row, .quick { display: flex; gap: 10px; align-items: end; max-width: 560px; }
.quick { margin: 10px 0 14px; }
.quick label { flex: 1; }
.search-hint, .field-status { font-size: 13px; color: var(--ink-muted); min-height: 1.3em; margin: 6px 0; }

.tabs { display: flex; gap: 6px; margin: 0 0 14px; overflow-x: auto; }
.tabs.wrap { flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap; }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; }
button.chip { font-weight: 500; }
button.chip:hover { color: var(--copper-ink); }
.chip.is-on { background: var(--copper); border-color: var(--copper); color: var(--copper-ink); }
.badge { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--wood-soft); color: var(--wood); border: 1px solid var(--line); }
.badge.exact { color: var(--ok); }
.badge.partial { color: var(--copper); }
.prov-curated { color: var(--ok); }
.prov-generated { color: var(--role-ext); }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.empty { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 16px; color: var(--ink-muted); }
.empty p { margin: 4px 0; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.muted { color: var(--ink-muted); text-decoration: line-through; }

.tool-grid { list-style: none; padding: 0; margin: 10px 0 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tool-grid a { display: grid; gap: 4px; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-decoration: none; color: var(--ink); }
.tool-grid a:hover { border-color: var(--copper); }
.tool-grid .num { font-size: 11px; letter-spacing: .16em; color: var(--copper); font-weight: 800; }
.tool-grid b { font-family: var(--serif); font-size: 20px; }
.tool-grid span:last-child { color: var(--ink-muted); font-size: 14px; }

/* Chord detail */
.detail-head { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: start; }
.symbol { font-size: clamp(40px, 6vw, 64px); margin: 2px 0 4px; color: var(--copper); }
.formula { display: grid; grid-template-columns: auto auto; gap: 4px 14px; font-size: 15px; background: var(--paper); padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line); }
.formula span { color: var(--ink-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; align-self: center; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
caption { text-align: left; font-weight: 700; padding: 6px 0; color: var(--ink-muted); }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head label { max-width: 200px; }
.voicing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 10px 0; }
.voicing { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); display: grid; justify-items: center; gap: 4px; }
.voicing figcaption { display: grid; justify-items: center; gap: 3px; font-size: 13px; text-align: center; }
.voicing .tags { color: var(--ink-muted); font-size: 12px; }
.difficulty { color: var(--copper); letter-spacing: 2px; font-size: 11px; }
.difficulty span { color: var(--line-strong); }
.diagram { width: 132px; height: auto; }
.diagram .d-fret { stroke: var(--fret-wire); stroke-width: 1.4; }
.diagram .d-nut { stroke: var(--ink); stroke-width: 5; }
.diagram .d-string { stroke: var(--string); stroke-width: 1.3; }
.diagram .d-dot { fill: var(--ink); }
.diagram .d-dot.is-root { fill: var(--role-root); }
.diagram .d-open { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.diagram .d-open.is-root { stroke: var(--role-root); stroke-width: 2.4; }
.diagram .d-barre { fill: var(--ink); opacity: .85; }
.diagram text { font: 700 11px var(--sans); text-anchor: middle; fill: var(--ink); }
.diagram .d-finger { fill: var(--card); font-size: 10px; }
.diagram .d-mute { font-size: 14px; }
.diagram .d-start { text-anchor: end; font-size: 11px; fill: var(--ink-muted); }
.diagram .d-name { font-size: 10px; fill: var(--ink-muted); }
.diagram .d-name.is-root { fill: var(--role-root); }
.type-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; max-height: 620px; overflow-y: auto; }
.type-list a { display: grid; grid-template-columns: minmax(84px, auto) 1fr; gap: 0 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.type-list a:hover { background: var(--wood-soft); }
.type-list small { grid-column: 2; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.rel { padding-left: 18px; }
.chord-link { font-weight: 700; text-decoration: none; border-bottom: 1px dotted var(--wood); }

/* Fretboard */
.fret-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding: 6px 0 4px; margin: 10px 0; border-radius: 10px; background: linear-gradient(to right, var(--card) 30%, transparent), linear-gradient(to right, transparent, var(--card) 70%) 100% 0, radial-gradient(farthest-side at 0 50%, rgb(0 0 0 / .16), transparent), radial-gradient(farthest-side at 100% 50%, rgb(0 0 0 / .16), transparent) 100% 0; background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; }
.board { display: grid; gap: 0; width: max-content; min-width: 100%; }
.board-row { display: grid; grid-auto-flow: column; grid-template-columns: 46px; grid-auto-columns: minmax(46px, 1fr); align-items: center; height: 44px; position: relative; }
.board-row:not(.numbers)::before { content: ""; position: absolute; left: 46px; right: 0; top: 50%; height: 1.5px; background: var(--string); z-index: 0; }
.string-label { font-size: 12px; color: var(--ink-muted); position: sticky; left: 0; background: var(--card); z-index: 2; height: 100%; display: flex; align-items: center; }
.cell { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; justify-content: center; border: 0; border-right: 2px solid var(--fret-wire); background: var(--fret-bg); padding: 0; min-height: 0; border-radius: 0; color: var(--ink); font-weight: 700; font-size: 12.5px; cursor: default; }
button.cell { cursor: pointer; }
button.cell:hover { background: var(--wood-soft); color: var(--ink); border-color: var(--fret-wire); }
.cell.is-nut { border-right: 6px solid var(--ink); background: var(--card); }
.cell.is-behind { background: var(--line); opacity: .55; }
.cell.is-capo { border-right: 6px solid var(--olive); }
.cell .tone { display: inline-flex; min-width: 30px; height: 30px; padding: 0 5px; align-items: center; justify-content: center; border-radius: 999px; background: var(--role-note); color: var(--role-note-ink); }
.role-root .tone { background: var(--role-root); color: var(--copper-ink); }
.role-third .tone { background: var(--role-third); color: var(--card); }
.role-fifth .tone { background: var(--role-fifth); color: var(--card); }
.role-seventh .tone { background: var(--role-seventh); color: var(--card); }
.role-ext .tone { background: var(--role-ext); color: var(--card); }
.role-scale .tone { background: var(--role-scale); color: var(--card); }
.role-picked .tone, .is-picked .tone { background: var(--role-picked); color: var(--card); min-width: 32px; }
.numbers { height: 26px; }
.fret-no { text-align: center; font-size: 11px; color: var(--ink-muted); }
.fret-no.inlay { color: var(--ink); font-weight: 800; }
.fret-no.inlay::after { content: " •"; color: var(--copper); }
.fret-no.double::after { content: " ••"; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 8px 0; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 999px; display: inline-block; }
.swatch.role-root { background: var(--role-root); }
.swatch.role-third { background: var(--role-third); }
.swatch.role-fifth { background: var(--role-fifth); }
.swatch.role-seventh { background: var(--role-seventh); }
.swatch.role-ext { background: var(--role-ext); }
.swatch.role-scale { background: var(--role-scale); }
button.cell[aria-pressed="true"] { background: var(--wood-soft); border-color: var(--fret-wire); }
.notes-line { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.notes-line span { display: grid; justify-items: center; padding: 6px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.notes-line b { font-size: 18px; font-family: var(--serif); }

/* Lookup */
.rev-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.string-toggles { display: grid; gap: 6px; }
.string-toggle { display: grid; grid-template-columns: 1fr auto auto 34px; gap: 6px; align-items: center; font-size: 14px; }
.string-toggle button { min-height: 36px; padding: 4px 10px; background: transparent; color: var(--wood); font-size: 13px; }
.string-toggle output { font-weight: 800; text-align: center; }
.rev-diagram { display: grid; justify-items: center; text-align: center; }
.rev-diagram .diagram { width: 170px; }
.results, .subs, .catalogue, .saved, .capo-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 10px; }
.results > li, .subs > li, .catalogue > li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.results p, .subs p, .catalogue p { margin: 6px 0; font-size: 14px; }
.res-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.res-head h2 { margin: 0; }
.res-head .chord-link { font-size: 20px; font-family: var(--serif); }
.conf { font-size: 12.5px; color: var(--ink-muted); }
.note-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; max-width: 520px; }
.note-toggle { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.families { border: 1px solid var(--line); border-radius: 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0; }
.families legend { font-size: 12.5px; font-weight: 700; padding: 0 4px; }

/* Progression playground */
.title-edit input { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.key-label { font-size: 14px; color: var(--ink-muted); align-self: center; }
.events { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.event { border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: var(--paper); display: grid; gap: 6px; }
.event.is-selected { border-color: var(--copper); box-shadow: 0 0 0 2px var(--copper) inset; }
.event-main { display: grid; justify-items: start; gap: 0; background: transparent; color: var(--ink); border: 0; padding: 4px 6px; min-height: 0; text-align: left; }
.event-main:hover, .event-main[aria-pressed="true"] { background: transparent; color: var(--ink); }
.event-main .roman { font-size: 12px; font-weight: 800; color: var(--wood); letter-spacing: .06em; }
.event-main .sym { font-family: var(--serif); font-size: 26px; }
.event-main .fn { font-size: 12px; font-weight: 500; color: var(--ink-muted); }
.event .voicing { border: 0; padding: 0; background: transparent; }
.event-tools { display: flex; gap: 4px; justify-content: center; }
.catalogue .chords { font-family: var(--serif); font-size: 18px; }
.saved li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; font-weight: 700; margin: 10px 0; }

/* Knowledge */
.lesson-nav ol { padding-left: 22px; margin: 0; display: grid; gap: 6px; }
.lesson-nav a[aria-current="page"] { font-weight: 800; color: var(--copper); }
.lesson p { max-width: 70ch; }
.lesson-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.lesson-cards a { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); height: 100%; }
.lesson-cards span { color: var(--ink-muted); font-size: 14px; }
.pattern-list { display: grid; gap: 0; }
.strum { list-style: none; padding: 0; margin: 12px 0; display: flex; gap: 4px; overflow-x: auto; }
.slot { display: grid; justify-items: center; min-width: 46px; padding: 6px 4px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.slot.on-beat { border-color: var(--line-strong); background: var(--wood-soft); }
.slot .accent { height: 16px; color: var(--copper); font-weight: 900; }
.slot .stroke { font-size: 26px; font-weight: 800; height: 34px; line-height: 34px; }
.s-D { color: var(--role-third); }
.s-U { color: var(--olive); }
.s-X { color: var(--copper); }
.s-B { color: var(--role-seventh); font-family: var(--serif); }
.slot .count { font-size: 12px; color: var(--ink-muted); }
.pima td, .pima th { text-align: center; min-width: 38px; }
.finger { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; font-weight: 800; color: var(--card); margin: 1px; }
.f-p { background: var(--role-root); }
.f-i { background: var(--role-third); }
.f-m { background: var(--role-fifth); }
.f-a { background: var(--role-seventh); }
.big-result { font-size: 20px; }
.big-result b { font-family: var(--serif); font-size: 28px; color: var(--copper); }
.tuning-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tuning-list .panel { margin: 0; }
.tuning-list .is-on { border-color: var(--olive); box-shadow: 0 0 0 2px var(--olive) inset; }
.strings { display: flex; gap: 6px; flex-wrap: wrap; }
.strings span { display: grid; justify-items: center; padding: 6px 10px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); min-width: 52px; }
.strings b { font-family: var(--serif); font-size: 18px; }
.bars { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 0; border-left: 2px solid var(--ink); }
.bars li { padding: 12px 10px; border-right: 2px solid var(--ink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.glossary { display: grid; gap: 0; }
.glossary div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.glossary dt { font-weight: 800; }
.glossary dd { margin: 2px 0 0; color: var(--ink-muted); }
.note-panel { background: var(--wood-soft); }

@media (max-width: 900px) {
  .split, .split.wide-left, .split.narrow-left, .split.even, .rev-grid { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 16px; }
  .context-bar label { max-width: none; }
}
@media (max-width: 520px) {
  main { padding: 18px 12px 48px; }
  .note-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .string-toggle { grid-template-columns: 1fr auto auto 26px; font-size: 13px; }
  .context-bar label { flex-basis: calc(50% - 6px); min-width: 0; }
  .search-row, .quick { flex-direction: column; align-items: stretch; }
  .events { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slot { min-width: 36px; }
  .strum { gap: 3px; }
}
@media (forced-colors: active) {
  .cell .tone { border: 1px solid CanvasText; }
  .swatch { border: 1px solid CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
