/* Microtone.js — shared styling.
 *
 * ══════════════════════════════════════════════════════════════════════
 *  THEMES — every colour in the app (DOM *and* canvas) is defined here.
 *  The canvas views read these variables through src/ui/theme.js, so a
 *  change below is the only edit needed. Toggle: the ◐ button / data-theme
 *  attribute on <html>.
 * ══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@450&family=Open+Sans:ital,wdth,wght@0,75..100,300..800;1,75..100,300..800&family=Geist:wght@400..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Asta+Sans:wght@300..800&display=swap');

/* ── THEME: DARK (default) — taut.js-inspired slate + amber ───────────── */
:root,
:root[data-theme="dark"] {
  /* chrome */
  --bg: #16181d;            /* app background */
  --panel: #1f232b;         /* bars, list panels, canvas panels */
  --panel-2: #262b35;       /* buttons, inputs, alternating headers */
  --fg: #e2e5eb;            /* primary text / note glyphs */
  --fg2: #95a3bc;           /* key-offs */
  --dim: #7a8290;           /* secondary text, empty cells */
  --accent: #ffc043;        /* amber: highlights, sentinels, off-grid notes */
  --accent-2: #78DCE7;      /* blue: instrument column, links, pan ticks */
  --meter: #8be400;         /* green: VU bars, volume column, live dots */
  --meter-bg: #2a2f3a;      /* meter troughs */
  --border: #404655;

  /* status colours */
  --ok-bg: #234d2c;   --ok-fg: #9df0ae;    /* "audio on" badge */
  --err-bg: #5c2e2e;  --err-fg: #ffb0b0;   /* "audio off" badge, warnings */
  --rec-fg: #ff5c5c;  --rec-border: #7a3434;

  /* canvas: pattern grids (Timeline / Cues / Patterns) */
  --cv-bg: #1f232b;         /* waveform / envelope canvas ground */
  --cv-row-beat: #20242d;   /* primary beat row band */
  --cv-row-bar: #262c38;    /* secondary beat row band */
  --cv-playhead: #3a3320;   /* playing row */
  --cv-cursor: #28405c;     /* cursor cell */
  --cv-caret: #6e5316;      /* sub-column caret, record mode (amber) */
  --cv-caret-nav: #2f5378;  /* sub-column caret, navigate mode (blue) */
  --cv-cue-line: #4a5364;   /* cue boundary rule */
  --cv-col-pan: #d08bff;    /* pan column ink */
  --cv-sel: #37506e;        /* block selection fill */

  /* canvas: samples / instruments */
  --cv-wave: #43d675;        /* waveform trace */
  --cv-wave-loop: #26314a;   /* loop-region shading */
  --cv-wave-mid: #4a5266;    /* waveform centre baseline */
  --cv-wave-funk: #f5a623;   /* loop bytes live-inverted by funk repeat (S$Fx) */
  --cv-play-cursor: #f5a623; /* live play-position bars, envelope nodes */
  --cv-env-line: #4aa3ff;    /* envelope polyline, zone strokes */
  --cv-env-node: #f5a623;    /* envelope node dots */
  --cv-env-sus: #2a3a2e;     /* sustain-region shading */
  --cv-env-loop: #33314a44;  /* loop-region shading (translucent) */
  --cv-live: #43d675;        /* live envelope cursor */

  --brand: #ff4362;
  --brand2: #eeeeee;
}

