/* =========================================================
   clean PRO · Model C-02 Hardware UI Stylesheet
   Tactile Braun / Teenage Engineering inspired workstation
   ========================================================= */

:root {
  --bg: #d8d5ce;
  --bg-glow: #f1efea;
  --panel-top: #f8f7f3;
  --panel-bot: #e9e7e1;
  --panel-inset: #dfddd6;
  --panel-border: #c6c2b8;
  --panel-bevel-top: rgba(255, 255, 255, 0.85);
  --panel-shadow: 0 12px 28px rgba(32, 28, 20, 0.12), 0 2px 5px rgba(32, 28, 20, 0.08);

  --ink: #383633;
  --ink-strong: #141312;
  --ink-muted: #76726a;
  --divider: #cfcbc3;

  --key-top: #fcfbf8;
  --key-bot: #e6e3dc;
  --key-edge: #b9b5ab;
  --key-ink: #2b2926;

  --orange-top: #ffcb6e;
  --orange-bot: #ff992b;
  --orange-edge: #c95e00;
  --orange-ink: #211200;

  --knob-outer: #d7d3ca;
  --knob-cap-top: #f4f2ec;
  --knob-cap-bot: #cac6bc;
  --knob-pointer: #ff7a00;

  --lcd-a: #ffeab3;
  --lcd-b: #f6cd74;
  --lcd-c: #e5a846;
  --lcd-ink: rgba(42, 22, 4, 0.82);
  --lcd-border: #b68838;

  --led-off: #7d786f;
  --led-on: #ff8c1a;
  --led-glow: rgba(255, 140, 26, 0.65);

  --font-sans: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --font-lcd: "VT323", "JetBrains Mono", monospace;
}

html[data-theme="dark"] {
  --bg: #141413;
  --bg-glow: #282725;
  --panel-top: #2c2b29;
  --panel-bot: #21201e;
  --panel-inset: #191817;
  --panel-border: #3a3835;
  --panel-bevel-top: rgba(255, 255, 255, 0.06);
  --panel-shadow: 0 16px 36px rgba(0, 0, 0, 0.48), 0 2px 6px rgba(0, 0, 0, 0.35);

  --ink: #d4d0c8;
  --ink-strong: #f4f1ea;
  --ink-muted: #8c877d;
  --divider: #383633;

  --key-top: #3e3c39;
  --key-bot: #2b2a28;
  --key-edge: #121110;
  --key-ink: #ece8e0;

  --knob-outer: #1d1c1a;
  --knob-cap-top: #4b4945;
  --knob-cap-bot: #22211f;
  --knob-pointer: #ff9a2e;

  --led-off: #4a3320;
  --led-on: #ff9a2e;
  --led-glow: rgba(255, 154, 46, 0.78);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: radial-gradient(circle at 50% 0%, var(--bg-glow) 0%, var(--bg) 70%);
  -webkit-font-smoothing: antialiased;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4 3l14 9.5-6.2 1.6-2.8 5.9z' fill='%23181715' stroke='%23ff9d34' stroke-width='1.4' stroke-linejoin='round'/%3E%3Ccircle cx='4.5' cy='3.5' r='1.6' fill='%23ff9d34'/%3E%3C/svg%3E") 4 3, auto;
}

button,
select,
input[type="range"],
.pill-btn,
.mini-key,
.key,
.chip-toggle,
.led-switch,
.seg-switch__btn,
.eq-preset-chip,
.lcd-select {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='7.5' cy='7.5' r='4.2' fill='%23181715'/%3E%3Ccircle cx='20.5' cy='7.5' r='4.2' fill='%23181715'/%3E%3Ccircle cx='14' cy='15' r='9.5' fill='%23ffffff' stroke='%23181715' stroke-width='1.5'/%3E%3Cellipse cx='10.2' cy='14' rx='2.4' ry='3' transform='rotate(-15 10.2 14)' fill='%23181715'/%3E%3Cellipse cx='17.8' cy='14' rx='2.4' ry='3' transform='rotate(15 17.8 14)' fill='%23181715'/%3E%3Ccircle cx='10.4' cy='13.4' r='0.9' fill='%23ffffff'/%3E%3Ccircle cx='17.6' cy='13.4' r='0.9' fill='%23ffffff'/%3E%3Ccircle cx='7.8' cy='17.5' r='1.5' fill='%23ff9aa2' opacity='0.85'/%3E%3Ccircle cx='20.2' cy='17.5' r='1.5' fill='%23ff9aa2' opacity='0.85'/%3E%3Cellipse cx='14' cy='16.8' rx='1.6' ry='1.1' fill='%23181715'/%3E%3Cpath d='M12.2 18.6q1.8 1.5 3.6 0' fill='none' stroke='%23181715' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") 14 14, auto !important;
}

