:root {
  --bg-color: #0d0e12;
  --panel-bg: rgba(20, 22, 31, 0.75);
  --panel-border: rgba(255, 255, 255, 0.08);
  --accent-primary: #bb86fc;
  --accent-secondary: #03dac6;
  --text-main: #f0f2f5;
  --text-muted: #8b949e;
  --success: #03dac6;
  --fail: #cf6679;
  --xt-surface: rgba(8, 10, 14, 0.55);
  --xt-surface-raised: rgba(255, 255, 255, 0.04);
  --xt-border: rgba(255, 255, 255, 0.08);
  --xt-meter: #ff9900;
  --xt-radius: 12px;
  --xt-label-size: 0.78rem;
  --xt-val-size: 0.78rem;
}

* { box-sizing: border-box; }

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  margin: 0;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(187, 134, 252, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(3, 218, 198, 0.05) 0%, transparent 40%);
}

header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, #fff 30%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header p { margin: 5px 0 0; color: var(--text-muted); }

.badge {
  background: rgba(187, 134, 252, 0.1);
  border: 1px solid rgba(187, 134, 252, 0.3);
  color: var(--accent-primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 30px;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  max-width: 100%;
}

.panel-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title span {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

.panel-desc { margin: 0 0 16px; color: var(--text-muted); font-size: 0.95rem; }
.muted { color: var(--text-muted); font-size: 0.85rem; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.select-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.select-wrap select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: inherit;
}

select option {
  color: #121318;
  background: #ffffff;
}

/* ── XayTech unified module chrome ── */
.modules-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 20px;
}

.module-slot {
  display: flex;
  justify-content: center;
  width: 100%;
}

.xt-module {
  width: 100%;
  max-width: 760px;
  background: var(--xt-surface);
  border: 1px solid var(--xt-border);
  border-radius: var(--xt-radius);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.xt-module--wide { max-width: 820px; }
.xt-module--compact { max-width: 420px; }

.xt-module__header {
  position: relative;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--xt-border);
  background: var(--xt-surface-raised);
}

.xt-module__checkbox-label {
  position: absolute;
  top: 14px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.xt-module__checkbox-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--xt-accent, #6366f1);
}

.xt-module__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-main);
}

.xt-module__subtitle {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.xt-module__body {
  padding: 16px 18px;
}

.xt-module__footer {
  padding: 8px 18px 10px;
  border-top: 1px solid var(--xt-border);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
}

.xt-control {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.xt-control--inline {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.xt-control--vertical {
  justify-items: center;
  text-align: center;
}

.xt-control__label {
  font-size: var(--xt-label-size);
  font-weight: 600;
  color: var(--text-muted);
}

.xt-control__val {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--xt-val-size);
  color: var(--accent-secondary);
  min-height: 1.1em;
}

.xt-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  accent-color: var(--accent-primary);
}

.xt-slider--vertical {
  -webkit-appearance: slider-vertical;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 28px;
  height: 120px;
}

.xt-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.xt-toggle {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--xt-border);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.xt-toggle:hover {
  border-color: rgba(187, 134, 252, 0.45);
  color: var(--text-main);
}

.xt-toggle.active {
  background: rgba(187, 134, 252, 0.18);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.xt-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.xt-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--xt-label-size);
  color: var(--text-muted);
  cursor: pointer;
}

.xt-meter-h {
  height: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.xt-meter-h__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(180deg, #ffb347, var(--xt-meter));
  transition: width 0.06s linear;
}

.xt-meter-v {
  width: 14px;
  height: 72px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.xt-meter-v__fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, #ffb347, var(--xt-meter));
  transition: height 0.06s linear;
}

.xt-knob-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.xt-knob {
  background: none;
  border: none;
  padding: 0;
  cursor: ns-resize;
  touch-action: none;
}

.xt-knob:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
  border-radius: 50%;
}

.peq-panel { display: flex; flex-direction: column; gap: 12px; }

.peq-graph-wrap {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 10px;
  align-items: stretch;
}

.peq-canvas {
  width: 100%;
  height: 320px;
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #07080b;
  cursor: crosshair;
}

