/* ============================================================
   MICROPHONE TEST ONLINE — Dark Audio Studio Design System
   ============================================================ */

/* --- Fonts --- */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/space-mono-400.woff2) format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/space-mono-700.woff2) format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/dm-sans-latin.woff2) format('woff2');
}

/* --- Design Tokens --- */
:root {
  --bg-deep: #0a0e17;
  --bg-card: #111827;
  --bg-elevated: #1a2235;
  --bg-input: #0d1220;
  --accent-cyan: #00f0ff;
  --accent-magenta: #ff2d7b;
  --accent-green: #00ff88;
  --accent-amber: #ffb800;
  --accent-red: #ff4757;
  --text-primary: #e8ecf4;
  --text-secondary: #7a8ba7;
  --text-muted: #4a5568;
  --border-subtle: rgba(0, 240, 255, 0.08);
  --border-default: rgba(0, 240, 255, 0.12);
  --border-active: rgba(0, 240, 255, 0.3);
  --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.3);
  --glow-magenta: 0 0 20px rgba(255, 45, 123, 0.3);
  --glow-green: 0 0 20px rgba(0, 255, 136, 0.3);
  --font-display: 'Space Mono', 'Cascadia Code', 'Fira Code', monospace;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --navbar-height: 56px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg-deep); scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-deep);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: #66f7ff; }

/* --- Background Pattern --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 0;
}

/* --- Layout --- */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
section {
  position: relative;
  z-index: 1;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: var(--navbar-height);
  background: rgba(17, 24, 39, 0.95);
  border-bottom: 1px solid var(--border-default);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: -0.02em;
}
.logo svg { width: 28px; height: 28px; flex-shrink: 0; }
.logo-text-dim { color: var(--text-secondary); font-weight: 400; }
.header-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}
.header-nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--accent-cyan); }
.mic-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-family: var(--font-display);
  color: var(--text-muted);
}
.mic-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.3s;
}
.mic-dot.active {
  background: var(--accent-green);
  box-shadow: var(--glow-green);
}
.mic-dot.recording {
  background: var(--accent-red);
  box-shadow: 0 0 12px rgba(255, 71, 87, 0.5);
  animation: pulseDot 1s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
  position: relative;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent-cyan), #66f7ff, var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.5;
}
.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 44px;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 30px rgba(0, 240, 255, 0.3);
  position: relative;
  overflow: hidden;
}
.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0, 240, 255, 0.4);
}
.btn-start:active { transform: translateY(0); }
.btn-start .mic-icon { font-size: 24px; }
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.trust-badge svg {
  width: 16px; height: 16px;
  color: var(--accent-green);
}
.permission-hint {
  display: none;
  margin-top: 16px;
  padding: 12px 20px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.error-hint {
  display: none;
  margin-top: 16px;
  padding: 12px 20px;
  background: rgba(255, 45, 123, 0.06);
  border: 1px solid rgba(255, 45, 123, 0.2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--accent-magenta);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   DASHBOARD (hidden until mic active)
   ============================================================ */
.dashboard { display: none; padding-bottom: 20px; }
.dashboard.active { display: block; }

/* --- Glass Cards --- */
.card {
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color 0.3s;
}
.card:hover { border-color: var(--border-active); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* --- Device Select --- */
.device-select {
  width: 100%;
  padding: 12px 40px 12px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%237a8ba7' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.2s;
}
.device-select:focus { outline: none; border-color: var(--accent-cyan); box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.1); }

/* --- Waveform --- */
.waveform-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
#waveformCanvas { width: 100%; height: 100%; display: block; }
.vu-bar-wrap {
  position: absolute;
  right: 14px;
  top: 14px;
  bottom: 14px;
  width: 22px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
}
.vu-bar-fill {
  width: 100%;
  background: linear-gradient(to top, var(--accent-green), var(--accent-amber), var(--accent-red));
  border-radius: 6px;
  transition: height 0.08s linear;
}
.db-label {
  position: absolute;
  right: 44px;
  top: 14px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Pitch Display --- */
.pitch-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  min-height: 80px;
}
.pitch-note {
  font-family: var(--font-display);
  font-size: clamp(40px, 10vw, 64px);
  font-weight: 700;
  color: var(--accent-cyan);
  line-height: 1;
  min-width: 110px;
  text-align: center;
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}
.pitch-meta { display: flex; flex-direction: column; gap: 6px; }
.pitch-freq, .pitch-cents {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-secondary);
}
.pitch-freq span, .pitch-cents span { color: var(--text-primary); }
.no-pitch {
  color: var(--text-muted);
  font-size: 15px;
  text-align: center;
}

/* --- Deep Mode --- */
/* Loopback */
.loopback-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color 0.3s;
}
.loopback-row.active { border-color: rgba(0, 240, 255, 0.25); }
.loopback-warning {
  margin-top: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--accent-amber);
  background: rgba(255, 184, 0, 0.06);
  border: 1px solid rgba(255, 184, 0, 0.15);
  border-radius: var(--radius-xs);
}
.loopback-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 16px;
}
.loopback-vol-label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.loopback-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-deep);
  border-radius: 2px;
  outline: none;
}
.loopback-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}
.loopback-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: none;
  cursor: pointer;
}
.loopback-vol-value {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 32px;
  text-align: right;
}

