/* ==========================================================================
   SONUS — Minimalist Study Sound & Frequency Tool
   Monochrome Edition with Tactile Glassmorphism
   ========================================================================== */

:root {
  --bg-base: #050507;
  --bg-surface: rgba(14, 14, 19, 0.7);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.24);
  
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;

  --accent-neon: #ffffff;
  --accent-glow: rgba(255, 255, 255, 0.5);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

button {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  font: inherit;
  color: inherit;
}

button:focus-visible {
  outline: 2px solid var(--accent-neon);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   Glassmorphism System (.glass-panel, .glass-btn, .glass-card)
   ========================================================================== */

.glass-panel {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 12px 32px -8px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.glass-btn {
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);
  transition: all 0.22s var(--ease-spring);
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 0 12px rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.glass-btn:active,
.glass-btn.active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: 
    0 4px 18px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 0 16px rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.glass-card {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 32px 36px;
  box-shadow: 
    0 20px 48px -12px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   Page Shell & Topbar
   ========================================================================== */

.page-shell {
  min-height: calc(100vh - 84px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 40px 48px;
  max-width: 1160px;
  margin: 0 auto;
  box-sizing: border-box;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 36px 48px 16px;
  box-sizing: border-box;
  position: relative;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.wordmark {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  display: inline-flex;
  align-items: baseline;
  transition: opacity 0.2s ease;
}

.wordmark span {
  color: var(--text-muted);
}

.clock-display {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" on;
  font-weight: 500;
  user-select: none;
  transition: color 0.2s ease;
}

.clock-display:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Center Curve Stage (Container-free, fades out at edges)
   ========================================================================== */

.curve-center-stage {
  width: 100%;
  margin-top: clamp(64px, 12vh, 140px);
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 20px 0 32px;
}

.presets-header-right {
  display: flex;
  align-items: center;
}

.flat-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.flat-reset-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-focus);
}

/* ==========================================================================
   Interactive Frequency Plot Area (Fading out softly at edges)
   ========================================================================== */

.eq-plot-wrap {
  position: relative;
  width: 100%;
  height: clamp(280px, 38vh, 350px);
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  user-select: none;
  touch-action: none;
  cursor: crosshair;
}

.eq-backdrop-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  /* Organic edge fadeouts for audio spectrum wave */
  mask-image: linear-gradient(90deg, transparent 0%, black 7%, black 93%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 7%, black 93%, transparent 100%);
}

/* dB Grid Lines — Going completely to the side of the page across full viewport */
.eq-db-grid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}

.db-line {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 1px;
  display: flex;
  align-items: center;
  transform: translateY(-50%);
}

.db-line.pos-12 { top: 8.89%; }
.db-line.pos-6  { top: 29.44%; }
.db-line.zero   { top: 50%; }
.db-line.neg-6  { top: 70.56%; }
.db-line.neg-12 { top: 91.11%; }

.db-line i {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.04);
}

.db-line.zero i {
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

/* SVG Curves */
.eq-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 3;
}

