/* "エフェクト・GEQ・COMP" view (js/ui/panels/dsp/*). Owner: ui-shell (panels/dsp).
   CONTRACTS §A1: all styles here; JS only sets CSS custom properties / transforms via CSSOM.
   Colour coding: reverb = purple, echo/delay = cyan, modulation = green, other = orange, GEQ = amber,
   COMP = red, SETUP = blue. Responsive classes (.dsp-narrow / .dsp-wide / .dsp-xl / .dsp-short) are set
   from the view's real width by a ResizeObserver. */

.dsp {
  --dsp-cv-bg: #0b0e12;
  --dsp-grid: #222b35;
  --dsp-track: #29313b;
  --dsp-warm: #ffb347;
  --dsp-rta: #3fb6ff;
  --dsp-cut: #ff6b6b;
  --dsp-sweep: #ff4fd8;
  --tone: var(--accent);
  --tone2: #ffe2a3;
  --tone-bg: rgba(242, 179, 61, .10);
  --tone-bg2: rgba(242, 179, 61, .20);
  position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0;
  background: var(--bg); color: var(--text);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.dsp *, .dsp *::before, .dsp *::after { box-sizing: border-box; }
.dsp button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; cursor: pointer; }
.dsp button:disabled { opacity: .4; cursor: default; }
.dsp-hide { display: none !important; }
.dsp [hidden] { display: none !important; }
.dsp-locked { opacity: .35; }

