/* ═══════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:   #0f0f0f;
  --bg2:  #111;
  --bg3:  #0d0d0d;
  --bd:   rgba(255,255,255,0.07);
  --txt:  #e8e8e8;
  --dim:  #888;
  --red:  #e8456a;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
}

body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
}

/* ── SCROLLBARS ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }
/* Firefox */
* { scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; }

/* ══════════════════════════════════════════════════
   TRANSPORT BAR
   ══════════════════════════════════════════════════ */
#transport {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 46px;
  background: var(--bg2);
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0;
  font-size: 11px;
}

.logo { font-size: 15px; font-weight: 800; letter-spacing: -0.5px; color: #fff; }
.sep  { width: 1px; height: 20px; background: var(--bd); flex-shrink: 0; }
.spacer { flex: 1; }

#play-btn {
  background: var(--red);
  border: none;
  border-radius: 20px;
  color: #fff;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 5px 16px;
  cursor: pointer;
  transition: background .15s;
}
#play-btn:hover { background: #f04060; }
#play-btn.playing { background: #1a1a1a; border: 1px solid var(--red); color: var(--red); }

/* ── Pattern / Song pill toggle ───────────────────── */
#mode-pill {
  position: relative;
  display: flex;
  align-items: center;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  padding: 2px;
  cursor: pointer;
  user-select: none;
  gap: 0;
  height: 24px;
  box-sizing: border-box;
}
.mode-pill-label {
  position: relative;
  z-index: 1;
  font-family: var(--font);
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.3px;
  min-width: 38px;
  text-align: center;
  line-height: 20px;
  transition: color .2s;
  color: #555;
}
.mode-pill-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  background: #2a2a2a;
  border-radius: 16px;
  transition: left .2s cubic-bezier(.4,0,.2,1), background .2s;
  z-index: 0;
}
#mode-pill.song .mode-pill-knob {
  left: calc(50%);
  background: rgba(232,69,106,0.2);
}
#mode-pill .mode-pill-label:first-child  { color: #ccc; }
#mode-pill .mode-pill-label:nth-child(2) { color: #555; }
#mode-pill.song .mode-pill-label:first-child  { color: #555; }
#mode-pill.song .mode-pill-label:nth-child(2) { color: var(--red); }

.bpm-group { display: flex; align-items: center; gap: 4px; }
.ctrl-lbl  { font-size: 10px; color: var(--dim); letter-spacing: 0; font-weight: 500; }
.bpm-box   { display: flex; align-items: center; background: #191919; border: 1px solid #2a2a2a; border-radius: 6px; padding: 2px; gap: 2px; }
.adj-btn   { background: none; border: none; color: var(--dim); cursor: pointer; font-size: 15px; width: 18px; text-align: center; line-height: 1; padding: 0; }
.adj-btn:hover { color: var(--txt); }
#bpm-input {
  background: transparent; border: none; color: #e8e8e8;
  font-family: var(--font); font-size: 15px; font-weight: bold;
  width: 40px; text-align: center; outline: none;
  -moz-appearance: textfield; cursor: ns-resize;
}
#bpm-input:focus { cursor: text; }
#bpm-input::-webkit-inner-spin-button,
#bpm-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.sm-btn {
  background: #181818; border: 1px solid #2a2a2a; border-radius: 6px;
  color: var(--txt); font-family: var(--font); font-size: 11px;
  letter-spacing: 0.3px; padding: 4px 10px; cursor: pointer;
}
.sm-btn:hover { background: #222; }

.slider-grp { display: flex; align-items: center; gap: 5px; }
.slider-val { font-size: 11px; color: #777; min-width: 28px; }
input[type=range] {
  -webkit-appearance: none; height: 3px; border-radius: 2px;
  background: #2e2e2e; outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 11px; height: 11px;
  border-radius: 50%; background: #777;
}
input[type=range]::-moz-range-thumb {
  width: 11px; height: 11px; border: none;
  border-radius: 50%; background: #777;
}
#swing-slider { width: 72px; }
#vol-slider   { width: 64px; }

/* ══════════════════════════════════════════════════
   TAB BAR
   ══════════════════════════════════════════════════ */
#tab-bar {
  display: flex;
  align-items: stretch;
  height: 32px;
  background: #0a0a0a;
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0;
}

.tab {
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #444;
  cursor: pointer;
  border-right: 1px solid var(--bd);
  transition: color .12s, background .12s;
}
.tab:hover { color: #aaa; background: #131313; }
.tab.active {
  color: var(--red);
  background: var(--bg2);
  border-bottom: 2px solid var(--red);
  margin-bottom: -1px;
}

/* ══════════════════════════════════════════════════
   PANELS
   ══════════════════════════════════════════════════ */
#main-area {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
}

#panels {
  flex: 1;
  min-height: 0;
  position: relative;
}

