/**
 * VoiceIsolate Pro — Engineer Mode Studio Console skin
 * Premium rack aesthetic. Does not rename IDs; only layout/visual layers.
 */
/* ── Tokens (console skin) ─────────────────────────────────────────── */
body.eng-console {
  --ec-bg: #07080c;
  --ec-panel: #0e1016;
  --ec-panel-2: #12151d;
  --ec-border: rgba(255, 255, 255, 0.07);
  --ec-border-hi: rgba(56, 189, 248, 0.28);
  --ec-accent: #38bdf8;
  --ec-accent-2: #22d3ee;
  --ec-warm: #f59e0b;
  --ec-ok: #34d399;
  --ec-warn: #fbbf24;
  --ec-risk: #f87171;
  --ec-text: #e8edf5;
  --ec-muted: #8b95a8;
  --ec-radius: 12px;
  --ec-gap: 12px;
  --ec-rack-w: minmax(300px, 360px);
  --ec-session-w: minmax(260px, 300px);
  background: radial-gradient(1200px 600px at 20% -10%, rgba(56, 189, 248, 0.08), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(220, 38, 38, 0.06), transparent 50%),
    var(--ec-bg) !important;
  color: var(--ec-text);
}

body.eng-console .hdr {
  background: linear-gradient(180deg, rgba(14, 16, 22, 0.96), rgba(8, 9, 12, 0.92)) !important;
  border-bottom: 1px solid var(--ec-border) !important;
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}
body.eng-console .hdr-title {
  letter-spacing: 0.02em;
}
body.eng-console .hdr-badge {
  border: 1px solid var(--ec-border-hi);
  color: var(--ec-accent);
  background: rgba(56, 189, 248, 0.08);
}
body.eng-console .hdr-stat .hs-val {
  font-variant-numeric: tabular-nums;
  font-family: var(--fm, 'JetBrains Mono', monospace);
  color: var(--ec-text);
}
body.eng-console .hdr-stat .hs-lbl {
  color: var(--ec-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.58rem;
}

/* Console mode badge in header */
.ec-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--ec-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ec-muted);
}
.ec-mode-badge[data-mode="live"] {
  color: var(--ec-ok);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}
.ec-mode-badge[data-mode="creator"],
.ec-mode-badge[data-mode="offline"] {
  color: var(--ec-accent);
  border-color: var(--ec-border-hi);
  background: rgba(56, 189, 248, 0.08);
}

/* ── 3-column engineer rack ───────────────────────────────────────── */
body.eng-console .main-grid.ec-grid {
  max-width: 1720px;
  margin: 10px auto 24px;
  padding: 0 12px 80px;
  display: grid;
  grid-template-columns: var(--ec-session-w) minmax(0, 1.35fr) var(--ec-rack-w);
  gap: var(--ec-gap);
  align-items: start;
}
body.eng-console .ec-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--ec-gap);
}
body.eng-console .ec-col-rack {
  position: sticky;
  top: calc(var(--vip-hdr-h, 48px) + 16px);
  max-height: calc(100vh - var(--vip-hdr-h, 48px) - 24px);
  overflow-y: auto;
  overflow-x: hidden;
  /* Last control fully usable above sticky status / window chrome */
  padding-right: 4px;
  padding-bottom: max(96px, env(safe-area-inset-bottom, 0px));
  scroll-padding-bottom: 96px;
  scroll-padding-top: 56px;
  scrollbar-gutter: stable;
  z-index: 2;
  isolation: isolate;
}
/* Sticky rack nav must never cover slider thumbs */
body.eng-console .ec-col-rack .ec-rack-nav {
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(7, 8, 12, 0.99), rgba(7, 8, 12, 0.94));
}
body.eng-console .ec-col-rack::-webkit-scrollbar {
  width: 8px;
}
body.eng-console .ec-col-rack::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.25);
  border-radius: 8px;
}