/* ---- tones */
.dsp-tone-rev { --tone: #a77bff; --tone2: #dccbff; --tone-bg: rgba(167, 123, 255, .12); --tone-bg2: rgba(167, 123, 255, .24); }
.dsp-tone-dly { --tone: #2fd3e6; --tone2: #b8f4fb; --tone-bg: rgba(47, 211, 230, .10); --tone-bg2: rgba(47, 211, 230, .22); }
.dsp-tone-mod { --tone: #4fd67a; --tone2: #c2f3d2; --tone-bg: rgba(79, 214, 122, .10); --tone-bg2: rgba(79, 214, 122, .22); }
.dsp-tone-oth { --tone: #ff9f43; --tone2: #ffd8b0; --tone-bg: rgba(255, 159, 67, .11); --tone-bg2: rgba(255, 159, 67, .24); }
.dsp-tone-geq { --tone: #f2b33d; --tone2: #ffe2a3; --tone-bg: rgba(242, 179, 61, .10); --tone-bg2: rgba(242, 179, 61, .22); }
.dsp-tone-cmp { --tone: #ff5c6c; --tone2: #ffb9c0; --tone-bg: rgba(255, 92, 108, .10); --tone-bg2: rgba(255, 92, 108, .22); }
.dsp-tone-set { --tone: #4fb3ff; --tone2: #c3e5ff; --tone-bg: rgba(79, 179, 255, .10); --tone-bg2: rgba(79, 179, 255, .22); }

/* ---- section nav */
.dsp-nav {
  flex: none; display: flex; gap: 6px; padding: 6px 8px; overflow-x: auto; scrollbar-width: none;
  background: var(--bg2); border-bottom: 1px solid var(--line);
}
.dsp-nav::-webkit-scrollbar { display: none; }
.dsp-nav-b {
  flex: 1 0 auto; min-width: 84px; min-height: 46px; padding: 4px 12px; border-radius: 10px;
  border: 1px solid var(--line2); background: var(--panel); position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; line-height: 1.15;
}
.dsp-nav-b::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--tone); opacity: .7; }
.dsp-nav-t { font-weight: 800; font-size: 15px; letter-spacing: .03em; color: var(--tone2); }
.dsp-nav-s { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.dsp-nav-b.on { background: var(--tone-bg2); border-color: var(--tone); }
.dsp-nav-b.on::before { opacity: 1; height: 4px; }
.dsp-nav-b.on .dsp-nav-t { color: #fff; }
.dsp-nav-b.on .dsp-nav-s { color: var(--tone2); }

.dsp-body { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 10px 10px calc(18px + var(--safe-b, 0px)); }
.dsp-panel { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }

/* ---- layout */
.dsp-cols { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.dsp-wide .dsp-cols { grid-template-columns: minmax(240px, .85fr) minmax(0, 1.45fr); }
.dsp-wide .dsp-comp-single { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.dsp-wide .dsp-setup-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.dsp-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dsp-card {
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--tone);
  border-radius: 12px; padding: 10px 12px 12px; min-width: 0; position: relative;
}
.dsp-card-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dsp-card-t { margin: 0; flex: 1 1 auto; font-size: 14.5px; font-weight: 800; color: var(--tone2); letter-spacing: .02em; }
.dsp-card-sub { font-size: 11px; color: var(--muted); }
.dsp-two { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.dsp-wide .dsp-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dsp-sub { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dsp-sub-t { font-weight: 800; color: var(--tone2); font-size: 13px; }
.dsp-note { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; -webkit-user-select: text; user-select: text; }
.dsp-warn { font-size: 11px; color: var(--warn); text-align: center; line-height: 1.3; max-width: 220px; }
.dsp-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---- buttons */
.dsp-btn {
  min-height: 44px; padding: 6px 14px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--panel2); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.dsp-btn:active { transform: translateY(1px); }
.dsp-btn.primary { background: var(--tone); color: #121212; border-color: var(--tone); }
.dsp-btn.danger { background: #3a1517; border-color: var(--danger); color: #ffd6d6; }
.dsp-btn.ghost { background: transparent; }
.dsp-btn-s { min-height: 40px; padding: 4px 12px; font-size: 13px; }
@media (pointer: coarse) { .dsp-btn-s { min-height: 44px; } }
.dsp-step {
  min-width: 44px; min-height: 40px; padding: 0 6px; border-radius: 9px; border: 1px solid var(--line2);
  background: var(--panel2); font-size: 17px; font-weight: 800; line-height: 1;
}
.dsp-step:active { background: var(--tone-bg2); border-color: var(--tone); }
@media (pointer: coarse) { .dsp-step { min-height: 44px; } }
.dsp-step-l { min-width: 52px; font-size: 14px; }

/* ---- segmented / toggles / chips */
.dsp-seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; background: var(--panel2); max-width: 100%; }
.dsp-seg-b {
  min-height: 44px; min-width: 52px; padding: 4px 12px; border: 0; border-right: 1px solid var(--line2); background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15;
}
.dsp-seg-b:last-child { border-right: 0; }
.dsp-seg-t { font-weight: 800; font-size: 14px; }
.dsp-seg-s { font-size: 10px; color: var(--muted); white-space: nowrap; }
.dsp-seg-b.on { background: var(--tone); color: #121212; }
.dsp-seg-b.on .dsp-seg-s { color: #2a2a2a; }
.dsp-seg-wrap { flex-wrap: wrap; display: flex; }
.dsp-seg-wrap .dsp-seg-b { flex: 1 0 64px; border-bottom: 1px solid var(--line2); }
.dsp-seg-sm .dsp-seg-b { padding: 2px 10px; }
.dsp-tog {
  min-height: 44px; padding: 4px 12px 4px 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel2);
  display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; white-space: nowrap;
}
.dsp-tog-led { width: 12px; height: 12px; border-radius: 50%; background: #2a1c1c; border: 1px solid #000; flex: none; }
.dsp-tog-st { font-size: 11px; color: var(--muted); font-weight: 700; }
.dsp-tog.on { border-color: var(--tone); background: var(--tone-bg2); }
.dsp-tog.on .dsp-tog-led { background: #3bf07a; box-shadow: 0 0 8px #3bf07a; }
.dsp-tog.on .dsp-tog-st { color: #fff; }
.dsp-tog-pfl.on .dsp-tog-led, .dsp-tog-sweep.on .dsp-tog-led { background: #ffc531; box-shadow: 0 0 8px #ffc531; }
.dsp-tog-byp.on .dsp-tog-led { background: #ff5c6c; box-shadow: 0 0 8px #ff5c6c; }
.dsp-tog-rta.on .dsp-tog-led { background: var(--dsp-rta); box-shadow: 0 0 8px var(--dsp-rta); }
.dsp-chip { padding: 5px 12px; border-radius: 999px; background: var(--tone-bg2); border: 1px solid var(--tone); font-weight: 800; font-size: 13px; }
.dsp-chip.full { background: var(--bad); border-color: var(--bad); color: #fff; }
.dsp-sig { font-weight: 800; font-size: 11px; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line2); color: var(--dim); letter-spacing: .05em; }
.dsp-sig.on { background: #2bd46a; border-color: #2bd46a; color: #052211; box-shadow: 0 0 10px #2bd46a88; }

/* ---- knobs */
.dsp-knobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px 8px; }
.dsp-knob { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.dsp-knob-lbl { font-size: 12.5px; font-weight: 800; color: var(--tone2); text-align: center; letter-spacing: .02em; line-height: 1.2; }
.dsp-dial {
  --a: 0; --b: 0; --dial: 86px;
  position: relative; width: var(--dial); height: var(--dial); border-radius: 50%; flex: none;
  background: conic-gradient(from -150deg, var(--dsp-track) 0deg calc(var(--a) * 300deg), var(--tone) calc(var(--a) * 300deg) calc(var(--b) * 300deg), var(--dsp-track) calc(var(--b) * 300deg) 300deg, transparent 300deg 360deg);
  touch-action: none; cursor: ns-resize; outline: none;
}
.dsp-dial::before {
  content: ""; position: absolute; inset: 9px; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #2f3843, #161b21 72%); box-shadow: inset 0 1px 0 #44505e, 0 3px 8px #000a;
}
.dsp-dial:focus-visible { box-shadow: 0 0 0 3px var(--tone-bg2); }
.dsp-dial.mgp-active::before { background: radial-gradient(circle at 50% 30%, #3a4552, #1b2128 72%); }
.dsp-dial-ptr { position: absolute; left: 50%; top: 9px; bottom: 50%; width: 4px; margin-left: -2px; transform-origin: 50% 100%; pointer-events: none; }
.dsp-dial-ptr::after { content: ""; position: absolute; left: 0; top: 2px; width: 4px; height: 11px; border-radius: 2px; background: var(--tone2); box-shadow: 0 0 6px var(--tone); }
.dsp-dial-val {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 14px;
  font-weight: 800; font-size: 13.5px; line-height: 1.1; font-variant-numeric: tabular-nums; pointer-events: none; z-index: 1;
}
.dsp-dial-val.long { font-size: 12px; padding: 0 11px; letter-spacing: -.02em; }
.dsp-knob-btns { display: flex; gap: 6px; }
.dsp-knob-help { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3; max-width: 160px;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dsp-knob-sm .dsp-dial { --dial: 72px; }
.dsp-narrow .dsp-dial { --dial: 78px; }
.dsp-xl .dsp-dial { --dial: 94px; }
.dsp-xl .dsp-dial-val { font-size: 14.5px; }
.dsp-optcell { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.dsp-optcell .dsp-knob-help { text-align: left; max-width: none; -webkit-line-clamp: 3; line-clamp: 3; }
.dsp-sendcell { grid-column: span 2; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.dsp-chsel { display: flex; align-items: center; gap: 4px; max-width: 100%; }
.dsp-chsel-l { font-weight: 800; font-size: 12px; min-width: 70px; max-width: 130px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tone2); }

/* ---- canvases */
.dsp-cv { position: relative; width: 100%; border-radius: 10px; overflow: hidden; background: var(--dsp-cv-bg); }
.dsp-cv canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dsp-cv-fx { height: 176px; }
.dsp-short .dsp-cv-fx { height: 150px; }
.dsp-xl .dsp-cv-fx { height: 220px; }
.dsp-cv-xo { height: 170px; }
.dsp-cv-duck { height: 150px; margin: 6px 0 10px; }

/* ---- FX panel */
.dsp-fx-head {
  display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 8px 12px; border-radius: 12px;
  background: linear-gradient(100deg, var(--tone-bg2), var(--panel) 70%); border: 1px solid var(--line);
}
.dsp-fx-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 60px; height: 52px; border-radius: 10px; background: var(--tone); color: #121212; flex: none; line-height: 1.05; }
.dsp-fx-badge-n { font-weight: 900; font-size: 19px; }
.dsp-fx-badge-k { font-weight: 800; font-size: 10px; letter-spacing: .05em; }
.dsp-fx-headtxt { flex: 1 1 200px; min-width: 0; }
.dsp-fx-cur { font-size: 20px; font-weight: 900; letter-spacing: .02em; line-height: 1.2; }
.dsp-fx-curdesc { font-size: 12.5px; color: var(--tone2); line-height: 1.35; }
.dsp-fx-headctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dsp-pgroup + .dsp-pgroup { margin-top: 10px; }
.dsp-pgroup-t { font-size: 12px; font-weight: 900; color: var(--tone); letter-spacing: .08em; margin: 0 0 5px 2px; }
.dsp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 6px; }
.dsp-tile {
  text-align: left; padding: 7px 9px 8px; border-radius: 10px; border: 1px solid var(--line); border-left: 4px solid var(--tone);
  background: var(--tone-bg); min-height: 58px; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.dsp-tile:hover { background: var(--tone-bg2); }
.dsp-tile-top { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.dsp-tile-no { font-family: var(--mono); font-weight: 800; font-size: 12px; color: var(--tone2); }
.dsp-tile-name { font-weight: 900; font-size: 13.5px; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsp-tile-tag { margin-left: auto; font-size: 9.5px; font-weight: 800; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; color: var(--tone2); }
.dsp-tile-sub { display: none; }
.dsp-tile-desc { font-size: 11.5px; color: var(--muted); line-height: 1.32; }
.dsp-tile.on { background: var(--tone); border-color: var(--tone); color: #121212; box-shadow: 0 0 0 2px var(--tone-bg2), 0 4px 14px #0008; }
.dsp-tile.on .dsp-tile-no, .dsp-tile.on .dsp-tile-tag { color: #222; }
.dsp-tile.on .dsp-tile-desc { color: #1d1d1d; }
.dsp-tap-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.dsp-tap-btn {
  width: 104px; height: 76px; border-radius: 14px; border: 2px solid var(--tone); position: relative; flex: none;
  background: linear-gradient(#3a4350, #20262e); box-shadow: 0 4px 10px #0009, inset 0 1px 0 #5a6675;
}
.dsp-tap-btn:active, .dsp-tap-btn.hit { background: linear-gradient(#4a5565, #2a313a); transform: translateY(1px); }
.dsp-tap-t { font-weight: 900; font-size: 22px; letter-spacing: .08em; }
.dsp-tap-led { position: absolute; top: 8px; right: 9px; width: 13px; height: 13px; border-radius: 50%; background: #3a1010; border: 1px solid #000; }
.dsp-tap-led.lit { background: #ff9a2a; border-color: #ffcf8a; box-shadow: 0 0 10px #ff9a2a, 0 0 3px #ffd9a8; }
@keyframes dsp-blink { 0% { background: #ff3b3b; box-shadow: 0 0 10px #ff3b3b; } 30% { background: #3a1010; box-shadow: none; } }
.dsp-tap-info { flex: 1 1 200px; min-width: 0; }
.dsp-tap-info .dsp-knob-help { text-align: left; max-width: none; -webkit-line-clamp: 4; line-clamp: 4; }
.dsp-tap-val { font-weight: 900; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--tone2); }

/* ---- GEQ */
.dsp-geq-fieldcard { padding-top: 10px; }
.dsp-geq-field { position: relative; height: clamp(220px, 52vh, 430px); border-radius: 10px; overflow: hidden; cursor: ns-resize; }
.dsp-short .dsp-geq-field { height: 230px; }
.dsp-cv-geq { position: absolute; inset: 0; height: auto; border-radius: 10px; }
.dsp-sweeping .dsp-geq-field { box-shadow: 0 0 0 2px var(--dsp-sweep); cursor: ew-resize; }
.dsp-geq-msg {
  position: absolute; left: 50%; top: 18px; transform: translateX(-50%); max-width: calc(100% - 40px); z-index: 3; pointer-events: none;
  background: #000d; color: #fff; border: 1px solid var(--tone); border-radius: 10px; padding: 6px 12px; font-size: 13px; line-height: 1.4;
  opacity: 0; transition: opacity .25s;
}
.dsp-geq-msg.show { opacity: 1; }
.dsp-geq-sel { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.dsp-geq-self { font-weight: 900; font-size: 18px; min-width: 92px; text-align: center; color: var(--tone2); }
.dsp-geq-selg { font-weight: 900; font-size: 20px; min-width: 104px; text-align: center; font-variant-numeric: tabular-nums; margin-left: 6px; }
.dsp-geq-selg.boost { color: var(--tone); }
.dsp-geq-selg.cut { color: var(--dsp-cut); }
.dsp-rta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.dsp-rta-row .dsp-knob-help { text-align: left; max-width: 360px; }
.dsp-sweep { margin-top: 8px; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--dsp-sweep); background: rgba(255, 79, 216, .06); }
.dsp-sweep-h { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.dsp-sweep-h b { color: #ff9be9; font-size: 13.5px; }
.dsp-sweep-h .dsp-knob-help { text-align: left; max-width: none; -webkit-line-clamp: 4; line-clamp: 4; }
.dsp-sweep-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.dsp-sweep-row .dsp-knob { --tone: var(--dsp-sweep); --tone2: #ffb9f0; }
.dsp-sweep-info { flex: 1 1 200px; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.dsp-sweep-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- programs list */
.dsp-plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 6px; }
.dsp-prow { display: flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--line); min-width: 0; }
.dsp-prow.on { border-color: var(--tone); box-shadow: inset 3px 0 0 var(--tone); }
.dsp-prow-n { flex: 1 1 auto; font-weight: 800; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsp-prow-tags { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.dsp-prow-ro { font-weight: 900; font-size: 12px; color: var(--dim); min-width: 52px; text-align: center; }

/* ---- COMP */
.dsp-comp { --band-l: #ff8a5c; --band-m: #ffd166; --band-h: #5cc8ff; }
.dsp-tf-wrap { display: flex; gap: 10px; align-items: stretch; }
.dsp-cv-tf { flex: 1 1 auto; aspect-ratio: 1.15; max-height: 380px; min-height: 200px; }
.dsp-gr { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 62px; flex: none; }
.dsp-gr-lbl { font-size: 11px; font-weight: 800; color: var(--tone2); white-space: nowrap; }
.dsp-gr-col { position: relative; width: 22px; flex: 1 1 auto; min-height: 120px; margin-left: 22px; background: #0b0e11; border: 1px solid var(--line2); border-radius: 4px; }
.dsp-gr-fill { position: absolute; left: 0; right: 0; top: 0; height: 100%; transform-origin: 50% 0; transform: scaleY(0); background: linear-gradient(#ffd166, #ff5c6c 60%, #c2185b); border-radius: 3px; }
.dsp-gr-tick { position: absolute; right: 100%; top: calc(var(--y) * 100%); transform: translateY(-50%); padding-right: 4px; font-size: 9px; color: var(--dim); font-variant-numeric: tabular-nums; }
.dsp-gr-n { font-weight: 900; font-size: 13px; font-variant-numeric: tabular-nums; }
.dsp-gr-lbl, .dsp-gr-n { margin-left: 22px; }
.dsp-gr-row { display: flex; gap: 6px; justify-content: center; margin-top: 10px; height: 170px; }
.dsp-gr-row .dsp-gr { width: 84px; }
.dsp-grb-l .dsp-gr-fill { background: var(--band-l); }
.dsp-grb-m .dsp-gr-fill { background: var(--band-m); }
.dsp-grb-h .dsp-gr-fill { background: var(--band-h); }
.dsp-comp-multi { display: flex; flex-direction: column; gap: 10px; }
.dsp-xo-wrap { position: relative; touch-action: none; cursor: ew-resize; }
.dsp-bands { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.dsp-wide .dsp-bands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dsp-band-l { --tone: var(--band-l); --tone2: #ffc7b0; --tone-bg2: rgba(255, 138, 92, .2); }
.dsp-band-m { --tone: var(--band-m); --tone2: #ffe8b0; --tone-bg2: rgba(255, 209, 102, .2); }
.dsp-band-h { --tone: var(--band-h); --tone2: #c0e9ff; --tone-bg2: rgba(92, 200, 255, .2); }
.dsp-knobs-band { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); margin-bottom: 8px; }
.dsp-band .dsp-tog { width: 100%; justify-content: center; }

/* ---- confirmation sheet */
.dsp-sheet-back { position: absolute; inset: 0; z-index: 50; background: #000b; display: flex; align-items: center; justify-content: center; padding: 16px; }
.dsp-sheet { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line2); border-top: 3px solid var(--tone); border-radius: 14px; padding: 14px 16px; box-shadow: 0 20px 60px #000c; }
.dsp-sheet-t { font-weight: 900; font-size: 17px; font-family: var(--mono); letter-spacing: .02em; }
.dsp-sheet-p { font-size: 14px; color: var(--text); line-height: 1.55; margin: 8px 0 14px; }
.dsp-sheet-row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---- narrow (portrait phones) */
.dsp-narrow .dsp-body { padding: 8px 8px calc(16px + var(--safe-b, 0px)); }
.dsp-narrow .dsp-card { padding: 8px 10px 10px; }
.dsp-narrow .dsp-knobs { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.dsp-narrow .dsp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dsp-narrow .dsp-fx-cur { font-size: 18px; }
.dsp-narrow .dsp-nav { gap: 4px; padding: 5px 6px; }
.dsp-narrow .dsp-nav-b { flex: 1 1 0; min-width: 0; padding: 4px 2px; }
.dsp-narrow .dsp-nav-t { font-size: 14px; }
.dsp-narrow .dsp-nav-s { display: none; }
.dsp-narrow .dsp-tf-wrap { gap: 4px; }

/* ---- short (phone landscape): save vertical space */
.dsp-short .dsp-nav { padding: 4px 8px; }
.dsp-short .dsp-nav-b { min-height: 44px; }
.dsp-short .dsp-body { padding-top: 6px; }
.dsp-short .dsp-geq-top .dsp-card-h, .dsp-short .dsp-comp-top .dsp-card-h { display: none; }
.dsp-short .dsp-geq-top, .dsp-short .dsp-comp-top { padding-top: 8px; }
.dsp-short .dsp-fx-head { padding: 6px 10px; }
.dsp-short .dsp-fx-badge { height: 46px; }
.dsp-short .dsp-fx-cur { font-size: 18px; }

/* latching toggles (user request, same rule as the console switches): ON = bright white face with glow,
   OFF = blacked-out face with dim legend. LED colours unchanged. */
.dsp-tog { background: linear-gradient(#17191c, #0c0d0f); border-color: #30353c; color: #69717b; }
.dsp-tog .dsp-tog-st { color: #59616a; }
.dsp-tog.on { background: linear-gradient(#ffffff, #e2e6ea); border-color: #ffffff; color: #0e0f10; box-shadow: 0 0 12px rgba(255, 255, 255, 0.5); }
.dsp-tog.on .dsp-tog-st { color: #1b1d20; }
.dsp-tog.on .dsp-tog-led { border-color: #00000088; }