.eq-path-fill {
  fill: url(#curveFillGrad);
  transition: opacity 0.3s ease;
}

.eq-path-glow {
  fill: none;
  stroke: #ffffff;
  stroke-width: 4.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#neonBlur);
  opacity: 0.45;
  vector-effect: non-scaling-stroke;
  transition: opacity 0.3s ease;
}

.eq-path-core {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.eq-plot-wrap.is-morphing .eq-path-glow {
  opacity: 0.75;
}

.eq-plot-wrap.is-morphing .handle-ring {
  box-shadow: none;
}

/* Interactive Handles / Nodes */
.eq-nodes-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.eq-handle {
  position: absolute;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.eq-handle:active,
.eq-handle.is-dragging {
  cursor: grabbing;
}

.handle-ring {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  box-shadow: none;
  transition: transform 0.15s var(--ease-spring);
}

.handle-dot {
  display: none;
}

.eq-handle:hover .handle-ring,
.eq-handle.is-dragging .handle-ring {
  transform: scale(1.35);
  background: #ffffff;
  box-shadow: none;
}

.eq-handle:hover .handle-dot,
.eq-handle.is-dragging .handle-dot {
  display: none;
}

/* Dynamic Floating Tooltip */
.drag-tooltip {
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(14, 14, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 14px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  pointer-events: none;
  transform: translate(-50%, -100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s;
}

.drag-tooltip.visible {
  opacity: 1;
  visibility: visible;
}

.tooltip-band {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
}

.tooltip-val {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
}

.interactive-hint {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.eq-plot-wrap:hover .interactive-hint {
  opacity: 0.15;
}

/* Bottom Frequency Axis */
.eq-frequency-axis {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  padding: 14px 45px 0;
}

.axis-band-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  transition: color 0.2s;
  cursor: pointer;
}

.axis-band-label:hover {
  color: var(--text-primary);
}

.axis-band-label.active {
  color: #ffffff;
  font-weight: 600;
}

/* ==========================================================================
   Bottom Controls Dock (Play + Volume + Glass Presets Grid)
   ========================================================================== */

.bottom-dock {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  align-items: start;
  width: 100%;
}

.play-action-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  padding: 16px;
}

.main-focus-btn {
  position: relative;
  width: 100%;
  height: 52px;
  border-radius: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.btn-ambient-pulse {
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.main-focus-btn.is-playing {
  background: #ffffff;
  border-color: #ffffff;
  color: #060608;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.35);
}

.btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  display: flex;
  align-items: center;
}

.btn-caption {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.shortcut-legend {
  font-size: 10px;
  color: var(--text-muted);
}

kbd {
  display: inline-block;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: var(--text-secondary);
}

/* Master Volume Glass Widget */
.volume-widget {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 10px;
}

.icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.icon-btn.muted {
  color: var(--text-muted);
}

.volume-slider-track {
  position: relative;
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
}

.volume-slider-track input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  margin: 0;
}

.volume-slider-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #ffffff;
  border-radius: 999px;
  pointer-events: none;
  transition: width 0.05s ease;
}

.volume-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  min-width: 30px;
}

/* Presets Container & Glass Grid */
.presets-container {
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.presets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.presets-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 600;
}

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

.preset-pill {
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.preset-pill,
.preset-pill:hover,
.preset-pill:active,
.preset-pill.active,
body.light-theme .preset-pill,
body.light-theme .preset-pill:hover,
body.light-theme .preset-pill:active,
body.light-theme .preset-pill.active {
  box-shadow: none !important;
}

.preset-pill-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.preset-pill-desc {
  font-size: 9px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Masonry Grid Information Cards Directly Underneath
   ========================================================================== */

.masonry-cards-section {
  width: 100%;
  margin-top: 20px;
}

.masonry-grid {
  columns: 2 360px;
  column-gap: 16px;
}

.masonry-grid .about-card {
  break-inside: avoid;
  margin-bottom: 16px;
  padding: 28px 32px;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}

.about-card h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.about-card p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.about-card p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.dev-author {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dev-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.dev-role {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Interactive FAQ Accordion
   ========================================================================== */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
  overflow: hidden;
}

.faq-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
}

.faq-item[open] {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.16);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  list-style: none;
  transition: color 0.2s ease;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform 0.25s var(--ease-spring), color 0.2s ease;
  flex-shrink: 0;
  margin-left: 10px;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--text-primary);
}

.faq-answer {
  padding: 0 14px 14px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.faq-answer p {
  margin: 0;
}

.faq-answer em {
  font-style: italic;
  color: var(--text-primary);
}

.faq-answer strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   Bottom Center Creator Signature Badge
   ========================================================================== */

.bottom-signature-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 48px;
  margin-bottom: 40px;
  width: 100%;
}

.signature-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 999px;
  transition: transform 0.25s var(--ease-spring);
}

.signature-badge {
  width: 64px;
  height: 64px;
  object-fit: contain;
  opacity: 0.45;
  transition: opacity 0.25s ease, transform 0.25s var(--ease-spring);
}

.signature-link:hover .signature-badge {
  opacity: 0.95;
  transform: scale(1.1);
}

/* ==========================================================================
   Ambient Stillness / Idle Focus Mode (when sitting still)
   ========================================================================== */

.bottom-dock,
.masonry-cards-section,
.bottom-signature-wrap,
.eq-frequency-axis,
.interactive-hint,
.bottom-left-dock {
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease;
}

body.is-idle {
  cursor: none;
}

body.is-idle .bottom-dock,
body.is-idle .masonry-cards-section,
body.is-idle .bottom-signature-wrap,
body.is-idle .eq-frequency-axis,
body.is-idle .interactive-hint,
body.is-idle .bottom-left-dock {
  opacity: 0;
  pointer-events: none;
  filter: blur(2px);
  transform: translateY(8px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ensure Topbar, Sonus Wordmark & Live Time Clock stay prominently visible when inactive mode comes */
body.is-idle .topbar,
body.is-idle .wordmark,
body.is-idle .clock-display {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
}

/* ==========================================================================
   Ambient Focus Quote GUI Layer (Overlay HUD replacing bottom dock)
   ========================================================================== */

.idle-quote-layer {
  position: fixed;
  bottom: clamp(28px, 6vh, 60px);
  left: 50%;
  transform: translate(-50%, 16px);
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 1.2s;
  width: 90%;
  max-width: 660px;
  display: flex;
  justify-content: center;
  text-align: center;
}

body.is-idle .idle-quote-layer {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.idle-quote-hud {
  background: rgba(14, 14, 18, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: 20px 32px 18px;
  box-shadow: 
    0 16px 40px -8px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
}

.idle-quote-text {
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}

.idle-quote-author {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-style: normal;
}

/* ==========================================================================
   Bottom-Left Display & Quick Controls (Fullscreen + Light Mode)
   ========================================================================== */

.bottom-left-dock {
  position: fixed;
  bottom: 24px;
  left: 28px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
}

.utility-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.utility-icon-btn:hover {
  color: var(--text-primary);
}

.theme-icon-moon { display: none; }
body.light-theme .theme-icon-sun { display: none; }
body.light-theme .theme-icon-moon { display: block; }

.fs-icon-exit { display: none; }
body.is-fullscreen .fs-icon-enter { display: none; }
body.is-fullscreen .fs-icon-exit { display: block; }

/* ==========================================================================
   Light Mode Theme
   ========================================================================== */

body.light-theme {
  --bg-base: #f5f5f7;
  --bg-surface: rgba(255, 255, 255, 0.75);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(0, 0, 0, 0.22);

  --text-primary: #121214;
  --text-secondary: #5a5a65;
  --text-muted: #8e8e98;

  --accent-neon: #000000;
  --accent-glow: rgba(0, 0, 0, 0.15);

  color-scheme: light;
  background-color: var(--bg-base);
  color: var(--text-primary);
}

body.light-theme .glass-panel {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 
    0 12px 32px -8px rgba(0, 0, 0, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.light-theme .glass-btn {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.04);
  color: #18181b;
}

body.light-theme .glass-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 #ffffff;
}

body.light-theme .glass-btn:active,
body.light-theme .glass-btn.active {
  background: #18181b;
  border-color: #18181b;
  box-shadow: 
    0 4px 18px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

body.light-theme .glass-btn.active .preset-pill-name {
  color: #ffffff;
}

body.light-theme .glass-btn.active .preset-pill-desc {
  color: rgba(255, 255, 255, 0.7);
}

body.light-theme .glass-card {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 
    0 20px 48px -12px rgba(0, 0, 0, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.light-theme .main-focus-btn.is-playing {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
}

body.light-theme .volume-slider-track {
  background: rgba(0, 0, 0, 0.08);
}

body.light-theme .volume-slider-progress {
  background: #18181b;
}

body.light-theme .flat-reset-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-secondary);
}

body.light-theme .flat-reset-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.18);
  color: var(--text-primary);
}

body.light-theme .faq-item {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .faq-item:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.14);
}

body.light-theme .faq-item[open] {
  background: rgba(0, 0, 0, 0.035);
  border-color: rgba(0, 0, 0, 0.16);
}

body.light-theme kbd {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-secondary);
}

body.light-theme .drag-tooltip {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 0 14px rgba(0, 0, 0, 0.06);
}

body.light-theme .tooltip-val {
  color: #18181b;
}

body.light-theme .signature-badge {
  filter: invert(1);
}

body.light-theme .db-line i {
  background: rgba(0, 0, 0, 0.05);
}

body.light-theme .db-line.zero i {
  background: rgba(0, 0, 0, 0.1);
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

body.light-theme .eq-svg {
  color: #18181b;
}

body.light-theme .eq-path-glow {
  stroke: #18181b;
  opacity: 0.22;
}

body.light-theme .eq-path-core {
  stroke: #18181b;
}

body.light-theme .handle-ring {
  background: #18181b;
  box-shadow: none;
}

body.light-theme .eq-handle:hover .handle-ring,
body.light-theme .eq-handle.is-dragging .handle-ring {
  background: #000000;
  box-shadow: none;
}

body.light-theme .idle-quote-hud {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 
    0 16px 40px -8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 900px) {
  .topbar {
    padding: 24px 28px 12px;
  }

  .page-shell {
    padding: 16px 20px 36px;
  }

  .bottom-dock {
    grid-template-columns: 1fr;
  }

  .masonry-grid {
    columns: 1;
  }

  .eq-frequency-axis {
    padding: 12px 20px 0;
  }
}

@media (max-width: 600px) {
  .topbar {
    padding: 20px 20px 8px;
  }

  .eq-plot-wrap {
    height: 240px;
  }

  .axis-band-label {
    font-size: 8px;
  }

  .about-card {
    padding: 24px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