/* Sticky rack nav pills */
.ec-rack-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0 10px;
  margin: 0 0 4px;
  background: linear-gradient(180deg, rgba(7, 8, 12, 0.98), rgba(7, 8, 12, 0.88));
  backdrop-filter: blur(10px);
}
.ec-rack-nav a {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ec-muted);
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--ec-border);
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.ec-rack-nav a:hover {
  color: var(--ec-text);
  border-color: var(--ec-border-hi);
  background: rgba(56, 189, 248, 0.08);
}

/* Cards / modules */
body.eng-console .card,
body.eng-console details.card,
body.eng-console .vip-section {
  background: linear-gradient(165deg, rgba(18, 21, 29, 0.95) 0%, rgba(10, 12, 18, 0.98) 100%) !important;
  border: 1px solid var(--ec-border) !important;
  border-radius: var(--ec-radius) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.45) !important;
  transform: none !important;
}
body.eng-console .card:hover,
body.eng-console details.card:hover {
  border-color: rgba(56, 189, 248, 0.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(56, 189, 248, 0.06) !important;
  transform: none !important;
}
body.eng-console .vip-section-summary {
  font-weight: 650;
  letter-spacing: 0.03em;
  color: var(--ec-text);
  list-style: none;
}
body.eng-console .vip-section-summary::-webkit-details-marker {
  display: none;
}
body.eng-console .vip-section-summary::after {
  content: '▾';
  float: right;
  opacity: 0.45;
  font-size: 0.75rem;
  transition: transform 0.15s;
}
body.eng-console details:not([open]) > .vip-section-summary::after {
  transform: rotate(-90deg);
}
body.eng-console .group-desc {
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--ec-muted);
  margin: 0 0 10px;
}
body.eng-console .module-sub {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ec-muted);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/*
 * Rack is ~300–360px wide — two-column slider grids crushed labels/thumbs.
 * Single column is the desktop default; dual column only on very wide racks.
 */
body.eng-console .ec-col-rack .slider-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: visible;
  padding-bottom: 8px;
}
body.eng-console .ec-col-rack .slider-panel .slider-row,
body.eng-console .ec-col-rack .slider-panel .control-row,
body.eng-console .ec-col-rack .slider-panel > * {
  min-width: 0;
  max-width: 100%;
}
body.eng-console .ec-col-rack .vip-section-body {
  overflow: visible;
}
/* Ultrawide / expanded rack only */
@media (min-width: 1800px) {
  body.eng-console {
    --ec-rack-w: minmax(420px, 520px);
  }
  body.eng-console .ec-col-rack .slider-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
  }
}
/* Compact laptop heights: keep rack scrollable and last row reachable */
@media (max-height: 800px) {
  body.eng-console .ec-col-rack {
    max-height: calc(100vh - var(--vip-hdr-h, 48px) - 8px);
    top: calc(var(--vip-hdr-h, 48px) + 4px);
    padding-bottom: 120px;
  }
}
/* Prefer readable labels over clipping at common desktop zooms */
@media (min-resolution: 1.25dppx) {
  body.eng-console .ec-col-rack .sr-label {
    font-size: 0.7rem;
  }
}

/* Integrity + output safety */
.ec-integrity-card,
.ec-output-safety {
  padding: 12px 14px;
}
.ec-integrity-head,
.ec-safety-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.ec-integrity-title,
.ec-safety-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}
.ec-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ec-status-pill {
  font-size: 0.65rem;
  font-weight: 650;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--ec-border);
  color: var(--ec-muted);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--fm, 'JetBrains Mono', monospace);
}
.ec-status-pill[data-state="ok"] {
  color: var(--ec-ok);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}
.ec-status-pill[data-state="warn"] {
  color: var(--ec-warn);
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}
.ec-status-pill[data-state="risk"] {
  color: var(--ec-risk);
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.1);
}
.ec-meter-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.ec-meter {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  padding: 8px;
  border: 1px solid var(--ec-border);
}
.ec-meter-lbl {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ec-muted);
  margin-bottom: 4px;
}
.ec-meter-val {
  font-family: var(--fm, 'JetBrains Mono', monospace);
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
body.eng-console.ec-clean-output .ec-output-safety,
body.eng-console.ec-clean-output #section-processing {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(52, 211, 153, 0.2),
    0 0 28px rgba(52, 211, 153, 0.12) !important;
}