/* ── THEME: LIGHT (preliminary — tune freely) ─────────────────────────── */
:root[data-theme="light"] {
  /* chrome */
  --bg: #fafbfd;
  --panel: #f0f2f6;
  --panel-2: #eceef3;
  --fg: #24272e;
  --fg2: #656c7d;
  --dim: #69707d;
  --accent: #a44500;
  --accent-2: #1d66b8;
  --meter: #1c9450;
  --meter-bg: #cfd4dd;
  --border: #c2c7d1;

  /* status colours */
  --ok-bg: #d3ecd8;   --ok-fg: #1d6b32;
  --err-bg: #f4d9d9;  --err-fg: #a03434;
  --rec-fg: #c22f2f;  --rec-border: #d99d9d;

  /* canvas: pattern grids */
  --cv-bg: #eceef2;
  --cv-row-beat: #eef0f4;
  --cv-row-bar: #e5e7ee;
  --cv-playhead: #f4e3b8;
  --cv-cursor: #c5d8ef;
  --cv-caret: #eed28f;
  --cv-caret-nav: #a9c8e8;
  --cv-cue-line: #9aa3b4;
  --cv-col-pan: #9c3fb4;
  --cv-sel: #b8d0ec;        /* block selection fill */

  /* canvas: samples / instruments */
  --cv-wave: #1c9450;
  --cv-wave-loop: #ccd8ee;
  --cv-wave-mid: #b3bcc9;
  --cv-wave-funk: #c07a10;
  --cv-play-cursor: #af6f10;
  --cv-env-line: #1d66b8;
  --cv-env-node: #af6f10;
  --cv-env-sus: #d7e7d9;
  --cv-env-loop: #c3c9e766;
  --cv-live: #1c9450;

  --brand: #f20046;
  --brand2: #404758;
}

/* ── CANVAS GRID FONT ──────────────────────────────────────────────────
 * The tracker-grid typeface (Timeline / Cues / Patterns canvases). Canvas
 * views read this through src/ui/fonts.js, which also force-loads the
 * webfont faces (canvas fillText never triggers a download on its own) and
 * repaints once they arrive. To test another font: add it to the @import
 * line above (or any @font-face) and put its family first here. If the
 * glyph baseline sits off against the new font, tune GLYPH.baselineOffset
 * in src/ui/glyphs.js (live slider: test/browser/glyph-gallery.html). */
:root {
  --cv-font: "Roboto Mono", ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; }

/* display rules on classes must not defeat the hidden attribute */
[hidden] { display: none !important; }

:root, body, button {
  font-family: "Open Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings:
    "wdth" 86.6667;
}

button {
  box-shadow: 0 0 1.0px rgba(0, 0, 0, 0.1),
              0 0 2.0px rgba(0, 0, 0, 0.1);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}

.player {
  max-width: 1060px;
  margin: 2rem auto;
  padding: 0 1rem;
}

h1 { font-size: 1.4rem; }
h1 .sub { color: var(--dim); font-weight: normal; font-size: 1rem; }

.dim { color: var(--dim); }

.drop {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  background: var(--panel);
}
.drop.hover { border-color: var(--accent); }

.filebtn {
  color: var(--accent-2);
  cursor: pointer;
  text-decoration: underline;
}
.filebtn input { display: none; }

.transport { margin-top: 1rem; }
.transport .row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

button {
  background: var(--panel-2);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  font-size: 0.95rem;
}
button:hover { border-color: var(--accent); }
button.big { font-size: 1.1rem; padding: 0.45rem 1.2rem; }