html[data-theme="dark"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

/* Mode visibility */
html[data-mode="basic"] .adv-only {
  display: none !important;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 20px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Drop Overlay */
.drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 15, 0.72);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.drop-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.drop-overlay__box {
  border: 2px dashed #ff9d34;
  background: var(--panel-top);
  color: var(--ink-strong);
  padding: 40px 56px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.drop-overlay__icon {
  font-size: 32px;
  color: #ff8c1a;
  margin-bottom: 8px;
}

.drop-overlay__title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.16em;
}

.drop-overlay__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 6px;
}

/* Compact Sticky Mini-Transport */
.mini-transport {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bot));
  border-bottom: 1px solid var(--panel-border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  transform: translateY(-110%);
  transition: transform 0.2s ease;
}

.mini-transport.is-visible {
  transform: translateY(0);
}

.mini-transport__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-transport__brand,
.mini-transport__controls,
.mini-transport__readout {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff8c1a;
  box-shadow: 0 0 8px rgba(255, 140, 26, 0.8);
}

.mini-filename {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lcd-mini {
  font-family: var(--font-lcd);
  font-size: 17px;
  padding: 2px 8px;
  border-radius: 4px;
  background: radial-gradient(circle, var(--lcd-a), var(--lcd-c));
  color: var(--lcd-ink);
  border: 1px solid var(--lcd-border);
}

/* Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.wordmark {
  margin: 0;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--ink-strong);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.wordmark__badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 3px 6px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--orange-top), var(--orange-bot));
  color: var(--orange-ink);
  vertical-align: middle;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nameplate {
  display: flex;
  flex-direction: column;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.35;
  letter-spacing: 0.15em;
  color: var(--ink-muted);
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--divider);
}

/* Panels */
.panel {
  background: linear-gradient(180deg, var(--panel-top) 0%, var(--panel-bot) 100%);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: var(--panel-shadow), inset 0 1px 0 var(--panel-bevel-top);
  padding: 16px;
}

/* Segmented Switch */
.seg-switch {
  display: inline-flex;
  background: var(--panel-inset);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.seg-switch--vertical {
  flex-direction: column;
  width: 100%;
}

.seg-switch--sm {
  padding: 2px;
  border-radius: 6px;
}

.seg-switch--xs {
  padding: 2px;
  border-radius: 6px;
}

.seg-switch__btn {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: center;
}

.seg-switch--sm .seg-switch__btn {
  font-size: 10px;
  padding: 4px 9px;
}

.seg-switch--xs .seg-switch__btn {
  font-size: 9.5px;
  padding: 3px 7px;
}

.seg-switch__btn:hover:not(:disabled):not(.is-active) {
  color: var(--ink-strong);
  background: rgba(255, 140, 26, 0.12);
}

.seg-switch__btn.is-active {
  background: linear-gradient(180deg, var(--key-top), var(--key-bot));
  color: var(--ink-strong);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

.seg-switch__btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

/* Pill & Tactile Mechanical Keys */
.pill-btn,
.mini-key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, var(--key-top), var(--key-bot));
  color: var(--key-ink);
  cursor: pointer;
  box-shadow: 0 2px 0 var(--key-edge);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mini-key {
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 10px;
}

.pill-btn:hover:not(:disabled),
.mini-key:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #ff9d34;
  box-shadow: 0 3px 0 var(--key-edge), 0 4px 10px rgba(255, 140, 26, 0.18);
  color: var(--ink-strong);
}

.pill-btn:active,
.mini-key:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--key-edge);
}

.pill-badge {
  background: #ff8c1a;
  color: #1f1000;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 9.5px;
  font-weight: 700;
}

.key {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 15px;
  border-radius: 7px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, var(--key-top), var(--key-bot));
  color: var(--key-ink);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--key-edge), 0 4px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.07s ease, box-shadow 0.07s ease, filter 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  user-select: none;
}

.key:hover:not(:disabled) {
  transform: translateY(-1.5px);
  border-color: #ff9d34;
  box-shadow: 0 4px 0 var(--key-edge), 0 8px 16px rgba(0, 0, 0, 0.16);
  filter: brightness(1.04);
}

.key--orange:hover:not(:disabled) {
  border-color: #ffb85c;
  box-shadow: 0 4px 0 var(--orange-edge), 0 8px 20px rgba(255, 140, 26, 0.45);
  filter: brightness(1.06);
}

