/* editor.css — light "EP Sample Tool" theme for the DAW editor.
   Design tokens and bevel treatments from the handoff (high-fidelity). */

/* Kill the browser's swipe-to-navigate gesture: horizontal overscroll must
   never chain from our scroll containers up to the page. */
html, body { overscroll-behavior-x: none; }

.ep-editor {
  --ink: #17171a;
  --ink-deep: #101014;
  --ink-panel: #232327;
  --paper: #f2f1ed;
  --panel: #ecebe7;
  --inner: #f4f3f0;
  --hover: #e6e5e0;
  --hover2: #e0dfda;
  --hair: #cfcec9;
  --hair2: #dddcd7;
  --muted: #5a5a60;
  --muted2: #8a8a90;
  --or: #ff4a00;
  --green: #3fe0a8;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;

  position: fixed;
  inset: 0;
  z-index: 50;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  background-color: #b5b9c0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.38) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.38) 1px, transparent 1px);
  background-size: 26px 26px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr); /* single full-width column so every row stretches */
  padding: 14px;
  gap: 12px;
  overflow: hidden;
}
.ep-editor * { box-sizing: border-box; }
.ep-editor.ep-dragging { outline: 3px dashed var(--or); outline-offset: -8px; }
.ep-editor .mono { font-family: var(--mono); }

@keyframes ep-sweep { from { left: 0%; } to { left: 100%; } }
@keyframes ep-blinkr { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0.15; } }

