:root {
  --bg: #0c0e13;
  --bg-2: #11141b;
  --panel: #161a23;
  --panel-2: #1c212c;
  --panel-3: #232936;
  --border: #232936;
  --border-2: #2e3544;
  --text: #e8eaf0;
  --text-dim: #9aa3b2;
  --text-mute: #6b7384;
  --accent: #6366f1;
  --accent-2: #818cf8;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --accent-line: rgba(99, 102, 241, 0.4);
  --good: #34d399;
  --warn: #f59e0b;
  --bad: #f87171;
  --pink: #ec4899;
  --cyan: #22d3ee;
  --amber: #fbbf24;
  --green: #4ade80;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 10px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-radius: 11px;
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: 0.2px; }
.brand-sub { font-size: 10.5px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 1.4px; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }

.nav-group {
  margin-top: 10px;
  padding: 0 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--text-mute);
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  user-select: none;
}
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-2);
  border-color: var(--accent-line);
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item .nav-badge {
  margin-left: auto;
  font-size: 9.5px;
  background: var(--panel-2);
  color: var(--text-mute);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
}

.sidebar-foot { padding: 10px 8px 4px; border-top: 1px solid var(--border); }
.audio-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-mute);
}
.audio-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-mute);
  box-shadow: 0 0 0 0 transparent;
}
.audio-status.active .dot { background: var(--good); box-shadow: 0 0 8px var(--good); }
.audio-status.mic .dot { background: var(--pink); box-shadow: 0 0 8px var(--pink); }

/* ---------- Content ---------- */
.content {
  overflow-y: auto;
  padding: 30px 38px 60px;
  position: relative;
}
.content::-webkit-scrollbar { width: 10px; }
.content::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 6px; border: 3px solid var(--bg); }

.tool-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 24px;
}
.tool-title { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.tool-sub { color: var(--text-mute); font-size: 13.5px; }

.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.9px;
  margin-bottom: 14px;
}

.grid { display: grid; gap: 18px; }
.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Buttons / Controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
}
.btn:hover { background: var(--panel-3); border-color: #3a4253; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: white; }
.btn.danger:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn.icon { padding: 9px; }
.btn.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); }

select, input[type="text"], input[type="number"] {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: 9px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
select:focus, input:focus { border-color: var(--accent-line); }

.label { font-size: 11.5px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }
.value { font-family: var(--mono); font-size: 13px; color: var(--text); }

/* ---------- Range sliders ---------- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--panel-3);
  border-radius: 6px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  transition: box-shadow 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.2); }
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.control-group { display: flex; flex-direction: column; gap: 7px; min-width: 140px; flex: 1; }
.control-group .row-between { display: flex; justify-content: space-between; align-items: center; }

/* ---------- Toggle ---------- */
.toggle {
  width: 40px; height: 22px;
  background: var(--panel-3);
  border-radius: 22px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform 0.2s;
}
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(18px); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel-3);
  color: var(--text);
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: var(--shadow);
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Misc ---------- */
.kbd {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--panel-3);
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--text-dim);
}
.muted { color: var(--text-mute); }
.dim { color: var(--text-dim); }
.mono { font-family: var(--mono); }
.divider { height: 1px; background: var(--border); margin: 4px 0; }
.hint { font-size: 12px; color: var(--text-mute); line-height: 1.5; }
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--panel-2);
  border: 1px solid var(--border-2);
  color: var(--text-dim);
}
.pill.accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); }
.pill.good { background: rgba(52,211,153,0.14); border-color: rgba(52,211,153,0.4); color: var(--good); }
.pill.warn { background: rgba(245,158,11,0.14); border-color: rgba(245,158,11,0.4); color: var(--warn); }
.pill.bad { background: rgba(248,113,113,0.14); border-color: rgba(248,113,113,0.4); color: var(--bad); }

canvas { display: block; }