/* Analysis / diarization summary strip under viz */
.ec-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ec-gap);
}
@media (max-width: 900px) {
  .ec-summary-grid {
    grid-template-columns: 1fr;
  }
}
.ec-summary-card {
  padding: 12px 14px;
}
.ec-summary-card h3 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ec-summary-body {
  font-size: 0.8rem;
  color: var(--ec-muted);
  line-height: 1.45;
  min-height: 2.4em;
}
.ec-summary-body strong {
  color: var(--ec-text);
}
.ec-voice-matrix {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ec-voice-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--ec-border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.72rem;
  cursor: pointer;
  color: var(--ec-muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.ec-voice-pill:hover,
.ec-voice-pill[aria-pressed="true"] {
  color: var(--ec-text);
  border-color: var(--ec-border-hi);
  background: rgba(56, 189, 248, 0.12);
}
.ec-voice-pill[data-role="primary"] {
  border-color: rgba(52, 211, 153, 0.4);
  color: var(--ec-ok);
}
.ec-voice-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* Focus explain accordion (collapsed by default) */
.ec-focus-explain {
  border: 1px solid var(--ec-border);
  border-radius: 10px;
  margin: 0 0 10px;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.ec-focus-explain > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--ec-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ec-focus-explain > summary::-webkit-details-marker {
  display: none;
}
.ec-focus-explain > summary::after {
  content: '▸';
  opacity: 0.5;
  transition: transform 0.15s;
}
.ec-focus-explain[open] > summary::after {
  transform: rotate(90deg);
}
.ec-focus-explain-body {
  padding: 0 12px 12px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ec-muted);
}
.ec-focus-explain-body p {
  margin: 0 0 8px;
}

/* Collapse verbose analysis lead + hide secondary analyze CTAs as primary path */
body.eng-console .analysis-lead {
  font-size: 0.78rem;
  color: var(--ec-muted);
}
body.eng-console .analysis-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
body.eng-console .analysis-actions .btn {
  font-size: 0.68rem;
  padding: 5px 10px;
}
body.eng-console.ec-auto-analysis .analysis-actions #btnAnalyzeFull,
body.eng-console.ec-auto-analysis .analysis-actions #btnAnalyzeProcessAuto {
  opacity: 0.55;
}
body.eng-console .analysis-actions::before {
  content: 'Runs automatically after Process · manual re-run:';
  flex: 1 0 100%;
  font-size: 0.65rem;
  color: var(--ec-muted);
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

/* Transport polish */
body.eng-console .transport-card {
  border-color: rgba(56, 189, 248, 0.15) !important;
}
body.eng-console .btn-primary {
  background: linear-gradient(135deg, #0e7490, #0284c7, #38bdf8) !important;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}
body.eng-console .btn-primary:hover:not(:disabled) {
  box-shadow: 0 8px 28px rgba(56, 189, 248, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}
body.eng-console .btn-reprocess {
  border-color: rgba(56, 189, 248, 0.35);
}

/* Hero compact when console active */
body.eng-console .vip-hero {
  max-width: 1720px;
  margin: 8px auto 0;
  padding: 0 12px;
}
body.eng-console .vip-hero-inner {
  border-radius: var(--ec-radius);
  border: 1px solid var(--ec-border);
  background: linear-gradient(120deg, rgba(14, 16, 22, 0.9), rgba(8, 10, 14, 0.95));
}
body.eng-console .engine-cockpit {
  max-width: 1720px;
  margin: 8px auto 0;
  padding: 0 12px;
}
body.eng-console .cockpit-card {
  border-color: var(--ec-border) !important;
}

/* Target speaker in console */
body.eng-console #section-target-speaker:not([open]) {
  opacity: 0.92;
}
body.eng-console .vip-ts-steps {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s, opacity 0.2s, margin 0.2s;
  margin: 0 !important;
}
body.eng-console .vip-ts-panel.ec-show-steps .vip-ts-steps {
  max-height: 480px;
  opacity: 1;
  margin: 0.5rem 0 !important;
}
body.eng-console .vip-ts-lead {
  font-size: 0.8rem;
}

/* Smoothed control hint */
.ec-smoothed-hint {
  font-size: 0.58rem;
  color: var(--ec-accent);
  opacity: 0.75;
  margin-left: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Responsive: stack columns */
@media (max-width: 1180px) {
  body.eng-console .main-grid.ec-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  }
  body.eng-console .ec-col-session {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ec-gap);
  }
  body.eng-console .ec-col-rack {
    position: static;
    max-height: none;
  }
}
@media (max-width: 780px) {
  body.eng-console .main-grid.ec-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body.eng-console .ec-col-session {
    grid-template-columns: 1fr;
  }
}

/* Simple view: hide advanced rack groups + heavy chrome */
body.eng-console.ec-simple #section-advanced,
body.eng-console.ec-simple #tab-extreme-group,
body.eng-console.ec-simple #section-spectral,
body.eng-console.ec-simple #section-dynamics,
body.eng-console.ec-simple #section-eq,
body.eng-console.ec-simple .engine-cockpit,
body.eng-console.ec-simple #section-whisper-hunter,
body.eng-console.ec-simple #section-target-speaker,
body.eng-console.ec-simple #ecSummaryGrid {
  display: none !important;
}
/* Keep gate/NR + isolation + output for a usable Simple path */
body.eng-console.ec-simple #section-gate,
body.eng-console.ec-simple #section-separation,
body.eng-console.ec-simple #section-output {
  display: block !important;
}

/* Full-rack Essentials / filter polish */
.slider-filter-chip.is-active {
  border-color: rgba(0, 255, 231, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 255, 231, 0.18);
}
details.slider-group.filter-empty,
details.vip-section.filter-empty {
  display: none !important;
}
.control-search-row {
  position: sticky;
  top: 0;
  z-index: 4;
  backdrop-filter: blur(10px);
  background: rgba(8, 12, 18, 0.92);
  padding-bottom: 8px;
}

/* ══════════════════════════════════════════════════════════════════════
   Workstation shell — desktop (body.ws, set by engineer-console.js at
   ≥1024×560). One screen: header → workspace tabs → session bar → stage |
   rack | inspector (each column scrolls) → transport bar. Layout + visual
   only; every ID, slider binding and listener is the same node as before.
   Colours stay on the AA-pinned Precision Studio text tiers.
   Paint (tokens, header, panels, buttons) is on body.ec-skin, which
   engineer-console.js sets at every size; layout stays on body.ws.
   ══════════════════════════════════════════════════════════════════════ */
body.eng-console.ec-skin {
  --ws-bg: #05080c;
  --ws-panel: #0a1017;
  --ws-panel-2: #0d141c;
  --ws-raised: #111a23;
  --ws-raised-2: #16212c;
  --ws-line: #19242f;
  --ws-line-2: #22303d;
  --ws-line-3: #2c3d4d;
  --ws-text: #eef3f8;
  --ws-text-2: #b3bfcc;
  --ws-text-3: #8d9aaa;
  --ws-red: var(--action-process, #ff3d4d);
  --ws-red-solid: var(--action-process-solid, #d81f30);
  --ws-cyan: var(--action-live, #2ed5e5);
  --ws-green: var(--state-success, #31cf7d);
  --ws-amber: var(--state-warning, #f0b541);
  --ws-radius: 12px;
  background:
    radial-gradient(1200px 520px at 50% -180px, rgba(46, 213, 229, 0.035), transparent 70%),
    radial-gradient(900px 600px at 85% 110%, rgba(255, 61, 77, 0.025), transparent 70%),
    var(--ws-bg) !important;
}
body.eng-console.ws {
  height: 100vh;
  height: 100dvh;
  /* No overflow clip here: the columns scroll themselves, and a clipping body
     would hide every control below the fold from overflow-aware tooling. */
  display: flex;
  flex-direction: column;
  padding: 0 !important;
}
body.eng-console.ws > * { flex: none; }

/* ── Header ──────────────────────────────────────────────────────────── */
body.eng-console.ws .hdr {
  order: -3;
  position: relative;
  top: auto;
}
body.eng-console.ec-skin .hdr {
  background: linear-gradient(#0b1118, #090e14) !important;
  border-bottom: 1px solid var(--ws-line) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02), 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: none;
}
body.eng-console.ec-skin .hdr-badge {
  border-color: var(--ws-line-2);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ws-text-2);
  border-radius: 5px;
  letter-spacing: 0.08em;
}
body.eng-console.ec-skin .ec-mode-badge {
  border-radius: 6px;
  color: #bff0d4;
  background: rgba(49, 207, 125, 0.1);
  border-color: rgba(49, 207, 125, 0.32);
}
body.eng-console.ec-skin .hdr-stat .hs-val { color: var(--ws-text); }
body.eng-console.ec-skin .hdr-stat .hs-lbl { color: var(--ws-text-3); }
body.eng-console.ec-skin .hdr-actions .btn,
body.eng-console.ec-skin .hdr-scale .btn-xs {
  border-color: var(--ws-line-2);
  background: linear-gradient(#17212c, #121a23);
  color: var(--ws-text);
  border-radius: 7px;
}

/* ── Workspace tabs (the Precision Studio rail, laid out horizontally) ─ */
body.eng-console.ws.ps-workstation .ps-workspace-nav {
  order: -2;
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
  width: auto;
  gap: 2px;
  padding: 0 12px;
  height: 38px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #080d13;
  border: 0;
  border-bottom: 1px solid var(--ws-line);
  scrollbar-width: none;
}
body.eng-console.ws.ps-workstation .ps-workspace-nav[hidden] { display: none !important; }
body.eng-console.ws.ps-workstation .ps-workspace-nav a {
  /* precision-studio.css only shapes these links from 1100px. */
  display: flex;
  align-items: center;
  text-decoration: none;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
  color: var(--ws-text-3);
}
body.eng-console.ws.ps-workstation .ps-workspace-nav a[aria-current="page"] {
  color: var(--ws-text);
  background: linear-gradient(#1a2430, #141d27);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -2px 0 var(--ws-red);
}
body.eng-console.ws.ps-forensic .ps-workspace-nav a[aria-current="page"] {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -2px 0 var(--ws-cyan);
}
body.eng-console.ws .ps-quick-strip { order: -1; }
/* The legacy Home/Analyze/… nav duplicates the workspace tabs here. */
body.eng-console.ws .vip-engineer-nav { display: none; }
/* Its second canvas never received audio; the signal stage is #vizCard. */
body.eng-console.ws #unifiedSignalWorkspace { display: none; }

/* ── Session bar (#vipHero, compact) ─────────────────────────────────── */
body.eng-console.ws #vipHero.vip-hero {
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid var(--ws-line);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(255, 61, 77, 0.05), transparent 30%), #080d13;
  box-shadow: none;
  overflow: visible;
  transform: none;
}
body.eng-console.ws #vipHero .vip-hero-bg,
body.eng-console.ws #vipHero .vip-hero-kicker,
body.eng-console.ws #vipHero .vip-hero-tagline,
body.eng-console.ws #vipHero .vip-hero-video-scan,
body.eng-console.ws #vipHero .vip-hero-tier-label,
body.eng-console.ws #vipHero .vip-hero-title,
body.eng-console.ws #vipHero .vip-hero-scene-label { display: none; }
body.eng-console.ws #vipHero .vip-hero-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: none;
  padding: 0;
  margin: 0;
}
body.eng-console.ws #vipHero .vip-hero-media { flex: none; }
body.eng-console.ws #vipHero .vip-hero-video-frame {
  width: 92px;
  height: 52px;
  aspect-ratio: auto;
  border-radius: 8px;
  border-color: var(--ws-line-2);
  box-shadow: 0 0 0 1px rgba(255, 61, 77, 0.12), 0 4px 14px rgba(0, 0, 0, 0.45);
}
body.eng-console.ws #vipHero .vip-hero-fallback-mark { font-size: 15px; letter-spacing: 0.18em; }
body.eng-console.ws #vipHero .vip-hero-fallback-text { display: none; }
body.eng-console.ws #vipHero .vip-hero-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}
body.eng-console.ws #vipHero .vip-hero-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
body.eng-console.ws #vipHero .vip-hero-status {
  flex: 1 1 0;
  min-width: 60px;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--ws-text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.eng-console.ws #vipHero .vip-hero-tier,
body.eng-console.ws #vipHero .vip-hero-scene,
body.eng-console.ws #vipHero .vip-hero-cta-row,
body.eng-console.ws #vipHero .vip-hero-trust {
  margin: 0;
  flex: none;
  justify-content: flex-start;
}
body.eng-console.ws #vipHero .vip-hero-scene[hidden] { display: none !important; }
body.eng-console.ws #vipHero .vip-hero-tier-picker {
  display: flex;
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--ws-line-2);
  border-radius: 8px;
  background: #060a0e;
}
body.eng-console.ws #vipHero .vip-tier-pill {
  min-height: 26px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ws-text-3);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: none;
}
body.eng-console.ws #vipHero .vip-tier-pill[aria-pressed="true"] {
  color: var(--ws-text);
  background: linear-gradient(#1b2632, #151e28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
body.eng-console.ws #vipHero .vip-hero-scene-select {
  min-height: 30px;
  border-radius: 7px;
  border: 1px solid var(--ws-line-2);
  background: #070b10;
  color: var(--ws-text);
  font-size: 12px;
}
body.eng-console.ws #vipHero .vip-hero-cta-row { gap: 8px; }
body.eng-console.ws #vipHero .vip-hero-cta {
  min-width: 0;
  min-height: 32px;
  padding: 0 14px;
  font-size: 12px;
  border-radius: 7px;
}
body.eng-console.ws #vipHero .vip-hero-trust {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(49, 207, 125, 0.28);
  background: rgba(49, 207, 125, 0.08);
}
body.eng-console.ws #vipHero .vip-hero-trust-text {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: #bff0d4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Columns ─────────────────────────────────────────────────────────── */
body.eng-console.ws .main-grid.ec-grid {
  flex: 1 1 auto;
  min-height: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(380px, 24vw, 460px) clamp(300px, 19vw, 360px);
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  z-index: 1;
}
body.eng-console.ws .ec-col {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  gap: 10px;
  padding: 0 4px 16px 0;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--ws-line-3) transparent;
  scroll-padding-top: 8px;
}
/* 1024-1279: two columns. The stage keeps the left; the rack (top) and the
   inspector (bottom) share the right, each scrolling on its own. The rack
   cell stays >=310px so the @container vip-rack rows still fit. */
