/* ═══════════════════════════════════════════════════════════════
   WAVEGEN - Alien Biohack Neural Interface
   Bioluminescent organic tissue meets xenobiology lab
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Bio-organic palette */
  --void: #050508;
  --deep: #0a0d0f;
  --surface: #0f1214;
  --elevated: #151a1d;

  /* Bioluminescent accents */
  --bio-primary: #39ff14;
  --bio-primary-dim: rgba(57, 255, 20, 0.25);
  --bio-primary-faint: rgba(57, 255, 20, 0.08);
  --bio-primary-glow: 0 0 15px rgba(57, 255, 20, 0.4), 0 0 40px rgba(57, 255, 20, 0.15);

  --bio-secondary: #00f0ff;
  --bio-secondary-dim: rgba(0, 240, 255, 0.25);
  --bio-secondary-faint: rgba(0, 240, 255, 0.08);
  --bio-secondary-glow: 0 0 15px rgba(0, 240, 255, 0.4), 0 0 40px rgba(0, 240, 255, 0.15);

  --bio-accent: #b400ff;
  --bio-accent-dim: rgba(180, 0, 255, 0.25);
  --bio-accent-faint: rgba(180, 0, 255, 0.08);
  --bio-accent-glow: 0 0 15px rgba(180, 0, 255, 0.4), 0 0 40px rgba(180, 0, 255, 0.15);

  --bio-warm: #ff6a00;
  --bio-warm-dim: rgba(255, 106, 0, 0.25);

  --bio-danger: #ff0066;

  /* Text */
  --text: #d4e0d8;
  --text-dim: #7a918a;
  --text-muted: #445550;

  /* Membrane / Glass */
  --membrane: rgba(10, 18, 15, 0.85);
  --membrane-border: rgba(57, 255, 20, 0.1);
  --membrane-shine: linear-gradient(135deg, rgba(57, 255, 20, 0.04) 0%, transparent 40%, rgba(0, 240, 255, 0.03) 100%);

  /* Brainwave band colors */
  --band-delta: #8b5cf6;
  --band-theta: #06b6d4;
  --band-alpha: #10b981;
  --band-beta: #f59e0b;
  --band-gamma: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 16px; }

body {
  font-family: 'IBM Plex Mono', monospace;
  background: var(--void);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   BIO-ORGANIC BACKGROUND
   ═══════════════════════════════════════════════════════════════ */

.bio-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bio-veins {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.vein {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: vein-grow 6s ease-out forwards;
}
.v1 { animation-delay: 0s; }
.v2 { animation-delay: 0.8s; }
.v3 { animation-delay: 1.6s; }
.v4 { animation-delay: 2.4s; }
.v5 { animation-delay: 3.2s; }

@keyframes vein-grow {
  to { stroke-dashoffset: 0; }
}

.bio-cell {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: cell-drift 20s ease-in-out infinite;
}

.cell-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--bio-primary-faint) 0%, transparent 70%);
  top: -200px;
  right: -150px;
  animation-duration: 25s;
}

.cell-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--bio-accent-faint) 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
  animation-delay: 5s;
  animation-duration: 30s;
}

.cell-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--bio-secondary-faint) 0%, transparent 70%);
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 10s;
}

@keyframes cell-drift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  33% { transform: translate(30px, -40px) scale(1.1); opacity: 0.7; }
  66% { transform: translate(-20px, 30px) scale(0.95); opacity: 0.4; }
}

/* ═══════════════════════════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.app {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: grid;
  gap: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   BIO PANELS (replaces glass-panel)
   ═══════════════════════════════════════════════════════════════ */

.bio-panel {
  background: var(--membrane);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--membrane-border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.bio-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--membrane-shine);
  pointer-events: none;
}

.bio-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bio-primary-dim), var(--bio-secondary-dim), transparent);
  opacity: 0.6;
}

.panel-label {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--bio-primary);
  text-transform: uppercase;
  margin-bottom: 12px;
  text-shadow: 0 0 8px var(--bio-primary-dim);
}

.panel-label.small {
  font-size: 9px;
  letter-spacing: 2px;
  margin-bottom: 8px;
  color: var(--text-muted);
  text-shadow: none;
}

.panel-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 560px;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */

.hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 28px;
  background: var(--membrane);
  backdrop-filter: blur(16px);
  border: 1px solid var(--membrane-border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--membrane-shine);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bio-primary), var(--bio-secondary), var(--bio-accent));
  opacity: 0.6;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-mark { flex-shrink: 0; }

.logo-mark svg {
  width: 52px;
  height: 52px;
  animation: bio-pulse 4s ease-in-out infinite;
}

@keyframes bio-pulse {
  0%, 100% { filter: drop-shadow(0 0 6px var(--bio-primary-dim)); }
  50% { filter: drop-shadow(0 0 18px var(--bio-primary)); }
}

.hero-text { position: relative; }

.tag {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--bio-primary);
  margin-bottom: 6px;
  text-shadow: 0 0 12px var(--bio-primary-dim);
}

h1 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: 6px;
  line-height: 1;
  margin-bottom: 6px;
  color: var(--text);
}

h1 .accent {
  background: linear-gradient(135deg, var(--bio-primary) 0%, var(--bio-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════
   COMMAND DECK (Visualizer + Controls)
   ═══════════════════════════════════════════════════════════════ */

.command-deck {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: start;
}

.viz-column {
  display: grid;
  gap: 12px;
}

.viz-frame {
  background: var(--deep);
  border: 1px solid var(--membrane-border);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.viz-frame::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  padding: 1px;
  background: linear-gradient(135deg, var(--bio-primary-dim), transparent 50%, var(--bio-secondary-dim));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.viz-label {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.viz-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 300;
}

#scope {
  width: 100%;
  height: 240px;
  border-radius: 6px;
  background: linear-gradient(180deg,
    rgba(57, 255, 20, 0.02) 0%,
    transparent 50%,
    rgba(0, 240, 255, 0.02) 100%
  );
  display: block;
}

.viz-stats {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--membrane-border);
}

.stat-value {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--bio-primary);
  text-shadow: var(--bio-primary-glow);
  line-height: 1;
}

.stat-unit {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
}

.stat-divider {
  color: var(--text-muted);
  margin: 0 4px;
  font-size: 11px;
}

.stat-range {
  font-size: 11px;
  color: var(--text-dim);
}

.safety-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 106, 0, 0.08);
  border: 1px solid var(--bio-warm-dim);
  border-radius: 8px;
  color: var(--bio-warm);
  font-size: 11px;
}