.peq-trim {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 320px;
  padding: 10px 6px;
  background: rgba(7, 8, 11, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.peq-trim.xt-control {
  margin-bottom: 0;
}

.peq-trim .xt-control__label {
  writing-mode: horizontal-tb;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.peq-trim-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.peq-trim-slider.xt-slider--vertical {
  -webkit-appearance: slider-vertical;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 28px;
  height: 260px;
  flex: 1;
  margin: 4px 0;
}

.peq-trim-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent-secondary);
}

.peq-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.peq-tab {
  min-width: 34px;
  height: 30px;
  padding: 4px 10px;
}

.peq-controls {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.peq-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.peq-field {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.peq-field select {
  margin-left: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
}

.peq-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  flex: 1 1 240px;
}

.peq-slider-row.xt-control {
  margin-bottom: 0;
}

.peq-slider-row label {
  color: var(--text-muted);
  white-space: nowrap;
}

.peq-slider-row .xt-slider {
  accent-color: var(--accent-primary);
  flex: 1;
  min-width: 60px;
}

.peq-trim-slider.xt-slider--vertical {
  accent-color: var(--accent-primary);
}

.peq-slider-row input[type="number"] {
  width: 75px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.peq-gain-val, .peq-bw-val {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-secondary);
  font-size: 0.85rem;
  width: 60px;
  text-align: right;
  flex-shrink: 0;
}

.peq-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.control-group { margin-bottom: 4px; }

.control-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.control-header .val {
  color: var(--accent-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.slider-input.xt-slider {
  accent-color: var(--accent-primary);
}

.bypass-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 18px 0;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  font-size: 0.9rem;
}

.bypass-label { color: var(--text-muted); margin-right: 4px; }
.bypass-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; }

.preview-hint {
  margin: -8px 0 16px;
  font-size: 0.82rem;
}

.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 200px;
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 20px;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.upload-zone p {
  margin: 4px 0;
  max-width: 420px;
}

.upload-zone.is-hidden {
  display: none !important;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-status {
  margin-top: 8px;
  color: var(--accent-secondary);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent-primary);
  background: rgba(187, 134, 252, 0.03);
}

.upload-zone svg { width: 48px; height: 48px; fill: var(--text-muted); margin-bottom: 12px; }

.terminal {
  background: #07080b;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 15px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  height: 280px;
  overflow-y: auto;
  margin-bottom: 16px;
  color: #a0a8b6;
}

.log-pass { color: var(--success); font-weight: bold; }
.log-fail { color: var(--fail); font-weight: bold; }
.log-header { color: #fff; font-weight: bold; }

.btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
  width: 100%;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--accent-primary), #a067e4);
  color: #000;
}

.btn-accent {
  width: 100%;
  margin-top: 12px;
  background: var(--accent-secondary);
  color: #000;
  font-weight: 700;
}

.btn-accent:hover:not(:disabled) {
  box-shadow: 0 4px 20px rgba(3, 218, 198, 0.35);
}

.btn-secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-muted);
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-sm { padding: 8px 14px; font-size: 0.9rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  display: none;
  margin-top: 12px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent-secondary);
  transition: width 0.1s;
}

.render-status {
  font-size: 0.85rem;
  margin: 8px 0 0;
  min-height: 1.2em;
  color: var(--text-muted);
}

.render-status.ready { color: var(--success); }
.render-status.stale { color: #e8b86d; }

.player-card {
  position: sticky;
  top: 12px;
  z-index: 100;
  background: rgba(13, 14, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.player-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.player-filename {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 96px;
  justify-content: center;
}

.player-time-val {
  color: var(--text-main);
  font-weight: 600;
}

.player-time-sep {
  opacity: 0.5;
}

.monitoring-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.monitoring-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.profile-name-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: inherit;
  min-width: 140px;
}

.profile-name-wrap {
  min-width: 140px;
}

.waveform-canvas {
  width: 100%;
  height: 64px;
  display: block;
  margin-bottom: 16px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(7,8,11,0.6);
  border: 1px solid rgba(255,255,255,0.05);
}

.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-round {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--accent-secondary);
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.btn-round:hover {
  opacity: 0.9;
}

.btn-round--secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn-round--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-round--secondary[data-active="true"] {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #000;
}

.btn-round svg { width: 24px; height: 24px; fill: currentColor; }

.ab-selector {
  display: flex;
  padding: 4px;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.08);
}

.ab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
}