@media (max-width: 1279px) {
  body.eng-console.ws .main-grid.ec-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-rows: minmax(0, 2fr) minmax(0, 1fr);
  }
  body.eng-console.ws .ec-col-stage { grid-column: 1; grid-row: 1 / span 2; }
  body.eng-console.ws .ec-col-rack { grid-column: 2; grid-row: 1; }
  body.eng-console.ws .ec-col-session { grid-column: 2; grid-row: 2; }
}
/* Fixed-height flex columns would otherwise squeeze every panel to fit. */
body.eng-console.ws .ec-col > * { flex-shrink: 0; }
body.eng-console.ws .ec-col-stage { order: 1; }
body.eng-console.ws .ec-col-rack {
  order: 2;
  position: static;
  top: auto;
  max-height: none;
  scroll-padding-top: 56px;
  scroll-padding-bottom: 16px;
  padding-bottom: 24px;
}
body.eng-console.ws .ec-col-session { order: 3; }
/* Stage and inspector are already full-height; the stacked fallback is not needed. */
body.eng-console.ws .ec-col-session { display: flex; }

/* ── Panels ──────────────────────────────────────────────────────────── */
body.eng-console.ec-skin .card,
body.eng-console.ec-skin details.vip-section,
body.eng-console.ec-skin .cockpit-card {
  background: linear-gradient(180deg, var(--ws-panel-2), var(--ws-panel));
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 10px 30px rgba(0, 0, 0, 0.3);
}
body.eng-console.ec-skin details.card:hover { border-color: var(--ws-line-2); }
body.eng-console.ec-skin .vip-section-summary,
body.eng-console.ec-skin .viz-hdr {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ws-text-2);
}
body.eng-console.ws .engine-cockpit { margin: 0; padding: 0; max-width: none; }
body.eng-console.ws .cockpit-row { flex-wrap: wrap; gap: 10px; }
body.eng-console.ws .cockpit-title { font-size: 12px; line-height: 1.4; }
body.eng-console.ws .vip-workstation__inspector {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: auto;
  min-width: 0;
}
body.eng-console.ec-skin .vip-workstation__inspector h3 { color: var(--ws-text-2) !important; }
body.eng-console.ec-skin .vip-compare-toggle {
  padding: 12px;
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
  background: linear-gradient(180deg, var(--ws-panel-2), var(--ws-panel));
}