/* ── Pattern sidebar ────────────────────────────── */
#pattern-sidebar {
  width: 160px;
  flex-shrink: 0;
  border-left: 1px solid var(--bd);
  background: #090909;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.psb-section-label {
  padding: 8px 10px 4px;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #333;
  border-bottom: 1px solid #141414;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.psb-add-btn {
  background: none;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: #555;
  font-size: 12px;
  line-height: 1;
  padding: 1px 5px;
  cursor: pointer;
  font-family: var(--font);
}
.psb-add-btn:hover { color: #aaa; border-color: #555; }

/* Pattern context menu */
.psb-ctx-menu {
  position: fixed;
  z-index: 9999;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  padding: 4px 0;
  min-width: 130px;
  box-shadow: 0 6px 20px rgba(0,0,0,.6);
  font-family: var(--font);
}
.psb-ctx-item {
  padding: 7px 14px;
  font-size: 11px;
  letter-spacing: 0.3px;
  color: #aaa;
  cursor: pointer;
}
.psb-ctx-item:hover { background: #222; color: #fff; }
.psb-ctx-item.danger { color: #888; }
.psb-ctx-item.danger:hover { background: #2a1010; color: #ef4444; }
.psb-rename-input {
  width: 100%;
  box-sizing: border-box;
  background: #0e0e0e;
  border: 1px solid #3b82f6;
  border-radius: 5px;
  color: #ccc;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.3px;
  padding: 5px 8px;
  outline: none;
}
.psb-card {
  margin: 5px 8px;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.3px;
  cursor: grab;
  transition: opacity .1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.psb-card:hover { opacity: 0.75; }
.psb-card:active { cursor: grabbing; }
.psb-card.drum {
  background: rgba(232,69,106,.12);
  border: 1px solid rgba(232,69,106,.28);
  color: #e8456a;
}
.psb-card.melody {
  background: rgba(168,85,247,.12);
  border: 1px solid rgba(168,85,247,.28);
  color: #a855f7;
}
.psb-card.drum.active {
  background: rgba(232,69,106,.22);
  border-color: #e8456a;
  box-shadow: 0 0 0 1px rgba(232,69,106,.35);
}
.psb-card.melody.active {
  background: rgba(168,85,247,.28);
  border-color: #a855f7;
  box-shadow: 0 0 0 1px rgba(168,85,247,.4);
}

.panel {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.panel.active { display: flex; }

/* ── Playlist dock ───────────────────────────────── */
#playlist-dock {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--bd);
  background: var(--bg2);
  overflow: hidden;
  min-height: 36px;
  transition: height .15s ease;
}
#playlist-dock.collapsed { overflow: hidden; }
#playlist-dock #playlist {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

#pl-handle {
  height: 5px;
  background: transparent;
  cursor: ns-resize;
  flex-shrink: 0;
  border-bottom: 1px solid #1a1a1a;
  transition: background .1s;
}
#pl-handle:hover { background: #222; }

#pl-collapse-btn {
  background: none;
  border: none;
  color: #444;
  font-size: 10px;
  cursor: pointer;
  padding: 0 6px;
  transition: color .12s;
}
#pl-collapse-btn:hover { color: #888; }

/* ══════════════════════════════════════════════════
   STATUS BAR
   ══════════════════════════════════════════════════ */
#status-bar {
  height: 22px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  background: #090909;
  border-top: 1px solid var(--bd);
  font-size: 10px;
  color: #3a3a3a;
  flex-shrink: 0;
  gap: 16px;
}
#status-bar span { color: #888; }

/* ══════════════════════════════════════════════════
   CHANNEL RACK — LIBRARY BAR
   ══════════════════════════════════════════════════ */
#drum-lib-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px;
  height: 34px;
  background: #080808;
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0;
}
.drum-lib-btn {
  background: #141414;
  border: 1px solid #242424;
  border-radius: 5px;
  color: #555;
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.3px;
  padding: 3px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.drum-lib-btn:hover { color: #888; border-color: #333; }
.drum-lib-btn.active { background: #1a1a1a; border-color: #e8456a; color: #e8456a; }
.drum-lib-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #333;
  flex-shrink: 0;
}
.drum-lib-dot.loading { background: #eab308; animation: pulse 1s infinite; }
.drum-lib-dot.ready   { background: #22c55e; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.35; } }
.drum-lib-sep { width: 1px; height: 16px; background: var(--bd); margin: 0 4px; }

/* ── Generator buttons & picker ────────────────── */
.gen-btn {
  background: #141414;
  border: 1px solid #242424;
  border-radius: 5px;
  color: #a78bfa;
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.3px;
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.gen-btn:hover { background: #1a1a1a; border-color: #a78bfa; color: #c4b5fd; }
.gen-picker {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.7);
  min-width: 160px;
  padding: 4px 0;
  user-select: none;
}
.gen-picker-item {
  padding: 6px 14px;
  color: #ccc;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .5px;
  cursor: pointer;
}
.gen-picker-item:hover { background: #2a2a2a; color: #fff; }
.gen-picker-sep { height: 1px; background: #333; margin: 4px 0; }
.drum-kit-sel {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: #aaa;
  font-family: var(--font);
  font-size: 10px;
  padding: 3px 6px;
  outline: none;
  cursor: pointer;
}
.drum-kit-sel:focus { border-color: #e8456a; }

.t-sample-lbl {
  font-size: 9px;
  color: #555;
  letter-spacing: 0.3px;
  min-width: 80px;
  padding: 0 4px;
}

/* ══════════════════════════════════════════════════
   CHANNEL RACK — SUB BAR
   ══════════════════════════════════════════════════ */
#cr-sub-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  height: 30px;
  background: #0e0e0e;
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0;
  font-size: 11px;
  color: #555;
}
#step-counter { color: #909090; letter-spacing: 0.3px; font-size: 12px; }
.dots-wrap { display: flex; gap: 4px; align-items: center; }
.dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #252525; flex-shrink: 0; transition: background .05s;
}
.dot.lit { background: #999; }
.dot.gap { margin-left: 4px; }

/* pattern selector */
#pattern-sel {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.pat-arrow {
  background: none; border: none; color: var(--dim);
  cursor: pointer; font-size: 14px; padding: 0 3px; line-height: 1;
}
.pat-arrow:hover { color: var(--txt); }
#pat-name {
  font-size: 11px; color: #888; letter-spacing: 0.3px;
  min-width: 90px; text-align: center;
}
#pat-add {
  background: #171717; border: 1px solid #252525; border-radius: 5px;
  color: #555; font-family: var(--font); font-size: 11px;
  padding: 2px 8px; cursor: pointer;
}
#pat-add:hover { background: #222; color: #aaa; }

/* ── TRACK GRID ── */
#track-grid {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.t-row {
  display: flex;
  align-items: center;
  height: 56px;
  border-bottom: 1px solid #151515;
}
.t-row:hover { background: #0f0f0f; }

.t-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 326px;
  min-width: 326px;
  padding: 0 8px;
  height: 100%;
  border-right: 1px solid var(--bd);
  flex-shrink: 0;
}
.t-num    { font-size: 11px; font-weight: bold; min-width: 16px; text-align: right; flex-shrink: 0; }
.t-swatch { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.t-name {
  flex: 1; background: none; border: none; border-radius: 5px;
  color: #999; font-family: var(--font); font-size: 11px;
  outline: none; padding: 2px 4px; cursor: default; min-width: 0;
}
.t-name:focus { background: #1a1a1a; color: #ddd; cursor: text; }

.t-syn-btn {
  background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 5px;
  color: #666; font-family: var(--font); font-size: 10px; font-weight: bold;
  padding: 2px 6px; cursor: pointer; letter-spacing: 0.3px; flex-shrink: 0;
  transition: all .1s;
}
.t-syn-btn:hover { background: #252525; color: #aaa; }
.t-syn-btn.syn-on { background: rgba(232,69,106,0.12); border-color: var(--red); color: var(--red); }

.t-mbtn {
  background: #171717; border: 1px solid #252525; border-radius: 5px;
  color: #555; font-family: var(--font); font-size: 10px; font-weight: bold;
  width: 22px; height: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .1s;
}
.t-mbtn:hover { background: #222; color: #888; }
.t-mbtn.muted  { background: #2e1515; border-color: #7a3030; color: #d06060; }
.t-mbtn.soloed { background: #152030; border-color: #305878; color: #60a8d8; }

/* piano-roll open button for melodic tracks */
.t-pr-btn {
  background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 5px;
  color: #555; font-family: var(--font); font-size: 10px; font-weight: bold;
  padding: 2px 6px; cursor: pointer; letter-spacing: 0.3px; flex-shrink: 0;
  transition: all .1s;
}
.t-pr-btn:hover { background: #252525; color: #aaa; }

.t-steps { display: flex; gap: 3px; padding: 0 12px; align-items: center; width: 644px; flex-shrink: 0; overflow: visible; }

.s-btn {
  height: 44px; border-radius: 5px; border: 1px solid transparent;
  cursor: default; background: #1e1e1e; position: relative;
  transition: background .07s, border-color .07s, box-shadow .07s;
  overflow: hidden; flex-shrink: 0;
}
.s-btn.active { cursor: ns-resize; }
.s-btn:hover { background: #282828; }
.s-btn.beat-start { margin-left: 8px; }
.s-btn.beat-start::before {
  content: ''; position: absolute; left: -6px; top: 20%; bottom: 20%;
  width: 1px; background: #303030; pointer-events: none;
}
.s-vel {
  position: absolute; bottom: 0; left: 0; right: 0;
  border-radius: 0 0 4px 4px; display: none; transition: height .07s;
}

.t-steps-sel {
  background: #171717; border: 1px solid #252525; border-radius: 5px;
  color: #666; font-family: var(--font); font-size: 10px; letter-spacing: 0.3px;
  padding: 3px 6px; cursor: pointer; outline: none; flex-shrink: 0; margin-left: 6px;
}
.t-steps-sel:hover { background: #222; color: #aaa; }

.t-sound-sel {
  background: #171717; border: 1px solid #252525; border-radius: 5px;
  color: #888; font-family: var(--font); font-size: 10px;
  padding: 2px 4px; cursor: pointer; outline: none; flex: 1; min-width: 0; max-width: 96px;
}
.t-sound-sel:hover { background: #222; color: #bbb; }
.t-sound-sel option, .t-sound-sel optgroup { background: #141414; color: #bbb; }

/* Drum track vol / pan sliders */
.t-vol-sl, .t-pan-sl {
  -webkit-appearance: none; appearance: none;
  width: 44px; height: 3px; border-radius: 2px;
  background: #2a2a2a; outline: none; cursor: pointer; flex-shrink: 0;
}
.t-vol-sl::-webkit-slider-thumb {
  -webkit-appearance: none; width: 10px; height: 10px;
  border-radius: 50%; background: #e8456a; cursor: pointer;
}
.t-vol-sl::-moz-range-thumb {
  width: 10px; height: 10px; border-radius: 50%;
  background: #e8456a; border: none; cursor: pointer;
}
.t-pan-sl::-webkit-slider-thumb {
  -webkit-appearance: none; width: 10px; height: 10px;
  border-radius: 50%; background: #e8456a; cursor: pointer;
}
.t-pan-sl::-moz-range-thumb {
  width: 10px; height: 10px; border-radius: 50%;
  background: #e8456a; border: none; cursor: pointer;
}

/* ── Piano Roll: slide tool button ── */
.pr-slide-btn {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: #555;
  font-family: var(--font);
  font-size: 10px;
  font-weight: bold;
  padding: 3px 9px;
  cursor: pointer;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  transition: all .1s;
}
.pr-slide-btn:hover { background: #222; color: #22c55e; }
.pr-slide-btn.active {
  background: #061a0e;
  border-color: #22c55e;
  color: #22c55e;
}

/* Piano Roll: track vol / pan range inputs in synth bar */
.pr-track-knob {
  -webkit-appearance: none; appearance: none;
  width: 52px; height: 3px; border-radius: 2px;
  background: #2a2a2a; outline: none; cursor: pointer; flex-shrink: 0;
}
.pr-track-knob::-webkit-slider-thumb {
  -webkit-appearance: none; width: 11px; height: 11px;
  border-radius: 50%; background: #a855f7; cursor: pointer;
}
.pr-track-knob::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%;
  background: #a855f7; border: none; cursor: pointer;
}

/* Piano Roll: note property popup (double-click on note) */
.pr-note-popup {
  position: fixed;
  z-index: 500;
  background: #141414;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 10px 14px;
  min-width: 180px;
  box-shadow: 0 6px 24px rgba(0,0,0,.7);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font);
  font-size: 10px;
  color: #aaa;
  user-select: none;
}
.pr-note-popup-title {
  font-size: 9px;
  letter-spacing: 0.5px;
  color: #444;
  margin-bottom: 2px;
}
.pr-note-popup-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pr-note-popup-lbl {
  width: 30px;
  color: #666;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.pr-note-popup-sl {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 3px; border-radius: 2px;
  background: #2a2a2a; outline: none; cursor: pointer;
}
.pr-note-popup-sl::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  border-radius: 50%; background: #a855f7; cursor: pointer;
}
.pr-note-popup-sl::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: #a855f7; border: none; cursor: pointer;
}
.pr-note-popup-val {
  width: 34px;
  text-align: right;
  color: #bbb;
}

/* Piano Roll: slide SVG overlay */
.pr-slides-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}
.pr-slide-line {
  pointer-events: stroke;
  cursor: pointer;
}

/* ── SYNTH PANEL MODAL ── */
#synth-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.75);
  z-index: 200; display: none; align-items: center; justify-content: center;
}
#synth-backdrop.open { display: flex; }

#synth-panel {
  background: var(--bg2); border: 1px solid var(--bd); border-radius: 12px;
  width: 680px; max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.85); overflow: hidden;
}
.sp-rainbow { display: none; }
.sp-hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid var(--bd); flex-shrink: 0;
  background: var(--bg3);
}
.sp-dot { width: 8px; height: 8px; border-radius: 50%; background: #2a2a2a; flex-shrink: 0; transition: all .2s; }
.sp-dot.on { background: #4caf50; box-shadow: 0 0 5px #4caf5055; }
.sp-hdr-title { font-size: 11px; font-weight: bold; letter-spacing: 0.5px; color: var(--txt); }
.sp-hdr-track {
  font-size: 10px; font-family: var(--font); font-weight: bold; letter-spacing: 0.3px;
  color: var(--dim); background: transparent; border: none;
  border-bottom: 1px solid transparent; outline: none;
  padding: 0 2px; min-width: 60px; max-width: 160px; cursor: text;
}
.sp-hdr-track:focus { border-bottom-color: #555; color: var(--txt); }
.sp-hspace { flex: 1; }
.sp-close { background: none; border: none; color: var(--dim); font-size: 15px; cursor: pointer; padding: 0 4px; }
.sp-close:hover { color: var(--txt); }

.sp-body { display: flex; flex: 1; overflow: hidden; min-height: 0; }
.sp-presets { width: 175px; min-width: 175px; overflow-y: auto; border-right: 1px solid var(--bd); padding: 4px 0 14px; background: var(--bg3); }
.sp-cat { padding: 8px 12px 3px; font-size: 9px; color: #383838; letter-spacing: 0.5px; font-weight: bold; }
.sp-item { padding: 6px 12px; font-size: 11px; color: var(--dim); cursor: pointer; transition: all .08s; border-left: 2px solid transparent; }
.sp-item:hover { background: #161616; color: #999; }
.sp-item.sel { color: var(--red); background: rgba(232,69,106,0.1); border-left-color: var(--red); }

.sp-right { flex: 1; padding: 16px 20px; display: flex; flex-direction: column; gap: 0; overflow-y: auto; }
.sp-preset-hdr { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; border-bottom: 1px solid var(--bd); padding-bottom: 12px; }
.sp-preset-name { font-size: 14px; font-weight: bold; color: var(--txt); letter-spacing: 0.5px; }
.sp-preset-badge { font-size: 9px; color: #444; background: var(--bg); border: 1px solid var(--bd); border-radius: 5px; padding: 2px 7px; letter-spacing: 0.5px; }

.sp-macros { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.sp-macro-row { display: flex; align-items: center; gap: 10px; }
.sp-macro-lbl { font-size: 10px; color: #555; letter-spacing: .5px; min-width: 110px; text-align: right; flex-shrink: 0; }
.sp-macro-sl { flex: 1; -webkit-appearance: none; height: 3px; border-radius: 2px; background: #202020; outline: none; cursor: pointer; }
.sp-macro-sl::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--red); cursor: pointer; }
.sp-macro-sl::-moz-range-thumb { width: 14px; height: 14px; border: none; border-radius: 50%; background: var(--red); cursor: pointer; }
.sp-macro-val { font-size: 10px; color: #999; min-width: 44px; text-align: right; background: #181818; border: 1px solid #1e1e1e; border-radius: 5px; padding: 2px 6px; flex-shrink: 0; }

.sp-note-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #1c1c1c; }
.sp-note-lbl  { font-size: 10px; color: #444; letter-spacing: 0.3px; min-width: 110px; text-align: right; }
.sp-note-btn  { background: #1c1c1c; border: 1px solid #252525; border-radius: 5px; color: #666; font-family: var(--font); font-size: 13px; width: 26px; height: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sp-note-btn:hover { background: #242424; color: #aaa; }
.sp-note-disp { font-size: 16px; font-weight: bold; color: #ccc; min-width: 48px; text-align: center; }

/* ══════════════════════════════════════════════════
   MIXER PANEL
   ══════════════════════════════════════════════════ */
#mixer-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#mixer-scroll {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: stretch;
  padding: 16px 16px 0;
  gap: 4px;
  min-height: 0;
}

.mx-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  min-width: 72px;
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: 5px;
  padding: 8px 6px 10px;
  gap: 6px;
  flex-shrink: 0;
}
.mx-strip.master {
  border-color: #2a2a2a;
  background: #141414;
  margin-left: 8px;
  position: sticky;
  right: 0;
}

.mx-ch-name {
  font-size: 9px;
  letter-spacing: 0.3px;
  color: #888;
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

/* VU meter */
.mx-meter-wrap {
  width: 10px;
  height: 80px;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.mx-meter-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #22c55e;
  transition: height 40ms, background 80ms;
  height: 0%;
}

/* fader track */
.mx-fader-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.mx-fader {
  -webkit-appearance: none;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 40px;
  height: 100px;
  background: transparent;
  outline: none;
  cursor: pointer;
}
.mx-fader::-webkit-slider-runnable-track {
  width: 4px;
  background: #2a2a2a;
  border-radius: 2px;
}
.mx-fader::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 12px;
  border-radius: 2px;
  background: #4a4a4a;
  border: 1px solid #666;
  cursor: pointer;
}
.mx-fader::-moz-range-thumb {
  width: 28px;
  height: 12px;
  border-radius: 2px;
  background: #4a4a4a;
  border: 1px solid #666;
  cursor: pointer;
}
.mx-fader-val {
  font-size: 9px;
  color: #555;
  letter-spacing: .5px;
}

/* pan knob (simple range slider rotated) */
.mx-pan-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.mx-pan-lbl { font-size: 8px; color: #444; letter-spacing: 0.3px; }
.mx-pan {
  -webkit-appearance: none;
  width: 52px;
  height: 3px;
  background: #2a2a2a;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.mx-pan::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #666;
  cursor: pointer;
}
.mx-pan::-moz-range-thumb {
  width: 10px; height: 10px;
  border: none; border-radius: 50%;
  background: #666;
  cursor: pointer;
}

/* mute / solo */
.mx-btns { display: flex; gap: 3px; }
.mx-mbtn {
  background: #171717;
  border: 1px solid #252525;
  border-radius: 5px;
  color: #555;
  font-family: var(--font);
  font-size: 9px;
  font-weight: bold;
  width: 22px;
  height: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .1s;
}
.mx-mbtn:hover { background: #222; color: #888; }
.mx-mbtn.muted  { background: #2e1515; border-color: #7a3030; color: #d06060; }
.mx-mbtn.soloed { background: #152030; border-color: #305878; color: #60a8d8; }

/* FX slots */
.mx-fx-slots { width: 100%; display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.mx-fx-slot {
  width: 100%;
  height: 16px;
  background: #0e0e0e;
  border: 1px solid #1c1c1c;
  border-radius: 2px;
  font-size: 8px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all .1s;
}
.mx-fx-slot:hover { background: #181818; color: #666; }
.mx-fx-slot.loaded { color: #888; border-color: #2a2a2a; }

/* swatch dot on mixer strip */
.mx-swatch {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Peak hold tick on VU meter */
.mx-meter-peak {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: #fff;
  display: none;
  pointer-events: none;
}

/* FX Popover */
.mx-fx-popover {
  z-index: 9999;
  background: #111;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 10px;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,.7);
  font-family: var(--font);
}
.mx-fx-pop-selrow {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.mx-fx-pop-sel {
  flex: 1;
  background: #181818; border: 1px solid #2a2a2a; border-radius: 5px;
  color: #aaa; font-family: var(--font); font-size: 10px;
  padding: 3px 6px; outline: none; cursor: pointer;
}
.mx-fx-pop-apply {
  background: #1e3a1e; border: 1px solid #22c55e; border-radius: 5px;
  color: #22c55e; font-family: var(--font); font-size: 10px;
  padding: 3px 8px; cursor: pointer; letter-spacing: 0.3px;
}
.mx-fx-pop-apply:hover { background: #22c55e; color: #000; }
.mx-fx-pop-params { display: flex; flex-direction: column; gap: 5px; }
.mx-fx-param-row { display: flex; align-items: center; gap: 6px; }
.mx-fx-param-lbl { font-size: 9px; color: #666; width: 44px; letter-spacing: 0.3px; }
.mx-fx-param-sl  { flex: 1; }
.mx-fx-param-val { font-size: 9px; color: #888; min-width: 52px; text-align: right; }

/* UNDO/REDO/SAVE/LOAD transport buttons */
#undo-btn, #redo-btn { color: #888; }
#save-btn { color: #22c55e; border-color: #1e3a1e; }
#load-btn { color: #3b82f6; border-color: #1e3a5f; }

/* MIDI indicator */
#midi-indicator {
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.3px;
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid #222;
  color: #333;
  background: #111;
  transition: color .1s, border-color .1s, background .1s;
  cursor: default;
}
#midi-indicator.connected { color: #555; border-color: #333; }
#midi-indicator.active    { color: #22c55e; border-color: #22c55e; background: #0a1f0a; }

/* ══════════════════════════════════════════════════
   PIANO ROLL PANEL
   ══════════════════════════════════════════════════ */
#piano-roll-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#pr-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 36px;
  background: var(--bg2);
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0;
  font-size: 10px;
}
#pr-toolbar .ctrl-lbl { min-width: fit-content; }

/* Synth strip above piano roll */
#pr-synth-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 38px;
  background: #0e0e0e;
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0;
  font-size: 10px;
  overflow: hidden;
}
/* Layer tab bar */
#pr-layer-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px;
  height: 30px;
  background: #0a0a0a;
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0;
}
.pr-layer-tab {
  background: #141414;
  border: 1px solid #242424;
  border-radius: 5px;
  color: #555;
  font-family: var(--font);
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.3px;
  padding: 2px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.pr-layer-tab.active { background: #1a0a22; border-color: #a855f7; color: #a855f7; }
.pr-layer-del { font-size: 11px; color: #333; cursor: pointer; }
.pr-layer-del:hover { color: #e8456a; }
.pr-layer-add {
  background: none;
  border: 1px dashed #2a2a2a;
  border-radius: 5px;
  color: #3a3a3a;
  font-family: var(--font);
  font-size: 9px;
  letter-spacing: 0.3px;
  padding: 2px 8px;
  cursor: pointer;
}
.pr-layer-add:hover { border-color: #555; color: #777; }

/* ── Synth / Sample mode toggle ──────────────────── */
.psb-mode-btns {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.psb-mode-btn {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: #444;
  font-family: var(--font);
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.3px;
  padding: 3px 8px;
  cursor: pointer;
  transition: background .1s, color .1s, border-color .1s;
}
.psb-mode-btn:hover { color: #888; border-color: #444; }
.psb-mode-btn.active {
  background: #1e0f33;
  border-color: #a855f7;
  color: #c084fc;
}
#psb-instrument-sel {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: #aaa;
  font-family: var(--font);
  font-size: 10px;
  padding: 3px 6px;
  outline: none;
  cursor: pointer;
  max-width: 160px;
}
.psb-open-btn {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 5px;
  color: #a855f7;
  font-family: var(--font);
  font-size: 10px;
  padding: 3px 10px;
  cursor: pointer;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.psb-open-btn:hover { background: #222; color: #c084fc; }
#psb-preset-sel {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: #aaa;
  font-family: var(--font);
  font-size: 10px;
  padding: 3px 6px;
  outline: none;
  cursor: pointer;
  max-width: 140px;
}
#psb-macros {
  display: none;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.psb-macro-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.psb-macro-lbl {
  font-size: 9px;
  color: #555;
  letter-spacing: .5px;
  white-space: nowrap;
}
.psb-macro-sl {
  width: 70px;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 2px;
  background: #202020;
  outline: none;
  cursor: pointer;
}
.psb-macro-sl::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
}
.psb-macro-sl::-moz-range-thumb {
  width: 11px; height: 11px;
  border: none; border-radius: 50%;
  background: var(--red);
  cursor: pointer;
}
.psb-macro-val {
  font-size: 9px;
  color: #888;
  min-width: 36px;
  text-align: right;
  background: #181818;
  border: 1px solid #1e1e1e;
  border-radius: 5px;
  padding: 1px 4px;
  flex-shrink: 0;
}
.pr-pat-name {
  font-size: 11px;
  color: #555;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cr-pat-name {
  font-size: 11px;
  color: #555;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

#pr-play-btn {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: #888;
  font-size: 12px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all .12s;
}
#pr-play-btn:hover { background: #222; color: #aaa; }
#pr-play-btn.active { background: #0d1f0d; border-color: #22c55e; color: #22c55e; }

.pr-tool-btn {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: #666;
  font-family: var(--font);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.3px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all .12s;
}
.pr-tool-btn:hover { background: #222; color: #aaa; }
.pr-tool-btn.active { background: rgba(232,69,106,0.12); border-color: var(--red); color: var(--red); }

.pr-zoom-pct {
  display: inline-block;
  min-width: 36px;
  text-align: center;
  font-family: var(--font);
  font-size: 10px;
  color: #888;
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  padding: 2px 5px;
  cursor: ns-resize;
  user-select: none;
  line-height: 18px;
}
.pr-zoom-pct:hover { color: #aaa; border-color: #3a3a3a; }
.pr-zoom-pct[contenteditable="true"] {
  cursor: text;
  color: #ccc;
  border-color: #555;
  outline: none;
}

#pr-track-label {
  font-size: 11px;
  color: #555;
  margin-left: auto;
}

#pr-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* Piano keyboard sidebar */
#pr-keys {
  width: 52px;
  min-width: 52px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0e0e0e;
  border-right: 1px solid var(--bd);
  position: relative;
}

.pr-key {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 4px;
  font-size: 7px;
  cursor: pointer;
  user-select: none;
  transition: background .05s;
  box-sizing: border-box;
}
.pr-key.white {
  background: #1e1e1e;
  border-bottom: 1px solid #2a2a2a;
  color: #444;
  z-index: 1;
}
.pr-key.white:hover { background: #2a2a2a; }
.pr-key.white.c-note { color: #666; }
.pr-key.black {
  background: #0a0a0a;
  border-bottom: 1px solid #1a1a1a;
  color: transparent;
  z-index: 2;
  right: 20px;
}
.pr-key.black:hover { background: #161616; }

/* Note grid */
#pr-grid-wrap {
  flex: 1;
  overflow: auto;
  position: relative;
  background: var(--bg);
}

#pr-grid {
  position: relative;
  /* width and height set by JS based on zoom */
}

/* Beat lines drawn via CSS background */
.pr-row {
  position: absolute;
  left: 0;
  right: 0;
  border-bottom: 1px solid #151515;
}
.pr-row.black-row { background: #0d0d0d; }
.pr-row.c-row { border-bottom-color: #252525; }
.pr-row.in-key { background: rgba(168,85,247,0.07); }
.pr-row.black-row.in-key { background: rgba(168,85,247,0.05); }

.pr-beat-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.06);
}
.pr-bar-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #2a2a2a;
}

/* Ruler */
#pr-ruler {
  position: sticky;
  top: 0;
  height: 20px;
  background: #0e0e0e;
  border-bottom: 1px solid var(--bd);
  z-index: 10;
}
.pr-ruler-mark {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3px;
  font-size: 8px;
  color: #444;
  border-left: 1px solid rgba(255,255,255,0.08);
  padding-left: 2px;
}
.pr-ruler-mark.bar { color: #666; border-left-color: #2a2a2a; }

/* Notes on the grid */
.pr-loop-line {
  position: absolute;
  top: 0;
  width: 2px;
  background: rgba(168, 85, 247, 0.75);
  pointer-events: none;
  z-index: 4;
}

.pr-note {
  position: absolute;
  border-radius: 5px;
  cursor: pointer;
  min-width: 6px;
  display: flex;
  align-items: center;
  padding-left: 3px;
  font-size: 8px;
  color: rgba(0,0,0,.6);
  overflow: hidden;
  user-select: none;
  transition: filter .05s;
}
.pr-note:hover { filter: brightness(1.2); }
.pr-note.selected { outline: 2px solid #fff; filter: brightness(1.35); }

/* note resize handle */
.pr-note-resize {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  cursor: ew-resize;
  background: rgba(0,0,0,.3);
}

/* start marker */
#pr-start-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.18);
  z-index: 18;
  pointer-events: none;
}
#pr-start-marker::before {
  content: '';
  position: absolute;
  top: 0;
  left: -3px;
  width: 7px;
  height: 7px;
  background: rgba(255,255,255,0.35);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* playhead */
#pr-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--red);
  z-index: 20;
  pointer-events: none;
}

/* ruler is clickable */
#pr-ruler { cursor: col-resize; }

/* ══════════════════════════════════════════════════
   PLAYLIST PANEL
   ══════════════════════════════════════════════════ */
#playlist-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#pl-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 36px;
  background: var(--bg2);
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0;
  font-size: 10px;
}


#pl-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* ── Track sidebar (left of grid) ──────────────────── */
#pl-track-sidebar {
  width: 130px;
  min-width: 130px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--bd);
  background: #0a0a0a;
  overflow: hidden;
  z-index: 5;
}
#pl-sidebar-header {
  height: 24px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--bd);
  background: #0e0e0e;
}
#pl-sidebar-labels-clip {
  flex: 1;
  overflow: hidden;
  position: relative;
}
#pl-track-labels {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  will-change: transform;
}
.pl-track-label {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border-bottom: 1px solid #151515;
  box-sizing: border-box;
  user-select: none;
}
.pl-track-label:nth-child(even) { background: #0d0d0d; }
.pl-track-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(255,255,255,.15);
}
.pl-track-name {
  font-size: 9px;
  color: #555;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  letter-spacing: .5px;
}
.pl-track-label:hover .pl-track-name { color: #888; }
.pl-track-name-input {
  font-family: var(--font);
  font-size: 9px;
  background: #111;
  border: 1px solid #3b82f6;
  border-radius: 2px;
  color: #ccc;
  padding: 1px 3px;
  width: 100%;
  outline: none;
  letter-spacing: .5px;
}

#pl-grid-wrap {
  flex: 1;
  overflow: auto;
  position: relative;
}

#pl-ruler {
  height: 24px;
  background: #0e0e0e;
  border-bottom: 1px solid var(--bd);
  position: sticky;
  top: 0;
  z-index: 10;
}

#pl-grid {
  position: relative;
}

.pl-track-row {
  height: 36px;
  border-bottom: 1px solid #1e1e1e;
  border-left: 3px solid #2a2a2a; /* overridden per-row with track color via JS */
  position: relative;
  box-sizing: border-box;
}
.pl-track-row:nth-child(even) { background: #0d0d0d; }

.pl-bar-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.pl-bar-line.beat4 { background: #252525; }

.pl-block {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 5px;
  opacity: .85;
  cursor: pointer;
  min-width: 4px;
  display: flex;
  align-items: center;
  padding-left: 4px;
  font-size: 8px;
  color: rgba(0,0,0,.7);
  overflow: hidden;
  user-select: none;
  transition: opacity .08s;
}
.pl-block:hover { opacity: 1; }
.pl-block.selected {
  outline: 2px solid #ffffff;
  outline-offset: -2px;
  opacity: 1;
}
.pl-block-resize {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 5px;
  cursor: ew-resize;
  background: rgba(0,0,0,.3);
}

#pl-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--red);
  z-index: 20;
  pointer-events: none;
  opacity: .8;
}

/* ruler marks */
.pl-ruler-mark {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3px;
  font-size: 8px;
  color: #444;
  border-left: 1px solid rgba(255,255,255,0.08);
  padding-left: 2px;
}
.pl-ruler-mark.bar4 { color: #666; border-left-color: #2a2a2a; }

/* ══════════════════════════════════════════════════
   MIXER LAYOUT (new: strips top + FX rack bottom)
   ══════════════════════════════════════════════════ */

/* Override #mixer-scroll to live inside #mixer-top */
#mixer-top {
  flex: 1;               /* takes ALL remaining panel space */
  min-height: 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #1a1a1a;
}

#mixer-scroll {
  height: 100%;
  min-height: 0;
  flex: unset;
  position: relative;    /* for sc-svg absolute child */
}

/* Keep strips from being too tall */
.mx-meter-wrap { height: 80px !important; }
.mx-fader      { height: 110px !important; }

/* ── Routing SVG arc overlay ───────────────────── */
#sc-svg {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

/* Extra top padding gives headroom for routing arcs */
#mixer-scroll { padding-top: 52px !important; }

/* ── Send bus strip — collapsed (default) ────────── */
.mx-strip.send {
  background: #0e1616;
  border-color: #1a2828;
}
.mx-strip.send.collapsed {
  width: 26px;
  min-width: 26px;
  padding: 6px 0;
  cursor: default;
  overflow: hidden;
}
.mx-send-collapsed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  cursor: pointer;
}
.mx-send-collapsed-dot {
  width: 4px;
  border-radius: 2px;
  flex: 0 0 4px;
  align-self: stretch;
  margin: 0 auto;
}
.mx-send-collapsed-lbl {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 8px;
  letter-spacing: 0.3px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.mx-strip.send.collapsed .mx-mbtn {
  width: 20px;
  height: 20px;
  font-size: 8px;
  flex-shrink: 0;
}

/* ── Routing buttons (→M, SC, SEND) ────────────── */
.mx-route-row {
  display: flex;
  gap: 2px;
  width: 100%;
}
.mx-route-btn {
  flex: 1;
  background: #141414;
  border: 1px solid #222;
  border-radius: 5px;
  color: #444;
  font-family: var(--font);
  font-size: 8px;
  letter-spacing: 0.5px;
  height: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .1s;
  white-space: nowrap;
  padding: 0 2px;
}
.mx-route-btn:hover { background: #1e1e1e; color: #777; border-color: #333; }
.mx-route-btn.active { background: #0e1e0e; border-color: #22c55e; color: #22c55e; }
.mx-route-btn.sc-active { background: #16141e; border-color: #6366f1; color: #818cf8; }
/* ── Sidechain detail sliders (inside SC picker popup) ── */
.mx-sc-row {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}
.mx-sc-lbl {
  font-size: 7px;
  color: #555;
  letter-spacing: 0.3px;
  min-width: 22px;
}
.mx-sc-sl {
  flex: 1;
  -webkit-appearance: none;
  height: 2px;
  border-radius: 2px;
  background: #1e1e1e;
  outline: none;
  cursor: pointer;
}
.mx-sc-sl::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #818cf8;
  cursor: pointer;
}
.mx-sc-sl::-moz-range-thumb {
  width: 9px; height: 9px;
  border: none; border-radius: 50%;
  background: #818cf8;
  cursor: pointer;
}
.mx-sc-duck-bar {
  height: 4px;
  background: #111;
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
  margin-top: 2px;
}
.mx-sc-duck-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #6366f1, #a78bfa);
  border-radius: 2px;
  transition: width 50ms;
}

/* ── Route picker dropdown ──────────────────────── */
.mx-route-picker {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 5px;
  box-shadow: 0 6px 24px rgba(0,0,0,.8);
  min-width: 150px;
  padding: 4px 0;
  user-select: none;
}
.mx-route-picker-label {
  padding: 5px 12px 3px;
  font-size: 8px;
  color: #555;
  letter-spacing: 0.3px;
}
.mx-route-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  color: #bbb;
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background .08s;
}
.mx-route-picker-item:hover { background: #252525; color: #fff; }
.mx-route-picker-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mx-route-picker-sep {
  height: 1px;
  background: #252525;
  margin: 3px 0;
}

/* ══════════════════════════════════════════════════
   FX RACK
   ══════════════════════════════════════════════════ */
#fx-rack {
  flex: 0 0 auto;
  max-height: 50%;
  display: flex;
  flex-direction: column;
  background: #090909;
  overflow: hidden;
  border-top: 1px solid #1a1a1a;
}

#fx-rack-hdr {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  background: #0f0f0f;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
  gap: 8px;
}

#fx-rack-hdr-label {
  font-size: 10px;
  color: #888;
  letter-spacing: 0.3px;
  flex: 1;
}

#fx-rack-close {
  background: none;
  border: 1px solid #222;
  border-radius: 5px;
  color: #555;
  font-family: var(--font);
  font-size: 9px;
  cursor: pointer;
  padding: 2px 7px;
  letter-spacing: 0.5px;
  transition: all .12s;
}
#fx-rack-close:hover { border-color: #444; color: #aaa; }

/* Slot tiles row */
#fx-rack-slots {
  display: flex;
  gap: 3px;
  padding: 6px 10px;
  flex-shrink: 0;
  overflow-x: auto;
  background: #0f0f0f;
  border-bottom: 1px solid #161616;
}

.fx-slot-tile {
  flex: 0 0 76px;
  height: 56px;
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .12s, background .12s;
  gap: 3px;
  position: relative;
  user-select: none;
}
.fx-slot-tile:hover { background: #181818; border-color: #2a2a2a; }
.fx-slot-tile.active { background: #1a1a1a; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
.fx-slot-tile.loaded .fx-slot-name { opacity: 1; }

.fx-slot-num {
  position: absolute;
  top: 3px; left: 5px;
  font-size: 7px;
  color: #2a2a2a;
  letter-spacing: 0.5px;
}
.fx-slot-icon { font-size: 18px; line-height: 1; }
.fx-slot-name {
  font-size: 7.5px;
  letter-spacing: 0.5px;
  color: #444;
  opacity: 0.6;
}
.fx-slot-tile.loaded .fx-slot-name { opacity: 1; }

/* Editor area */
#fx-rack-editor {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

#fx-rack-visual {
  flex: 0 0 330px;
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  gap: 6px;
  border-right: 1px solid #161616;
  overflow: hidden;
  background: #0a0a0a;
}

.fx-eff-label {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.3px;
}

.fx-eff-desc {
  font-size: 9px;
  color: #555;
  line-height: 1.5;
}

.fx-visual-canvas {
  border: 1px solid #1c1c1c;
  border-radius: 5px;
  display: block;
  max-width: 100%;
}

.fx-empty-hint {
  font-size: 10px;
  color: #333;
  letter-spacing: 0.5px;
  margin-top: 20px;
  text-align: center;
  width: 100%;
}

#fx-rack-params {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Effect picker */
.fx-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #161616;
  flex-shrink: 0;
}

.fx-picker-lbl {
  font-size: 9px;
  color: #555;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.fx-picker-sel {
  flex: 1;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: #e8e8e8;
  font-family: var(--font);
  font-size: 10px;
  padding: 3px 6px;
  outline: none;
  cursor: pointer;
}

/* Param rows */
.fx-param-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fx-param-lbl-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fx-param-badge {
  font-size: 8px;
  font-weight: bold;
  letter-spacing: 0.3px;
  background: rgba(255,255,255,0.04);
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 1px 4px;
  opacity: 0.8;
  white-space: nowrap;
  flex-shrink: 0;
}

.fx-param-full-lbl {
  font-size: 9px;
  color: #444;
  line-height: 1.3;
}

.fx-param-sl-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fx-param-sl {
  flex: 1;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 2px;
  background: #1e1e1e;
  outline: none;
  cursor: pointer;
}
.fx-param-sl::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--track-color, #666);
  cursor: pointer;
  border: none;
}
.fx-param-sl::-moz-range-thumb {
  width: 13px; height: 13px;
  border: none;
  border-radius: 50%;
  background: var(--track-color, #666);
  cursor: pointer;
}

.fx-param-val {
  font-size: 9px;
  color: #999;
  min-width: 52px;
  text-align: right;
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: 5px;
  padding: 2px 5px;
  flex-shrink: 0;
}

/* Sidechain custom editor */
.fx-sc-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

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

.fx-sc-lbl {
  font-size: 9px;
  color: #666;
  min-width: 90px;
  flex-shrink: 0;
}

.fx-sc-sel {
  flex: 1;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: #e8e8e8;
  font-family: var(--font);
  font-size: 10px;
  padding: 3px 6px;
  outline: none;
  cursor: pointer;
}

.fx-sc-sl {
  flex: 1;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 2px;
  background: #1e1e1e;
  outline: none;
  cursor: pointer;
}
.fx-sc-sl::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #06b6d4;
  cursor: pointer;
}
.fx-sc-sl::-moz-range-thumb {
  width: 13px; height: 13px;
  border: none; border-radius: 50%;
  background: #06b6d4;
  cursor: pointer;
}

.fx-sc-val {
  font-size: 9px;
  color: #888;
  min-width: 40px;
  text-align: right;
  flex-shrink: 0;
}

.fx-sc-meter-lbl {
  font-size: 8px;
  color: #333;
  letter-spacing: 0.3px;
  margin-top: 4px;
}

.fx-sc-meter-wrap {
  height: 8px;
  background: #141414;
  border: 1px solid #1c1c1c;
  border-radius: 2px;
  overflow: hidden;
}

.fx-sc-meter-fill {
  height: 100%;
  width: 0%;
  background: #1a1a1a;
  border-radius: 2px;
  transition: width 60ms, background 80ms;
}

.fx-sc-note {
  font-size: 9px;
  color: #444;
  line-height: 1.5;
  margin-top: 6px;
}

/* ── FX Rack inner class aliases (fxr- / fxv-) ──── */
.fxr-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #161616;
  flex-shrink: 0;
}
.fxr-picker-lbl {
  font-size: 9px;
  color: #555;
  letter-spacing: 0.8px;
  white-space: nowrap;
}
.fxr-picker-sel {
  flex: 1;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: #e8e8e8;
  font-family: var(--font);
  font-size: 10px;
  padding: 3px 6px;
  outline: none;
  cursor: pointer;
}
.fxr-remove-btn {
  background: none;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: #555;
  font-family: var(--font);
  font-size: 8px;
  padding: 2px 6px;
  cursor: pointer;
  letter-spacing: 0.5px;
  margin-left: auto;
}
.fxr-remove-btn:hover { border-color: #c0392b; color: #c0392b; }

/* Floating effect picker popup (triggered by + slot click) */
.fx-picker-popup {
  position: fixed;
  z-index: 9999;
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  padding: 4px 0;
  min-width: 180px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.7);
  font-family: var(--font);
}
.fx-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 10px;
  color: #aaa;
  letter-spacing: 0.5px;
  cursor: pointer;
}
.fx-picker-item:hover { background: #222; color: #fff; }
.fxr-hint {
  font-size: 9px;
  color: #333;
  letter-spacing: 0.5px;
  margin-top: 12px;
  text-align: center;
}
.fxv-hint {
  font-size: 10px;
  color: #2a2a2a;
  letter-spacing: 0.5px;
  margin: auto;
  text-align: center;
}
.fxv-label {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.3px;
}
.fxv-desc {
  font-size: 9px;
  color: #555;
  line-height: 1.5;
}

/* ── Back to Frownspace ─────────────────────────────────────────────────── */
.daw-back-btn {
  font-family: var(--font); font-size: 10px; font-weight: 600;
  color: #444; text-decoration: none; letter-spacing: 0.3px;
  transition: color .15s; white-space: nowrap; flex-shrink: 0;
}
.daw-back-btn:hover { color: #aaa; }

/* ── Utility ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Export dropdown ───────────────────────────────────────────────────── */
.export-wrap { position: relative; display: inline-block; }
.export-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 9000;
  background: #1a1a1a; border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px; flex-direction: column; overflow: hidden;
  min-width: 80px; box-shadow: 0 8px 24px rgba(0,0,0,.6);
}
.export-opt {
  background: none; border: none; color: #bbb;
  font-family: var(--font); font-size: 10px; font-weight: 600;
  letter-spacing: 0.3px; padding: 9px 16px;
  cursor: pointer; text-align: left; width: 100%;
}
.export-opt:hover { background: rgba(255,255,255,.08); color: #fff; }
#export-status {
  font-family: var(--font); font-size: 10px; color: var(--red);
  font-weight: 600; letter-spacing: 0.3px; margin: 0 6px;
}

/* ── Projects modal ─────────────────────────────────────────────────────── */
.projects-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.projects-modal.hidden { display: none; }
.projects-panel {
  background: #141414; border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; width: 480px; max-width: calc(100vw - 32px);
  max-height: 80vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,.8);
}
.projects-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.07); flex-shrink: 0;
}
.projects-title {
  font-family: var(--font); font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px; color: #ccc;
}
.projects-close-btn {
  background: none; border: none; color: #555; font-size: 16px;
  cursor: pointer; padding: 0 4px; line-height: 1;
}
.projects-close-btn:hover { color: #ccc; }
.projects-logged-out {
  padding: 32px 24px; text-align: center;
  font-family: var(--font); font-size: 12px; color: #666; line-height: 1.6;
}
.projects-logged-out a { color: var(--red); text-decoration: none; }
.projects-logged-out a:hover { text-decoration: underline; }
#projects-logged-in { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.projects-save-row {
  display: flex; gap: 6px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.06); flex-shrink: 0;
}
.projects-name-input {
  flex: 1; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 5px; color: #ddd; font-family: var(--font); font-size: 11px;
  padding: 6px 10px; outline: none;
}
.projects-name-input:focus { border-color: rgba(255,255,255,.25); }
.projects-action-btn {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 5px; color: #aaa; font-family: var(--font); font-size: 10px;
  font-weight: 600; letter-spacing: 0.3px; padding: 5px 10px;
  cursor: pointer; white-space: nowrap; transition: background .15s;
}
.projects-action-btn:hover { background: rgba(255,255,255,.12); color: #ddd; }
.projects-action-btn.accent { background: var(--red); border-color: var(--red); color: #fff; }
.projects-action-btn.accent:hover { filter: brightness(1.1); }
.projects-action-btn.danger:hover { background: rgba(232,69,106,.2); border-color: var(--red); color: var(--red); }
.projects-list { overflow-y: auto; flex: 1; padding: 8px 0; min-height: 0; }
.projects-empty {
  padding: 24px; text-align: center;
  font-family: var(--font); font-size: 11px; color: #444;
}
.projects-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-bottom: 1px solid rgba(255,255,255,.04);
}
.projects-row:hover { background: rgba(255,255,255,.03); }
.projects-row.active { background: rgba(232,69,106,.08); }
.projects-row-name {
  flex: 1; font-family: var(--font); font-size: 12px; color: #ccc;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.projects-row-date {
  font-family: var(--font); font-size: 10px; color: #444;
  white-space: nowrap; flex-shrink: 0;
}
.fxv-canvas {
  border: 1px solid #1c1c1c;
  border-radius: 5px;
  display: block;
  max-width: 100%;
}
.fxr-param-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fxr-param-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: bold;
  letter-spacing: 0.3px;
  border: 1px solid;
  border-radius: 2px;
  padding: 1px 5px;
  flex-shrink: 0;
  align-self: flex-start;
}
.fxr-param-desc {
  font-size: 9px;
  color: #444;
  line-height: 1.3;
}
.fxr-param-sl-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fxr-param-sl {
  flex: 1;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 2px;
  background: #1e1e1e;
  outline: none;
  cursor: pointer;
}
.fxr-param-sl::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #666;
  cursor: pointer;
  border: none;
}
.fxr-param-sl::-moz-range-thumb {
  width: 14px; height: 14px;
  border: none; border-radius: 50%;
  background: #666;
  cursor: pointer;
}
.fxr-param-val {
  font-size: 9px;
  color: #999;
  min-width: 56px;
  text-align: right;
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: 5px;
  padding: 2px 5px;
  flex-shrink: 0;
}

/* Sidechain editor (inside fxr-visual) */
.fxsc-editor { display: flex; flex-direction: column; gap: 10px; padding: 2px 0; }
.fxsc-row    { display: flex; align-items: center; gap: 8px; }
.fxsc-lbl    { font-size: 9px; color: #666; min-width: 88px; flex-shrink: 0; }
.fxsc-sel    { flex: 1; background: #141414; border: 1px solid #2a2a2a; border-radius: 5px; color: #e8e8e8; font-family: var(--font); font-size: 10px; padding: 3px 6px; outline: none; cursor: pointer; }
.fxsc-sl     { flex: 1; -webkit-appearance: none; height: 3px; border-radius: 2px; background: #1e1e1e; outline: none; cursor: pointer; }
.fxsc-sl::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #06b6d4; cursor: pointer; }
.fxsc-sl::-moz-range-thumb { width: 13px; height: 13px; border: none; border-radius: 50%; background: #06b6d4; cursor: pointer; }
.fxsc-val    { font-size: 9px; color: #888; min-width: 42px; text-align: right; flex-shrink: 0; }
.fxsc-meter-lbl  { font-size: 8px; color: #333; letter-spacing: 0.3px; margin-top: 4px; }
.fxsc-meter-wrap { height: 8px; background: #141414; border: 1px solid #1c1c1c; border-radius: 2px; overflow: hidden; }
.fxsc-meter-fill { height: 100%; width: 0%; background: #1a1a1a; border-radius: 2px; transition: width 60ms, background 80ms; }
.fxsc-note   { font-size: 9px; color: #3a3a3a; line-height: 1.5; }

/* Sidechain form rows (inside #fx-rack-visual) */
.sc-form-row  { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sc-form-lbl  { font-size: 9px; color: #555; min-width: 100px; flex-shrink: 0; line-height: 1.3; }
.sc-form-sel  { flex: 1; background: #141414; border: 1px solid #2a2a2a; border-radius: 5px; color: #e8e8e8; font-family: var(--font); font-size: 10px; padding: 3px 6px; outline: none; cursor: pointer; }
.sc-form-sl   { flex: 1; -webkit-appearance: none; height: 3px; border-radius: 2px; background: #1e1e1e; outline: none; cursor: pointer; }
.sc-form-sl::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #06b6d4; cursor: pointer; }
.sc-form-sl::-moz-range-thumb { width: 13px; height: 13px; border: none; border-radius: 50%; background: #06b6d4; cursor: pointer; }
.sc-form-val  { font-size: 9px; color: #888; min-width: 36px; text-align: right; flex-shrink: 0; }
.sc-duck-meter-wrap { margin-top: 10px; }
.sc-duck-lbl  { font-size: 8px; color: #333; letter-spacing: 0.3px; margin-bottom: 3px; }

/* FX open button on channel strip */
.mx-fx-open {
  width: 100%;
  background: #0d0d0d;
  border: 1px solid #1c1c1c;
  border-radius: 2px;
  color: #333;
  font-family: var(--font);
  font-size: 8px;
  cursor: pointer;
  padding: 2px 0;
  letter-spacing: 0.8px;
  transition: all .1s;
  flex-shrink: 0;
}
.mx-fx-open:hover { background: #181818; border-color: #2a2a2a; color: #666; }
.mx-fx-open.has-fx { color: #888; border-color: #2a2a2a; }