/* ---------- Piano (SVG, crisp & responsive) ---------- */
.piano-wrap {
  width: 100%;
  background: #0d0f14;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.piano-wrap svg { display: block; }
/* high-contrast scale highlighting: root solid accent, other degrees vivid indigo */
.pk-w { fill: #f4f5f8; stroke: #c8ccd4; stroke-width: 1; transition: fill 0.12s; }
.pk-w:hover { fill: #e7e9f0; }
.pk-w.hl { fill: #818cf8; stroke: #6366f1; stroke-width: 1.5; }
.pk-w.root { fill: #4f46e5; stroke: #818cf8; stroke-width: 2; }
.pk-w.root:hover { fill: #4f46e5; }
.pk-b { fill: #15171c; stroke: #000; stroke-width: 0.5; transition: fill 0.12s; }
.pk-b:hover { fill: #2a2e38; }
.pk-b.hl { fill: #6366f1; stroke: #4f46e5; stroke-width: 1.2; }
.pk-b.root { fill: #312e81; stroke: #818cf8; stroke-width: 1.5; }
.pk-name { font-family: "JetBrains Mono", monospace; font-size: 11px; fill: #7a8294; font-weight: 600; pointer-events: none; }
.pk-name.hl { fill: #ffffff; }
.pk-name.root { fill: #ffffff; font-weight: 700; }
.pk-deg { font-family: "JetBrains Mono", monospace; font-size: 13px; fill: #ffffff; font-weight: 700; pointer-events: none; }
.pk-deg-root { font-family: "JetBrains Mono", monospace; font-size: 13px; fill: #ffffff; font-weight: 700; pointer-events: none; }
.pk-deg-b { font-family: "JetBrains Mono", monospace; font-size: 12px; fill: #ffffff; font-weight: 700; pointer-events: none; }
.piano-wrap.compact { padding: 8px; border-radius: 8px; }
.piano-wrap.compact .pk-name { font-size: 10px; }
.piano-wrap.compact .pk-deg { font-size: 12px; }
.piano-wrap.compact .pk-deg-b { font-size: 11px; }

/* ---------- Tuner ---------- */
.note-display {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 28px 0 18px;
  justify-content: center;
}
.note-name {
  font-size: 78px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--text);
  transition: color 0.2s;
  font-family: var(--mono);
}
.note-octave { font-size: 30px; color: var(--text-dim); font-family: var(--mono); }
.note-freq { font-size: 15px; color: var(--text-mute); font-family: var(--mono); margin-left: auto; }
.cents-bar { padding: 18px 8px 6px; }
.cents-track {
  position: relative;
  height: 10px;
  background: var(--panel-3);
  border-radius: 6px;
  overflow: visible;
}
/* fill spans from the center (50%) toward the marker, on either side */
.cents-fill {
  position: absolute;
  top: 0; bottom: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--warn), var(--good));
  transition: left 0.1s, width 0.1s;
}
.cents-center {
  position: absolute; left: 50%; top: -4px; bottom: -4px;
  width: 2px; background: var(--text-dim); transform: translateX(-1px);
}
.cents-marker {
  position: absolute; top: -6px;
  width: 4px; height: 22px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateX(-2px);
  transition: left 0.1s;
  box-shadow: 0 0 8px var(--accent);
}
.cents-scale { display: flex; justify-content: space-between; margin-top: 10px; }
.cents-tick { font-size: 10px; color: var(--text-mute); font-family: var(--mono); width: 36px; text-align: center; }
.cents-value { text-align: center; font-size: 18px; padding: 12px 0 4px; color: var(--text); }
.tuner-status { text-align: center; font-size: 12px; color: var(--text-mute); padding-bottom: 8px; }

/* ---------- Metronome ---------- */
.pendulum-wrap { display: flex; justify-content: center; padding: 6px 0 10px; }
.pendulum-svg svg { display: block; }
.beat-dots { display: flex; justify-content: center; gap: 14px; padding: 16px 0 8px; }
.beat-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--panel-3); border: 2px solid var(--border-2);
  transition: all 0.12s;
}
.beat-dot.accent { border-color: var(--accent-line); }
.beat-dot.active { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px var(--accent); transform: scale(1.18); }
.beat-dot.accent.active { background: var(--pink); border-color: var(--pink); box-shadow: 0 0 14px var(--pink); }
.tempo-big { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 10px 0 2px; }
.tempo-num { font-size: 46px; font-weight: 700; color: var(--text); letter-spacing: -1px; }
.tempo-unit { font-size: 14px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 1px; }
.tempo-marking { text-align: center; font-size: 13px; color: var(--accent-2); font-style: italic; padding-bottom: 4px; }

/* ---------- Circle of Fifths ---------- */
.circle-wrap { display: flex; justify-content: center; padding: 8px 0; }
.circle-wrap svg { max-width: 100%; height: auto; }
.ckey { transition: filter 0.15s; }
.ckey:hover { filter: brightness(1.2); }

/* ---------- Modes ---------- */
.mode-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.mode-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 14px; background: var(--panel-2); border: 1px solid var(--border-2);
  border-radius: 9px; cursor: pointer; color: var(--text-dim); font-family: inherit;
  transition: all 0.15s; min-width: 76px;
}
.mode-btn:hover { background: var(--panel-3); color: var(--text); }
.mode-btn.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); }
.mode-deg { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--text-mute); }
.mode-btn.active .mode-deg { color: var(--accent-2); }
.mode-name { font-size: 12.5px; font-weight: 500; }
.mode-steps { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.mode-step {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 64px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  transition: all 0.15s;
}
.mode-step.on { background: linear-gradient(180deg, var(--accent-soft), transparent); border-color: var(--accent-line); }
.mode-step.root { background: var(--accent); border-color: var(--accent-2); }
.mode-step.root .ms-name, .mode-step.root .ms-num, .mode-step.root .ms-semi { color: white; }
.ms-name { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text); }
.ms-num { font-size: 10px; color: var(--accent-2); font-weight: 700; }
.ms-semi { font-size: 9px; color: var(--text-mute); }
.mode-step:not(.on) .ms-name { color: var(--text-mute); }
.compare-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.compare-label { width: 78px; font-size: 11.5px; color: var(--text-dim); text-align: right; flex-shrink: 0; }
.compare-bar { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; flex: 1; }
.compare-cell { height: 16px; background: var(--panel-2); border-radius: 3px; }
.compare-cell.on { background: var(--accent); }
.compare-cell.on.current { background: var(--pink); box-shadow: 0 0 6px var(--pink); }

/* ---------- Scales ---------- */
.degree-row {
  display: grid; grid-template-columns: 28px 1fr 50px 40px; align-items: center; gap: 10px;
  padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.degree-row:last-child { border-bottom: none; }
.degree-row:hover { background: var(--panel-2); }
.degree-num { color: var(--accent-2); font-weight: 700; }
.degree-name { color: var(--text); font-weight: 600; }
.degree-int { color: var(--text-mute); text-align: right; }
.degree-label { color: var(--text-dim); font-size: 12px; text-align: right; }

/* ---------- Euclidean ---------- */
.euclid-wrap { display: flex; justify-content: center; padding: 8px 0; }
.euclid-wrap svg { max-width: 100%; height: auto; }
.named-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.named-card {
  background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 10px;
  padding: 12px; cursor: pointer; transition: all 0.15s;
}
.named-card:hover { background: var(--panel-3); border-color: var(--accent-line); }
.named-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.named-meta { font-size: 11px; color: var(--accent-2); margin-bottom: 8px; }
.named-dots { display: flex; gap: 3px; flex-wrap: wrap; }
.named-dot { width: 11px; height: 11px; border-radius: 3px; background: var(--panel-3); }
.named-dot.on { background: var(--accent); }

/* ---------- Sequencer ---------- */
.seq-row { display: grid; grid-template-columns: 70px repeat(16, 1fr); gap: 5px; margin-bottom: 5px; }
.seq-label { display: flex; align-items: center; }
.seq-voice { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.seq-step-num {
  text-align: center; font-size: 10px; font-family: var(--mono); color: var(--text-mute);
  padding: 4px 0; border-radius: 5px; transition: all 0.1s;
}
.seq-step-num.beat { color: var(--accent-2); font-weight: 700; }
.seq-step-num.current { background: var(--accent-soft); color: var(--accent-2); }
.seq-cell {
  height: 38px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.1s;
}
.seq-cell.beat { border-color: var(--border-2); }
.seq-cell:hover { background: var(--panel-3); }
.seq-cell.on { background: var(--accent); border-color: var(--accent-2); box-shadow: 0 0 8px rgba(99,102,241,0.4); }
.seq-cell.current { outline: 2px solid var(--pink); outline-offset: 1px; }
.seq-cell.on.current { background: var(--pink); border-color: var(--pink); box-shadow: 0 0 12px var(--pink); transform: scale(1.05); }
.seq-cell.playhead { outline: 1.5px dashed var(--text-mute); outline-offset: 1px; }

/* ---------- Theory ---------- */
.theory-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.theory-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px;
  background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 9px;
  cursor: pointer; color: var(--text-dim); font-family: inherit; font-size: 13px;
  transition: all 0.15s;
}
.theory-tab:hover { background: var(--panel-3); color: var(--text); }
.theory-tab.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); }
.theory-tab svg { width: 15px; height: 15px; }
.theory-content { }
.theory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.iv-card {
  background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px; position: relative;
}
.iv-bar { height: 3px; border-radius: 2px; margin: -14px -14px 4px; border-radius: 12px 12px 0 0; }
.iv-top { display: flex; justify-content: space-between; align-items: baseline; }
.iv-name { font-weight: 600; font-size: 14px; }
.iv-abbr { font-size: 12px; color: var(--accent-2); font-weight: 700; }
.iv-semis { font-size: 11px; color: var(--text-mute); }
.iv-kb { margin: 4px 0; }
.prog-kb { margin: 4px 0 6px; }
.prog-kb-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.prog-kb-col { flex: 1 1 120px; min-width: 110px; }
.prog-kb-label { font-size: 11px; font-family: var(--mono); color: var(--accent-2); font-weight: 600; margin-bottom: 4px; text-align: center; }
.iv-card.clickable, .prog-card.clickable { cursor: pointer; }
.iv-card.clickable:hover, .prog-card.clickable:hover { border-color: var(--accent-line); }
.iv-desc { font-size: 11.5px; line-height: 1.5; }
.iv-card .btn.icon.ghost { position: absolute; top: 10px; right: 10px; padding: 5px; border: none; background: transparent; color: var(--text-mute); }
.iv-card .btn.icon.ghost:hover { color: var(--accent-2); }

.prog-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.prog-card { background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.prog-top { display: flex; justify-content: space-between; align-items: center; }
.prog-name { font-weight: 600; font-size: 14.5px; }
.prog-nums { font-size: 13px; color: var(--accent-2); font-weight: 700; }
.prog-desc { font-size: 12px; }
.prog-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.prog-chip { font-family: var(--mono); font-size: 11px; padding: 3px 9px; background: var(--panel-3); border-radius: 6px; color: var(--text-dim); }

.sig-card { background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 18px; }
.sig-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.sig-mnemonic { font-style: italic; color: var(--accent-2); font-size: 12.5px; margin-bottom: 12px; }
.sig-steps { display: flex; flex-direction: column; gap: 6px; }
.sig-step { display: flex; gap: 10px; align-items: center; font-size: 12.5px; }
.sig-step-n { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 11px; }
.sig-step-note { color: var(--text-dim); font-family: var(--mono); }
.staff-wrap { background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 16px; margin-top: 14px; }
.staff-wrap svg { display: block; max-width: 100%; }
.staves { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
@media (max-width: 880px) { .staves { grid-template-columns: 1fr; } }

@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 20px; }
}