.key:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--key-edge);
}

.key:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.key--sm {
  padding: 6px 11px;
  font-size: 10px;
}

.key--xl {
  width: 100%;
  padding: 13px 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
}

.key--orange {
  border-color: #d97714;
  background: linear-gradient(180deg, var(--orange-top), var(--orange-bot));
  color: var(--orange-ink);
  box-shadow: 0 3px 0 var(--orange-edge), 0 4px 10px rgba(218, 107, 0, 0.25);
}

.key--orange:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--orange-edge);
}

.key--danger {
  border-color: #b52b27;
  background: linear-gradient(180deg, #ff7066, #d9382e);
  color: #fff;
  box-shadow: 0 3px 0 #8a1d17;
}

/* LEDs */
.led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--led-off);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
  display: inline-block;
  flex-shrink: 0;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.led--sm {
  width: 6px;
  height: 6px;
}

.led--xs {
  width: 5px;
  height: 5px;
}

.led.is-on {
  background: radial-gradient(circle at 35% 35%, #fffbe8 0%, var(--led-on) 55%, #b84b00 100%);
  box-shadow: 0 0 8px var(--led-glow), 0 0 2px #fff;
}

.led--red.is-on {
  background: radial-gradient(circle at 35% 35%, #ffe6e6 0%, #ff3b30 60%, #a30000 100%);
  box-shadow: 0 0 9px rgba(255, 59, 48, 0.85);
}

.led-switch {
  border: 1px solid var(--panel-border);
  background: var(--panel-inset);
  border-radius: 999px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.led-switch:hover {
  transform: scale(1.08);
  border-color: #ff9d34;
  box-shadow: 0 0 8px rgba(255, 140, 26, 0.35);
}

.chip-toggle {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, var(--key-top), var(--key-bot));
  color: var(--key-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 0 var(--key-edge);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.chip-toggle:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #ff9d34;
  box-shadow: 0 2px 0 var(--key-edge), 0 4px 10px rgba(255, 140, 26, 0.18);
}

.chip-toggle--sm {
  font-size: 9.5px;
  padding: 4px 8px;
}

/* Player Enclosure */
.player-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.screen-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.screen-toolbar__left,
.screen-toolbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--panel-inset);
  border: 1px solid var(--panel-border);
  color: var(--ink-muted);
}

.status-pill--warn {
  color: #c95200;
  border-color: rgba(255, 140, 26, 0.45);
}

.zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.zoom-slider {
  width: 72px;
  accent-color: #ff8c1a;
  height: 4px;
}

.zoom-readout {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  min-width: 34px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.player-stage {
  display: grid;
  grid-template-columns: 1fr 204px;
  gap: 12px;
  align-items: stretch;
}

.display-area {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.videobox {
  width: 32%;
  min-width: 180px;
  background: #0d0d0d;
  border-radius: 8px;
  border: 2px solid var(--panel-border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.videobox video {
  width: 100%;
  height: 168px;
  object-fit: contain;
  display: block;
}

.videobox__tag {
  position: absolute;
  top: 6px;
  left: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.72);
  color: #ff9d34;
}

/* Backlit Amber LCD */
.lcd-screen {
  flex: 1;
  min-width: 0;
  height: 172px;
  border-radius: 8px;
  border: 2px solid var(--lcd-border);
  background: radial-gradient(ellipse at 50% 45%, var(--lcd-a) 0%, var(--lcd-b) 58%, var(--lcd-c) 100%);
  box-shadow: inset 0 3px 12px rgba(66, 36, 4, 0.35), 0 1px 0 rgba(255, 255, 255, 0.35);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lcd-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(42, 22, 4, 0.04) 0px,
    rgba(42, 22, 4, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 2;
}

.lcd-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.22) 0%, transparent 38%);
  z-index: 3;
}

.lcd-screen.is-bypassed {
  background: radial-gradient(ellipse at 50% 45%, #d9d8d3 0%, #c4c2bc 60%, #aba8a0 100%);
  border-color: #8f8c84;
}

.lcd-screen.is-manual {
  background: radial-gradient(ellipse at 50% 45%, #d6f5c9 0%, #aee39b 60%, #83c96e 100%);
  border-color: #4f8c3d;
}

.lcd-hud {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  padding: 5px 10px 0;
  font-family: var(--font-lcd);
  font-size: 18px;
  line-height: 1;
  color: var(--lcd-ink);
  pointer-events: none;
}

.lcd-canvas {
  width: 100%;
  flex: 1;
  min-height: 0;
  height: 100%;
  display: block;
  position: relative;
  z-index: 1;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cline x1='12' y1='2' x2='12' y2='22' stroke='%23241304' stroke-width='1.5'/%3E%3Cline x1='2' y1='12' x2='22' y2='12' stroke='%23241304' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='%23ff7a00' stroke='%23241304' stroke-width='1'/%3E%3C/svg%3E") 12 12, crosshair;
}

.lcd-panbar {
  height: 10px;
  background: rgba(42, 22, 4, 0.14);
  border-top: 1px solid rgba(42, 22, 4, 0.18);
  position: relative;
  z-index: 4;
  cursor: pointer;
}

.lcd-panbar__thumb {
  height: 100%;
  background: rgba(42, 22, 4, 0.55);
  border-radius: 3px;
  position: absolute;
  left: 0;
  width: 100%;
}

/* Metering Column */
.meter-column {
  background: var(--panel-inset);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.vu-box {
  position: relative;
  border-radius: 6px;
  border: 1px solid var(--lcd-border);
  background: radial-gradient(ellipse at 50% 70%, var(--lcd-a) 0%, var(--lcd-b) 65%, var(--lcd-c) 100%);
  box-shadow: inset 0 2px 6px rgba(42, 22, 4, 0.3);
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.vu-box canvas {
  display: block;
  width: 100%;
  height: auto;
}

.vu-box__label {
  position: absolute;
  bottom: 4px;
  right: 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--lcd-ink);
}

.ppm-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ppm-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ppm-ch {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-muted);
  width: 10px;
}

.ppm-row canvas {
  flex: 1;
  background: #1a1815;
  border-radius: 3px;
  border: 1px solid var(--panel-border);
}

.ppm-scale {
  display: flex;
  justify-content: space-between;
  padding-left: 16px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--ink-muted);
}

.meter-readout {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--ink);
  padding-top: 2px;
  border-top: 1px solid var(--divider);
}

.meter-readout.is-clip {
  color: #d9382e;
}

/* Inline Trim Bar */
.inline-drawer {
  background: var(--panel-inset);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 8px 12px;
}

.inline-drawer__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
}

.inline-field input {
  width: 72px;
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid var(--panel-border);
  background: var(--panel-top);
  color: var(--ink-strong);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Transport Bar */
.transport-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.transport-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Manual Clean Inline Drawer */
.mchelp {
  border: 2px solid #ff9d34;
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bot));
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mchelp__steps {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.mchelp__badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 3px 8px;
  border-radius: 4px;
  background: #ff9d34;
  color: #211200;
}

/* Batch Drawer */
.batch-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.batch-drawer__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.batch-list {
  background: var(--panel-inset);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 8px;
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.batch-empty {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  text-align: center;
  padding: 14px;
}

.batch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  background: var(--panel-top);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.batch-item__status {
  font-size: 10px;
  color: #ff8c1a;
  font-weight: 700;
}

/* Basic Mode Grid */
.basic-grid {
  display: grid;
  grid-template-columns: 160px 1.4fr 1.1fr 220px;
  gap: 16px;
  align-items: stretch;
}

.basic-block {
  background: var(--panel-inset);
  border: 1px solid var(--panel-border);
  border-radius: 9px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.basic-block--wide {
  align-items: stretch;
}

.basic-block--export {
  align-items: stretch;
}

.block-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.mono-label.muted,
.muted {
  color: var(--ink-muted);
}

.muted-note {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-muted);
}

.block-caption {
  margin: 0;
  font-size: 11.5px;
  color: var(--ink-muted);
  text-align: center;
}

/* Preset Stepper & LCD Select */
.preset-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lcd-select-wrap {
  flex: 1;
  border-radius: 6px;
  border: 1px solid var(--lcd-border);
  background: radial-gradient(circle, var(--lcd-a), var(--lcd-c));
  box-shadow: inset 0 1px 4px rgba(42, 22, 4, 0.25);
}

.lcd-select-wrap--full {
  width: 100%;
}

.lcd-select {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 7px 10px;
  font-family: var(--font-lcd);
  font-size: 19px;
  color: var(--lcd-ink);
  cursor: pointer;
  outline: none;
}

.basic-toggles {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.mini-select {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--panel-border);
  background: var(--panel-top);
  color: var(--ink);
}

.export-filename {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Conical Rotary Knobs */
.knob-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  user-select: none;
}

.knob {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--panel-top), var(--knob-outer));
  border: 1px solid var(--panel-border);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  position: relative;
}