.ab-btn.active {
  background: var(--accent-primary);
  color: #000;
}

.visualizer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 75px;
  gap: 15px;
  margin: 16px 0;
}

@media (max-width: 650px) {
  .visualizer-grid { grid-template-columns: 1fr; }
}

.viz-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
}

.viz-canvas {
  width: 100%;
  height: 130px;
  display: block;
  background: rgba(7,8,11,0.6);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
}

.peak-meters {
  display: flex;
  gap: 6px;
  height: 130px;
  padding: 8px;
  background: rgba(7,8,11,0.6);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
}

.peak-col {
  flex: 1;
  position: relative;
  background: rgba(255,255,255,0.03);
  border-radius: 3px;
  overflow: hidden;
}

.peak-bar {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to top, #03dac6, #bb86fc);
  transition: height 0.05s;
}

.peak-col span {
  position: absolute;
  bottom: 2px;
  width: 100%;
  text-align: center;
  font-size: 0.65rem;
  font-family: monospace;
}

.gr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.gr-cell {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.gr-track {
  height: 48px;
  margin-top: 6px;
  background: rgba(7,8,11,0.6);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

.gr-bar {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to top, #cf6679, #bb86fc);
  transition: height 0.08s;
}

.lpe-face {
  position: relative;
  padding: 8px 0 4px;
  min-height: 160px;
}

.lpe-bg-art {
  position: absolute;
  inset: 8px 12px 28px;
  opacity: 0.35;
  background:
    radial-gradient(ellipse 60% 40% at 30% 55%, rgba(90, 140, 200, 0.5), transparent),
    radial-gradient(ellipse 50% 35% at 75% 40%, rgba(220, 190, 80, 0.35), transparent),
    linear-gradient(135deg, rgba(60, 100, 150, 0.2) 0%, transparent 50%);
  pointer-events: none;
  border-radius: 4px;
}

.lpe-knobs {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 36px;
  z-index: 1;
}

.lpe-knob-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lpe-knob {
  background: none;
  border: none;
  padding: 0;
  cursor: ns-resize;
  touch-action: none;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.55));
  transition: filter 0.15s;
}

.lpe-knob:hover { filter: drop-shadow(0 4px 8px rgba(0,0,0,0.65)); }
.lpe-knob:focus-visible { outline: 2px solid rgba(180, 210, 255, 0.6); outline-offset: 4px; border-radius: 50%; }

.lpe-knob-ring {
  fill: none;
  stroke: #0a0c10;
  stroke-width: 5;
  stroke-dasharray: 3 4;
}

.lpe-knob-face {
  stroke: #1a1e24;
  stroke-width: 1.5;
}

.lpe-knob-svg {
  display: block;
}

.lpe-knob-pointer {
  stroke: #e8ecf0;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.lpe-knob-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e8ecf2;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.a1-body {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 1.4fr) 1fr;
  gap: 12px;
  align-items: start;
}

.a1-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.a1-io {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  background: rgba(0,0,0,0.25);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.04);
}

.a1-io .xt-control__label {
  text-align: center;
}

.a1-vmeters {
  display: flex;
  gap: 6px;
  height: 72px;
  margin-top: 4px;
}

.a1-vtrack {
  width: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.a1-vfill {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, #ffb347, var(--xt-meter));
  transition: height 0.06s linear;
}

.a1-mode-row {
  display: flex;
  gap: 6px;
}

.a1-mode.xt-toggle {
  flex: 1;
  padding: 5px 6px;
}

.a1-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.a1-field {
  width: 100%;
  max-width: 280px;
  border-radius: 4px;
  border: 1px solid #1a1c20;
  display: block;
}

.a1-readouts {
  display: flex;
  gap: 16px;
  font-size: 0.65rem;
  color: #9aa8b8;
  letter-spacing: 0.3px;
}

.a1-readouts b {
  color: #c8d8ec;
  font-family: 'JetBrains Mono', monospace;
}

.a1-width-knob-wrap, .a1-pan-row, .a1-freq-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}

.a1-width-knob-wrap label, .a1-pan-row label, .a1-freq-row label {
  font-size: 0.6rem;
  color: #8a98a8;
  font-weight: 600;
}