.deep-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color 0.3s;
}
.deep-mode-row.active { border-color: rgba(0, 240, 255, 0.25); }
.deep-label { display: flex; flex-direction: column; gap: 2px; }
.deep-label .label-main {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.deep-label .label-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.deep-label .label-range {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  transition: color 0.3s;
}
.deep-mode-row.active .label-range { color: var(--accent-cyan); }

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 48px; height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--bg-deep);
  border: 1px solid var(--border-default);
  border-radius: 13px;
  transition: all 0.3s;
}
.toggle-switch input:checked + .toggle-track {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent-cyan);
}
.toggle-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: transform 0.25s, background 0.25s;
  pointer-events: none;
}
.toggle-switch input:checked ~ .toggle-knob {
  transform: translateX(22px);
  background: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* --- FFT Spectrum --- */
.spectrum-wrap {
  position: relative;
  width: 100%;
  height: 100px;
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 12px;
}
#spectrumCanvas { width: 100%; height: 100%; display: block; }

/* --- Quality Score --- */
.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.score-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.score-ring-wrap {
  position: relative;
  width: 140px; height: 140px;
}
.score-ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring-bg {
  fill: none;
  stroke: var(--bg-elevated);
  stroke-width: 8;
}
.score-ring-fill {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 1.5s ease-out, stroke 0.5s;
}
.score-number {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-cyan);
}
.score-number small {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}
.score-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}
.score-details { display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.score-item { display: flex; flex-direction: column; gap: 4px; }
.score-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.score-item-name { color: var(--text-secondary); }
.score-item-value { font-family: var(--font-display); color: var(--text-primary); font-weight: 600; }
.score-bar {
  height: 6px;
  background: var(--bg-deep);
  border-radius: 3px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent-cyan);
  transition: width 1s ease-out;
  width: 0;
}

/* Score colors */
.score-excellent { color: var(--accent-green) !important; }
.score-excellent .score-ring-fill { stroke: var(--accent-green); }
.score-excellent .score-bar-fill { background: var(--accent-green); }
.score-good { color: var(--accent-cyan) !important; }
.score-good .score-ring-fill { stroke: var(--accent-cyan); }
.score-good .score-bar-fill { background: var(--accent-cyan); }
.score-fair { color: var(--accent-amber) !important; }
.score-fair .score-ring-fill { stroke: var(--accent-amber); }
.score-fair .score-bar-fill { background: var(--accent-amber); }
.score-poor { color: var(--accent-magenta) !important; }
.score-poor .score-ring-fill { stroke: var(--accent-magenta); }
.score-poor .score-bar-fill { background: var(--accent-magenta); }