.safety-banner svg { flex-shrink: 0; }

.hidden { display: none !important; }

/* Controls Column */
.controls-column {
  display: grid;
  gap: 16px;
}

.freq-control { padding: 20px; }

.freq-dial { margin-bottom: 12px; }

.freq-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  position: relative;
}

.freq-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: radial-gradient(circle at 40% 35%, #8fff6a, var(--bio-primary));
  border-radius: 50%;
  cursor: grab;
  box-shadow: var(--bio-primary-glow), 0 2px 8px rgba(0,0,0,0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.freq-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: var(--bio-primary-glow), var(--bio-secondary-glow);
}

.freq-slider::-webkit-slider-thumb:active { cursor: grabbing; }

.freq-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: radial-gradient(circle at 40% 35%, #8fff6a, var(--bio-primary));
  border-radius: 50%;
  border: none;
  cursor: grab;
  box-shadow: var(--bio-primary-glow);
}

.freq-markers {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 9px;
  color: var(--text-muted);
  font-family: 'Chakra Petch', sans-serif;
  letter-spacing: 1px;
}

.freq-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.freq-number {
  flex: 1;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--membrane-border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.freq-number:focus {
  border-color: var(--bio-primary);
  box-shadow: 0 0 0 2px var(--bio-primary-dim);
}

.freq-unit {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
}

/* Action Row */
.action-row { display: flex; gap: 12px; }

.action-controls {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--bio-primary), var(--bio-secondary), var(--bio-primary));
  border: none;
  color: var(--void);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--bio-primary-glow), 0 4px 20px rgba(0,0,0,0.4);
  flex-direction: column;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--void);
  z-index: 0;
}

.btn-primary .btn-icon,
.btn-primary .btn-text {
  position: relative;
  z-index: 1;
}

.btn-primary .btn-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--bio-primary);
}

.btn-primary .btn-text { color: var(--text); font-size: 11px; }

.btn-primary:hover {
  transform: scale(1.06);
  box-shadow: var(--bio-primary-glow), var(--bio-secondary-glow), 0 8px 30px rgba(0,0,0,0.5);
}

.btn-primary:active { transform: scale(0.97); }

.btn-primary.playing::before {
  background: linear-gradient(135deg, var(--bio-primary-faint), var(--bio-secondary-faint));
}

.btn-primary.playing .play-icon { display: none; }
.btn-primary.playing .stop-icon { display: block !important; }

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--bio-secondary);
  border-radius: 24px;
  color: var(--bio-secondary);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary svg { width: 14px; height: 14px; }

.btn-secondary:hover {
  background: var(--bio-secondary-faint);
  box-shadow: var(--bio-secondary-glow);
}

/* Aux Controls */
.aux-controls {
  padding: 16px 20px;
  display: grid;
  gap: 14px;
}

.control-group {
  display: grid;
  gap: 6px;
}

.control-group label {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.select-bio {
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--membrane-border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23445550' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 36px;
}

.select-bio:focus {
  border-color: var(--bio-primary);
  box-shadow: 0 0 0 2px var(--bio-primary-dim);
}

.select-bio option {
  background: var(--deep);
  color: var(--text);
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--bio-secondary);
  border-radius: 50%;
  cursor: grab;
  box-shadow: var(--bio-secondary-glow);
  transition: transform 0.15s ease;
}

.volume-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--bio-secondary);
  border-radius: 50%;
  border: none;
  cursor: grab;
}

.volume-val {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--bio-secondary);
  min-width: 36px;
  text-align: right;
}

.control-hint {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   IMPACT SECTION - THE HERO
   ═══════════════════════════════════════════════════════════════ */

.impact-section {
  margin-top: 8px;
}

.impact-panel {
  padding: 28px;
  display: grid;
  gap: 24px;
  border-color: var(--bio-primary-dim);
  position: relative;
}

.impact-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bio-primary), var(--bio-secondary), var(--bio-accent), var(--bio-primary));
  background-size: 200% 100%;
  animation: neural-flow 4s linear infinite;
  opacity: 0.8;
}

@keyframes neural-flow {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.impact-hero-header {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  align-items: start;
}

/* Neural Map SVG */
.neural-map-container {
  position: relative;
  padding: 8px;
}

.neural-map {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 8px var(--bio-primary-dim));
}

.brain-outline {
  animation: brain-breathe 5s ease-in-out infinite;
}

@keyframes brain-breathe {
  0%, 100% { stroke-opacity: 0.6; }
  50% { stroke-opacity: 1; }
}

.brain-label {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 6px;
  fill: var(--text-muted);
  letter-spacing: 1px;
  font-weight: 600;
}

.neural-node {
  animation: node-pulse 3s ease-in-out infinite;
}

.n-frontal { animation-delay: 0s; }
.n-parietal { animation-delay: 0.5s; }
.n-temporal-l { animation-delay: 1s; }
.n-temporal-r { animation-delay: 1.5s; }
.n-occipital { animation-delay: 2s; }
.n-brain-stem { animation-delay: 2.5s; }

@keyframes node-pulse {
  0%, 100% { opacity: 0.15; r: attr(r); }
  50% { opacity: 0.5; }
}

.synapse {
  animation: synapse-fire 4s ease-in-out infinite;
}

.s1 { animation-delay: 0.2s; }
.s2 { animation-delay: 0.7s; }
.s3 { animation-delay: 1.2s; }
.s4 { animation-delay: 1.7s; }
.s5 { animation-delay: 2.2s; }

@keyframes synapse-fire {
  0%, 100% { opacity: 0.15; }
  30% { opacity: 0.6; }
  60% { opacity: 0.1; }
}

.brain-fold {
  animation: fold-shimmer 6s ease-in-out infinite;
}

.f1 { animation-delay: 0s; }
.f2 { animation-delay: 1.5s; }
.f3 { animation-delay: 3s; }
.f4 { animation-delay: 4.5s; }