.a1-width, .a1-pan, .a1-freq {
  width: 90%;
  accent-color: #5a9fd8;
  height: 4px;
}

.a1-panlaw {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.58rem;
  color: #8a98a8;
}

.a1-panlaw label { cursor: pointer; }

.a1-check {
  font-size: 0.58rem;
  color: #8a98a8;
  cursor: pointer;
}

.a1-freq-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  color: #c8d8ec;
}

@media (max-width: 700px) {
  .a1-body {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }
}

.lmx-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: stretch;
}

.lmx-stage {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.lmx-stage-row {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 300px) 1fr;
  gap: 14px;
  align-items: center;
}

.lmx-scale-row {
  display: flex;
  justify-content: space-between;
  padding: 0 22px 0 36px;
  font-size: 0.55rem;
  color: #9aa0a6;
  font-family: 'JetBrains Mono', monospace;
}

.lmx-meter-pair {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lmx-pair-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.lmx-hbar {
  display: grid;
  grid-template-columns: 14px 1fr;
  align-items: center;
  gap: 4px;
}

.lmx-ch {
  font-size: 0.65rem;
  font-weight: 700;
  color: #ddd;
  font-family: 'JetBrains Mono', monospace;
}

.lmx-bar.xt-meter-h {
  height: 14px;
}

.lmx-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(180deg, #ffb347, var(--xt-meter));
  transition: width 0.05s linear;
}

.lmx-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.lmx-knob-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.lmx-knob-col .xt-slider {
  width: 100%;
}

.lmx-mid-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lmx-release-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.lmx-readout {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.lmx-toggles {
  flex-direction: column;
  align-items: stretch;
}

.lmx-release-slider.xt-slider--vertical {
  height: 72px;
}

.lmx-gr-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  min-width: 36px;
}

.lmx-gr-meter {
  display: flex;
  gap: 4px;
  align-items: stretch;
  flex: 1;
  min-height: 120px;
}

.lmx-gr-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .lmx-stage-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .lmx-body {
    grid-template-columns: 1fr;
  }

  .lmx-gr-col {
    flex-direction: row;
    justify-content: center;
    min-height: 48px;
  }

  .lmx-gr-track {
    height: 48px;
    width: 120px;
  }

  .lmx-gr-fill {
    height: 100% !important;
    width: 0%;
    top: auto;
    bottom: 0;
  }
}

.lmx-gr-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.5rem;
  color: #888;
  font-family: 'JetBrains Mono', monospace;
  padding: 2px 0;
}

.lmx-gr-track {
  flex: 1;
  width: 18px;
  background: #1e1f22;
  border: 1px inset #111;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.lmx-gr-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, #ffb347, #ff6600);
  transition: height 0.06s linear;
}

.meter-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.lufs-panel {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.lufs-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.lufs-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-secondary);
}

.lufs-val-sm { font-size: 1.1rem; }
.lufs-unit { font-size: 0.8rem; font-weight: 400; color: var(--text-muted); }

#btn-download { width: 100%; }

#btn-delete-profile:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #ef4444 !important;
}

/* ── Module Row Layout ── */
.module-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 18px;
  width: 100%;
}
.module-row > .module-slot {
  max-width: 420px;
}
@media (max-width: 860px) {
  .module-row {
    flex-direction: column;
    align-items: center;
  }
}