select, input[type="range"] {
  background: var(--panel-2);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.status span { color: var(--dim); }
.status b { color: var(--fg); font-variant-numeric: tabular-nums; }

.badge {
  background: var(--err-bg);
  color: var(--err-fg);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-size: 0.85rem;
}
.badge.on { background: var(--ok-bg); color: var(--ok-fg); }

#meters {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* ── app shell (index.html) ── */

.app-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar, .statusbar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.4rem 0.8rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.statusbar {
  border-bottom: none;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  font-variation-settings:
    "wdth" 92.5;
}

.brand-container {
  display: inline-block;
  font-family: "Geist", sans-serif;
  font-weight: 900;
  font-style: oblique;
  font-size: 1.333rem;
  margin: 0 0.333rem;
  cursor: pointer; /* opens the About popup */
}

.brand {
  text-shadow: 0 0 4.0px rgba(0, 0, 0, 0.15),
               0 0 2.0px rgba(0, 0, 0, 0.15),
               0 0 1.0px rgba(0, 0, 0, 0.80);
}
.brand-red { color: var(--brand); }
.brand-white { color: var(--brand2); }
.brand-dim { margin-left: 0.14rem; color: var(--dim); font-weight: 400; font-style: normal; font-size: 1.222rem; }

.transport-controls { display: flex; gap: 0.3rem; align-items: center; }
.chk { color: var(--dim); font-size: 0.85rem; display: flex; align-items: center; gap: 0.25rem; }

.tb-sep { width: 1px; align-self: stretch; margin: 0.1rem 0.25rem; background: var(--border); }
.icon-btn { padding: 0.25rem 0.5rem; font-size: 1.05rem; line-height: 1; }
button.icon-btn:disabled { opacity: 0.35; cursor: default; }
button.icon-btn:disabled:hover { border-color: var(--border); }
.undo-stat { font-size: 0.75rem; min-width: 3.5ch; font-variant-numeric: tabular-nums; }

.support-btn {
  font-size: 0.82rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--fg);
  background: var(--panel-2);
  white-space: nowrap;
}
.support-btn.donate { color: #e0507a; border-color: #e0507a55; }
.support-btn.sponsor { color: #db61a2; border-color: #db61a255; }
.support-btn:hover { border-color: var(--accent); }
.gh-link { color: var(--dim); text-decoration: none; font-size: 0.82rem; white-space: nowrap; }
.gh-link:hover { color: var(--accent); }

.pos { display: flex; gap: 0.7rem; }
.pos span { color: var(--dim); }
.pos b { color: var(--fg); font-variant-numeric: tabular-nums; min-width: 2ch; display: inline-block; }

.grow { flex: 1; }

.tabs {
  display: flex;
  gap: 2px;
  padding: 0.25rem 0.8rem 0;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.tabs button {
  border-radius: 6px 6px 0 0;
  border-bottom: none;
  padding: 0.3rem 0.9rem;
  background: var(--panel-2);
  color: var(--dim);
}
.tabs button.active {
  background: var(--bg);
  color: var(--accent);
  border-color: var(--border);
}

.view-host {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.view-canvas { display: block; position: absolute; inset: 0; }
.view-dom { position: absolute; inset: 0; }

.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  font-size: 1.1rem;
}

.dirty { color: var(--accent); }

.rec { color: var(--dim); }
/* .rec.on { color: var(--rec-fg); border-color: var(--rec-border); } */

.wheelable-dummy, .wheelable {
  padding: 0.15rem 0.35rem;
}

.wheelable {
  cursor: ns-resize;
  border-radius: 4px;
  transition: background 80ms;
}
.wheelable:hover { background: var(--panel-2); color: var(--fg); }

.toolbox {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.3rem 0.8rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.toolbox button { padding: 0.2rem 0.7rem; font-size: 0.85rem; }
.toolbox button.active { color: var(--accent); border-color: var(--accent); }

/* Quick instrument lookup — floating panel over the Timeline/Patterns grid. */
.inst-lookup {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 210px;
  max-height: calc(100% - 16px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  font-size: 0.8rem;
  z-index: 5;
  overflow: hidden;
}
.inst-lookup .il-head {
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.inst-lookup .il-list { overflow-y: auto; }
.inst-lookup .il-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0.6rem;
  cursor: pointer;
  white-space: nowrap;
}
.inst-lookup .il-row:hover { background: var(--panel-2); }
.inst-lookup .il-row.sel { background: var(--cv-cursor); }
.inst-lookup .il-idx { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.inst-lookup .il-name { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.inst-lookup .il-kind { color: var(--dim); }
.inst-lookup .il-empty { padding: 0.5rem 0.6rem; }

/* Meta-instrument layer editor: compact numeric inputs + dB readout. */
.meta-table .meta-num { width: 4.5em; }
.meta-table .meta-db { margin-left: 0.4rem; }

.cmd-palette {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.3rem 0.8rem;
  background: var(--panel);
  border-top: 1px solid var(--border);
  min-height: 2.1rem;
}
.cmd-palette button {
  padding: 0.15rem 0.55rem;
  font-size: 0.85rem;
}
.cmd-palette button.active { color: var(--accent); border-color: var(--accent); }
.pal-label { color: var(--accent); font-size: 0.8rem; margin-right: 0.3rem; }
.pal-hint { color: var(--dim); font-size: 0.82rem; margin-left: 0.4rem; }

/* ── modal dialogs ── */
.modal {
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.4rem;
  min-width: 320px;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.55); }
.modal h3 { margin-top: 0; }
.modal-field { display: block; margin: 0.6rem 0; color: var(--dim); }
.modal-field input, .modal-field select {
  background: var(--panel-2);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem 0.4rem;
  margin-left: 0.5rem;
}
.modal-buttons { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }

/* ── files view ── */
.files-host { position: absolute; inset: 0; overflow: auto; padding: 1rem; }
.files-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.files-warn { color: var(--err-fg); }
.files-table { border-collapse: collapse; width: 100%; }
.files-table th, .files-table td {
  text-align: left;
  padding: 0.35rem 0.7rem;
  border-bottom: 1px solid var(--border);
}
.files-table th { color: var(--dim); font-weight: normal; }
.files-table td button { margin-right: 0.3rem; padding: 0.15rem 0.5rem; }
.files-current { color: var(--accent); }

/* ── split views (Samples / Instruments) ── */
.split-view { position: absolute; inset: 0; display: flex; }
.side-list {
  width: 300px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--panel);
}
.side-row {
  display: flex;
  gap: 0.6rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  align-items: baseline;
}
.side-row:hover { background: var(--panel-2); }
.side-row.sel { background: var(--cv-cursor); }
.side-row .idx { color: var(--accent); font-family: "Roboto Mono", monospace; }
.side-row .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  flex-shrink: 0;
  align-self: center;
  transition: background 80ms;
}
.side-row.live .dot { background: var(--meter); box-shadow: 0 0 6px var(--meter); }
.side-row .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-sm { color: var(--accent-2); font-size: 0.75rem; }
.side-detail { flex: 1; overflow-y: auto; padding: 0.8rem; }
.detail-info { margin-bottom: 0.6rem; color: var(--dim); font-size: 0.9rem; }
.detail-info b { color: var(--fg); }
.wave-canvas {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  touch-action: none;
}

.subtabs { display: flex; gap: 2px; margin-bottom: 0.7rem; }
.subtabs button { padding: 0.2rem 0.7rem; font-size: 0.85rem; color: var(--dim); }
.subtabs button.active { color: var(--accent); border-color: var(--accent); }

.inst-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.4rem 1rem;
  margin-bottom: 0.8rem;
}
.inst-group-head {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0.2rem 0 0.4rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid var(--border);
}
.inst-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--dim);
  font-size: 0.88rem;
  gap: 0.5rem;
}
.inst-field input, .inst-field select {
  background: var(--panel-2);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.35rem;
  width: 7.5rem;
}

/* General-tab stacked field rows: label · spinner · annotation · slider. */
.inst-rows {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-bottom: 0.8rem;
  max-width: 560px;
}
.slider-row {
  display: grid;
  grid-template-columns: 10rem 5rem minmax(4.5rem, 1fr) 12rem;
  align-items: center;
  gap: 0.5rem;
  color: var(--dim);
  font-size: 0.88rem;
}
.slider-row .sl-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slider-row .sl-ann { color: var(--fg); font-variant-numeric: tabular-nums; font-size: 0.82rem; }
.slider-row input.sl-num,
.slider-row select.sl-select {
  background: var(--panel-2);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.12rem 0.3rem;
  width: 100%;
}
.slider-row select.sl-select { grid-column: 2 / -1; width: auto; justify-self: start; min-width: 12rem; }
.slider-row .sl-check { grid-column: 2 / -1; display: flex; align-items: center; gap: 0.35rem; color: var(--fg); justify-self: start; }
.slider-row .sl-check input { accent-color: var(--accent); }
.slider-row input.sl-num.wide { width: 100%; }
.slider-row input.sl-range { width: 100%; accent-color: var(--accent); }
.slider-row.noslider { grid-template-columns: 10rem 6rem minmax(4.5rem, 1fr); }
/* WIDE detune slider: spinner + readout on the first line, full-width slider below. */
.slider-row.wide {
  grid-template-columns: 10rem 6rem 1fr;
  grid-template-areas: "label num ann" "range range range";
  row-gap: 0.3rem;
}
.slider-row.wide .sl-label { grid-area: label; }
.slider-row.wide .sl-num { grid-area: num; }
.slider-row.wide .sl-ann { grid-area: ann; }
.slider-row.wide .sl-range { grid-area: range; }

.env-controls { margin-top: 0.7rem; display: flex; flex-direction: column; gap: 0.45rem; }
.env-row { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: center; }
.env-ctl {
  display: flex; align-items: center; gap: 0.35rem;
  color: var(--dim); font-size: 0.85rem;
}
.env-ctl input[type="number"] {
  background: var(--panel-2); color: var(--fg);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 0.12rem 0.3rem; width: 4.5rem;
}
.env-ctl.chk { gap: 0.3rem; }
.env-row button { padding: 0.2rem 0.6rem; font-size: 0.85rem; }

.project-view { position: absolute; inset: 0; overflow-y: auto; padding: 1rem; max-width: 900px; }

.pattern-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.8rem;
}
.pattern-view .files-bar { align-items: center; margin-bottom: 0.4rem; }
.pat-input {
  width: 4.5rem;
  text-align: center;
  font-family: "Roboto Mono", monospace;
  background: var(--panel-2);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem;
}
.pattern-canvas { flex: 1; border: 1px solid var(--border); border-radius: 6px; }