/* Noise Floor Detail */
.noise-floor-detail {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.nf-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nf-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.nf-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.nf-rating {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
}
.nf-excellent { color: var(--accent-green); background: rgba(0, 255, 136, 0.1); }
.nf-good { color: var(--accent-cyan); background: rgba(0, 240, 255, 0.1); }
.nf-fair { color: var(--accent-amber); background: rgba(255, 184, 0, 0.1); }
.nf-poor { color: var(--accent-magenta); background: rgba(255, 45, 123, 0.1); }
.nf-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.nf-snr {
  font-family: var(--font-display);
  color: var(--text-secondary);
}
.nf-scale {
  font-size: 11px;
}

.score-recommendation {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.score-recommendation strong { color: var(--text-primary); }
.score-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-weight: 600;
  color: var(--accent-cyan);
  font-size: 14px;
}
/* Share Actions */
.share-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-share:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}
.btn-share svg { flex-shrink: 0; }
.btn-compare {
  color: var(--accent-cyan);
  border-color: rgba(0, 240, 255, 0.2);
}
.btn-compare:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.06);
}

/* Comparison Card */
.compare-instruction {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-secondary);
  font-size: 15px;
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 8px 0;
}
.compare-side { text-align: center; }
.compare-mic-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compare-score {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}
.compare-vs {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  align-self: center;
  padding-top: 24px;
}
.compare-bars { display: flex; flex-direction: column; gap: 8px; }
.compare-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.compare-bar-name {
  font-size: 11px;
  color: var(--text-muted);
  width: 42px;
  text-align: right;
  flex-shrink: 0;
}
.compare-bar-track {
  flex: 1;
  height: 5px;
  background: var(--bg-deep);
  border-radius: 3px;
  overflow: hidden;
}
.compare-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease-out;
}
.compare-bar-val {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--text-secondary);
  width: 24px;
  flex-shrink: 0;
}
.compare-winner {
  text-align: center;
  margin-top: 16px;
  padding: 12px;
  font-size: 15px;
  color: var(--accent-green);
  background: rgba(0, 255, 136, 0.06);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: var(--radius-xs);
}
@media (max-width: 600px) {
  .compare-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .compare-vs {
    padding-top: 0;
    margin: 4px 0;
  }
}

.score-measuring {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-secondary);
}
.score-measuring .spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 2px solid var(--border-default);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Recording --- */
.rec-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-rec:hover { border-color: var(--border-active); }
.btn-rec.recording {
  color: var(--accent-red);
  border-color: var(--accent-red);
  background: rgba(255, 71, 87, 0.08);
}
.rec-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-red);
  display: inline-block;
}
.btn-rec.recording .rec-dot { animation: pulseDot 1s infinite; }
.rec-timer {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-secondary);
  min-width: 44px;
}
.rec-playback {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.rec-playback audio {
  height: 36px;
  flex: 1;
  min-width: 200px;
  border-radius: var(--radius-xs);
}
.btn-small {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-small:hover { border-color: var(--border-active); color: var(--text-primary); }
.format-select {
  padding: 7px 10px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
}

/* --- Device Info --- */
.device-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.info-item { display: flex; flex-direction: column; gap: 3px; }
.info-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.info-value {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-primary);
}

/* ============================================================
   QUALITY SCORE BREAKDOWN
   ============================================================ */
.score-breakdown {
  display: none;
  padding: 40px 20px 20px;
}
.score-breakdown.active { display: block; }
.score-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.score-breakdown-item {
  text-align: center;
  padding: 20px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
}
.score-breakdown-ring {
  position: relative;
  width: 80px; height: 80px;
  margin: 0 auto 10px;
}
.score-breakdown-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-breakdown-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}
.score-breakdown-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ============================================================
   CROSSLINK: Vocal Range Test
   ============================================================ */