.knob-wrap--sm .knob {
  width: 50px;
  height: 50px;
}

.knob__cap {
  width: 76%;
  height: 76%;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--knob-cap-top), var(--knob-cap-bot));
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.28);
  position: relative;
  transform: rotate(0deg);
}

.knob__pointer {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 3px;
  height: 11px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--knob-pointer);
}

.knob__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.knob__val {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-strong);
}

/* Advanced 3-Column Rack */
.adv-rack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: stretch;
}

.rackcol {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.rackcol__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--divider);
}

.rackcol__head .led-switch,
.rackcol__head .mini-key {
  margin-left: auto;
}

.rack-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #ff8c1a;
}

.rack-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink-strong);
}

.module-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.module-card {
  background: var(--panel-inset);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.module-card--flat {
  align-items: stretch;
}

.module-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-line {
  background: var(--panel-inset);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.slider-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
}

.slider-inline input[type="range"] {
  width: 84px;
  accent-color: #ff8c1a;
}

.mono-val {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  min-width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* EQ Scope */
.eq-preset-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.eq-scope {
  background: #141312;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.eq-scope canvas {
  width: 100%;
  height: 140px;
  display: block;
}

.eq-scope__legend {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #9e998e;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 4px;
}

.dot--grey { background: #6b6861; }
.dot--amber { background: #ff9d34; }
.dot--white { background: #ffffff; }

.tone-knobs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--panel-inset);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px 6px;
}

.sat-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sat-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sat-info .block-caption {
  text-align: left;
}

/* 10-Band Vertical Faders */
.fader-bank {
  background: var(--panel-inset);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 12px 8px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  align-items: center;
}

.fader-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  user-select: none;
}

.fader-val {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.fader-track {
  width: 12px;
  height: 140px;
  border-radius: 6px;
  background: #1d1c1a;
  border: 1px solid var(--panel-border);
  position: relative;
  cursor: ns-resize;
}

.fader-zero {
  position: absolute;
  left: -3px;
  right: -3px;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
}

.fader-fill {
  position: absolute;
  left: 2px;
  right: 2px;
  background: #ff9d34;
  border-radius: 2px;
  pointer-events: none;
}

.fader-thumb {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 11px;
  margin-left: -11px;
  margin-top: -5.5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--key-top), var(--key-bot));
  border: 1px solid var(--panel-border);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.fader-freq {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-muted);
}

.eq-preset-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eq-preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 86px;
  overflow-y: auto;
  padding: 6px;
  background: var(--panel-inset);
  border: 1px solid var(--panel-border);
  border-radius: 7px;
}