.help-modal { max-width: 720px; }

/* ── import-instruments popup ── */
.import-modal { max-width: 560px; }
.import-bar { display: flex; gap: 0.5rem; align-items: baseline; margin: 0.4rem 0; }
.import-bar .import-tally { margin-left: auto; color: var(--dim); font-size: 0.85rem; }
.import-bar .import-filter {
  background: var(--panel-2);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  flex: 1;
  min-width: 8rem;
}
.import-list {
  max-height: 50vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel-2);
}
.import-row {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.import-row:hover { background: var(--panel); }
.import-row input { accent-color: var(--accent); }
.import-row .idx { color: var(--accent); font-family: "Roboto Mono", monospace; }
.import-row .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-row .note { color: var(--dim); font-size: 0.78rem; }
.import-error { color: var(--err-fg); margin: 0.4rem 0 0; }

/* ── import progress popup (conversion spinner + streaming log) ── */
.import-progress { min-width: 420px; max-width: 560px; }
.spinner {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  border: 2px solid var(--dim);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spinner-rot 0.8s linear infinite;
  vertical-align: -0.1em;
}
.spinner.stopped { animation: none; border-color: var(--err-fg); }
@keyframes spinner-rot { to { transform: rotate(360deg); } }
.import-log {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  height: 4.8em;            /* ~4 lines */
  overflow-y: auto;
  font-size: 0.8rem;
  line-height: 1.2;
  margin: 0.6rem 0 0;
  white-space: pre-wrap;
}

/* ── sample editor modal ── */
.sample-editor { max-width: 780px; }
.smp-canvas { display: block; margin: 0.4rem 0; cursor: ew-resize; border: 1px solid var(--border); border-radius: 4px; }
.smp-fields, .smp-ops { display: flex; gap: 0.8rem; align-items: baseline; flex-wrap: wrap; margin: 0.4rem 0; }
.smp-fields label { color: var(--dim); font-size: 0.85rem; }
.smp-fields input[type="number"] {
  width: 5.5rem;
  background: var(--panel-2);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.3rem;
}
.smp-fields select {
  background: var(--panel-2);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.smp-toolbar { padding: 0.3rem 0.6rem 0; }

/* ── About popup (brand click) ── */
.about-modal { max-width: 460px; }
.about-modal h3 { font-size: 1.3rem; }
.about-modal h4 {
  margin: 0.9rem 0 0.3rem;
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.about-modal a { color: var(--accent); }
.about-thanks { margin: 0.2rem 0 0; padding-left: 1.2rem; }

/* File tab: current project's song list */
.files-songs-head { margin: 1.4rem 0 0.5rem; font-size: 1rem; color: var(--fg2); }

.side-toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}
.help-cols { display: flex; gap: 2rem; }
.help-cols dl { flex: 1; margin: 0; }
.help-cols dt { color: var(--accent); font-family: "Roboto Mono", monospace; margin-top: 0.4rem; }
.help-cols dd { margin: 0 0 0 0.2rem; color: var(--dim); font-size: 0.9rem; }

.proj-title {
  font-variation-settings:
    "wdth" 100.0;
}
