/* ===================================================================
   tssiayn — dark UI
   Copyright © 2026 Michał Czyszczoń. All rights reserved.
   =================================================================== */

:root {
  --bg:        #08080a;
  --bg-2:      #0e0e12;
  --panel:     #131319;
  --panel-2:   #191921;
  --line:      #26262f;
  --line-2:    #33333f;
  --text:      #e9e9f0;
  --text-dim:  #9a9aab;
  --text-mute: #6c6c7d;

  --accent:    #35d0ff;
  --accent-2:  #ff3b3b;
  --ref:       #35a7ff;
  --cmp:       #ff5fd2;
  --shared:    #9ee43b;

  /*
   * Sidebar section accents. Two of them are not free choices: the Scale panel
   * reuses --ref and the Compare panel reuses --cmp, because those are the
   * exact colours those two scales get drawn in on the fretboard — the panel
   * accent is what ties the control to its dots. The rest are picked from the
   * interval palette in fretboard.js so the whole app stays one colour family,
   * and are spaced around the hue circle to stay distinguishable at 2px.
   */
  --sec-instrument: #ff9e2c;
  --sec-positions:  #35d67a;
  --sec-chords:     #c56cff;
  --sec-library:    #35d0ff;
  --sec-key:        #9ee43b;
  --sec-find:       #ffe23d;
  --sec-shapes:     #ff7a1a;
  --sec-prog:       #ff4f8b;

  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 8px 28px rgba(0, 0, 0, .55);
  --font:      "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono:      "JetBrains Mono", "Cascadia Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1100px 620px at 12% -10%, rgba(53, 167, 255, .10), transparent 60%),
    radial-gradient(900px 520px at 92% 0%,  rgba(255, 95, 210, .08), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }

/* ------------------------------ topbar ----------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 22px;
  background: rgba(10, 10, 13, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }

.brand-mark {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .04em;
  background: linear-gradient(92deg, #ff3b3b, #ff9e2c 42%, #35d0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--text-mute);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.tab {
  padding: 7px 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.tab:hover { color: var(--text); background: var(--panel-2); }

.tab.active {
  color: #06131c;
  background: linear-gradient(180deg, #5fdcff, #24b6ea);
  box-shadow: 0 2px 12px rgba(53, 208, 255, .35);
}

/* ------------------------------ layout ----------------------------- */

.app { padding: 20px 22px 60px; }

.view { display: none; }
.view.active { display: block; }

.layout {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/*
 * The sidebar is its own scroll container, so a short window scrolls the
 * controls rather than hiding the ones that do not fit.
 *
 * The `flex: 0 0 auto` on the children is load-bearing, not decoration: as
 * flex items the panels default to flex-shrink:1, so `max-height` squeezed
 * every panel a little instead of overflowing the column. Combined with
 * `.panel { overflow: hidden }` (needed so the ::before accent bar follows the
 * border radius) that squeeze silently clipped each panel's contents and no
 * scrollbar ever appeared. Keep the children unshrinkable.
 */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding-right: 4px;
}

.sidebar > * { flex: 0 0 auto; }

.sidebar::-webkit-scrollbar,
.fretboard-wrap::-webkit-scrollbar,
.scale-list::-webkit-scrollbar { height: 10px; width: 10px; }
.sidebar::-webkit-scrollbar-thumb,
.fretboard-wrap::-webkit-scrollbar-thumb,
.scale-list::-webkit-scrollbar-thumb { background: #2c2c38; border-radius: 6px; }
.sidebar::-webkit-scrollbar-track,
.fretboard-wrap::-webkit-scrollbar-track,
.scale-list::-webkit-scrollbar-track { background: transparent; }

.main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ------------------------------ panels ----------------------------- */

.panel, .card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.panel h3, .card h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .11em;
  color: var(--text-dim);
  margin-bottom: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel { position: relative; overflow: hidden; }

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--panel-accent), transparent);
}

/*
 * Per-section accent colours.
 *
 * Only the colour varies — the accent bar and the header keep the styling
 * every panel already had. Each section sets --panel-accent from its
 * data-panel id, which replaced the earlier one-class-per-colour approach
 * (.accent-ref / .accent-cmp): that only ever covered the two panels someone
 * had bothered to write a rule for, and the rest silently fell back to the
 * neutral grey, which read as "no colour at all".
 *
 * The fallback below is deliberately kept: a panel with no entry here shows
 * grey, so a newly added section is visibly unfinished rather than quietly
 * borrowing a neighbour's colour. Adding a section = adding one line.
 */
.panel { --panel-accent: var(--line-2); }