@keyframes fold-shimmer {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.5; }
}

/* Impact Title Block */
.impact-title-block {
  display: grid;
  gap: 12px;
}

.impact-panel h2 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.impact-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.evidence-badge {
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--membrane-border);
  border-radius: 16px;
  font-size: 10px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.btn-ghost {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid var(--membrane-border);
  border-radius: 6px;
  color: var(--text-dim);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  border-color: var(--bio-primary);
  color: var(--bio-primary);
}

/* Brainwave Band Display */
.brainwave-band-display {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.band-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--membrane-border);
  border-radius: 14px;
  font-size: 10px;
  opacity: 0.4;
  transition: all 0.3s ease;
}

.band-indicator.active {
  opacity: 1;
  border-color: currentColor;
}

.band-indicator[data-band="delta"] { color: var(--band-delta); }
.band-indicator[data-band="theta"] { color: var(--band-theta); }
.band-indicator[data-band="alpha"] { color: var(--band-alpha); }
.band-indicator[data-band="beta"] { color: var(--band-beta); }
.band-indicator[data-band="gamma"] { color: var(--band-gamma); }

.band-indicator.active[data-band="delta"] { background: rgba(139, 92, 246, 0.1); box-shadow: 0 0 10px rgba(139, 92, 246, 0.2); }
.band-indicator.active[data-band="theta"] { background: rgba(6, 182, 212, 0.1); box-shadow: 0 0 10px rgba(6, 182, 212, 0.2); }
.band-indicator.active[data-band="alpha"] { background: rgba(16, 185, 129, 0.1); box-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }
.band-indicator.active[data-band="beta"] { background: rgba(245, 158, 11, 0.1); box-shadow: 0 0 10px rgba(245, 158, 11, 0.2); }
.band-indicator.active[data-band="gamma"] { background: rgba(239, 68, 68, 0.1); box-shadow: 0 0 10px rgba(239, 68, 68, 0.2); }

.band-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.band-indicator.active .band-dot {
  animation: band-glow 1.5s ease-in-out infinite;
  box-shadow: 0 0 6px currentColor;
}

@keyframes band-glow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.band-name {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.band-range {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  opacity: 0.7;
}

/* Preset Info */
.preset-info {
  padding: 18px;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--membrane-border);
}

.preset-desc {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 6px;
}

.preset-caveat {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.headphones-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bio-warm-dim);
  border-radius: 6px;
  font-size: 11px;
  color: var(--bio-warm);
}

/* Parameters Panel */
.params-panel {
  padding: 14px 18px;
  background: var(--deep);
  border-radius: 8px;
  border: 1px solid var(--membrane-border);
}

.param-list {
  list-style: none;
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--text-dim);
}

.param-list li::before {
  content: '>';
  color: var(--bio-primary);
  margin-right: 8px;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   EFFECT CARDS - Large, Organic, Prominent
   ═══════════════════════════════════════════════════════════════ */

.effects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.effects-grid.secondary {
  grid-template-columns: repeat(5, 1fr);
}

.effect-card {
  padding: 24px 20px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--membrane-border);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.effect-card .card-accent-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.effect-card.mind .card-accent-line { background: linear-gradient(90deg, var(--bio-primary), transparent); }
.effect-card.body .card-accent-line { background: linear-gradient(90deg, var(--bio-secondary), transparent); }
.effect-card.soul .card-accent-line { background: linear-gradient(90deg, var(--bio-accent), transparent); }

.effect-card:hover {
  transform: translateY(-3px);
  border-color: var(--text-muted);
}

.effect-card:hover .card-accent-line { opacity: 1; }

.effect-card.mind:hover { box-shadow: 0 4px 20px var(--bio-primary-faint); }
.effect-card.body:hover { box-shadow: 0 4px 20px var(--bio-secondary-faint); }
.effect-card.soul:hover { box-shadow: 0 4px 20px var(--bio-accent-faint); }

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.card-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.effect-card.mind .card-icon { color: var(--bio-primary); }
.effect-card.body .card-icon { color: var(--bio-secondary); }
.effect-card.soul .card-icon { color: var(--bio-accent); }

.effect-card h3 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.effect-card.mind h3 { color: var(--bio-primary); }
.effect-card.body h3 { color: var(--bio-secondary); }
.effect-card.soul h3 { color: var(--bio-accent); }

.card-subtitle {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.effect-card p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  transition: color 0.3s ease;
}

.effect-card:hover p { color: var(--text); }

/* Mini Cards */
.effect-card-mini {
  padding: 14px 16px;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--membrane-border);
  transition: border-color 0.2s ease;
}

.effect-card-mini:hover { border-color: var(--text-muted); }

.effect-card-mini h4 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
}

.effect-card-mini p {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Sources Panel */
.sources-panel {
  padding: 14px 18px;
  background: var(--deep);
  border-radius: 8px;
  border: 1px solid var(--membrane-border);
}

.sources-panel ul {
  list-style: none;
  display: grid;
  gap: 6px;
}

.sources-panel li { font-size: 11px; }

.sources-panel a {
  color: var(--bio-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.sources-panel a:hover {
  color: var(--text);
  text-decoration: underline;
}

.disclaimer {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.5;
  padding-top: 14px;
  border-top: 1px solid var(--membrane-border);
}

/* ═══════════════════════════════════════════════════════════════
   PRESETS SECTION
   ═══════════════════════════════════════════════════════════════ */

.preset-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.preset-panel,
.timer-panel {
  padding: 20px;
}

.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
}

.filter-check input { display: none; }

.check-box {
  width: 16px;
  height: 16px;
  border: 1px solid var(--membrane-border);
  border-radius: 3px;
  background: var(--surface);
  position: relative;
  transition: all 0.2s ease;
}

.filter-check input:checked + .check-box {
  background: var(--bio-primary);
  border-color: var(--bio-primary);
}

.filter-check input:checked + .check-box::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--void);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.timer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 10px;
}

.btn-timer {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--bio-secondary);
  border-radius: 6px;
  color: var(--bio-secondary);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-timer:hover {
  background: var(--bio-secondary-faint);
  box-shadow: var(--bio-secondary-glow);
}

.timer-status {
  font-size: 11px;
  color: var(--text-dim);
}