.eq-preset-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, var(--key-top), var(--key-bot));
  color: var(--key-ink);
  box-shadow: 0 1px 0 var(--key-edge);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.eq-preset-chip:hover:not(.is-active) {
  transform: translateY(-1px);
  border-color: #ff9d34;
  box-shadow: 0 2px 0 var(--key-edge), 0 4px 8px rgba(255, 140, 26, 0.18);
}

.eq-preset-chip.is-active {
  border-color: #d97714;
  background: linear-gradient(180deg, var(--orange-top), var(--orange-bot));
  color: var(--orange-ink);
}

.preset-save-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.mono-input {
  flex: 1;
  min-width: 100px;
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  background: var(--panel-inset);
  color: var(--ink-strong);
  font-family: var(--font-mono);
  font-size: 11px;
}

.adv-export-box {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adv-footer-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 4px 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 15, 13, 0.68);
  backdrop-filter: blur(3px);
}

.modal__card {
  position: relative;
  z-index: 1;
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 14px;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.guide-item h3 {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--ink-strong);
}

.guide-item p {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
}

.shortcuts-table {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--panel-inset);
  border: 1px solid var(--panel-border);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 220;
  background: #1b1a18;
  color: #ffe9b0;
  border: 1px solid #ff9d34;
  border-radius: 8px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* Responsive */
@media (max-width: 1100px) {
  .adv-rack {
    grid-template-columns: 1fr 1fr;
  }
  .basic-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .player-stage {
    grid-template-columns: 1fr;
  }
  .meter-column {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .vu-box {
    width: 160px;
  }
  .ppm-box {
    flex: 1;
    min-width: 160px;
  }
  .adv-rack {
    grid-template-columns: 1fr;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .shortcuts-table {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nameplate {
    display: none;
  }
  .basic-grid {
    grid-template-columns: 1fr;
  }
  .display-area {
    flex-direction: column;
  }
  .videobox {
    width: 100%;
  }
}