.panel[data-panel="instrument"] { --panel-accent: var(--sec-instrument); }
.panel[data-panel="scale"]      { --panel-accent: var(--ref); }
.panel[data-panel="positions"]  { --panel-accent: var(--sec-positions); }
.panel[data-panel="chords"]     { --panel-accent: var(--sec-chords); }
.panel[data-panel="compare"]    { --panel-accent: var(--cmp); }
.panel[data-panel="lib-scales"] { --panel-accent: var(--sec-library); }
.panel[data-panel="lib-key"]    { --panel-accent: var(--sec-key); }
.panel[data-panel="lib-find"]   { --panel-accent: var(--sec-find); }
.panel[data-panel="ch-source"]  { --panel-accent: var(--ref); }
.panel[data-panel="ch-set"]     { --panel-accent: var(--sec-chords); }
.panel[data-panel="ch-shapes"]  { --panel-accent: var(--sec-shapes); }
.panel[data-panel="ch-prog"]    { --panel-accent: var(--sec-prog); }

/* The title carries the same colour so a collapsed panel is still identifiable
   by its section colour, when the 2px bar is all that would otherwise be left. */
.panel[data-panel] > h3 { color: var(--panel-accent); }

/*
 * Collapsible panels. Every panel starts expanded — collapsing is an opt-in
 * for users who want to shrink a section they are not using, not a default
 * that hides controls. Only the body collapses; the header stays as the
 * affordance to bring it back.
 */
.panel > h3 { cursor: pointer; user-select: none; transition: color .15s; }
.panel > h3:hover { color: var(--text); }
.panel > h3:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.panel > h3 .chev {
  margin-left: auto;
  font-size: 9px;
  color: var(--text-mute);
  transition: transform .18s ease;
}

.panel.collapsed > h3 { margin-bottom: 0; }
.panel.collapsed > h3 .chev { transform: rotate(-90deg); }
.panel.collapsed > .panel-body { display: none; }

.card { padding: 16px 18px; }
.card h3 { margin-bottom: 12px; }

.hint {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--text-mute);
  text-transform: none;
  padding: 2px 7px;
  border: 1px solid var(--line-2);
  border-radius: 20px;
}

.hint.block {
  display: block;
  border: 0;
  padding: 0;
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
}

/* ------------------------------ fields ----------------------------- */

.field { margin-bottom: 11px; }
.field:last-child { margin-bottom: 0; }

.field.row { display: flex; gap: 8px; align-items: center; }

.field > label {
  display: block;
  font-size: 11px;
  color: var(--text-mute);
  margin-bottom: 5px;
  letter-spacing: .03em;
}

select, .search, input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  background: #0b0b10;
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

select { cursor: pointer; }

select:focus, .search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(53, 208, 255, .14);
}

select:disabled { opacity: .45; cursor: not-allowed; }

