/* CURRENT Studio — Mix window + floating plugin windows.
   Builds on daw-base.css tokens. Flat console: 1px dividers, no shadows, no gradients,
   no transitions or animations (nothing moves at idle). 11px floor everywhere. */

/* ───────── root ───────── */
/* tokens: shared by the mix root and anything floating in #daw-overlay */
.dm-root, .dm-float{
  --dm-w: 92px;
  --dm-slot: 17px;
  --dm-legend: 72px;
  --dm-lab: 22px;             /* fader scale label column */
  --dm-well: #0e0f11;         /* recessed wells: grooves, meters, readouts */
  --dm-knob-trk: #3a3d44;
  --dm-edge: #484b53;         /* floating panel edge */
  --dm-lit-bg: #4a4e57;       /* neutral "on" for view toggles / segments */
  --dm-lit-fg: #f2f3f5;
  --dm-ink: #121316;
}
.dm-root{
  display: flex; flex-direction: column;
  height: 100%; min-height: 0; min-width: 0;
  background: var(--bg-0);
  font-family: var(--daw-font); font-size: var(--fs); color: var(--text);
  user-select: none; -webkit-user-select: none;
}
.dm-root[hidden]{ display: none !important; }
.dm-root.narrow{ --dm-w: 64px; --dm-lab: 0px; }

html.dm-dragging, html.dm-dragging *{ cursor: ns-resize !important; }
html.dm-grabbing, html.dm-grabbing *{ cursor: grabbing !important; }

/* ───────── view bar ───────── */
.dm-bar{
  flex: 0 0 auto; height: 30px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 8px 0 10px;
  background: var(--bg-1); border-bottom: 1px solid var(--line);
}
.dm-bar .dm-lbl{ font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin-right: 2px; }
.dm-bar .sp{ flex: 1 1 auto; }
.dm-count{ font-size: 11px; color: var(--text-faint); letter-spacing: .04em; margin-right: 6px; }
.dm-root .dm-vb{ height: 21px; padding: 0 9px; font-size: 12px; font-weight: 500; color: var(--text-dim); }
.dm-root .dm-vb.lit{ background: var(--dm-lit-bg); border-color: var(--dm-lit-bg); color: var(--dm-lit-fg); }
.dm-root .dm-vb.auto{ background: transparent; border-style: dashed; border-color: var(--dm-lit-bg); color: var(--text-dim); z-index: 1; }

/* segmented groups (flat, joined) */
.dm-segs{ display: inline-flex; align-items: center; }
.daw .dm-segs > button{ border-radius: 0; margin-left: -1px; position: relative; }
.daw .dm-segs > button:first-child{ border-radius: var(--r) 0 0 var(--r); margin-left: 0; }
.daw .dm-segs > button:last-child{ border-radius: 0 var(--r) var(--r) 0; }
.daw .dm-segs > button:only-child{ border-radius: var(--r); }
.daw .dm-segs > button.lit{ z-index: 1; }

/* ───────── rack ───────── */
/* body = scroller (legend + tracks + returns) | master column. Master sits outside the scroller,
   so it never covers a strip at any width; its column mirrors the scroller's vertical offset. */
.dm-body{ flex: 1 1 auto; min-height: 0; display: flex; overflow: hidden; position: relative; background: var(--bg-0); }
.dm-scroll{ flex: 1 1 auto; min-width: 0; overflow: auto; position: relative; }
.dm-rack{ display: flex; align-items: stretch; min-width: max-content; min-height: 100%; }
.dm-mcol{ flex: 0 0 auto; overflow: hidden; border-left: 1px solid var(--line); background: var(--bg-0); }
.dm-mcol.empty{ display: none; }
.dm-gap{ flex: 0 0 6px; background: var(--bg-0); border-right: 1px solid var(--line); }