/* Signal stage: the canvas gets the room. */
body.eng-console.ws #vizCard .viz-card-body { min-height: 0; }
body.eng-console.ws #vizCard #spectro3d-container,
body.eng-console.ws #vizCard #spectroCanvas { min-height: 340px; }

/* Buttons share the console's two weights: neutral and the action red. */
body.eng-console.ec-skin .btn {
  border-radius: 7px;
}
/* White text sits on the solid red only (5.05:1); the bright red fails AA. */
body.eng-console.ec-skin .btn-primary,
body.eng-console.ec-skin #vipHero #heroCtaProcess:not(:disabled) {
  background: var(--ws-red-solid) !important;
  border-color: #ff5161 !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 14px rgba(216, 31, 48, 0.28);
}
/* In the session bar Process is the call to action; Upload is secondary. */
body.eng-console.ec-skin #vipHero #heroCtaUpload {
  background: linear-gradient(#17212c, #121a23) !important;
  border-color: var(--ws-line-2) !important;
  color: var(--ws-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* The session bar must span the window; the legacy hero caps it at 1720px. */
body.eng-console.ws #vipHero.vip-hero { max-width: none; }

/* Narrow columns: button rows wrap instead of squeezing labels out of view
   (measured 41-61px boxes around 93-132px labels in the 360px inspector). */
body.eng-console.ec-skin .file-library-toolbar,
body.eng-console.ec-skin .save-row { flex-wrap: wrap; }
body.eng-console.ec-skin .file-library-toolbar > .btn,
body.eng-console.ec-skin .save-row > .btn { flex: 1 1 auto; min-width: max-content; justify-content: center; }
body.eng-console.ec-skin .save-row > .hint { flex-basis: 100%; }
body.eng-console.ec-skin .actions-row { flex-wrap: wrap; }
body.eng-console.ec-skin .actions-row > .btn { flex: 1 1 auto; min-width: max-content; }
/* A fixed column count left 75px cells for unbreakable labels ("Phone/Radio"). */
body.eng-console.ec-skin .presets-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 104px), 1fr)); }