/* Gamma Panel */
.gamma-panel {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  gap: 1.5rem;
  padding: 20px;
  border-color: var(--bio-warm-dim);
  align-items: center;
}

.gamma-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 106, 0, 0.04) 0%, transparent 60%);
  pointer-events: none;
  border-radius: 12px;
}

.gamma-badge {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--bio-warm);
  text-shadow: 0 0 8px var(--bio-warm-dim);
}

.gamma-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0 8px;
}

.gamma-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
}

.gamma-details {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gamma-details li {
  font-size: 10px;
  color: var(--text-dim);
  padding-left: 14px;
  position: relative;
}

.gamma-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bio-warm);
  box-shadow: 0 0 4px var(--bio-warm);
}

.gamma-safety {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

.gamma-content { flex: 1; }

.btn-gamma {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--bio-warm);
  border-radius: 8px;
  background: rgba(255, 106, 0, 0.08);
  color: var(--bio-warm);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  flex-shrink: 0;
}

.btn-gamma:hover {
  background: rgba(255, 106, 0, 0.15);
  box-shadow: 0 0 15px rgba(255, 106, 0, 0.3);
  transform: translateY(-1px);
}

.btn-gamma:active { transform: translateY(0); }

.gamma-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Plant Panel */
.plant-panel {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  gap: 1.5rem;
  padding: 20px;
  border-color: rgba(16, 185, 129, 0.25);
  align-items: center;
}

.plant-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, transparent 60%);
  pointer-events: none;
  border-radius: 12px;
}

.plant-badge {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #10b981;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.plant-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0 8px;
}

.plant-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
}

.plant-details {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.plant-details li {
  font-size: 10px;
  color: var(--text-dim);
  padding-left: 14px;
  position: relative;
}

.plant-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 4px #10b981;
}

.plant-safety {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

.plant-content { flex: 1; }

.plant-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex-shrink: 0;
}

.btn-plant {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 16px;
  border: 1px solid #10b981;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
}

.btn-plant small {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(16, 185, 129, 0.6);
}

.btn-plant:hover {
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.btn-plant:active { transform: translateY(0); }

.btn-plant.active {
  background: rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4), inset 0 0 8px rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.8);
}

.plant-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   QUICKSTART
   ═══════════════════════════════════════════════════════════════ */

.quickstart {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.quickstart-step {
  padding: 20px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.quickstart-step:hover {
  transform: translateY(-2px);
  border-color: var(--bio-primary-dim);
}

.step-number {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--bio-primary);
  opacity: 0.3;
  margin-bottom: 8px;
  line-height: 1;
  text-shadow: 0 0 10px var(--bio-primary-dim);
}

.quickstart-step h3 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: 6px;
}

.quickstart-step p {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

.site-footer { margin-top: 16px; }

.footer-content { padding: 28px; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--membrane-border);
}

.footer-col h4 {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.footer-col p {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
}

.evidence-legend {
  list-style: none;
  display: grid;
  gap: 6px;
}

.evidence-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.4;
}

.evidence-legend strong {
  color: var(--text);
  font-weight: 500;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.strong { background: var(--bio-primary); box-shadow: 0 0 5px var(--bio-primary-dim); }
.legend-dot.moderate { background: #10b981; box-shadow: 0 0 5px rgba(16, 185, 129, 0.3); }
.legend-dot.mixed { background: var(--bio-warm); box-shadow: 0 0 5px var(--bio-warm-dim); }
.legend-dot.limited { background: var(--bio-accent); box-shadow: 0 0 5px var(--bio-accent-dim); }
.legend-dot.poetic { background: var(--text-muted); }

.footer-bottom {
  padding-top: 16px;
  text-align: center;
}

.footer-bottom p {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════
   MODE SELECTOR
   ═══════════════════════════════════════════════════════════════ */

.mode-selector {
  margin-top: -8px;
}

.mode-panel {
  padding: 20px 24px 24px;
}

.mode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.mode-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
}

.timer-icon-mini {
  color: var(--text-muted);
  flex-shrink: 0;
}

.timer-select-mini {
  padding: 6px 28px 6px 10px;
  font-size: 11px;
  min-width: 90px;
}

.btn-timer-mini {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--bio-secondary);
  border-radius: 4px;
  color: var(--bio-secondary);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-timer-mini:hover {
  background: var(--bio-secondary-faint);
  box-shadow: var(--bio-secondary-glow);
}

.timer-status-mini {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.category-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.category-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-wrap: wrap;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--membrane-border);
  border-radius: 20px;
  color: var(--text-dim);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-transform: uppercase;
}

.cat-tab:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.cat-tab.active {
  background: var(--bio-primary-faint);
  border-color: var(--bio-primary);
  color: var(--bio-primary);
  box-shadow: 0 0 8px var(--bio-primary-faint);
}

.evidence-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
}

.evidence-toggle input { display: none; }

.preset-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.preset-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--membrane-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  position: relative;
  font-family: inherit;
  color: inherit;
}

.preset-card:hover {
  border-color: var(--text-muted);
  background: var(--elevated);
  transform: translateY(-1px);
}

.preset-card.active {
  border-color: var(--bio-primary);
  background: var(--bio-primary-faint);
  box-shadow: 0 0 12px var(--bio-primary-faint), inset 0 0 6px var(--bio-primary-faint);
}

.preset-card.active .pc-name {
  color: var(--bio-primary);
}

