/* assets/css/app.css — LiveSound Pro */
/* Aesthetic: Industrial Pro Audio — dark, precise, purposeful */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;700&family=Barlow+Condensed:wght@300;400;500;600;700&family=Barlow:wght@300;400;500&display=swap');

/* ── CSS Variables ────────────────────────────────────────────────────────── */
:root {
  --bg0:        #080b0e;
  --bg1:        #0f1318;
  --bg2:        #161c23;
  --bg3:        #1e252e;
  --bg4:        #252e39;
  --border:     rgba(255,255,255,0.07);
  --border-lit: rgba(255,255,255,0.15);

  --accent:     #00c8ff;
  --accent-dim: rgba(0,200,255,0.12);
  --amber:      #ffb830;
  --green:      #30d158;
  --red:        #ff3b30;
  --orange:     #ff9500;

  --text-primary:   #e8edf2;
  --text-secondary: #8a95a3;
  --text-dim:       #4a5568;

  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --cond: 'Barlow Condensed', sans-serif;
  --body: 'Barlow', sans-serif;

  --radius: 4px;
  --radius-lg: 8px;
  --transition: 150ms ease;
  --shadow: 0 2px 12px rgba(0,0,0,0.6);
  --glow: 0 0 20px rgba(0,200,255,0.2);

  --nav-h: 56px;
  --bottom-h: 60px;
}

[data-theme="light"] {
  --bg0:        #eef1f5;
  --bg1:        #f5f7fa;
  --bg2:        #ffffff;
  --bg3:        #f0f2f6;
  --bg4:        #e4e8ee;
  --border:     rgba(0,0,0,0.08);
  --border-lit: rgba(0,0,0,0.18);
  --text-primary:   #1a2130;
  --text-secondary: #4a5568;
  --text-dim:       #8a95a3;
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg0);
  color: var(--text-primary);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* ── App Shell ────────────────────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* ── Top Nav Bar ─────────────────────────────────────────────────────────── */
#topnav {
  flex-shrink: 0;
  height: var(--nav-h);
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  position: relative;
  z-index: 100;
}

.nav-logo {
  font-family: var(--cond);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-icon svg { width: 18px; height: 18px; }

.nav-show-selector {
  flex: 1;
  max-width: 300px;
  position: relative;
}

.nav-show-selector select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--body);
  font-size: 13px;
  padding: 6px 28px 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.nav-show-selector::after {
  content: '▾';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  font-size: 10px;
}

.nav-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.nav-pill {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.nav-pill.active { border-color: var(--green); color: var(--green); background: rgba(48,209,88,0.1); }
.nav-pill.live   { border-color: var(--red);   color: var(--red);   background: rgba(255,59,48,0.1);
  animation: pulse-live 2s ease-in-out infinite; }

@keyframes pulse-live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,59,48,0); }
  50%       { box-shadow: 0 0 0 4px rgba(255,59,48,0.2); }
}

.btn-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg3); color: var(--text-primary); }

/* ── Main Content Area ────────────────────────────────────────────────────── */
#content {
  flex: 1;
  overflow: hidden;
  display: flex;
  position: relative;
}

/* ── Side Nav (desktop) ───────────────────────────────────────────────────── */
#sidenav {
  width: 56px;
  background: var(--bg1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 2px;
  flex-shrink: 0;
}

@media (max-width: 600px) { #sidenav { display: none; } }

.sidenav-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  transition: all var(--transition);
  position: relative;
}

.sidenav-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidenav-btn span {
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}

.sidenav-btn:hover      { background: var(--bg3); color: var(--text-secondary); }
.sidenav-btn.active     { background: var(--accent-dim); color: var(--accent); }
.sidenav-btn.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; height: 60%;
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

/* ── Panels ───────────────────────────────────────────────────────────────── */
.panel {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  flex-direction: column;
  padding: 16px;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--bg4) transparent;
}

.panel.active { display: flex; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg1);
}

.card-title {
  font-family: var(--cond);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  flex: 1;
}

.card-body { padding: 14px; }

/* ── SPL Meter ────────────────────────────────────────────────────────────── */
#spl-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
}
#spl-panel.active { display: flex; }