optgroup { background: #0b0b10; color: var(--text-mute); font-style: normal; }
option { background: #0b0b10; color: var(--text); }

.search { margin-bottom: 10px; }

/* segmented control */
.seg {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: #0b0b10;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
}

.seg button {
  flex: 1;
  padding: 6px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.seg button:hover { background: var(--panel-2); color: var(--text); }

.seg button.active {
  background: linear-gradient(180deg, #2f2f3d, #22222d);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
  margin-top: 10px;
  user-select: none;
}

.check input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.check:hover { color: var(--text); }

.btn {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text-dim);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.btn:hover { background: #23232e; color: var(--text); border-color: #45455a; }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; }
.btn.icon { width: 34px; padding: 8px 0; text-align: center; font-size: 15px; line-height: 1; }

.transpose { display: flex; gap: 5px; margin-left: auto; }
.field.row .btn.ghost { flex: 1; }

.hidden { display: none !important; }

/* per-string tuning editor */
.string-editor {
  margin-top: 10px;
  padding: 10px;
  background: #0b0b10;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.string-row { display: flex; align-items: center; gap: 6px; }

.string-row .num {
  width: 18px;
  font-size: 11px;
  color: var(--text-mute);
  font-family: var(--mono);
  flex: none;
}

.string-row select { padding: 5px 6px; font-size: 12px; }
.string-row select.note { flex: 2; }
.string-row select.oct { flex: 1; }

/* ---------------------------- board card --------------------------- */

.board-card { padding: 16px 18px 14px; }

.board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

#board-title { font-size: 20px; letter-spacing: -.02em; }

.board-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--text-mute);
}

.notes-strip { display: flex; gap: 5px; flex-wrap: wrap; }

.note-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
  padding: 4px 8px 5px;
  background: #0b0b10;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  border-top-width: 3px;
}

.note-chip b { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }

.note-chip span {
  font-size: 9.5px;
  color: var(--text-mute);
  font-family: var(--mono);
  letter-spacing: .02em;
}

.fretboard-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 2px 4px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #050506, #0a0a0d);
  border: 1px solid #1c1c24;
}

.fretboard-svg { display: block; width: 100%; height: auto; min-width: 1080px; }

.dot-label {
  text-anchor: middle;
  dominant-baseline: central;
  font-family: var(--font);
  font-weight: 750;
  fill: #0a0a10;
  pointer-events: none;
}

.fret-num {
  text-anchor: middle;
  font-family: var(--mono);
  font-size: 10.5px;
  fill: #63636f;
}

.fret-num.octave { fill: #a9a9bb; font-weight: 700; }
.fret-num.open { fill: #7d7d8c; }

.tuning-label {
  font-family: var(--mono);
  font-size: 10px;
  fill: #7c7c8b;
  letter-spacing: .02em;
}

/* ------------------------------ legend ----------------------------- */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 4px;
  background: #0b0b10;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 11.5px;
  color: var(--text-dim);
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #0a0a10;
  flex: none;
}

.legend-swatch.split { background: linear-gradient(90deg, var(--ref) 50%, var(--cmp) 50%); }
.legend-swatch.ring { box-shadow: 0 0 0 2px #fff; margin: 2px; }

/* ---------------------------- info cards --------------------------- */

.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

#mode-info p { margin: 0 0 10px; font-size: 13px; color: var(--text-dim); line-height: 1.55; }
#mode-info p:last-child { margin-bottom: 0; }
#mode-info strong { color: var(--text); }

.formula {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.formula code {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #0b0b10;
  border: 1px solid var(--line-2);
  color: var(--text);
}

/* ------------------------------ tables ----------------------------- */

.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }

.tbl th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-mute);
  font-weight: 600;
  padding: 0 10px 8px 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.tbl td {
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid #1c1c24;
  color: var(--text-dim);
  vertical-align: middle;
}

.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover { background: rgba(53, 208, 255, .06); }
.tbl tbody tr.selected { background: rgba(53, 208, 255, .12); }
.tbl tbody tr.selected td { color: var(--text); }

.numeral {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  font-size: 13px;
}

.chord-name { color: var(--text); font-weight: 650; font-size: 13.5px; }
.tone-list { font-family: var(--mono); font-size: 11.5px; color: var(--text-mute); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .03em;
  border: 1px solid var(--line-2);
  color: var(--text-dim);
  white-space: nowrap;
}

.badge.tonic       { color: #9ee43b; border-color: rgba(158, 228, 59, .38); background: rgba(158, 228, 59, .09); }
.badge.dominant    { color: #ff7a1a; border-color: rgba(255, 122, 26, .38); background: rgba(255, 122, 26, .09); }
.badge.subdominant { color: #35a7ff; border-color: rgba(53, 167, 255, .38); background: rgba(53, 167, 255, .09); }

/* --------------------------- scale library ------------------------- */

.scale-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }

.scale-item {
  padding: 9px 11px;
  background: #0b0b10;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}

.scale-item:hover { background: var(--panel-2); border-left-color: var(--accent); transform: translateX(2px); }

.scale-item.active {
  background: rgba(53, 208, 255, .09);
  border-color: rgba(53, 208, 255, .3);
  border-left-color: var(--accent);
}

.scale-item b { display: block; font-size: 13px; font-weight: 650; color: var(--text); }
.scale-item span { font-size: 11px; color: var(--text-mute); }

.lib-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lib-header h2 { font-size: 24px; letter-spacing: -.02em; }
.lib-header .aka { margin: 2px 0 0; font-size: 13px; color: var(--text-mute); }
.lib-desc { margin: 12px 0 0; font-size: 13.5px; color: var(--text-dim); line-height: 1.6; max-width: 76ch; }

.mode-row-name { color: var(--text); font-weight: 600; }
.mode-row-aka { display: block; font-size: 10.5px; color: var(--text-mute); font-weight: 400; }

.tbl td .mini-formula { font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); }

.chord-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.chord-card {
  background: #0b0b10;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 8px 8px;
  text-align: center;
}

.chord-card h4 {
  margin: 0 0 2px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.chord-card .sub {
  font-size: 10px;
  color: var(--text-mute);
  font-family: var(--mono);
  margin-bottom: 6px;
}

.chord-svg { display: block; margin: 0 auto; width: 100%; max-width: 148px; height: auto; }
.chord-mark { text-anchor: middle; font-size: 11px; fill: #6c6c7d; font-family: var(--mono); }
.chord-basefret { text-anchor: end; font-size: 10.5px; fill: #9a9aab; font-family: var(--mono); }

.chord-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.chord-pill {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  background: #0b0b10;
  color: var(--text-dim);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.chord-pill:hover { border-color: var(--accent); color: var(--text); }

.chord-pill.active {
  background: rgba(53, 208, 255, .14);
  border-color: var(--accent);
  color: var(--text);
}

.empty {
  padding: 22px;
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
}

.callout {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: rgba(53, 167, 255, .07);
  border: 1px solid rgba(53, 167, 255, .25);
  border-left: 3px solid var(--ref);
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.55;
}

.card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------- note finder (library) ---------------------- */

/*
 * A twelve-button chromatic pad rather than a dropdown: picking the notes of a
 * riff is a multi-select, and a select element hides both the choices and what
 * is already chosen behind a click.
 */
.note-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.note-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 2px 6px;
  background: #0b0b10;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}

.note-btn b { font-size: 13px; font-weight: 700; line-height: 1.1; }
.note-btn i { font-size: 8.5px; font-style: normal; color: var(--text-mute); letter-spacing: .02em; }

.note-btn:hover { border-color: var(--sec-find); color: var(--text); }

.note-btn.on {
  background: rgba(255, 226, 61, .16);
  border-color: var(--sec-find);
  color: #fff;
}

.note-btn.on i { color: rgba(255, 255, 255, .7); }

/* --------------------------- chords view --------------------------- */

.lbl-note { color: var(--text-mute); font-size: 10px; letter-spacing: 0; }

.title-chord {
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 650;
  color: var(--sec-chords);
  border: 1px solid rgba(197, 108, 255, .4);
  background: rgba(197, 108, 255, .1);
  vertical-align: middle;
}

/* The catalogue list runs to a hundred rows; the card must not become the page. */
.chord-list-scroll { max-height: 460px; overflow-y: auto; }
.chord-list-scroll::-webkit-scrollbar { width: 10px; }
.chord-list-scroll::-webkit-scrollbar-thumb { background: #2c2c38; border-radius: 6px; }

.tbl tr.group-row td {
  padding-top: 14px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--sec-chords);
  border-bottom: 1px solid var(--line);
  cursor: default;
}

.tbl tr.group-row:hover { background: none; }

.shapes { display: flex; flex-direction: column; gap: 16px; margin-top: 4px; }

.inv-block {
  padding: 12px;
  background: #0b0b10;
  border: 1px solid var(--line);
  border-left: 3px solid var(--sec-shapes);
  border-radius: var(--radius-sm);
}

.inv-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.inv-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 650;
  color: var(--sec-shapes);
}

.inv-name { font-size: 14px; font-weight: 700; color: var(--text); }
.inv-stack { font-family: var(--mono); font-size: 11px; color: var(--text-mute); margin-left: auto; }

.inv-block .chord-card { background: #101017; }

/* -------------------------- progressions --------------------------- */

.prog {
  padding: 14px;
  margin-bottom: 12px;
  background: #0b0b10;
  border: 1px solid var(--line);
  border-left: 3px solid var(--sec-prog);
  border-radius: var(--radius-sm);
}

.prog:last-of-type { margin-bottom: 0; }

.prog-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.prog-head h4 { margin: 0; font-size: 14px; font-weight: 700; color: var(--text); }

.prog-numerals {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--sec-prog);
  letter-spacing: .04em;
}

.prog-note { margin: 5px 0 12px; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; max-width: 72ch; }

.prog-steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.prog-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 116px;
  padding: 9px 10px 8px;
  background: #101017;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.prog-step:hover { border-color: var(--sec-prog); background: #16161f; }

.prog-num { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--sec-prog); }
.prog-name { font-size: 14px; font-weight: 700; color: var(--text); }
.prog-notes { font-family: var(--mono); font-size: 10px; color: var(--text-mute); margin-bottom: 4px; }

.prog-arrow { color: var(--text-mute); font-size: 15px; flex: none; }

.no-shape {
  font-size: 10px;
  color: var(--text-mute);
  padding: 14px 0;
  font-style: italic;
}

/* ------------------------------ footer ----------------------------- */

.site-footer {
  margin: 0 22px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--text-mute);
  font-size: 11.5px;
  line-height: 1.6;
}

.site-footer p { margin: 0 0 4px; max-width: 88ch; }
.site-footer strong { color: var(--text-dim); }

/* --------------------------- responsive ---------------------------- */

@media (max-width: 1180px) {
  .layout { grid-template-columns: 258px minmax(0, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; overflow: visible; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .app { padding: 16px 14px 48px; }
  .note-grid { grid-template-columns: repeat(6, 1fr); }
  .site-footer { margin: 0 14px; }
}