.crosslink-section { padding: 24px 0 40px; }
.crosslink-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.04), rgba(0, 255, 136, 0.03));
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.crosslink-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.06), transparent 70%);
  pointer-events: none;
}
.crosslink-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0, 240, 255, 0.12);
}
.crosslink-icon { font-size: 44px; flex-shrink: 0; }
.crosslink-text h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.crosslink-text p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}
.crosslink-arrow {
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 14px;
  margin-top: 6px;
  display: inline-block;
}

/* ============================================================
   AFFILIATE: Recommended Microphones
   ============================================================ */
.affiliate-section { padding: 40px 0; }
.affiliate-section .section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 8px;
}
.affiliate-disclosure {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.5;
}
.affiliate-disclosure a { color: var(--text-secondary); }
.affiliate-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.affiliate-tab {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
}
.affiliate-tab:hover { border-color: var(--border-active); }
.affiliate-tab.active {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.06);
}
.affiliate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.affiliate-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
}
.affiliate-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.affiliate-card.featured {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.08);
}
.affiliate-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  border-radius: 50px;
  white-space: nowrap;
}
.affiliate-card-img {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}
.affiliate-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.affiliate-price {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}
.affiliate-stars {
  color: var(--accent-amber);
  font-size: 14px;
  margin-bottom: 8px;
}
.affiliate-use {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.btn-affiliate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
}
.btn-affiliate:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ============================================================
   SEO CONTENT SECTIONS
   ============================================================ */
.content-section {
  padding: 40px 0;
  scroll-margin-top: calc(var(--navbar-height) + 10px);
}
.content-section h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.content-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-top: 28px;
  margin-bottom: 10px;
}
.content-section p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 14px;
  line-height: 1.7;
}
.content-section ul, .content-section ol {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 14px;
  padding-left: 22px;
  line-height: 1.7;
}
.content-section li { margin-bottom: 6px; }
.content-section strong { color: var(--text-primary); }

/* Setup grid */
.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.setup-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.setup-card:hover {
  border-color: rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.05);
}
.setup-icon {
  font-size: 36px;
  flex-shrink: 0;
  width: 48px;
  text-align: center;
}
.setup-info h3 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-primary);
  margin: 0 0 2px;
}
.setup-role {
  font-size: 12px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.setup-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 8px 0 12px;
}
.setup-info .btn-affiliate {
  font-size: 13px;
  padding: 6px 14px;
}