.spl-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.spl-readout {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.spl-value {
  font-family: var(--mono);
  font-size: clamp(56px, 12vw, 96px);
  font-weight: 300;
  line-height: 1;
  color: var(--green);
  letter-spacing: -0.03em;
  transition: color 0.3s ease;
  min-width: 4ch;
  display: block;
  text-align: center;
}

.spl-value.warn  { color: var(--amber); }
.spl-value.over  { color: var(--red);  }

.spl-unit {
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.spl-weighting-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,200,255,0.3);
  border-radius: 3px;
  padding: 2px 8px;
  letter-spacing: 0.1em;
  display: inline-block;
  margin-top: 6px;
}

.spl-peak-line {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  letter-spacing: 0.05em;
}

.spl-peak-val { color: var(--amber); font-weight: 700; }

/* Vertical bar meter */
.spl-bar-wrap {
  width: 28px;
  height: 240px;
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.spl-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, var(--green) 0%, var(--amber) 75%, var(--red) 90%);
  transition: height 0.05s linear;
  border-radius: var(--radius) var(--radius) 0 0;
}

.spl-peak-marker {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--amber);
  transition: bottom 0.1s ease;
}

/* Zone markers */
.spl-zones {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.zone-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid transparent;
}

.zone-badge.z-safe    { background: rgba(48,209,88,0.1);  border-color: rgba(48,209,88,0.3);  color: var(--green); }
.zone-badge.z-warn    { background: rgba(255,184,48,0.1); border-color: rgba(255,184,48,0.3); color: var(--amber); }
.zone-badge.z-danger  { background: rgba(255,59,48,0.1);  border-color: rgba(255,59,48,0.3);  color: var(--red); }

/* ── Spectrum Canvas ──────────────────────────────────────────────────────── */
#spectrum-canvas {
  width: 100%;
  height: 220px;
  border-radius: var(--radius);
  cursor: crosshair;
  display: block;
}

/* ── Freq ID tooltip ─────────────────────────────────────────────────────── */
.freq-tooltip {
  background: var(--bg3);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-primary);
  display: none;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.freq-tooltip.visible { display: flex; }
.freq-hz    { color: var(--accent);  font-weight: 700; font-size: 15px; }
.freq-note  { color: var(--amber);   font-weight: 700; }
.freq-db    { color: var(--text-secondary); }

/* ── Controls Strip ───────────────────────────────────────────────────────── */
.controls-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg1);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--cond);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  min-height: 36px;
  min-width: 44px;
}

.btn:hover           { background: var(--bg4); border-color: var(--border-lit); }
.btn.btn-primary     { background: var(--accent); border-color: var(--accent); color: #000; }
.btn.btn-primary:hover { background: #00e0ff; }
.btn.btn-danger      { background: rgba(255,59,48,0.15); border-color: var(--red); color: var(--red); }
.btn.btn-success     { background: rgba(48,209,88,0.15); border-color: var(--green); color: var(--green); }
.btn.btn-sm          { padding: 5px 10px; font-size: 11px; min-height: 28px; }
.btn.active          { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.btn:disabled        { opacity: 0.4; cursor: not-allowed; }

/* ── Segmented Controls ───────────────────────────────────────────────────── */
.segmented {
  display: inline-flex;
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.segmented button {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  border-right: 1px solid var(--border);
  min-height: 34px;
}

.segmented button:last-child { border-right: none; }
.segmented button.active     { background: var(--accent-dim); color: var(--accent); }
.segmented button:hover:not(.active) { background: var(--bg3); color: var(--text-primary); }

/* ── Form Elements ────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 4px; }

label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select, textarea {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--body);
  font-size: 14px;
  padding: 8px 12px;
  width: 100%;
  transition: border-color var(--transition);
  min-height: 38px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,200,255,0.1);
}

textarea { resize: vertical; min-height: 80px; }

/* ── Toggle Switch ────────────────────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; cursor: pointer; }

.toggle {
  width: 36px; height: 20px;
  background: var(--bg4);
  border-radius: 10px;
  position: relative;
  border: 1px solid var(--border);
  transition: background var(--transition);
  flex-shrink: 0;
}

.toggle::after {
  content: '';
  width: 14px; height: 14px;
  background: var(--text-secondary);
  border-radius: 50%;
  position: absolute;
  top: 2px; left: 2px;
  transition: transform var(--transition), background var(--transition);
}

.toggle.on { background: var(--accent-dim); border-color: var(--accent); }
.toggle.on::after { transform: translateX(16px); background: var(--accent); }

/* ── Auth Screen ──────────────────────────────────────────────────────────── */
#auth-screen {
  position: fixed;
  inset: 0;
  background: var(--bg0);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
}

.auth-logo {
  font-family: var(--cond);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin-bottom: 4px;
}

.auth-tagline {
  font-family: var(--body);
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-family: var(--cond);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  margin-bottom: -1px;
}

.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form-panel { display: none; }
.auth-form-panel.active { display: block; }

.auth-error {
  background: rgba(255,59,48,0.1);
  border: 1px solid rgba(255,59,48,0.3);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--red);
  font-size: 13px;
  display: none;
}

.auth-error.visible { display: block; }

/* ── Bottom Nav (mobile) ──────────────────────────────────────────────────── */
#bottomnav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-h);
  background: var(--bg1);
  border-top: 1px solid var(--border);
  z-index: 100;
}

@media (max-width: 600px) {
  #bottomnav { display: flex; }
  #app       { padding-bottom: var(--bottom-h); }
}

.bottom-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--transition);
  padding: 6px 0;
}