/* ── Saturation Panel Styles ── */
.sat-face {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sat-header-row {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.sat-select-wrap {
  width: 100%;
  max-width: 180px;
}

.sat-preset-select {
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  background: #1b1d24;
  border: 1px solid var(--xt-border);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.sat-controls-grid {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sat-left-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.15);
  border: 1px dashed rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px 14px;
}

.sat-knob-pair {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.sat-knob-connector {
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  margin-top: -12px;
}

.sat-pair-label {
  font-size: 0.65rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 8px;
}

.indicator-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
}

.cyan-dot { background-color: #03dac6; box-shadow: 0 0 6px #03dac6; }
.purple-dot { background-color: #bb86fc; box-shadow: 0 0 6px #bb86fc; }

.sat-knob-svg, .trans-center-knob-svg, .trans-ring-svg {
  cursor: pointer;
  display: block;
}

.sat-knob-ring {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 2;
  fill: none;
}

.sat-knob:focus, .trans-large-knob:focus, .trans-center-knob:focus {
  outline: none;
}

.xt-knob {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* ── Transient Shaper Panel Styles ── */
.trans-face {
  padding: 12px 16px;
}

.trans-grid {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.trans-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trans-col-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.label-attack { color: #03dac6; }
.label-sustain { color: #ffb74d; }

.trans-large-knob {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.trans-ring-text {
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.trans-shapes {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-top: 10px;
}

.shape-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.shape-icon.active {
  opacity: 1;
}

.trans-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
}

.trans-center-knob-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.trans-center-knob {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.trans-center-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trans-brand {
  text-align: center;
  font-family: Outfit, sans-serif;
  margin: 2px 0;
  line-height: 1.1;
}

.brand-smack {
  font-weight: 800;
  color: #03dac6;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.brand-attack {
  font-weight: 800;
  color: #ffb74d;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Fade Controls & Exciter Additions ── */
.fade-controls-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 0 4px;
}

.fade-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fade-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.fade-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-main);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
}

.fade-select:focus {
  border-color: var(--accent-secondary);
}

.fade-duration-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-secondary);
  min-width: 48px;
  display: inline-block;
}

/* Exciter output gain slider & horizontal L/R meters */
.lpe-output-gain-container {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}

.lpe-output-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.lpe-output-slider {
  width: 100%;
}

.lpe-output-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-secondary);
}

.lpe-meter-row {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}

.lpe-meter-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.lpe-meter-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-secondary);
  border-radius: 2px;
  transition: width 0.05s linear;
}

/* Authentication Lock Overlay */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 11, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.auth-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.hide-auth .auth-overlay {
  display: none !important;
}

.auth-card {
  background: rgba(20, 22, 31, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(1);
  transition: transform 0.3s ease;
}

.auth-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 10px;
  background: linear-gradient(135deg, #bb86fc 0%, #03dac6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

.auth-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 30px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-auth-sso {
  background: linear-gradient(135deg, #03dac6 0%, #018786 100%);
  color: #000;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 15px rgba(3, 218, 198, 0.3);
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-auth-sso:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-auth-purchase {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: background-color 0.2s, border-color 0.2s;
}

.btn-auth-purchase:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}

/* User Profile & Access Control Modal */
button.badge:hover {
  background: rgba(187, 134, 252, 0.25);
  border-color: rgba(187, 134, 252, 0.6);
  box-shadow: 0 0 12px rgba(187, 134, 252, 0.2);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: #1e1e2f;
  border: 1px solid rgba(187, 134, 252, 0.25);
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  padding: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.is-active .modal-container {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 30%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  margin-bottom: 25px;
}

.profile-info-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
}

.profile-info-label {
  color: var(--text-muted);
}

.profile-info-value {
  font-weight: 600;
  color: #fff;
}

.progress-container {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
  margin-top: 15px;
}

.progress-fill {
  background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  height: 100%;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 15px;
}

.modal-footer .btn {
  font-size: 0.9rem;
  padding: 8px 16px;
}

.btn-blue-gradient {
  background: linear-gradient(135deg, #00acc1 0%, #1e88e5 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-blue-gradient:hover {
  box-shadow: 0 6px 18px rgba(30, 136, 229, 0.4);
  transform: translateY(-1px);
}

.btn-red-danger {
  background: linear-gradient(135deg, #ff5252 0%, #d50000 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(213, 0, 0, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-red-danger:hover {
  box-shadow: 0 6px 18px rgba(213, 0, 0, 0.4);
  transform: translateY(-1px);
}

.upload-progress-container {
  width: 80%;
  max-width: 320px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-top: 16px;
  overflow: hidden;
  display: none;
}

.upload-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 10px;
  transition: width 0.15s ease-out;
}

.upload-progress-container.active {
  display: block;
}

@keyframes progress-pulsing {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.upload-progress-bar.decoding {
  width: 100% !important;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  animation: progress-pulsing 1.5s ease-in-out infinite;
}

.btn-unlock {
  background: linear-gradient(135deg, #8e24aa 0%, #5e35b1 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(94, 53, 177, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-unlock:hover {
  box-shadow: 0 6px 18px rgba(94, 53, 177, 0.5);
  transform: translateY(-1px);
}