/* panel + bevel primitives */
.ep-panel {
  background: var(--panel);
  border: 1.5px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(23, 23, 26, 0.9);
  min-height: 0;
}
.ep-btn {
  border: 1.5px solid var(--ink);
  background: var(--inner);
  box-shadow: 2.5px 2.5px 0 var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ep-btn:active { transform: translate(2px, 2px); box-shadow: 0.5px 0.5px 0 var(--ink); }
.ep-btn.active { background: var(--or); color: #fff; }
.ep-btn.dark { background: var(--ink-panel); color: var(--paper); box-shadow: 2.5px 2.5px 0 rgba(23, 23, 26, 0.5); }
.ep-btn.sm { box-shadow: 2px 2px 0 var(--ink); }
.ep-btn.sm:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }

/* top bar */
.ep-top { display: flex; align-items: stretch; height: 58px; }
.ep-top > div { display: flex; align-items: center; }
.ep-seg { border-right: 1.5px solid var(--ink); padding: 0 16px; gap: 10px; }
.ep-badge-ep { background: var(--or); color: #fff; font-weight: 700; font-size: 22px; padding: 0 14px; height: 100%; display: flex; align-items: center; border-right: 1.5px solid var(--ink); }
.ep-badge-133 { background: var(--ink); color: var(--paper); font-weight: 700; font-size: 22px; padding: 0 12px; height: 100%; display: flex; align-items: center; }
.ep-led { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); }
.ep-led.off { background: var(--muted2); animation: ep-blinkr 1.2s step-end infinite; }
.ep-led.on { background: var(--green); }
.ep-stack { display: flex; flex-direction: column; line-height: 1.15; }
.ep-chip { font-family: var(--mono); font-size: 11px; background: var(--ink); color: var(--paper); padding: 2px 7px; }
/* Audio-in monitor toggle + master VU */
.ep-audioin { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border: 1.5px solid var(--ink); background: var(--inner); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.ep-audioin.on { background: var(--or); color: #fff; box-shadow: 2px 2px 0 var(--ink); }
.ep-ai-lbl { font-family: var(--sans); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.ep-vu { width: 46px; height: 8px; background: var(--ink); border: 1px solid var(--ink); overflow: hidden; position: relative; }
.ep-audioin.on .ep-vu { background: rgba(0,0,0,.35); }
.ep-vu .fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--green) 0%, var(--green) 65%, #ffd23f 82%, #ff4a00 100%); transition: width .05s linear; }
.ep-readout { display: flex; align-items: baseline; gap: 5px; background: var(--ink); padding: 6px 12px; border: 1.5px solid var(--ink); }
.ep-readout .big { font-family: var(--mono); font-size: 16px; font-weight: 700; }
.ep-readout .unit { font-family: var(--mono); font-size: 9px; color: var(--muted2); }
.ep-grow { flex: 1; }

/* sample library sidebar */
/* tabs protrude past the right border (official file-cabinet look), so the
   sidebar reserves the tab width as outside margin and stacks above the center */
.ep-sidebar { width: 208px; flex: 0 0 208px; margin-right: 42px; display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 8; overflow: visible; }
.ep-side-main { flex: 1; display: flex; min-height: 0; }
.ep-side-x.on { background: var(--or); border-color: var(--or); }
.ep-side-head { display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--paper); padding: 8px 10px; border-bottom: 1.5px solid var(--ink); }
.ep-side-x { width: 18px; height: 18px; border: 1.5px solid var(--paper); background: transparent; color: var(--paper); font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; padding: 0; font-family: var(--mono); }
.ep-side-x:hover { background: var(--or); border-color: var(--or); }
.ep-side-list { flex: 1; overflow-y: auto; padding: 4px; scrollbar-width: thin; scrollbar-color: #b6b5b0 transparent; }
.ep-side-list::-webkit-scrollbar { width: 6px; }
.ep-side-list::-webkit-scrollbar-thumb { background: #b6b5b0; }
.ep-side-list::-webkit-scrollbar-track { background: transparent; }
.ep-samp { display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-bottom: 1px solid var(--hair); cursor: grab; }
.ep-samp:hover { background: var(--hover); }
.ep-samp:active { cursor: grabbing; }
.ep-samp.sel { background: var(--or); }
.ep-samp.sel .num, .ep-samp.sel .nm { color: #fff; }
.ep-samp .nm { text-transform: uppercase; letter-spacing: 0.03em; }
.ep-samp .dot { width: 8px; height: 8px; border-radius: 50%; background: #c9c6bf; flex: 0 0 8px; }
.ep-samp .dot.used { background: var(--or); }
.ep-samp.sel .dot { background: #fff; }
.ep-samp.empty { cursor: default; }
.ep-samp.empty:hover { background: transparent; }
.ep-samp.empty .dot { background: #e4e2dd; }
.ep-samp.empty .num { color: #c9c6bf; }
.ep-samp.empty .nm { color: #c9c6bf; font-size: 9px; letter-spacing: 0.08em; }
/* file-cabinet category tabs: hanging OFF the panel's right edge, sticking out
   over the page background like the official tool. */
.ep-side-main { position: relative; }
.ep-side-cats { position: absolute; top: 10px; left: 100%; margin-left: -1.5px; z-index: 9; display: flex; flex-direction: column; gap: 4px; }
.ep-cat { font-family: var(--mono); font-size: 7px; font-weight: 700; letter-spacing: 0.03em; padding: 5px 7px; border: 1.5px solid var(--ink); border-left: none; background: var(--paper); color: var(--ink); cursor: pointer; text-align: left; min-width: 40px; box-shadow: 2px 2px 0 rgba(23, 23, 26, 0.5); }
.ep-cat:hover { background: var(--hover); }
.ep-cat.on { background: var(--or); color: #fff; min-width: 48px; }
.ep-samp .num { font-family: var(--mono); font-size: 9px; color: var(--muted2); width: 26px; flex: 0 0 26px; }
.ep-samp .nm { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-drop-hi { outline: 2px solid var(--or); outline-offset: -2px; background: rgba(255, 74, 0, 0.12) !important; }

/* center panel — body is chrome-less: lanes float on the desk grid */
.ep-center { position: relative; display: flex; flex-direction: column; min-width: 0; }
.ep-panel.ep-center { background: transparent; border: none; box-shadow: none; }
.ep-pattern { min-width: 0; }
.ep-tabs { background: var(--ink); display: flex; align-items: stretch; height: 38px; border-bottom: 1.5px solid var(--ink); }
.ep-tab { padding: 0 18px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; border: none; border-right: 1.5px solid #3a3a40; cursor: pointer; background: transparent; color: var(--muted2); font-family: var(--sans); }
.ep-tab.active { background: var(--or); color: #fff; }
.ep-tab.queued { color: var(--or); animation: ep-blinkr 0.6s step-end infinite; }
.ep-tab.queued.active { color: #fff; }
.ep-ctx { display: flex; align-items: center; padding: 0 14px; font-family: var(--mono); font-size: 10px; color: var(--muted2); }
.ep-tabctl { display: flex; align-items: center; gap: 6px; padding: 0 10px; }

/* arrange */
.ep-arrange { flex: 1; overflow: auto; padding: 20px; display: flex; align-items: flex-start; gap: 14px; }
.ep-block { flex: 0 0 auto; background: var(--inner); border: 1.5px solid var(--ink); display: flex; flex-direction: column; cursor: grab; box-shadow: 3px 3px 0 var(--ink); }
.ep-block.current { box-shadow: 3px 3px 0 var(--ink), 0 0 0 2px var(--or); }
.ep-block-head { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-bottom: 1.5px solid var(--ink); cursor: pointer; background: var(--ink); color: #fff; }
.ep-block-head.cur { background: var(--or); }
.ep-block-body { display: flex; flex-direction: column; gap: 5px; padding: 9px 10px; }
.ep-arow { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.ep-arow:hover { opacity: 0.75; }
.ep-badge-sm { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); flex: 0 0 16px; }
.ep-mini { flex: 1; display: grid; grid-template-columns: repeat(16, 1fr); gap: 1px; height: 12px; }
.ep-mini-empty { flex: 1; height: 12px; border: 1px dashed #b6b5b0; }
.ep-block-foot { display: flex; border-top: 1px solid var(--hair); }
.ep-block-foot button { border: none; background: none; font-family: var(--mono); font-size: 8px; letter-spacing: 0.1em; color: var(--muted); cursor: pointer; padding: 4px; }
.ep-block-foot button + button { border-left: 1px solid var(--hair); }
.ep-block-foot button:hover { color: var(--or); }
.ep-add { flex: 0 0 auto; width: 80px; align-self: stretch; min-height: 150px; border: 1.5px dashed var(--muted2); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.ep-add:hover { border-color: var(--ink); color: var(--ink); }

/* pattern editor */
.ep-pattern { flex: 1; min-height: 0; overflow: hidden; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ep-pat-head { display: flex; align-items: center; gap: 10px; }
.ep-title { font-weight: 700; font-size: 13px; letter-spacing: 0.06em; }
.ep-sub { font-family: var(--mono); font-size: 9px; color: var(--muted); }
.ep-icon-btn { width: 26px; height: 26px; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.ep-mm { width: 150px; height: 26px; border: 1.5px solid var(--ink); background: var(--inner); position: relative; overflow: hidden; box-shadow: 2px 2px 0 var(--ink); margin-left: 4px; cursor: pointer; touch-action: none; }
.ep-mm-view { position: absolute; top: 0; bottom: 0; border: 1.5px solid var(--or); background: rgba(255, 74, 0, 0.14); pointer-events: none; box-sizing: border-box; }
.ep-roll { flex: 1; overflow: auto; min-height: 120px; }
.ep-barhead { height: 18px; position: relative; margin-left: 150px; margin-top: 6px; }
.ep-barhead span { position: absolute; top: 0; bottom: 0; font-family: var(--mono); font-size: 8px; font-weight: 700; color: var(--ink); border-left: 2px solid var(--ink); padding-left: 5px; }
.ep-lane { border: 1.5px solid var(--ink); background: var(--inner); margin-top: 10px; position: relative; display: flex; box-shadow: 4px 4px 0 rgba(23, 23, 26, 0.9); }
.ep-lane-main { flex: 1; min-width: 0; position: relative; }
/* vertical group-fader strip (the mixer, merged into the lane) */
.ep-vstrip { position: sticky; left: 0; z-index: 5; flex: 0 0 30px; width: 30px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 0 6px; background: var(--panel); border-right: 1.5px solid var(--ink); }
.ep-vstrip .ep-vfader.lane { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 0; width: 100%; cursor: ns-resize; touch-action: none; }
.ep-vstrip .track { flex: 1; width: 5px; min-height: 24px; background: #d8d6d0; border: 1px solid var(--ink); position: relative; }
.ep-vstrip .cap { position: absolute; left: -5px; width: 13px; height: 7px; background: var(--ink); border: 1px solid var(--ink); }
.ep-vstrip .val { font-family: var(--mono); font-size: 6px; color: var(--muted); letter-spacing: 0; white-space: nowrap; }
.ep-vamp { width: 20px; height: 18px; flex: none; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 9px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ep-vamp.on { background: var(--or); color: #fff; }
/* per-pad amplitude bar inside the pad cell */
.ep-padamp { position: absolute; left: 4px; right: 4px; bottom: 2px; height: 6px; background: #dddbd5; border: 1px solid var(--ink); cursor: ew-resize; touch-action: none; z-index: 4; }
.ep-padamp .fill { height: 100%; background: var(--or); }
.ep-lane-head { padding: 6px 10px; cursor: pointer; border-bottom: 1px solid var(--hair); display: flex; align-items: center; gap: 8px; }
.ep-lane-head:hover { background: var(--hover); }
.ep-badge-md { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); }
.ep-badge-md.active, .ep-badge-sm.active { background: var(--ink); color: var(--paper); }
.ep-collapsed { display: flex; cursor: pointer; }
.ep-lane-label { width: 120px; flex: 0 0 120px; display: flex; align-items: center; padding: 0 10px; font-family: var(--mono); font-size: 7px; color: var(--muted2); letter-spacing: 0.08em; border-right: 1.5px solid var(--ink); position: sticky; left: 30px; z-index: 3; background: var(--inner); }
.ep-mini-strip { flex: 1; position: relative; height: 56px; }
.ep-mini-note { position: absolute; height: 3px; }
.ep-prow { display: flex; border-top: 1px solid var(--hover2); }
.ep-prow.empty-lane .ep-notelane { opacity: 0.5; background-color: #eceae4; }
.ep-prow.empty-lane .ep-pcell { color: var(--muted2); }
.ep-pcell.pad-empty .nm { color: var(--muted2); }
.ep-pcell.pad-empty .smp { opacity: 0.6; }
.ep-pcell { width: 120px; flex: 0 0 120px; display: flex; align-items: center; gap: 5px; padding: 2px 8px; cursor: pointer; background: var(--inner); border-right: 1.5px solid var(--ink); position: sticky; left: 30px; z-index: 3; }
.ep-pcell.sel { background: var(--hair2); }
.ep-pcell:hover { background: var(--hover); }
.ep-pcell .nm { font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; }
.ep-pcell .smp { font-family: var(--mono); font-size: 7px; color: var(--muted2); white-space: nowrap; overflow: hidden; }
.ep-keys-chip { height: 16px; padding: 0 5px; font-family: var(--mono); font-size: 7px; border: 1px solid var(--ink); background: var(--inner); cursor: pointer; }
.ep-keys-chip:hover { background: var(--or); color: #fff; }
.ep-notelane { flex: 0 0 auto; position: relative; height: 26px; cursor: crosshair; }
.ep-note { position: absolute; top: 5px; bottom: 5px; border: 1px solid var(--ink); cursor: grab; touch-action: none; }
.ep-note:hover { filter: brightness(1.1); }
.ep-note.sel { background: var(--or) !important; outline: 1.5px solid var(--ink); outline-offset: -1px; z-index: 2; }
.ep-notelane, .ep-keyrow { touch-action: none; }
.ep-marquee { position: absolute; border: 1px solid var(--or); background: rgba(255, 74, 0, 0.12); pointer-events: none; z-index: 6; }
.ep-region { position: absolute; top: 0; bottom: 0; background: rgba(255, 74, 0, 0.14); border-left: 1px solid var(--or); border-right: 1px solid var(--or); pointer-events: none; z-index: 1; }
.ep-region.caret { width: 0; background: none; border-right: none; border-left: 2px solid var(--or); margin-left: -1px; }
.ep-bp { position: absolute; width: 10px; height: 10px; margin: -5px; border: 1.5px solid var(--ink); background: var(--paper, #f2f1ed); border-radius: 50%; cursor: grab; touch-action: none; z-index: 3; }
.ep-bp:hover { background: var(--or); }
.ep-auto-body[data-autobody] { cursor: crosshair; }
.ep-roll, .ep-keysview { user-select: none; -webkit-user-select: none; }
/* contain horizontal overscroll so a wheel/trackpad swipe never chains up to
   the page and triggers browser back/forward navigation. */
.ep-roll, .ep-keysview, .ep-wavescroll, .ep-side-list, .ep-arrange { overscroll-behavior-x: contain; }
.ep-auto-row { display: flex; border-top: 1.5px solid var(--ink); }
.ep-auto-label { width: 120px; flex: 0 0 120px; display: flex; align-items: center; gap: 5px; padding: 2px 8px; cursor: pointer; border-right: 1.5px solid var(--ink); position: sticky; left: 30px; z-index: 3; background: var(--inner); }
.ep-auto-body { flex: 0 0 auto; position: relative; cursor: pointer; }
.ep-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--or); pointer-events: none; z-index: 5; }
.ep-barhead { cursor: crosshair; user-select: none; }
.ep-barhead.moving { cursor: grabbing; }
.ep-loopband { position: absolute; top: 0; bottom: 0; background: var(--or); opacity: .28; pointer-events: none; z-index: 1; }
.ep-loopover { position: absolute; top: 24px; bottom: 0; background: var(--or); opacity: .07; pointer-events: none; z-index: 0; }
/* Settings overlay */
.ep-modal-scrim { position: fixed; inset: 0; background: rgba(10,10,12,.55); display: flex; align-items: center; justify-content: center; z-index: 200; }
.ep-settings { width: 420px; max-width: calc(100vw - 32px); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 10px; box-shadow: 0 18px 60px rgba(0,0,0,.4); overflow: hidden; }
.ep-settings-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1.5px solid var(--ink); }
.ep-set-row { padding: 16px 14px; }
.ep-set-label { display: flex; flex-direction: column; gap: 3px; font-weight: 700; font-size: 10px; letter-spacing: .1em; margin-bottom: 10px; }
.ep-set-sub { font-weight: 400; font-size: 9px; letter-spacing: .02em; color: var(--muted); }
.ep-chgrid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.ep-chchip { height: 30px; border: 1.5px solid var(--ink); border-radius: 5px; background: var(--paper); font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ink); cursor: pointer; }
.ep-chchip:hover { background: rgba(0,0,0,.06); }
.ep-chchip.on { background: var(--or); color: #fff; border-color: var(--or); }
.ep-set-foot { padding: 0 14px 14px; font-size: 9px; color: var(--muted2); }

/* keys mode */
.ep-keysview { flex: 1; overflow: auto; min-height: 0; border: 1.5px solid var(--ink); background: var(--inner); }
.ep-keycol { width: 56px; flex: 0 0 56px; position: sticky; left: 0; z-index: 6; background: var(--panel); border-right: 1.5px solid var(--ink); }
.ep-keyrow-label { height: 16px; display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; font-family: var(--mono); font-size: 7px; border-bottom: 1px solid var(--hair2); }
.ep-keyrow { height: 16px; border-bottom: 1px solid var(--hover2); cursor: crosshair; }
.ep-keynote { position: absolute; height: 13px; border: 1px solid var(--ink); cursor: grab; touch-action: none; }
.ep-keynote:hover { filter: brightness(1.1); }
.ep-keynote.sel { background: var(--or) !important; outline: 1.5px solid var(--ink); outline-offset: -1px; z-index: 2; }

/* disconnected overlay */
.ep-disc { position: absolute; inset: 38px 0 0 0; background: rgba(181, 185, 192, 0.85); display: flex; align-items: center; justify-content: center; z-index: 20; backdrop-filter: blur(2px); }
.ep-disc-card { background: var(--panel); border: 1.5px solid var(--ink); box-shadow: 5px 5px 0 rgba(23, 23, 26, 0.9); padding: 36px 44px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.ep-proj-grid { display: grid; grid-template-columns: repeat(3, 78px); gap: 8px; margin-top: 6px; }
.ep-proj-btn { height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; }
.ep-proj-btn:hover { background: var(--or); color: #fff; }
.ep-proj-btn .pn { font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: 0.02em; }
.ep-proj-btn .lbl { font-family: var(--mono); font-size: 7px; letter-spacing: 0.1em; color: var(--muted); }
.ep-proj-btn:hover .lbl { color: rgba(255, 255, 255, 0.7); }
.ep-proj-empty { height: 72px; border: 1.5px dashed var(--hair); }

/* inspector */
.ep-insp { position: fixed; top: 90px; right: 24px; width: 300px; max-height: calc(100vh - 210px); z-index: 45; background: var(--panel); border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 rgba(23, 23, 26, 0.9); display: flex; flex-direction: column; }
.ep-insp-resize { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; z-index: 3; touch-action: none; }
.ep-insp-resize::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); }
.ep-insp-head { background: var(--or); color: #fff; padding: 8px 12px; font-weight: 700; letter-spacing: 0.14em; font-size: 11px; border-bottom: 1.5px solid var(--ink); display: flex; justify-content: space-between; align-items: center; cursor: grab; touch-action: none; }
.ep-insp-head:active { cursor: grabbing; }
.ep-irow.editable { cursor: ew-resize; touch-action: none; }
.ep-irow.editable:hover { background: var(--hover); }
.ep-irow.editable:hover .bar { border-color: var(--or); }
.ep-insp-tag { font-family: var(--mono); font-size: 9px; font-weight: 400; background: rgba(0, 0, 0, 0.25); padding: 1px 7px; }
.ep-insp-x { width: 18px; height: 18px; border: 1.5px solid #fff; background: transparent; color: #fff; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--mono); }
.ep-insp-x:hover { background: var(--ink); }
.ep-insp-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.ep-wave { background: var(--ink-deep); border: 1.5px solid var(--ink); padding: 10px 8px; display: flex; align-items: center; gap: 1.5px; height: 76px; }
.ep-wave div { flex: 1; background: var(--green); }
/* sample block: integrated dark viewer flush to the inspector title bar */
.ep-insp.wide { width: 560px; }
.ep-sampleblock { background: var(--ink-deep); border-bottom: 1.5px solid var(--ink); }
.ep-shead { display: flex; align-items: center; gap: 9px; padding: 9px 10px; min-width: 0; }
.ep-shead .pbadge { display: flex; flex: none; }
.ep-shead .pbadge b { min-width: 19px; height: 19px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--or); color: #ecebe7; font-family: var(--mono); font-size: 10px; font-weight: 700; padding: 0 3px; }
.ep-shead .pbadge b + b { border-left: none; }
.ep-shead .slot { font-family: var(--mono); font-size: 12px; font-weight: 700; color: #8a8a92; }
.ep-shead .nm { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.05em; color: #ecebe7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-splay { width: 26px; height: 26px; flex: none; border: 1.5px solid #4a4a52; background: transparent; color: #ecebe7; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ep-splay:hover { border-color: var(--or); color: var(--or); }
.ep-wavebox2 { position: relative; border-top: 1px solid #26262c; border-bottom: 1px solid #26262c; background: var(--ink-deep); overflow: hidden; }
.ep-wavescroll { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #3a3a40 var(--ink-deep); }
.ep-wavecontent { position: relative; height: 100%; background-color: var(--ink-deep); background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0, rgba(255, 255, 255, 0.055) 1px, transparent 1px, transparent 22px), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0, rgba(255, 255, 255, 0.045) 1px, transparent 1px, transparent 16px); }
.ep-wavecontent.empty { display: flex; align-items: center; justify-content: center; }
.ep-wavecontent.empty span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; color: #6d6d74; }
.ep-inout { position: absolute; top: 0; bottom: 0; width: 12px; margin-left: -2px; cursor: ew-resize; touch-action: none; z-index: 4; }
.ep-inout::before { content: ""; position: absolute; top: 0; bottom: 0; left: 2px; width: 2px; background: var(--or); }
.ep-inout .tag { position: absolute; top: 0; left: 2px; background: var(--or); color: #fff; font-family: var(--mono); font-size: 7px; font-weight: 700; letter-spacing: 0.08em; padding: 2px 5px; pointer-events: none; }
.ep-wexp { position: absolute; bottom: 4px; right: 4px; z-index: 5; width: 20px; height: 20px; border: 1px solid #4a4a52; background: rgba(16, 16, 20, 0.8); color: #d8d7d2; font-size: 11px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ep-wexp:hover { border-color: var(--or); color: var(--or); }
.ep-waveinfo { display: flex; align-items: center; gap: 7px; padding: 5px 10px; font-family: var(--mono); min-width: 0; }
.ep-waveinfo .k { font-size: 7px; letter-spacing: 0.1em; color: #6d6d74; }
.ep-waveinfo .dur { font-size: 10px; font-weight: 700; color: #ecebe7; }
.ep-waveinfo .kb { font-size: 10px; font-weight: 700; color: var(--green); }
/* numboxes inside the dark block */
.ep-sampleblock .ep-numrow { border-top: 1px solid #26262c; }
.ep-sampleblock .ep-numbox { border: none; border-right: 1px solid #26262c; background: transparent; }
.ep-sampleblock .ep-numbox:last-child { border-right: none; }
.ep-sampleblock .ep-numbox .lbl { color: #6d6d74; }
.ep-sampleblock .ep-numbox .val { color: #ecebe7; }
.ep-sampleblock .ep-numinput { background: #232327; color: #ecebe7; }
/* pad-inspector control cluster */
.ep-padctl { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; }
.ep-padctl .lbl { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; color: var(--muted); }
.ep-pslider { display: flex; flex-direction: column; gap: 4px; }
.ep-pslider .row { display: flex; justify-content: space-between; align-items: baseline; }
.ep-pslider .row .val { font-family: var(--mono); font-weight: 700; font-size: 11px; color: var(--ink); }
.ep-pslider .bar { position: relative; height: 15px; background: #e4e2dd; border: 1.5px solid var(--ink); cursor: ew-resize; touch-action: none; overflow: hidden; }
.ep-pslider .fill { position: absolute; top: 0; bottom: 0; left: 0; background: rgba(255, 74, 0, .28); }
.ep-pslider .knob { position: absolute; top: -1px; bottom: -1px; width: 5px; margin-left: -2.5px; background: var(--ink); }
.ep-pslider .hint { font-family: var(--mono); font-size: 7px; letter-spacing: .04em; color: var(--muted2); }
.ep-seg-row { display: flex; align-items: center; gap: 8px; }
.ep-seg-row > .lbl { width: 46px; flex: none; }
.ep-seg-btns { display: flex; flex: 1; min-width: 0; }
.ep-mbtn { font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: .02em; min-height: 24px; padding: 0 6px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.ep-seg-btns .ep-mbtn { flex: 1; min-width: 0; overflow: hidden; }
.ep-seg-btns .ep-mbtn + .ep-mbtn { border-left: none; }
.ep-mbtn.on { background: var(--ink); color: var(--paper); }
.ep-numrow { display: flex; }
.ep-numbox { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; border: 1.5px solid var(--ink); background: var(--paper); cursor: ns-resize; touch-action: none; }
.ep-numbox + .ep-numbox { border-left: none; }
.ep-numbox .lbl { font-size: 7px; }
.ep-numbox .val { font-family: var(--mono); font-weight: 700; font-size: 11px; color: var(--ink); }
.ep-numbox.dis { opacity: .4; cursor: default; }
/* Temporarily reassigned (keys-mode playback/audition): striped + not editable. */
.ep-numbox.locked { cursor: not-allowed; position: relative; overflow: hidden; }
.ep-numbox.locked::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(255,74,0,.22) 4px, rgba(255,74,0,.22) 8px); }
.ep-numbox.locked .val { color: var(--or); }
.ep-numinput { width: 88%; font-family: var(--mono); font-weight: 700; font-size: 11px; text-align: center; border: 1px solid var(--or); background: #fff; padding: 0; }
.ep-sig .big.sig { color: var(--paper); cursor: ns-resize; touch-action: none; padding: 0 1px; }
.ep-sig .big.sig:hover { color: var(--or); }
.ep-siginput { width: 1.2em; font-family: var(--mono); font-weight: 700; font-size: inherit; text-align: center; color: var(--ink); border: 1px solid var(--or); background: #fff; padding: 0; }
.ep-play-btn { width: 40px; height: 40px; flex: none; padding: 0; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.ep-bpm-val { cursor: ns-resize; touch-action: none; }
.ep-bpm-val:hover { color: var(--or) !important; }
.ep-bpminput { width: 3.2em; font-family: var(--mono); font-weight: 700; font-size: inherit; text-align: center; color: var(--ink); border: 1px solid var(--or); background: #fff; padding: 0; }
.ep-big { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); }
.ep-irow { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.ep-irow .k { font-family: var(--mono); font-size: 9px; color: var(--muted); width: 76px; flex: 0 0 76px; }
.ep-irow .bar { flex: 1; height: 5px; background: #d8d7d3; border: 1px solid #b6b5b0; position: relative; }
.ep-irow .bar > div { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.ep-irow .v { font-family: var(--mono); font-size: 11px; font-weight: 700; width: 64px; flex: 0 0 64px; text-align: right; }
.ep-insp-foot { border-top: 1.5px solid var(--ink); padding: 9px 12px; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 8px; }

/* mixer */
.ep-mixer { display: flex; flex-direction: column; }
.ep-mix-head { background: var(--ink); color: var(--paper); display: flex; align-items: center; gap: 12px; padding: 5px 12px; border-bottom: 1.5px solid var(--ink); cursor: pointer; }
.ep-mix-grid { display: grid; grid-template-columns: repeat(4, minmax(340px, 1fr)); overflow-x: auto; }
.ep-ch { border-right: 1px solid var(--hair); display: flex; flex-direction: column; }
.ep-ch.active { background: var(--hover); }
.ep-ch-top { display: flex; align-items: center; gap: 10px; padding: 12px; }
[data-mix] { touch-action: none; cursor: ew-resize; }
.ep-vfader[data-mix] { cursor: default; }
.ep-vfader[data-mix] .track { cursor: ns-resize; }
.ep-fader { height: 12px; background: var(--ink); position: relative; }
.ep-fader .fill { position: absolute; left: 0; top: 2px; bottom: 2px; background: var(--muted); }
.ep-fader .cap { position: absolute; top: -3px; width: 10px; height: 18px; background: var(--inner); border: 1.5px solid var(--ink); }
.ep-ch-params { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; padding: 8px 12px 12px; border-top: 1px dashed #b6b5b0; }
.ep-vfader { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ep-vfader .track { width: 6px; height: 110px; background: var(--ink); position: relative; }
.ep-vfader .cap { position: absolute; left: -4px; width: 14px; height: 7px; background: var(--inner); border: 1px solid var(--ink); }
.ep-vfader .lbl { font-family: var(--mono); font-size: 7px; color: var(--muted); }
.ep-vfader .val { font-family: var(--mono); font-size: 8px; font-weight: 700; }