/* ── Transport bar ───────────────────────────────────────────────────── */
body.eng-console.ws > .transport-card {
  order: 1;
  position: relative;
  z-index: 3;
  margin: 0;
  padding: 6px 16px 6px;
  border: 0;
  border-top: 1px solid var(--ws-line);
  border-radius: 0;
  background: linear-gradient(#0b1118, #080c11);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
/* One row: buttons · time · scrubber · speed/loop/A-B. .transport-top has no
   role, so display:contents only flattens layout, not semantics. */
body.eng-console.ws > .transport-card {
  display: grid;
  grid-template-columns: auto auto minmax(160px, 1fr) auto;
  align-items: center;
  column-gap: 18px;
}
body.eng-console.ws > .transport-card .transport-top { display: contents; }
body.eng-console.ws > .transport-card .tp-buttons { grid-column: 1; }
body.eng-console.ws > .transport-card .tp-time-wrap { grid-column: 2; }
body.eng-console.ws > .transport-card .transport-seek { grid-column: 3; grid-row: 1; }
body.eng-console.ws > .transport-card .tp-meta {
  grid-column: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}
body.eng-console.ws > .transport-card .btn-tp {
  border-radius: 8px;
  border-color: var(--ws-line-2);
  background: linear-gradient(#17212c, #121a23);
  color: var(--ws-text-2);
}
body.eng-console.ws > .transport-card .btn-tp-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #071016;
  background: linear-gradient(#f4f8fb, #c9d3dc);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 22px rgba(46, 213, 229, 0.12);
}
body.eng-console.ws > .transport-card .tp-time-wrap {
  padding: 5px 12px;
  border-radius: 8px;
  background: #05080b;
  border: 1px solid var(--ws-line);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}
body.eng-console.ws > .transport-card .tp-time {
  font-family: var(--fm, ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  color: var(--ws-text);
}
body.eng-console.ws > .transport-card .transport-seek { margin: 0; padding: 8px 2px; min-height: 0; }
body.eng-console.ws > .transport-card .tp-speed label { color: var(--ws-text-3); }

/* ── Live analyzer card (neon-pulse-visualizer.js) ─────────────────────
   The card's np-* markup had no rules anywhere, so it rendered as raw
   buttons, an unbounded black canvas and a bare text list at every width. */
body.eng-console .np-card {
  margin: 0 0 12px;
  border: 1px solid var(--border-subtle, #1d2a34);
  border-radius: 10px;
  background: #05080c;
  overflow: hidden;
}
body.eng-console .np-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle, #1d2a34);
}
body.eng-console .np-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  color: #b3bfcc;
}
body.eng-console .np-card-title svg { color: var(--action-live, #2ed5e5); }
body.eng-console .np-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #a9eef5;
  background: rgba(46, 213, 229, 0.1);
  border: 1px solid rgba(46, 213, 229, 0.3);
}
body.eng-console .np-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--action-live, #2ed5e5);
  box-shadow: 0 0 6px rgba(46, 213, 229, 0.7);
}
body.eng-console .np-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 8px 12px 0;
  padding: 2px;
  width: fit-content;
  max-width: calc(100% - 24px);
  border: 1px solid #22303d;
  border-radius: 7px;
  background: #060a0e;
}
body.eng-console .np-tab {
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8d9aaa;
  font: 600 10.5px/1 inherit;
  letter-spacing: 0.06em;
  cursor: pointer;
}
body.eng-console .np-tab:hover { color: #eef3f8; }
body.eng-console .np-tab.active,
body.eng-console .np-tab[aria-selected="true"] {
  color: #eef3f8;
  background: linear-gradient(#1b2632, #151e28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
body.eng-console .np-tab:focus-visible {
  outline: 2px solid var(--action-live, #2ed5e5);
  outline-offset: 1px;
}
body.eng-console .np-canvas-wrap {
  position: relative;
  height: 200px;
  margin: 8px 12px;
  border: 1px solid #19242f;
  border-radius: 8px;
  background: #04070b;
  overflow: hidden;
}
body.eng-console .np-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
body.eng-console .np-scanline { display: none; }
body.eng-console .np-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 0 12px 10px;
}
body.eng-console .np-stat {
  padding: 6px 8px;
  border: 1px solid #19242f;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.015);
}
body.eng-console .np-stat-val {
  font: 600 14px/1.2 var(--fm, ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
  color: #eef3f8;
}
body.eng-console .np-stat-label {
  margin-top: 2px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8d9aaa;
}
body.eng-console .np-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 12px 10px;
  font-size: 10.5px;
  color: #b3bfcc;
}
body.eng-console .np-legend:empty { display: none; }
body.eng-console .np-legend-item { display: inline-flex; align-items: center; gap: 5px; }
body.eng-console .np-legend-dot { width: 8px; height: 8px; border-radius: 2px; }