.pc-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.pc-dot[data-ev="strong"] { background: var(--bio-primary); box-shadow: 0 0 4px var(--bio-primary-dim); }
.pc-dot[data-ev="moderate"] { background: #10b981; box-shadow: 0 0 4px rgba(16, 185, 129, 0.3); }
.pc-dot[data-ev="mixed"] { background: var(--bio-warm); box-shadow: 0 0 4px var(--bio-warm-dim); }
.pc-dot[data-ev="limited"] { background: var(--bio-accent); box-shadow: 0 0 4px var(--bio-accent-dim); }
.pc-dot[data-ev="poetic"] { background: var(--text-muted); }

.pc-name {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  padding-right: 16px;
}

.pc-detail {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.pc-indicators {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.pc-badge {
  padding: 1px 5px;
  background: var(--membrane-border);
  border-radius: 3px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 8px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.pc-badge.pc-hp {
  color: var(--bio-warm);
  background: rgba(255, 106, 0, 0.15);
}

.pc-badge.pc-timer {
  color: var(--bio-secondary);
  background: var(--bio-secondary-faint);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .command-deck {
    grid-template-columns: 1fr;
  }

  .impact-hero-header {
    grid-template-columns: 160px 1fr;
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .impact-hero-header {
    grid-template-columns: 1fr;
  }

  .neural-map-container {
    max-width: 200px;
    margin: 0 auto;
  }

  .preset-section {
    grid-template-columns: 1fr;
  }

  .effects-grid {
    grid-template-columns: 1fr;
  }

  .effects-grid.secondary {
    grid-template-columns: repeat(2, 1fr);
  }

  .quickstart {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .app {
    padding: 16px 14px 60px;
    gap: 16px;
  }

  .hero { padding: 20px; }

  .hero-top { flex-direction: column; text-align: center; }

  h1 { letter-spacing: 3px; }

  .impact-panel { padding: 20px; }

  .effects-grid.secondary { grid-template-columns: 1fr; }

  .brainwave-band-display { justify-content: center; }

  .action-controls { flex-direction: column; }

  .preset-cards {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .mode-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .category-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .mode-timer {
    flex-wrap: wrap;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR & SELECTION
   ═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--deep); }
::-webkit-scrollbar-thumb { background: var(--elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

::selection {
  background: var(--bio-primary-dim);
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════
   THEME TOGGLE BUTTON
   ═══════════════════════════════════════════════════════════════ */

.btn-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--membrane-border);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-theme:hover {
  border-color: var(--bio-secondary);
  color: var(--bio-secondary);
  box-shadow: var(--bio-secondary-glow);
  transform: rotate(15deg);
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT THEME
   Adapted from wavegen-codex organic membrane design
   ═══════════════════════════════════════════════════════════════ */

[data-theme="light"] {
  --void: #ecffe5;
  --deep: #d6f0d7;
  --surface: rgba(250, 255, 247, 0.82);
  --elevated: rgba(242, 255, 236, 0.92);

  --bio-primary: #6dff3e;
  --bio-primary-dim: rgba(109, 255, 62, 0.36);
  --bio-primary-faint: rgba(109, 255, 62, 0.12);
  --bio-primary-glow: 0 0 18px rgba(109, 255, 62, 0.42), 0 0 42px rgba(109, 255, 62, 0.2);

  --bio-secondary: #00d4c2;
  --bio-secondary-dim: rgba(0, 212, 194, 0.34);
  --bio-secondary-faint: rgba(0, 212, 194, 0.1);
  --bio-secondary-glow: 0 0 16px rgba(0, 212, 194, 0.4), 0 0 34px rgba(0, 212, 194, 0.16);

  --bio-accent: #ff5d45;
  --bio-accent-dim: rgba(255, 93, 69, 0.3);
  --bio-accent-faint: rgba(255, 93, 69, 0.1);
  --bio-accent-glow: 0 0 14px rgba(255, 93, 69, 0.34), 0 0 30px rgba(255, 93, 69, 0.14);

  --bio-warm: #ff9f1a;
  --bio-warm-dim: rgba(255, 159, 26, 0.28);
  --bio-danger: #ff355e;

  --text: #10261f;
  --text-dim: #2e5a4d;
  --text-muted: #5d887b;

  --membrane: linear-gradient(152deg, rgba(253, 255, 252, 0.9) 0%, rgba(235, 252, 230, 0.68) 48%, rgba(234, 248, 255, 0.58) 100%);
  --membrane-border: rgba(18, 96, 79, 0.18);
  --membrane-shine: linear-gradient(130deg, rgba(109, 255, 62, 0.14) 0%, transparent 38%, rgba(0, 212, 194, 0.09) 64%, rgba(255, 93, 69, 0.06) 100%);

  --band-delta: #2866ff;
  --band-theta: #00b6d3;
  --band-alpha: #2ecf73;
  --band-beta: #f2ae00;
  --band-gamma: #ff4f3d;
}

/* Body & Background */
[data-theme="light"] body {
  background:
    radial-gradient(circle at 8% -12%, rgba(109, 255, 62, 0.28), transparent 36%),
    radial-gradient(circle at 91% 0%, rgba(0, 212, 194, 0.2), transparent 30%),
    radial-gradient(circle at 50% 106%, rgba(31, 139, 255, 0.16), transparent 44%),
    linear-gradient(132deg, #f1ffe8 0%, #dbf4de 44%, #e5f8ff 100%);
}

[data-theme="light"] .cell-1 {
  background: radial-gradient(circle, rgba(109, 255, 62, 0.2) 0%, rgba(109, 255, 62, 0.03) 54%, transparent 72%);
}

[data-theme="light"] .cell-2 {
  background: radial-gradient(circle, rgba(0, 212, 194, 0.2) 0%, rgba(0, 212, 194, 0.02) 58%, transparent 74%);
}

[data-theme="light"] .cell-3 {
  background: radial-gradient(circle, rgba(255, 93, 69, 0.13) 0%, rgba(255, 93, 69, 0.03) 52%, transparent 75%);
}

/* Bio Panel */
[data-theme="light"] .bio-panel {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 18px;
  box-shadow:
    0 14px 45px rgba(10, 45, 38, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -1px 0 rgba(18, 96, 79, 0.08);
}

[data-theme="light"] .bio-panel::after {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--bio-secondary), var(--bio-primary), transparent);
}

/* Hero */
[data-theme="light"] .hero {
  background:
    radial-gradient(circle at 20% 0%, rgba(109, 255, 62, 0.16), transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(31, 139, 255, 0.13), transparent 40%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.82) 0%, rgba(240, 255, 240, 0.72) 54%, rgba(228, 247, 255, 0.68) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 20px;
  box-shadow:
    0 20px 44px rgba(13, 70, 56, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

[data-theme="light"] .hero::before {
  background: repeating-linear-gradient(96deg, rgba(18, 96, 79, 0.06) 0, rgba(18, 96, 79, 0.06) 1px, transparent 1px, transparent 12px);
  opacity: 0.65;
}

[data-theme="light"] .hero::after {
  background: linear-gradient(90deg, var(--bio-secondary), var(--bio-primary), var(--bio-accent));
}

[data-theme="light"] .panel-label {
  color: #17715f;
  text-shadow: 0 0 8px rgba(109, 255, 62, 0.16);
}

[data-theme="light"] .tag {
  color: #17715f;
  text-shadow: 0 0 12px rgba(109, 255, 62, 0.16);
}

[data-theme="light"] h1 {
  color: #0e2820;
  text-shadow: 0 0 16px rgba(109, 255, 62, 0.12);
}

[data-theme="light"] h1 .accent {
  background: linear-gradient(120deg, #00b6d3 0%, #6dff3e 45%, #ff5d45 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Theme Toggle Light */
[data-theme="light"] .btn-theme {
  background: rgba(248, 255, 244, 0.88);
  border: 1px solid rgba(18, 96, 79, 0.24);
  color: #17715f;
}

[data-theme="light"] .btn-theme:hover {
  border-color: rgba(0, 212, 194, 0.5);
  color: #0f7f70;
  box-shadow: 0 0 12px rgba(0, 212, 194, 0.2);
}

/* Visualizer */
[data-theme="light"] .viz-frame {
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 212, 194, 0.14), transparent 46%),
    linear-gradient(160deg, rgba(11, 33, 32, 0.95) 0%, rgba(17, 45, 45, 0.94) 100%);
  border: 1px solid rgba(109, 255, 62, 0.22);
  border-radius: 18px;
  box-shadow:
    0 18px 35px rgba(8, 26, 27, 0.33),
    inset 0 1px 0 rgba(189, 255, 236, 0.16);
}

[data-theme="light"] .viz-frame::before {
  background: linear-gradient(130deg, rgba(109, 255, 62, 0.5), rgba(0, 212, 194, 0.4), rgba(255, 93, 69, 0.25));
}

[data-theme="light"] .viz-label {
  color: rgba(186, 240, 228, 0.78);
}

[data-theme="light"] .viz-hint {
  color: rgba(150, 202, 193, 0.7);
}

[data-theme="light"] #scope {
  background:
    linear-gradient(180deg, rgba(0, 212, 194, 0.05), rgba(0, 0, 0, 0.08) 45%, rgba(109, 255, 62, 0.06)),
    repeating-linear-gradient(to right, rgba(170, 222, 211, 0.06) 0, rgba(170, 222, 211, 0.06) 1px, transparent 1px, transparent 18px);
}

[data-theme="light"] .stat-value {
  color: #8bff67;
  text-shadow: 0 0 16px rgba(109, 255, 62, 0.48);
}

[data-theme="light"] .stat-unit {
  color: rgba(194, 255, 242, 0.8);
}

[data-theme="light"] .stat-divider {
  color: rgba(160, 209, 196, 0.56);
}

[data-theme="light"] .stat-range {
  color: rgba(198, 243, 233, 0.72);
}

[data-theme="light"] .viz-stats {
  border-top: 1px solid rgba(167, 243, 225, 0.24);
}

/* Safety Banner */
[data-theme="light"] .safety-banner {
  background: rgba(255, 159, 26, 0.12);
  border: 1px solid var(--bio-warm-dim);
  color: #a65f00;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Controls */
[data-theme="light"] .freq-slider {
  background: linear-gradient(to right, rgba(109, 255, 62, 0.4) 0%, rgba(0, 212, 194, 0.45) 56%, rgba(255, 93, 69, 0.32) 100%);
  border: 1px solid rgba(18, 96, 79, 0.18);
  border-radius: 999px;
}

[data-theme="light"] .freq-slider::-webkit-slider-thumb {
  background: radial-gradient(circle at 35% 30%, #f2ffef, #6dff3e 60%, #00d4c2 100%);
  border-radius: 38% 62% 55% 45% / 45% 42% 58% 55%;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.46) inset,
    0 4px 10px rgba(8, 55, 46, 0.36),
    0 0 18px rgba(109, 255, 62, 0.38);
}

[data-theme="light"] .freq-number {
  background: rgba(248, 255, 245, 0.9);
  border: 1px solid rgba(18, 96, 79, 0.24);
  border-radius: 10px;
}

[data-theme="light"] .freq-number:focus {
  border-color: var(--bio-secondary);
  box-shadow: 0 0 0 2px rgba(0, 212, 194, 0.2);
}

[data-theme="light"] .btn-primary {
  background: conic-gradient(from 30deg, #8bff67, #00d4c2, #ff5d45, #8bff67);
  border-radius: 42% 58% 57% 43% / 42% 47% 53% 58%;
  width: 108px;
  height: 108px;
  box-shadow:
    0 9px 22px rgba(10, 58, 48, 0.27),
    0 0 22px rgba(0, 212, 194, 0.26);
}

[data-theme="light"] .btn-primary::before {
  background: linear-gradient(155deg, rgba(245, 255, 242, 0.95), rgba(231, 255, 227, 0.86));
}

[data-theme="light"] .btn-primary .btn-icon svg {
  fill: #128770;
}

[data-theme="light"] .btn-primary .btn-text {
  color: #136d5b;
}

[data-theme="light"] .btn-primary:hover {
  transform: scale(1.05) rotate(-3deg);
  border-radius: 48% 52% 42% 58% / 58% 44% 56% 42%;
  box-shadow:
    0 12px 28px rgba(10, 58, 48, 0.35),
    0 0 20px rgba(109, 255, 62, 0.38),
    0 0 28px rgba(0, 212, 194, 0.22);
}

[data-theme="light"] .btn-primary.playing::before {
  background: linear-gradient(140deg, rgba(228, 255, 221, 0.95), rgba(223, 249, 255, 0.85));
}

[data-theme="light"] .btn-secondary {
  background: rgba(230, 253, 249, 0.64);
  border: 1px solid rgba(0, 212, 194, 0.45);
  border-radius: 30px;
  color: #0f7f70;
}

[data-theme="light"] .btn-secondary:hover {
  background: rgba(214, 252, 244, 0.9);
  box-shadow: 0 0 16px rgba(0, 212, 194, 0.2);
}

[data-theme="light"] .select-bio {
  background-color: rgba(248, 255, 244, 0.88);
  border: 1px solid rgba(18, 96, 79, 0.24);
  border-radius: 10px;
  color: #1b4f43;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235d887b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

[data-theme="light"] .select-bio option {
  background: #effff0;
  color: #17483d;
}

[data-theme="light"] .volume-slider {
  background: linear-gradient(90deg, rgba(0, 212, 194, 0.4), rgba(31, 139, 255, 0.35));
}

[data-theme="light"] .volume-slider::-webkit-slider-thumb {
  background: radial-gradient(circle at 35% 30%, #ffffff, var(--bio-secondary));
  box-shadow: 0 0 10px rgba(0, 212, 194, 0.35);
}

[data-theme="light"] .volume-val {
  color: #0f7f70;
}

/* Impact Panel */
[data-theme="light"] .impact-panel {
  border-color: rgba(0, 212, 194, 0.28);
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 212, 194, 0.16), transparent 36%),
    radial-gradient(circle at 0% 100%, rgba(109, 255, 62, 0.14), transparent 44%),
    var(--membrane);
}

[data-theme="light"] .impact-panel h2 {
  color: #11362b;
}

[data-theme="light"] .evidence-badge {
  background: rgba(245, 255, 241, 0.9);
  border: 1px solid rgba(18, 96, 79, 0.2);
  color: #1c5f4f;
}

[data-theme="light"] .btn-ghost {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(18, 96, 79, 0.2);
}

[data-theme="light"] .btn-ghost:hover {
  border-color: var(--bio-secondary);
  color: #0f7f70;
  background: rgba(224, 255, 251, 0.72);
}

[data-theme="light"] .neural-map-container {
  background:
    radial-gradient(circle at 50% 45%, rgba(109, 255, 62, 0.09), transparent 60%),
    rgba(236, 255, 233, 0.7);
  border: 1px solid rgba(18, 96, 79, 0.14);
  border-radius: 16px;
  padding: 12px;
}

/* Effect Cards */
[data-theme="light"] .effect-card {
  background: linear-gradient(160deg, rgba(250, 255, 247, 0.9) 0%, rgba(239, 255, 234, 0.72) 100%);
  border-radius: 16px;
  border: 1px solid rgba(18, 96, 79, 0.16);
}

[data-theme="light"] .effect-card.mind .card-icon { color: #3ab214; }
[data-theme="light"] .effect-card.body .card-icon { color: #0a9e90; }
[data-theme="light"] .effect-card.soul .card-icon { color: #ce4f3d; }

[data-theme="light"] .effect-card.mind h3 { color: #3a8f22; }
[data-theme="light"] .effect-card.body h3 { color: #0f7f70; }
[data-theme="light"] .effect-card.soul h3 { color: #ab4435; }

[data-theme="light"] .effect-card:hover {
  border-color: rgba(18, 96, 79, 0.3);
}

[data-theme="light"] .effect-card.mind:hover { box-shadow: 0 8px 26px rgba(109, 255, 62, 0.18); }
[data-theme="light"] .effect-card.body:hover { box-shadow: 0 8px 26px rgba(0, 212, 194, 0.18); }
[data-theme="light"] .effect-card.soul:hover { box-shadow: 0 8px 26px rgba(255, 93, 69, 0.16); }

[data-theme="light"] .effect-card-mini {
  background: rgba(250, 255, 248, 0.74);
  border-radius: 12px;
  border: 1px solid rgba(18, 96, 79, 0.14);
}

[data-theme="light"] .effect-card-mini:hover {
  border-color: rgba(18, 96, 79, 0.3);
}

/* Preset Info & Params */
[data-theme="light"] .preset-info {
  background: rgba(250, 255, 248, 0.68);
  border-radius: 14px;
  border: 1px solid rgba(18, 96, 79, 0.14);
}

[data-theme="light"] .preset-desc {
  color: #153d32;
}

[data-theme="light"] .headphones-note {
  background: rgba(255, 159, 26, 0.14);
  border-radius: 10px;
  color: #9f6100;
}

[data-theme="light"] .params-panel {
  background: rgba(242, 255, 238, 0.72);
  border-radius: 12px;
  border: 1px solid rgba(18, 96, 79, 0.14);
}

[data-theme="light"] .param-list li::before {
  color: #20af94;
}

/* Sources */
[data-theme="light"] .sources-panel {
  background: rgba(243, 255, 240, 0.72);
  border-radius: 12px;
  border: 1px solid rgba(18, 96, 79, 0.14);
}

[data-theme="light"] .sources-panel a {
  color: #0b8475;
}

[data-theme="light"] .sources-panel a:hover {
  color: #225244;
}

[data-theme="light"] .disclaimer {
  border-top: 1px solid rgba(18, 96, 79, 0.14);
}

/* Mode Selector */
[data-theme="light"] .cat-tab {
  border: 1px solid rgba(18, 96, 79, 0.18);
}

[data-theme="light"] .cat-tab:hover {
  border-color: rgba(18, 96, 79, 0.35);
}

[data-theme="light"] .cat-tab.active {
  background: rgba(216, 255, 242, 0.92);
  border-color: rgba(0, 212, 194, 0.62);
  color: #12473b;
  box-shadow: 0 0 12px rgba(0, 212, 194, 0.18);
}

[data-theme="light"] .preset-card {
  background: rgba(250, 255, 248, 0.84);
  border: 1px solid rgba(18, 96, 79, 0.16);
  border-radius: 10px;
}

[data-theme="light"] .preset-card:hover {
  border-color: rgba(18, 96, 79, 0.3);
  background: rgba(242, 255, 236, 0.92);
}

[data-theme="light"] .preset-card.active {
  border-color: rgba(0, 212, 194, 0.62);
  background: linear-gradient(145deg, rgba(216, 255, 242, 0.92), rgba(226, 255, 228, 0.9));
  box-shadow: 0 0 12px rgba(0, 212, 194, 0.18);
}

[data-theme="light"] .preset-card.active .pc-name {
  color: #12473b;
}

[data-theme="light"] .pc-badge {
  background: rgba(18, 96, 79, 0.1);
}

[data-theme="light"] .pc-badge.pc-hp {
  color: #a65f00;
  background: rgba(255, 159, 26, 0.15);
}

[data-theme="light"] .pc-badge.pc-timer {
  color: #0f7f70;
  background: rgba(0, 212, 194, 0.1);
}

/* Band Indicators */
[data-theme="light"] .band-indicator {
  background: rgba(244, 255, 241, 0.72);
  border: 1px solid rgba(18, 96, 79, 0.16);
}

[data-theme="light"] .band-indicator.active[data-band="delta"] { background: rgba(40, 102, 255, 0.1); box-shadow: 0 0 10px rgba(40, 102, 255, 0.2); }
[data-theme="light"] .band-indicator.active[data-band="theta"] { background: rgba(0, 182, 211, 0.1); box-shadow: 0 0 10px rgba(0, 182, 211, 0.2); }
[data-theme="light"] .band-indicator.active[data-band="alpha"] { background: rgba(46, 207, 115, 0.1); box-shadow: 0 0 10px rgba(46, 207, 115, 0.2); }
[data-theme="light"] .band-indicator.active[data-band="beta"] { background: rgba(242, 174, 0, 0.12); box-shadow: 0 0 10px rgba(242, 174, 0, 0.22); }
[data-theme="light"] .band-indicator.active[data-band="gamma"] { background: rgba(255, 79, 61, 0.12); box-shadow: 0 0 10px rgba(255, 79, 61, 0.22); }

/* Buttons */
[data-theme="light"] .btn-timer {
  background: rgba(229, 255, 250, 0.7);
  border: 1px solid rgba(0, 212, 194, 0.5);
  color: #0f7f70;
}

[data-theme="light"] .btn-timer:hover {
  background: rgba(218, 253, 247, 0.96);
  box-shadow: 0 0 14px rgba(0, 212, 194, 0.22);
}

[data-theme="light"] .btn-timer-mini {
  background: rgba(229, 255, 250, 0.7);
  border: 1px solid rgba(0, 212, 194, 0.5);
  color: #0f7f70;
}

[data-theme="light"] .btn-timer-mini:hover {
  background: rgba(218, 253, 247, 0.96);
  box-shadow: 0 0 14px rgba(0, 212, 194, 0.22);
}

[data-theme="light"] .btn-gamma {
  border: 1px solid rgba(255, 159, 26, 0.62);
  background: rgba(255, 224, 164, 0.38);
  color: #9d5600;
}

[data-theme="light"] .btn-gamma:hover {
  background: rgba(255, 218, 144, 0.58);
  box-shadow: 0 0 15px rgba(255, 159, 26, 0.28);
}

/* Plant Panel */
[data-theme="light"] .plant-panel {
  border-color: rgba(35, 182, 118, 0.3);
  background:
    radial-gradient(circle at 0% 100%, rgba(34, 197, 94, 0.16), transparent 46%),
    linear-gradient(150deg, rgba(245, 255, 244, 0.88), rgba(236, 255, 243, 0.74));
}

[data-theme="light"] .plant-panel::before {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), transparent 60%);
}

[data-theme="light"] .plant-badge { color: #138d5e; }
[data-theme="light"] .plant-title { color: #1f4d3b; }
[data-theme="light"] .plant-desc { color: #2c6650; }
[data-theme="light"] .plant-details li { color: #2f6a54; }
[data-theme="light"] .plant-safety { color: #3c7561; }

[data-theme="light"] .plant-details li::before {
  background: #1aa76f;
  box-shadow: 0 0 4px rgba(26, 167, 111, 0.35);
}

[data-theme="light"] .btn-plant {
  border: 1px solid rgba(21, 146, 97, 0.45);
  background: rgba(230, 255, 240, 0.74);
  color: #187d54;
}

[data-theme="light"] .btn-plant:hover {
  border-color: rgba(21, 146, 97, 0.72);
  background: rgba(218, 255, 232, 0.9);
  box-shadow: 0 0 13px rgba(21, 146, 97, 0.18);
}

[data-theme="light"] .btn-plant.active {
  border-color: rgba(13, 122, 81, 0.85);
  box-shadow: 0 0 14px rgba(21, 146, 97, 0.3);
  background: linear-gradient(145deg, rgba(202, 252, 224, 0.96), rgba(216, 255, 243, 0.9));
}

[data-theme="light"] .btn-plant small {
  color: rgba(24, 125, 84, 0.75);
}

/* Quickstart */
[data-theme="light"] .quickstart-step:hover {
  border-color: rgba(0, 212, 194, 0.32);
  box-shadow: 0 12px 26px rgba(14, 75, 61, 0.12);
}

[data-theme="light"] .step-number {
  color: #22a98f;
  text-shadow: 0 0 10px rgba(0, 212, 194, 0.2);
}

[data-theme="light"] .quickstart-step h3 {
  color: #114235;
}

/* Footer */
[data-theme="light"] .legend-dot.strong { background: var(--bio-primary); box-shadow: 0 0 6px rgba(109, 255, 62, 0.35); }
[data-theme="light"] .legend-dot.moderate { background: #2ecf73; box-shadow: 0 0 6px rgba(46, 207, 115, 0.32); }
[data-theme="light"] .legend-dot.mixed { background: var(--bio-warm); box-shadow: 0 0 6px rgba(255, 159, 26, 0.3); }
[data-theme="light"] .legend-dot.limited { background: var(--bio-accent); box-shadow: 0 0 6px rgba(255, 93, 69, 0.3); }

/* Checkbox */
[data-theme="light"] .check-box {
  border: 1px solid rgba(18, 96, 79, 0.24);
  background: rgba(250, 255, 248, 0.9);
}

[data-theme="light"] .filter-check input:checked + .check-box {
  background: var(--bio-primary);
  border-color: #57d731;
}

[data-theme="light"] .filter-check input:checked + .check-box::after {
  border-color: #14463b;
}

/* Scrollbar & Selection */
[data-theme="light"] ::-webkit-scrollbar-track {
  background: rgba(13, 66, 55, 0.08);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--bio-secondary), var(--bio-primary));
  border-radius: 8px;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(#1f8bff, var(--bio-secondary));
}

[data-theme="light"] ::selection {
  background: rgba(0, 212, 194, 0.24);
  color: #10362d;
}