/* How-to steps */
.how-to-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.how-to-step {
  padding: 24px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  text-align: center;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 50%;
  margin-bottom: 10px;
}
.how-to-step h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.how-to-step p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Troubleshooting accordion */
.troubleshoot-list { margin-top: 16px; }
.troubleshoot-item {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.troubleshoot-q {
  width: 100%;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-card);
  border: none;
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.troubleshoot-q:hover { background: var(--bg-elevated); }
.troubleshoot-q::after {
  content: '+';
  font-size: 20px;
  color: var(--accent-cyan);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}
.troubleshoot-item.open .troubleshoot-q::after { transform: rotate(45deg); }
.troubleshoot-a {
  display: none;
  padding: 0 18px 16px;
  font-size: 15px;
  color: var(--text-secondary);
  background: var(--bg-card);
  line-height: 1.7;
}
.troubleshoot-item.open .troubleshoot-a { display: block; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-section { padding: 40px 0; }
.faq-list { margin-top: 20px; }
.faq-item {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-card);
  border: none;
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.faq-q:hover { background: var(--bg-elevated); }
.faq-q::after {
  content: '+';
  font-size: 20px;
  color: var(--accent-cyan);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  display: none;
  padding: 0 18px 16px;
  font-size: 15px;
  color: var(--text-secondary);
  background: var(--bg-card);
  line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-default);
  padding: 40px 20px 20px;
  position: relative;
  z-index: 1;
}
.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand .brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 10px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.site-footer h3 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer li a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.site-footer li a:hover { color: var(--accent-cyan); }
.footer-bottom {
  max-width: 1100px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a { color: var(--text-secondary); }
.footer-bottom a:hover { color: var(--accent-cyan); }
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  .site-header { padding: 0 16px; }
  .header-nav .nav-link { display: none; }
  .nav-toggle { display: block; }
  .hero { padding: 40px 16px 30px; }
  .btn-start { padding: 14px 32px; font-size: 16px; }
  .trust-badges { gap: 12px; }
  .card { padding: 16px; }
  .waveform-wrap { height: 140px; }
  .score-grid { grid-template-columns: 1fr; }
  .score-main { margin-bottom: 8px; }
  .score-breakdown-grid { grid-template-columns: repeat(2, 1fr); }
  .affiliate-grid { grid-template-columns: 1fr; }
  .how-to-steps { grid-template-columns: 1fr 1fr; }
  .crosslink-card { flex-direction: column; text-align: center; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 26px; }
  .pitch-note { font-size: 36px; }
  .pitch-display { gap: 14px; }
  .rec-controls { flex-direction: column; align-items: stretch; }
  .how-to-steps { grid-template-columns: 1fr; }
  .score-breakdown-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; }
  .affiliate-tabs { gap: 6px; }
  .affiliate-tab { padding: 6px 14px; font-size: 12px; }
}

/* ============================================================
   UTILITY
   ============================================================ */
.hide-mobile { display: inline; }
@media (max-width: 768px) { .hide-mobile { display: none; } }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ============================================================
   SOUND TEST / HEADPHONE TEST — Shared Tool Styles
   ============================================================ */
.st-dashboard, .ht-dashboard, .wt-dashboard { padding-bottom: 20px; }

/* Sound Test — Now Playing Status */
.st-status-card { background: rgba(0, 240, 255, 0.04); border-color: var(--accent-cyan); }
.st-now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}
.st-playing-indicator {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
}
.st-bar {
  display: block;
  width: 3px;
  background: var(--accent-cyan);
  border-radius: 1px;
  animation: st-pulse 0.8s ease-in-out infinite alternate;
}
.st-bar:nth-child(1) { height: 6px; animation-delay: 0s; }
.st-bar:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.st-bar:nth-child(3) { height: 10px; animation-delay: 0.3s; }
.st-bar:nth-child(4) { height: 16px; animation-delay: 0.45s; }
@keyframes st-pulse {
  from { height: 4px; }
  to { height: 18px; }
}
.st-playing-label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-cyan);
}
.st-tap-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  animation: st-hint-fade 2s ease-in-out infinite alternate;
}
@keyframes st-hint-fade {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* Quick test buttons */
.quick-test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.quick-test-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  color: var(--text-primary);
}
.quick-test-btn:hover { border-color: var(--border-active); }
.quick-test-btn.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.15);
}
.qt-icon {
  font-size: 24px;
  color: var(--accent-cyan);
  line-height: 1;
}
.qt-bass { color: var(--accent-amber); }
.qt-treble { color: var(--accent-magenta); }
.qt-label {
  font-size: 13px;
  font-weight: 600;
}

/* Tool button (sweep, tone, bass play) */
.btn-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-tool:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-tool.active {
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-red));
  color: #fff;
}

/* Frequency slider */
.freq-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-deep);
  border-radius: 3px;
  outline: none;
  margin: 12px 0;
}
.freq-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}
.freq-slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* Sweep */
.sweep-hz {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--accent-cyan);
  font-weight: 700;
}
.sweep-bar-wrap {
  height: 8px;
  background: var(--bg-deep);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}
.sweep-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green), var(--accent-amber), var(--accent-magenta));
  border-radius: 4px;
  transition: width 0.1s linear;
}
.sweep-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-display);
}