.bottom-btn svg  { width: 20px; height: 20px; }
.bottom-btn span { font-family: var(--mono); font-size: 8px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; }
.bottom-btn.active { color: var(--accent); }

/* ── Settings Panel ───────────────────────────────────────────────────────── */
.settings-section { margin-bottom: 24px; }

.settings-section h3 {
  font-family: var(--cond);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.settings-label {
  font-size: 13px;
  color: var(--text-primary);
}

.settings-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── Toast Notifications ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 80px; right: 16px;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: var(--bg3);
  border: 1px solid var(--border-lit);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  font-family: var(--body);
  color: var(--text-primary);
  max-width: 300px;
  box-shadow: var(--shadow);
  animation: toast-in 0.25s ease forwards;
  pointer-events: all;
}

.toast.success { border-color: rgba(48,209,88,0.4); color: var(--green); }
.toast.error   { border-color: rgba(255,59,48,0.4);  color: var(--red); }
.toast.warn    { border-color: rgba(255,184,48,0.4); color: var(--amber); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
  backdrop-filter: blur(2px);
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border-lit);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.8);
}

.modal-title {
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ── Freq Log List ────────────────────────────────────────────────────────── */
.freq-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.freq-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 11px;
  transition: background var(--transition);
}

.freq-item:hover { background: var(--bg3); }
.freq-item-hz    { color: var(--accent);  font-weight: 700; min-width: 70px; }
.freq-item-note  { color: var(--amber);   min-width: 40px; }
.freq-item-type  { color: var(--text-secondary); flex: 1; }
.freq-item-action{ color: var(--green);   font-size: 10px; flex: 1; }
.freq-item-del   { color: var(--text-dim); cursor: pointer; padding: 2px 4px; }
.freq-item-del:hover { color: var(--red); }

/* ── Log icon badges ──────────────────────────────────────────────────────── */
.badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 2px;
}

.badge-feedback   { background: rgba(255,59,48,0.15);  color: var(--red); }
.badge-resonance  { background: rgba(255,149,0,0.15);  color: var(--orange); }
.badge-rumble     { background: rgba(0,200,255,0.1);   color: var(--accent); }
.badge-other      { background: rgba(255,255,255,0.07); color: var(--text-secondary); }

/* ── SPL Log mini-chart ───────────────────────────────────────────────────── */
#spl-log-canvas {
  width: 100%;
  height: 80px;
  display: block;
  border-radius: var(--radius);
}

/* ── Micro-animations ─────────────────────────────────────────────────────── */
.fade-in { animation: fade-in 0.2s ease forwards; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ── Scrollbars ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 2px; }

/* ── Meter scan line effect ───────────────────────────────────────────────── */
.scan-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.04) 2px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
  border-radius: var(--radius-lg);
}

/* ── Mic permission prompt ────────────────────────────────────────────────── */
.mic-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
  color: var(--text-secondary);
}

.mic-prompt svg { width: 48px; height: 48px; color: var(--text-dim); }
.mic-prompt h3  { font-family: var(--cond); font-size: 18px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-primary); }
.mic-prompt p   { font-size: 13px; max-width: 280px; }

/* ── Responsive tweaks ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .spl-main { grid-template-columns: 1fr; }
  .spl-bar-wrap { display: none; }
  .spl-value { font-size: clamp(72px, 20vw, 120px); }
  #spectrum-canvas { height: 160px; }
  .controls-strip { gap: 6px; }
  .btn { padding: 7px 12px; font-size: 12px; }
  .panel { padding: 10px; gap: 10px; }
}