.dm-legend{
  position: sticky; left: 0; z-index: 3;
  flex: 0 0 var(--dm-legend); width: var(--dm-legend);
  display: flex; flex-direction: column;
  background: var(--bg-0); border-right: 1px solid var(--line);
}
.dm-legend .dm-sec{
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 7px 0 0; text-align: right; white-space: pre-line;
  font-size: 11px; line-height: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); border-bottom-color: transparent;
}
.dm-legend .dm-s-stripe{ background: transparent; }
.dm-legend .dm-s-fader{ align-items: flex-start; }
.dm-legend .dm-lg-db{ margin-top: 11px; font-family: var(--daw-mono); letter-spacing: 0; text-transform: none; }
.dm-legend .dm-s-name{ border-bottom-color: transparent; }

.dm-strip{
  --tc: var(--text-faint);
  flex: 0 0 var(--dm-w); width: var(--dm-w);
  display: flex; flex-direction: column;
  background: var(--bg-1); border-right: 1px solid var(--line);
}
.dm-strip.dm-k-master{ border-right: 0; }
.dm-strip.dm-g-bus{ background: #1a1b1e; }
.dm-strip.full .dm-s-insA, .dm-strip.full .dm-s-insB{ background: rgba(229,57,53,.10); }

/* sections — identical heights in strips and legend so rows line up */
.dm-sec{ flex: 0 0 auto; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.dm-s-stripe{ height: 4px; background: var(--tc); border-bottom: 0; }
.dm-s-insA, .dm-s-insB, .dm-s-sends{
  height: calc(5 * var(--dm-slot) + 4px + 7px);
  padding: 3px 3px 4px; display: flex; flex-direction: column; gap: 1px;
}
.dm-s-io{ height: calc(2 * var(--dm-slot) + 1px + 7px); padding: 3px 3px 4px; display: flex; flex-direction: column; gap: 1px; }
.dm-s-auto{ height: calc(var(--dm-slot) + 7px); padding: 3px 3px 4px; }
.dm-s-pan{ height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 4px; }
.dm-s-btn{ height: 29px; display: flex; align-items: center; justify-content: center; gap: 2px; padding: 0 3px; }
.dm-s-fader{ flex: 1 1 auto; min-height: 150px; display: flex; justify-content: center; gap: 3px; padding: 0 2px; position: relative; }
.dm-s-vol{ height: 27px; display: flex; align-items: center; padding: 0 3px; }
.dm-s-name{ height: 29px; display: flex; align-items: center; padding: 0 3px; border-bottom: 3px solid var(--tc); }
.dm-s-cmt{ height: 36px; }
/* fit levels (set by fit() from the height available): tighter rows, then F-J collapsed */
.dm-root.fit-tight{ --dm-slot: 15px; }
.dm-root.fit-tight .dm-s-pan{ height: 35px; }
.dm-root.fit-tight .dm-s-btn{ height: 26px; }
.dm-root.fit-tight .dm-s-vol{ height: 25px; }
.dm-root.fit-tight .dm-s-name{ height: 27px; }
.dm-root.fit-tight .dm-s-cmt{ height: 33px; }
.dm-root.fit-tight .dm-cmt{ height: 30px; padding-top: 4px; }
.dm-root.fit-tight .dm-s-insA, .dm-root.fit-tight .dm-s-insB, .dm-root.fit-tight .dm-s-sends{ height: calc(5 * var(--dm-slot) + 4px + 6px); padding: 3px 3px 3px; }
.dm-root.fit-tight .dm-s-io{ height: calc(2 * var(--dm-slot) + 1px + 6px); padding: 3px 3px 3px; }
.dm-root.fit-tight .dm-s-auto{ height: calc(var(--dm-slot) + 6px); padding: 3px 3px 3px; }
.dm-root.fit-nofj .dm-s-insB{ display: none; }
.dm-root.fit-nocmt .dm-s-cmt{ display: none; }

/* narrow strips: stack pan, 2x2 state buttons, drop secondary text */
.dm-root.narrow .dm-s-pan{ flex-direction: column; gap: 1px; padding: 0; }
.dm-root.narrow .dm-s-pan .dm-knob{ width: 22px; height: 22px; }
.dm-root.narrow .dm-panv{ width: auto; height: 13px; line-height: 13px; background: transparent; border: 0; color: var(--text-dim); }
.dm-root.narrow .dm-s-btn{ height: 46px; flex-wrap: wrap; align-content: center; gap: 2px; padding: 0 4px; }
.dm-root.narrow.fit-tight .dm-s-btn{ height: 44px; }
.dm-root.narrow.fit-tight .dm-s-pan{ height: 37px; }
.dm-root.narrow .dm-b{ width: 26px; }
.dm-root.narrow .dm-slot:not(.empty) .dm-sl,
.dm-root.narrow .dm-send:not(.empty) .dm-sl,
.dm-root.narrow .dm-send .dm-sv,
.dm-root.narrow .dm-sb{ display: none; }
.dm-root.narrow .dm-slot, .dm-root.narrow .dm-send{ padding: 0 3px; }
.dm-root.narrow .dm-io .gl, .dm-root.narrow .dm-auto .gl{ display: none; }
.dm-root.narrow .dm-slot.byp .dm-sn{ text-decoration: line-through; }
.dm-root.no-fj .dm-s-insB,
.dm-root.no-sends .dm-s-sends,
.dm-root.no-io .dm-s-io,
.dm-root.no-cmt .dm-s-cmt{ display: none; }
.dm-na{ height: 100%; }

/* ───────── insert + send slots ───────── */
.dm-slot, .dm-send, .dm-io, .dm-auto{
  position: relative;
  height: var(--dm-slot); flex: 0 0 var(--dm-slot);
  display: flex; align-items: center; gap: 4px;
  padding: 0 4px 0 3px;
  font-size: 11px; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; border-radius: var(--r);
  outline: none;
}
.dm-slot, .dm-send{ cursor: default; background: var(--ctl); border-color: var(--line); color: var(--text); }
.dm-slot:hover, .dm-send:hover{ background: var(--ctl-hi); }
.dm-slot.empty, .dm-send.empty{ background: transparent; border: 1px dashed #2f3237; color: var(--text-faint); }
.dm-slot.empty:hover, .dm-send.empty:hover{ background: transparent; border-color: var(--text-faint); }
.dm-slot:focus-visible, .dm-send:focus-visible{ border-style: solid; border-color: var(--accent); }
.dm-sl{ flex: 0 0 7px; font-family: var(--daw-mono); font-size: 11px; color: var(--text-faint); }
.dm-slot:not(.empty) .dm-sl{ color: var(--text-dim); }
.dm-sn{ flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.dm-sb{ display: none; flex: 0 0 auto; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--st-bypass); }
.dm-slot.byp{ background: var(--bg-2); color: var(--st-bypass); }
.dm-slot.byp .dm-sn{ font-weight: 400; }
.dm-slot.byp .dm-sb{ display: inline; }
.dm-slot.open{ box-shadow: inset 2px 0 0 var(--accent); }
.dm-slot.src{ opacity: .45; }
.dm-slot.drop, .dm-slot.empty.drop{ border: 1px solid var(--accent); background: var(--sel); }
.dm-slot.menu-open, .dm-send.menu-open, .dm-send.pop-open{ border-style: solid; border-color: var(--text-dim); }

.dm-send .dm-sv{ flex: 0 0 auto; font-size: 11px; color: var(--text-dim); }
.dm-send.pre .dm-sv{ color: var(--text); letter-spacing: .04em; }
.dm-send.mute{ color: var(--st-mute); }
.dm-send.mute .dm-sv{ color: var(--st-mute); text-decoration: line-through; }
.dm-send{ background: #232529; }
.dm-send:hover{ background: #282a2f; }
.dm-send > span{ position: relative; }
.dm-sfill{ position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #3a3d45; border-radius: 2px 0 0 2px; pointer-events: none; }
.dm-send:hover .dm-sfill{ background: #42454d; }
.dm-sunity{ position: absolute; left: 78%; top: 4px; bottom: 4px; width: 1px; background: #474a52; pointer-events: none; }
.dm-root.narrow .dm-sunity{ display: none; }
.dm-send.mute .dm-sfill{ background: rgba(201,138,46,.20); }
.dm-send.empty .dm-sfill, .dm-send.empty .dm-sunity{ display: none; }

.dm-io, .dm-auto{ background: var(--bg-2); border-color: var(--line-soft); color: var(--text-dim); }
.dm-io .t, .dm-auto .t{ overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dm-io .gl, .dm-auto .gl{ flex: 0 0 auto; display: inline-flex; color: var(--text-faint); }

/* ───────── pan ───────── */
.dm-knob{ display: block; flex: 0 0 auto; outline: none; cursor: ns-resize; overflow: visible; }
.dm-knob .trk{ fill: none; stroke: var(--dm-knob-trk); stroke-width: 3; }
.dm-knob .val{ fill: none; stroke: var(--text); stroke-width: 3; }
.dm-knob .zr{ stroke: var(--text-faint); stroke-width: 1; }
.dm-knob .bod{ fill: var(--ctl); stroke: #4b4e56; stroke-width: 1; }
.dm-knob .ptr{ stroke: var(--text); stroke-width: 2; }
.dm-knob.sm .trk, .dm-knob.sm .val{ stroke-width: 2.5; }
.dm-knob.sm .ptr{ stroke-width: 1.6; }
.dm-knob:hover .bod{ fill: var(--ctl-hi); }
.dm-knob.drag .val, .dm-knob.drag .ptr, .dm-knob:focus-visible .val{ stroke: var(--accent); }
.dm-panv{
  flex: 0 0 auto; width: 36px; height: 19px; line-height: 17px; text-align: center;
  font-size: 11px; color: var(--text);
  background: var(--dm-well); border: 1px solid var(--line); border-radius: var(--r);
  cursor: text;
}

/* ───────── rec / input / solo / mute ───────── */
.dm-root .dm-b{
  width: 19px; height: 19px; padding: 0; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--daw-font); font-size: 11px; font-weight: 700; color: var(--text-dim);
}
.dm-root .dm-b.ph{ visibility: hidden; }
.dm-root .dm-b-rec{ color: #a0504e; }
.dm-root .dm-b-rec.act{ background: var(--st-rec); border-color: var(--st-rec); color: #fff; }
.dm-root .dm-b-in.act{ background: var(--st-input); border-color: var(--st-input); color: var(--dm-ink); }
.dm-root .dm-b-solo.act{ background: var(--st-solo); border-color: var(--st-solo); color: var(--dm-ink); }
.dm-root .dm-b-mute.act{ background: var(--st-mute); border-color: var(--st-mute); color: var(--dm-ink); }
.dm-root .dm-b-mute.implied{ color: var(--st-mute); border-color: var(--st-mute); }

/* ───────── fader ───────── */
.dm-fader{
  --cap-h: 34px; --cap-w: 24px;
  position: relative; flex: 0 0 auto;
  width: calc(var(--dm-lab) + var(--cap-w)); height: 100%;
  outline: none; cursor: ns-resize; touch-action: none;
}
.dm-fscale{ position: absolute; left: 0; top: 0; bottom: 0; width: var(--dm-lab); }
.dm-fscale span{
  position: absolute; right: 3px; transform: translateY(-50%);
  font-family: var(--daw-mono); font-size: 11px; line-height: 11px; color: var(--text-faint);
}
.dm-fscale span.u{ color: var(--text-dim); }
.dm-root.narrow .dm-fscale{ display: none; }
.dm-fgroove{
  position: absolute; left: calc(var(--dm-lab) + var(--cap-w) / 2 - 2px); width: 4px;
  top: calc(var(--cap-h) / 2); bottom: calc(var(--cap-h) / 2);
  background: var(--dm-well); border: 1px solid var(--line); border-radius: 1px;
}
.dm-fticks{ position: absolute; left: var(--dm-lab); width: var(--cap-w); top: 0; bottom: 0; pointer-events: none; }
.dm-ftk{ position: absolute; left: 3px; right: 3px; height: 1px; margin-top: -0.5px; background: transparent;
  border-left: 5px solid #3c3f46; border-right: 5px solid #3c3f46; }
.dm-ftk.u{ left: 0; right: 0; border-left-color: var(--text-dim); border-right-color: var(--text-dim); background: #33363c; }
.dm-fcap{
  position: absolute; left: var(--dm-lab); width: var(--cap-w); height: var(--cap-h);
  background: #2b2d33; border: 1px solid #50535b; border-radius: 2px;
}
.dm-fcap i{ position: absolute; left: 0; right: 0; display: block; }
.dm-fcap .ca{ top: 0; height: calc(50% - 2px); background: #3a3d44; border-bottom: 1px solid #45484f; }
.dm-fcap .cx{ top: calc(50% - 1px); height: 2px; left: 2px; right: 2px; background: var(--text); }
.dm-fcap .cb{ top: calc(50% + 3px); bottom: 3px; left: 5px; right: 5px;
  border-top: 1px solid #3a3d44; border-bottom: 1px solid #3a3d44; }
.dm-fader:hover .dm-fcap{ border-color: #62666e; }
.dm-fader.drag .dm-fcap .cx, .dm-fader:focus-visible .dm-fcap .cx{ background: var(--accent); }
.dm-fader.sm{ --cap-w: 22px; }

/* ───────── meter ───────── */
.dm-meter{
  position: relative; flex: 0 0 13px; width: 13px; height: 100%;
  display: flex; flex-direction: column;
  padding: 9px 0 17px; cursor: pointer;
}
.dm-clip{ flex: 0 0 6px; height: 6px; margin-bottom: 2px; background: #2a1719; border: 1px solid #3b2224; border-radius: 1px; }
.dm-clip.on{ background: var(--m-clip); border-color: var(--m-clip); }
.dm-mcv{ display: block; flex: 1 1 auto; width: 13px; min-height: 0; background: var(--dm-well); }
.dm-mscale{ position: relative; flex: 0 0 15px; width: 15px; height: 100%; }
.dm-mscale span{
  position: absolute; left: 1px; transform: translateY(-50%);
  font-family: var(--daw-mono); font-size: 11px; line-height: 11px; color: var(--text-faint);
}
.dm-root.narrow .dm-mscale{ display: none; }

/* ───────── volume / peak readout ───────── */
.dm-vol{
  flex: 1 1 auto; height: 20px; min-width: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  padding: 0 5px; font-size: 11px; color: var(--text);
  background: var(--dm-well); border: 1px solid var(--line); border-radius: var(--r);
  cursor: pointer; outline: none;
}
.dm-vol .k{ color: var(--text-faint); letter-spacing: .04em; }
.dm-vol.pk .k{ color: var(--text-dim); }
.dm-vol .v.hot{ color: var(--m-high); }
.dm-vol .v.over{ color: var(--m-clip); }
.dm-vol:focus-visible{ border-color: var(--accent); }
.dm-root.narrow .dm-vol{ justify-content: center; }
.dm-root.narrow .dm-vol .k{ display: none; }

/* ───────── name + comments ───────── */
.dm-name{
  flex: 1 1 auto; height: 21px; min-width: 0;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r);
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.dm-name .t{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-k-master .dm-name{ letter-spacing: .08em; text-transform: uppercase; }
.dm-rename{
  width: 100%; height: 17px; padding: 0 3px; text-align: center;
  font: 600 12px var(--daw-font); color: var(--text);
  background: var(--dm-well); border: 1px solid var(--accent); border-radius: 2px; outline: none;
}
.dm-cmt{
  display: block; width: 100%; height: 100%; margin: 0; resize: none;
  height: 31px; padding: 5px 5px 0; border: 0; border-radius: 0; outline: none;
  background: transparent; color: var(--text-dim);
  font: 11px/13px var(--daw-font); overflow: hidden;
}
.dm-cmt::placeholder{ color: var(--text-faint); }
.dm-cmt:focus{ height: 100%; background: var(--bg-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); overflow: auto; }

/* ───────── floating layer: menus, popovers, plugin windows ───────── */
.dm-float{ position: fixed; pointer-events: auto; font-family: var(--daw-font); color: var(--text); }
.dm-float.daw{ background: var(--bg-3); }

.dm-menu{
  z-index: 1000; min-width: 160px; max-height: calc(100vh - 12px); overflow: auto;
  padding: 3px 0; font-size: 12px;
  border: 1px solid var(--dm-edge, #484b53); border-radius: var(--r); outline: none;
}
.dm-mi{ height: 23px; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 6px; white-space: nowrap; cursor: default; }
.dm-mi .ck{ flex: 0 0 12px; display: inline-flex; color: var(--accent); }
.dm-mi .t{ flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.dm-mi .hint{ margin-left: 14px; font-size: 11px; color: var(--text-faint); max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.dm-mi.hi{ background: var(--sel); box-shadow: inset 2px 0 0 var(--accent); }
.dm-mi.dis{ color: var(--text-faint); }
.dm-mi-in{ padding: 0 6px 0 24px; height: 27px; }
.dm-min, .dm-pk-in{
  width: 100%; height: 21px; padding: 0 6px;
  font: 12px var(--daw-font); color: var(--text);
  background: var(--dm-well, #0e0f11); border: 1px solid var(--line); border-radius: var(--r); outline: none;
}
.dm-min:focus{ border-color: var(--accent); }
.dm-mh{ padding: 7px 12px 3px 24px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.dm-msep{ height: 1px; margin: 3px 0; background: var(--line); }
.dm-mempty{ padding: 10px 12px; font-size: 12px; color: var(--text-faint); }
.dm-chip{ flex: 0 0 auto; display: inline-block; width: 8px; height: 12px; border-radius: 1px; }
.dm-swatches{ display: grid; grid-template-columns: repeat(8, 18px); gap: 3px; padding: 4px 10px 8px 24px; }
.daw .dm-sw{ width: 18px; height: 18px; padding: 0; border: 1px solid transparent; border-radius: 2px; }
.daw .dm-sw.act{ border-color: var(--text); }
.daw .dm-sw:hover{ border-color: var(--text-dim); }

/* plugin picker */
.dm-picker{ width: 392px; padding: 0; display: flex; flex-direction: column; overflow: hidden; max-height: min(460px, calc(100vh - 12px)); }
.dm-pk-s{ flex: 0 0 auto; display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 8px 0 10px; border-bottom: 1px solid var(--line); color: var(--text-faint); }
.dm-pk-in{ flex: 1 1 auto; background: transparent; border: 0; padding: 0; height: 26px; }
.dm-pk-ti{ flex: 0 0 auto; font-size: 11px; color: var(--text-faint); letter-spacing: .04em; }
.dm-pk-b{ display: flex; min-height: 0; flex: 1 1 auto; }
.dm-pk-c{ flex: 0 0 130px; overflow: auto; padding: 3px 0; border-right: 1px solid var(--line); background: var(--bg-1); }
.dm-pc{ height: 23px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 12px; font-size: 12px; color: var(--text-dim); cursor: default; }
.dm-pc .n{ font-family: var(--daw-mono); font-size: 11px; color: var(--text-faint); }
.dm-pc.act{ background: var(--bg-3); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.dm-pk-l{ flex: 1 1 auto; overflow: auto; padding: 0 0 3px; min-height: 180px; }
.dm-pk-f{ flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 6px 0 12px; border-top: 1px solid var(--line); font-size: 11px; background: var(--bg-1); }

/* send popover */
.dm-pop{ z-index: 900; width: 178px; border: 1px solid var(--dm-edge, #484b53); border-radius: var(--r); outline: none; }
.dm-pop-h{ height: 27px; display: flex; align-items: center; gap: 6px; padding: 0 3px 0 9px; border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.dm-pop-h .t{ flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-pop-b{ padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.dm-busseg{ display: flex; }
.daw .dm-busseg > button{ flex: 1 1 0; padding: 0 4px; }
.dm-pop-fr{ display: flex; gap: 10px; height: 168px; }
.dm-pop-fr .dm-fader{ --dm-lab: 22px; }
.dm-pop-col{ flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.dm-pop-col .dm-segs{ margin-bottom: 6px; }
.dm-pop-col .dm-segs > button{ flex: 1 1 0; padding: 0 6px; }
.dm-cap{ font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.dm-pop-read{ height: 20px; line-height: 18px; padding: 0 6px; margin-bottom: 8px; font-size: 11px; text-align: right;
  background: var(--dm-well, #0e0f11); border: 1px solid var(--line); border-radius: var(--r); }
.dm-pop-foot{ display: flex; justify-content: flex-end; border-top: 1px solid var(--line-soft); padding-top: 7px; }
.daw .dm-mutebtn.act{ background: var(--st-mute); border-color: var(--st-mute); color: #121316; }

/* shared small buttons inside floats */
.daw .dm-btn{ height: 22px; padding: 0 9px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.daw .dm-btn:disabled, .daw .dm-ib:disabled, .daw .dm-dd:disabled{ color: var(--text-faint); background: var(--bg-2); cursor: default; }
.daw .dm-sg{ height: 21px; padding: 0 8px; font-size: 11px; color: var(--text-dim); }
.daw .dm-sg.lit{ background: var(--dm-lit-bg, #4a4e57); border-color: var(--dm-lit-bg, #4a4e57); color: var(--dm-lit-fg, #f2f3f5); }
.daw .dm-x{ width: 22px; height: 22px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; border-color: transparent; color: var(--text-dim); }
.daw .dm-x:hover{ background: var(--ctl-hi); color: var(--text); }
.daw .dm-ib{ width: 22px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.dm-float .g{ display: block; flex: 0 0 auto; }

/* ───────── plugin window ───────── */
.dm-pwin{
  --dm-well: #0e0f11; --dm-knob-trk: #3a3d44; --dm-lit-bg: #4a4e57; --dm-lit-fg: #f2f3f5;
  z-index: 100; display: flex; flex-direction: column;
  max-height: calc(100vh - 8px);
  font-size: 12px; outline: none;
  border: 1px solid var(--dm-edge, #484b53); border-radius: var(--r);
  user-select: none; -webkit-user-select: none;
}
.dm-pwin.daw{ background: var(--bg-1); }
.dm-pwin.focus{ border-color: #62666f; }
.dm-pw-h1{
  flex: 0 0 auto; height: 32px; display: flex; align-items: center; gap: 4px;
  padding: 0 4px 0 6px; background: var(--bg-3); border-bottom: 1px solid var(--line);
  cursor: move;
}
.dm-pwin.focus .dm-pw-h1{ box-shadow: inset 0 1px 0 var(--accent); }
.dm-pw-h1 .sp, .dm-pw-h2 .sp{ flex: 1 1 auto; min-width: 8px; }
.dm-pw-h2{ flex: 0 0 auto; height: 32px; display: flex; align-items: center; gap: 4px; padding: 0 6px; border-bottom: 1px solid var(--line); }
.daw .dm-dd{ height: 22px; min-width: 0; display: inline-flex; align-items: center; gap: 6px; padding: 0 6px 0 7px; font-size: 12px; }
.dm-dd .t{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-dd .cr{ display: inline-flex; color: var(--text-faint); }
.dm-dd .dm-chip{ display: none; }
.dm-dd.dd-track .dm-chip{ display: inline-block; }
.daw .dm-dd.dd-track{ max-width: 136px; }
.daw .dm-dd.dd-slot{ flex: 0 0 auto; }
.daw .dm-dd.dd-plug{ max-width: 170px; font-weight: 600; }
.daw .dm-dd.dd-preset{ width: 150px; justify-content: space-between; }
.dm-dd.dd-preset.edited .t{ color: var(--text); font-style: italic; }
.daw .dm-dd.menu-open{ border-color: var(--text-dim); }
.dm-pgrp .dm-ib, .dm-pgrp .dm-dd{ position: relative; }
.daw .dm-cmp.act{ background: var(--dm-lit-bg); border-color: var(--dm-lit-bg); color: var(--dm-lit-fg); }
.daw .dm-byp.act{ background: var(--st-bypass); border-color: var(--st-bypass); color: #fff; }
.daw .dm-tgt.act{ background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dm-pw-body{ flex: 1 1 auto; overflow: auto; padding: 12px 12px 14px; background: var(--bg-2); }
.dm-pwin.bypassed .dm-pw-body > *{ opacity: .45; }
.dm-pw-foot{
  flex: 0 0 auto; height: 22px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 9px; font-size: 11px; color: var(--text-faint); border-top: 1px solid var(--line); background: var(--bg-1);
}
.dm-empty{ display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 4px 10px; }
.dm-empty-t{ font-size: 12px; color: var(--text-dim); }

/* response graph */
.dm-graph{ display: block; margin: 0 0 12px; background: #111215; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.dm-graph .g-minor{ stroke: #1d1f23; stroke-width: 1; }
.dm-graph .g-major{ stroke: #2a2c31; stroke-width: 1; }
.dm-graph .g-zero{ stroke: #3b3e45; stroke-width: 1; }
.dm-graph .g-lbl{ fill: var(--text-faint); font-family: var(--daw-mono); font-size: 11px; }
.dm-graph .g-curve{ fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linejoin: round; }
.dm-graph .g-fill{ fill: var(--sel); stroke: none; }

/* gain reduction */
.dm-gr{ display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; }
.dm-gr .grl{ flex: 0 0 auto; width: 22px; font-size: 11px; letter-spacing: .08em; color: var(--text-dim); line-height: 12px; }
.dm-grc{ flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.dm-grt{ position: relative; height: 12px; background: var(--dm-well); border: 1px solid var(--line); border-radius: 1px; overflow: hidden; }
.dm-grf{ position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--m-high); display: block; }
.dm-grk{ position: absolute; top: 0; bottom: 0; width: 1px; background: #2e3036; display: block; }
.dm-grs{ position: relative; height: 12px; }
.dm-grs span{ position: absolute; top: 0; transform: translateX(-50%); font-family: var(--daw-mono); font-size: 11px; line-height: 11px; color: var(--text-faint); }
.dm-grs span:first-child{ transform: none; }
.dm-grs span:last-child{ transform: translateX(-100%); }
.dm-gr .grv{ flex: 0 0 46px; height: 14px; line-height: 12px; text-align: right; font-size: 11px; color: var(--text); }

/* options + knobs */
.dm-optrow{ display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 14px; }
.dm-opt{ display: flex; flex-direction: column; gap: 4px; }
.dm-kgrid{ display: grid; grid-template-columns: repeat(var(--cols, 6), 64px); gap: 12px 6px; }
.dm-kc{ display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.dm-kc .kl, .dm-opt .kl{
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim);
}
.dm-kc .kv{
  width: 62px; height: 19px; line-height: 17px; text-align: center; padding: 0 2px;
  font-size: 11px; color: var(--text); white-space: nowrap; overflow: hidden;
  background: var(--dm-well); border: 1px solid var(--line); border-radius: var(--r); cursor: text;
}
.dm-entry{
  width: 100%; height: 100%; padding: 0 3px; margin: 0; text-align: center;
  font: 11px var(--daw-mono); color: var(--text);
  background: var(--dm-well, #0e0f11); border: 0; outline: 1px solid var(--accent); outline-offset: -1px;
}
.dm-panv .dm-entry{ height: 17px; }

/* drag ghost */
.dm-ghost{
  position: fixed; z-index: 1100; pointer-events: none;
  height: 20px; display: flex; align-items: center; padding: 0 8px;
  font: 500 11px var(--daw-font); color: var(--text); white-space: pre;
  background: var(--bg-3); border: 1px solid var(--accent); border-radius: var(--r);
}