/* Bass test */
.bass-warning {
  padding: 12px 16px;
  background: rgba(255, 184, 0, 0.06);
  border: 1px solid rgba(255, 184, 0, 0.2);
  border-radius: var(--radius-xs);
  font-size: 13px;
  color: var(--accent-amber);
  margin-bottom: 14px;
  line-height: 1.5;
}
.bass-controls { display: flex; flex-direction: column; gap: 10px; }
.bass-freq-display {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-amber);
}
.bass-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bass-preset-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-secondary);
  background: var(--bg-deep);
  border: 1px solid var(--border-default);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
}
.bass-preset-btn:hover { border-color: var(--border-active); color: var(--text-primary); }

/* Tone generator */
.tone-controls { display: flex; flex-direction: column; gap: 10px; }
.tone-freq-display {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-cyan);
}
.tone-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Noise generator */
.noise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.noise-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}
.noise-btn:hover { border-color: var(--border-active); }
.noise-btn.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.15);
}
.noise-icon { font-size: 24px; color: var(--accent-cyan); }

/* Volume display */
.volume-display {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--accent-cyan);
  font-weight: 700;
}

/* ============================================================
   HEADPHONE TEST — Channel Visual
   ============================================================ */
.channel-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 20px;
  margin-bottom: 14px;
}
.channel-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.channel-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s;
}
.channel-icon.active-left {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}
.channel-icon.active-right {
  border-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}
.channel-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.channel-icon.active-left + .channel-label { color: var(--accent-cyan); }
.channel-icon.active-right + .channel-label { color: var(--accent-green); }
.channel-connector {
  width: 60px;
  height: 2px;
  background: var(--border-default);
  position: relative;
}
.channel-connector::before {
  content: '🎧';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
}

/* Bass response grid */
.bass-response-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
}
.bass-freq-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-display);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}
.bass-freq-btn:hover { border-color: var(--border-active); }
.bass-freq-btn.active {
  border-color: var(--accent-amber);
  background: rgba(255, 184, 0, 0.08);
  box-shadow: 0 0 12px rgba(255, 184, 0, 0.2);
}
.bass-freq-btn small {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ============================================================
   WEBCAM TEST
   ============================================================ */
.video-preview-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.video-preview-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-preview-wrap.mirrored video {
  transform: scaleX(-1);
}
.video-controls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}
.video-control-btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s;
}
.video-control-btn:hover { background: rgba(0, 0, 0, 0.8); border-color: var(--accent-cyan); }
.video-control-btn.active { border-color: var(--accent-cyan); color: var(--accent-cyan); }

/* Camera info grid */
.camera-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

/* Brightness bar */
.brightness-bar-wrap {
  height: 8px;
  background: var(--bg-deep);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}
.brightness-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-green), var(--accent-cyan));
  border-radius: 4px;
  transition: width 0.3s;
}
.brightness-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
}
.brightness-good { color: var(--accent-green); }
.brightness-low { color: var(--accent-amber); }
.brightness-over { color: var(--accent-red); }

/* Screenshot thumbnail */
.screenshot-preview {
  display: none;
  margin-top: 12px;
}
.screenshot-preview img {
  max-width: 200px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-default);
}
.screenshot-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ============================================================
   TOOL RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .quick-test-grid { grid-template-columns: repeat(3, 1fr); }
  .noise-grid { grid-template-columns: repeat(3, 1fr); }
  .bass-response-grid { grid-template-columns: repeat(3, 1fr); }
  .channel-visual { gap: 20px; }
  .channel-icon { width: 48px; height: 48px; font-size: 20px; }
}
@media (max-width: 480px) {
  .quick-test-grid { grid-template-columns: repeat(2, 1fr); }
  .noise-grid { grid-template-columns: 1fr; }
  .bass-response-grid { grid-template-columns: repeat(3, 1fr); }
  .tone-row { flex-direction: column; }
  .bass-presets { flex-direction: column; }
}
