:root {
  --bg: #1a0e05;
  --surface: #2a1808;
  --board: #2a1608;
  --board2: #3a2010;
  --fret: #9a7428;
  --nut: #d8c888;
  --string: #c8a030;
  --inlay: rgba(240,220,180,0.35);
  --text: #f0d8a0;
  --text-dim: #a08858;
  --text-muted: #5a4828;
  --gold: #d89838;
  --gold-dim: #8a6020;
  --correct: #6a9840;
  --wrong: #b03828;
  --selected: rgba(216,152,56,0.28);
  --border: rgba(216,152,56,0.25);
  --vint-cream: #e8c890;
  --vint-deep:  #18090a;
  --vint-rust:  #b04020;
  --vint-blue:  #2a4868;
}
/* ── VINTAGE THEME (50s blues juke joint) ─────── */
[data-theme="vintage"] body ,
:root[data-theme="vintage"] body {
  background-color: #1a0e05;
  background-image:
    /* paper grain noise */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.10'/%3E%3C/svg%3E"),
    /* warm amber spotlight + deep shadows */
    radial-gradient(ellipse 70% 55% at 50% 18%, rgba(232,176,72,0.16), transparent 70%),
    radial-gradient(ellipse 60% 40% at 18% 90%, rgba(176,64,32,0.14), transparent 70%),
    radial-gradient(ellipse 60% 50% at 82% 92%, rgba(42,72,104,0.12), transparent 70%),
    /* base wood-grain warmth */
    radial-gradient(ellipse at center, #2a1608 0%, #100604 90%);
  position: relative;
}
/* old-photo vignette */
[data-theme="vintage"] body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
}
/* slow tube-amp flicker */
[data-theme="vintage"] body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(232,176,72,0.08), transparent 70%);
  z-index: 2;
  mix-blend-mode: screen;
  animation: vintTubeFlicker 6s steps(30) infinite;
}
[data-theme="vintage"] #root #root { position: relative; z-index: 3; }
@keyframes vintScratchDrift {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: 0 0, 0 -480px, 0 760px; }
}
@keyframes vintTubeFlicker {
  0%,100% { opacity: 1; }
  6%   { opacity: 0.85; }
  9%    { opacity: 1; }
  41%   { opacity: 0.92; }
  44%   { opacity: 1; }
  68%   { opacity: 0.78; }
  70%   { opacity: 1; }
  92%   { opacity: 0.9; }
  94%   { opacity: 1; }
}
@keyframes vintLogoGlow {
  0%, 100% { text-shadow: 0 0 30px rgba(232,176,72,0.35), 0 2px 0 #5a3010, 0 4px 14px rgba(0,0,0,0.7); }
  50%      { text-shadow: 0 0 42px rgba(232,176,72,0.55), 0 2px 0 #5a3010, 0 4px 18px rgba(0,0,0,0.8); }
}

[data-theme="vintage"] .menu-logo {
  font-family: 'Fraunces', 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #f0c878;
  background: linear-gradient(180deg, #fce4a8 0%, #e8a838 45%, #b87018 80%, #6a3010 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #2a1004) drop-shadow(0 0 18px rgba(232,176,72,0.45));
  animation: vintLogoGlow 4s ease-in-out infinite;
  position: relative;
  display: inline-block;
}
/* art-deco rule under tagline */
[data-theme="vintage"] .menu-tagline {
  color: var(--vint-cream);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-style: normal;
  font-weight: 500;
  opacity: 0.85;
}
[data-theme="vintage"] .menu-divider {
  width: 140px; height: 1px;
  background: linear-gradient(90deg, transparent, #b87018 20%, #f0c878 50%, #b87018 80%, transparent);
  position: relative;
}
[data-theme="vintage"] .menu-divider::before {
  content: '✦';
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  color: #d89838;
  font-size: 10px;
  padding: 0 8px;
  text-shadow: 0 0 8px rgba(216,152,56,0.6);
}
[data-theme="vintage"] .menu-num {
  color: #b87018;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 700;
}
[data-theme="vintage"] .menu-label {
  font-family: 'Fraunces', 'Playfair Display', serif;
  letter-spacing: 0.04em;
  font-style: italic;
}
[data-theme="vintage"] .menu-item {
  position: relative;
  transition: all 0.25s ease;
  border-radius: 4px;
}
[data-theme="vintage"] .menu-item:hover .menu-item:hover {
  border-color: rgba(216,152,56,0.5);
  background: linear-gradient(90deg, rgba(216,152,56,0.10), rgba(176,64,32,0.04));
  transform: translateX(3px);
}
[data-theme="vintage"] .menu-item.active .menu-item.active {
  border-color: #d89838;
  background: linear-gradient(90deg, rgba(216,152,56,0.18), rgba(176,64,32,0.08));
  box-shadow: 0 0 14px rgba(216,152,56,0.28), inset 0 0 8px rgba(232,200,144,0.04);
}
[data-theme="vintage"] .progress-fill {
  background: linear-gradient(90deg, #6a3010, #b87018 50%, #f0c878);
  box-shadow: 0 0 10px rgba(216,152,56,0.45);
  position: relative; overflow: hidden;
}
[data-theme="vintage"] .progress-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(252,228,168,0.35) 50%, transparent 100%);
  animation: metalProgShimmer 3s linear infinite;
}
[data-theme="vintage"] .submit-btn {
  background: linear-gradient(180deg, rgba(216,152,56,0.18) 0%, rgba(106,48,16,0.18) 100%);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: 'Fraunces', serif;
  font-style: italic;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
}
[data-theme="vintage"] .submit-btn::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(252,228,168,0.4), transparent);
  transition: left 0.6s;
}
[data-theme="vintage"] .submit-btn:hover::before .submit-btn:hover::before { left: 100%; }
[data-theme="vintage"] .submit-btn:hover .submit-btn:hover {
  background: linear-gradient(180deg, rgba(216,152,56,0.32) 0%, rgba(106,48,16,0.28) 100%);
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(216,152,56,0.4);
  color: #fce4a8;
}
[data-theme="vintage"] .game-title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--vint-cream);
  text-shadow: 0 1px 0 #2a1004;
}
[data-theme="vintage"] .prompt-text {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--vint-cream);
}
[data-theme="vintage"] .note-list-title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  background: linear-gradient(180deg, #fce4a8 0%, #b87018 80%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="vintage"] .amp-label {
  font-family: 'Fraunces', serif;
  font-style: italic;
  letter-spacing: 0.18em;
}
/* ── METAL THEME ─────────────────────────────── */
[data-theme="metal"] {
  --bg: #06080a;
  --surface: #0d1218;
  --text: #d8eaf5;
  --text-dim: #5a7a90;
  --text-muted: #2a3a48;
  --gold: #00c8ff;
  --gold-dim: #006888;
  --correct: #00d060;
  --wrong: #ff2844;
  --selected: rgba(0,200,255,0.12);
  --border: rgba(0,200,255,0.18);
  --fret-accent: #00c8ff;
}
[data-theme="metal"] body {
  background-color: #06080a;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(0,200,255,0.025) 80px),
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(0,200,255,0.08), transparent 70%),
    radial-gradient(ellipse 50% 35% at 85% 90%, rgba(180,40,255,0.06), transparent 70%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(0,200,255,0.04), transparent 70%);
  position: relative;
}
/* Scanline overlay */
[data-theme="metal"] body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0,200,255,0.025) 2px,
    rgba(0,200,255,0.025) 3px
  );
  z-index: 1;
  mix-blend-mode: screen;
  animation: metalScanShift 8s linear infinite;
}
/* Subtle vignette + power-line flicker */
[data-theme="metal"] body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.4) 100%);
  z-index: 2;
  animation: metalFlicker 5s steps(20) infinite;
}
@keyframes metalScanShift {
  from { background-position: 0 0; }
  to   { background-position: 0 6px; }
}
@keyframes metalFlicker {
  0%, 100% { opacity: 1; }
  3%   { opacity: 0.85; }
  6%   { opacity: 1; }
  47%  { opacity: 1; }
  48%  { opacity: 0.78; }
  49%  { opacity: 1; }
  72%  { opacity: 0.92; }
  73%  { opacity: 1; }
}
[data-theme="metal"] #root { position: relative; z-index: 3; }
@keyframes metalPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(0,200,255,0.25), 0 0 24px rgba(0,200,255,0.12); }
  50%      { box-shadow: 0 0 20px rgba(0,200,255,0.45), 0 0 40px rgba(0,200,255,0.22); }
}
@keyframes metalLogoBuzz {
  0%, 100% { text-shadow: 0 0 40px rgba(0,200,255,0.45), 0 0 80px rgba(0,200,255,0.18), 0 0 4px rgba(180,40,255,0.3); }
  50%      { text-shadow: 0 0 50px rgba(0,200,255,0.7),  0 0 100px rgba(0,200,255,0.3),  0 0 6px rgba(180,40,255,0.45); }
}
[data-theme="metal"] .menu-logo {
  font-family: 'Oswald', sans-serif; font-style: normal; letter-spacing: 0.12em; text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #b8e8ff 30%, #00c8ff 55%, #0088b0 80%, #ffffff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(0,200,255,0.5)) drop-shadow(0 2px 0 rgba(0,0,0,0.6));
  animation: metalLogoBuzz 3.5s ease-in-out infinite;
  position: relative;
}
[data-theme="metal"] .menu-logo::after {
  content: none;
}
[data-theme="metal"] .menu-tagline { letter-spacing: 0.3em; color: var(--text-muted); }
[data-theme="metal"] .menu-divider { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
[data-theme="metal"] .menu-label { font-family: 'Oswald', sans-serif; font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 400; }
[data-theme="metal"] .menu-num { color: var(--gold-dim); }
[data-theme="metal"] .menu-item:hover, [data-theme="metal"] .menu-item.active { border-color: rgba(0,200,255,0.4); background: rgba(0,200,255,0.06); }
[data-theme="metal"] .menu-item.active { border-color: rgba(0,200,255,0.7); }
[data-theme="metal"] .prompt-text { font-family: 'Oswald', sans-serif; font-style: normal; letter-spacing: 0.1em; font-size: 1rem; color: var(--gold); text-shadow: 0 0 12px rgba(0,200,255,0.4); }
[data-theme="metal"] .game-title { color: var(--gold-dim); }
[data-theme="metal"] .progress-fill {
  background: linear-gradient(90deg, #006888, #00c8ff 70%, #b8f0ff);
  box-shadow: 0 0 12px #00c8ff, 0 0 24px rgba(0,200,255,0.4);
  position: relative;
  overflow: hidden;
}
[data-theme="metal"] .progress-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  animation: metalProgShimmer 2s linear infinite;
}
@keyframes metalProgShimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
[data-theme="metal"] .menu-item.active {
  background: linear-gradient(90deg, rgba(0,200,255,0.12), rgba(0,200,255,0.04));
  border-color: rgba(0,200,255,0.7);
  box-shadow: 0 0 16px rgba(0,200,255,0.25), inset 0 0 12px rgba(0,200,255,0.06);
  animation: metalPulse 2.5s ease-in-out infinite;
}
[data-theme="metal"] .menu-item {
  position: relative;
  transition: all 0.2s;
}
[data-theme="metal"] .menu-item:hover {
  transform: translateX(4px);
  box-shadow: 0 0 12px rgba(0,200,255,0.2);
}
[data-theme="metal"] .submit-btn, [data-theme="metal"] .back-btn {
  position: relative;
  overflow: hidden;
}
[data-theme="metal"] .submit-btn::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,200,255,0.3), transparent);
  transition: left 0.5s;
}
[data-theme="metal"] .submit-btn:hover::before { left: 100%; }
[data-theme="metal"] .submit-btn:hover {
  box-shadow: 0 0 16px rgba(0,200,255,0.35), inset 0 0 8px rgba(0,200,255,0.1);
  text-shadow: 0 0 8px rgba(0,200,255,0.6);
}
[data-theme="metal"] .note-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(0,200,255,0.35), inset 0 0 12px rgba(0,200,255,0.05);
}
[data-theme="metal"] .game-title {
  text-shadow: 0 0 8px rgba(0,200,255,0.3);
}
[data-theme="metal"] .scale-btn.active {
  background: rgba(0,200,255,0.15);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 10px rgba(0,200,255,0.3);
}
[data-theme="metal"] .note-input { background: #080e14; border-color: var(--gold-dim); }
[data-theme="metal"] .note-input:focus { border-color: var(--gold); box-shadow: 0 0 12px rgba(0,200,255,0.2); }
[data-theme="metal"] .submit-btn { background: rgba(0,200,255,0.08); border-color: var(--gold-dim); color: var(--gold); }
[data-theme="metal"] .submit-btn:hover { background: rgba(0,200,255,0.18); border-color: var(--gold); box-shadow: 0 0 12px rgba(0,200,255,0.2); }
[data-theme="metal"] .back-btn { background: rgba(0,200,255,0.06); border-color: var(--border); }
[data-theme="metal"] .back-btn:hover { color: var(--gold); background: rgba(0,200,255,0.14); border-color: var(--gold-dim); }
[data-theme="metal"] .scale-btn.active { background: rgba(0,200,255,0.1); border-color: var(--gold); color: var(--gold); }
[data-theme="metal"] .note-list-title { font-family: 'Oswald', sans-serif; font-style: normal; letter-spacing: 0.2em; text-transform: uppercase; }
[data-theme="metal"] .note-list-item { font-size: 1.5rem; letter-spacing: 0.08em; color: var(--text); }
[data-theme="metal"] .tweaks-panel { background: #0a1018; border-color: rgba(0,200,255,0.25); }
[data-theme="metal"] .tweaks-title { color: var(--gold); }
[data-theme="metal"] .tweak-opt.active { background: rgba(0,200,255,0.12); border-color: var(--gold); color: var(--gold); }
[data-theme="metal"] .amp-panel { background: linear-gradient(180deg,#0a1018 0%,#06080a 100%); border-color: #1a3040; box-shadow: 0 0 0 1px #0a1828, 0 4px 24px rgba(0,0,0,0.8), inset 0 1px 0 rgba(0,200,255,0.06); }
[data-theme="metal"] .amp-panel::before { background: linear-gradient(90deg,transparent,rgba(0,200,255,0.3),transparent); }
[data-theme="metal"] .amp-label { color: var(--gold-dim); background: #06080a; }
[data-theme="metal"] .amp-screw { background: radial-gradient(circle at 35% 35%, #1a3040, #060810); border-color: #0a1828; }
[data-theme="metal"] .amp-content a { color: var(--gold-dim); }
[data-theme="metal"] .amp-content a:hover { color: var(--gold); }
[data-theme="metal"] .amp-cmd { background: rgba(0,200,255,0.06); border-color: rgba(0,200,255,0.18); color: var(--text-dim); }

/* ── FUNK THEME ──────────────────────────────── */
[data-theme="funk"] {
  --bg: #0d0420;
  --surface: #1a0a30;
  --text: #ffe8f5;
  --text-dim: #c870e0;
  --text-muted: #6a3088;
  --gold: #ff40c0;       /* hot pink primary */
  --gold-dim: #a02890;
  --funk-lime: #c8ff20;  /* electric lime */
  --funk-orange: #ff8830;
  --funk-cyan: #40e8ff;
  --funk-purple: #a040ff;
  --correct: #c8ff20;
  --wrong: #ff4060;
  --selected: rgba(255,64,192,0.18);
  --border: rgba(255,64,192,0.28);
}
[data-theme="funk"] body {
  background-color: #0d0420;
  background-image:
    /* concentric "vinyl record" rings, very subtle */
    repeating-radial-gradient(circle at 50% 120%, transparent 0, transparent 28px, rgba(255,64,192,0.05) 28px, rgba(255,64,192,0.05) 29px),
    /* sparkle noise */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
    /* color washes */
    radial-gradient(ellipse 60% 45% at 12% 18%, rgba(255,64,192,0.18), transparent 70%),
    radial-gradient(ellipse 55% 40% at 88% 78%, rgba(64,232,255,0.14), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(160,64,255,0.18), transparent 70%),
    radial-gradient(ellipse 50% 35% at 85% 12%, rgba(200,255,32,0.10), transparent 70%);
  position: relative;
  overflow-x: clip;
}
/* zigzag / chevron pattern overlay */
[data-theme="funk"] body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg,
      transparent 0, transparent 30px,
      rgba(255,64,192,0.025) 30px, rgba(255,64,192,0.025) 32px),
    repeating-linear-gradient(-45deg,
      transparent 0, transparent 30px,
      rgba(64,232,255,0.025) 30px, rgba(64,232,255,0.025) 32px);
  z-index: 1;
  animation: funkChevronDrift 24s linear infinite;
}
/* disco-ball spotlight sweeping across */
[data-theme="funk"] body::after {
  content: '';
  position: fixed;
  top: -30%; left: -30%;
  width: 160%; height: 160%;
  pointer-events: none;
  background:
    conic-gradient(from 0deg at 50% 50%,
      transparent 0deg, transparent 80deg,
      rgba(255,64,192,0.05) 90deg, rgba(255,64,192,0.05) 100deg,
      transparent 110deg, transparent 170deg,
      rgba(200,255,32,0.05) 180deg, rgba(200,255,32,0.05) 190deg,
      transparent 200deg, transparent 260deg,
      rgba(64,232,255,0.05) 270deg, rgba(64,232,255,0.05) 280deg,
      transparent 290deg, transparent 360deg);
  z-index: 1;
  animation: funkDiscoSpin 30s linear infinite;
  mix-blend-mode: screen;
}
[data-theme="funk"] #root { position: relative; z-index: 3; }

@keyframes funkChevronDrift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 60px 60px, -60px 60px; }
}
@keyframes funkDiscoSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes funkRainbowText {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes funkBoogie {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  25%      { transform: translateY(-2px) rotate(1deg); }
  50%      { transform: translateY(0) rotate(-1deg); }
  75%      { transform: translateY(-1px) rotate(1deg); }
}
@keyframes funkPulseGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(255,64,192,0.35), 0 0 24px rgba(160,64,255,0.18); }
  50%      { box-shadow: 0 0 22px rgba(255,64,192,0.55), 0 0 44px rgba(200,255,32,0.25); }
}

[data-theme="funk"] .menu-logo {
  font-family: 'Bungee', 'Bungee Inline', 'Fraunces', serif;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(90deg,
    #ff40c0 0%, #ff8830 20%, #c8ff20 40%,
    #40e8ff 60%, #a040ff 80%, #ff40c0 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.6)) drop-shadow(0 0 28px rgba(255,64,192,0.55));
  animation: funkRainbowText 6s linear infinite, funkBoogie 1.4s ease-in-out infinite;
  display: inline-block;
}
[data-theme="funk"] .menu-tagline {
  color: var(--funk-cyan);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-style: italic;
}
[data-theme="funk"] .menu-divider {
  background: linear-gradient(90deg, transparent, var(--funk-lime) 30%, var(--gold) 50%, var(--funk-cyan) 70%, transparent);
  height: 2px;
  border-radius: 2px;
}
[data-theme="funk"] .menu-num { color: var(--funk-lime); font-weight: 700; }
[data-theme="funk"] .menu-item {
  position: relative;
  transition: all 0.2s ease;
  border-radius: 10px;
}
[data-theme="funk"] .menu-item:hover {
  border-color: rgba(255,64,192,0.5);
  background: rgba(255,64,192,0.08);
  transform: translateX(6px) rotate(-0.5deg);
}
[data-theme="funk"] .menu-item.active {
  border-color: var(--gold);
  background: linear-gradient(90deg, rgba(255,64,192,0.16), rgba(160,64,255,0.10));
  box-shadow: 0 0 16px rgba(255,64,192,0.35), inset 0 0 12px rgba(200,255,32,0.06);
  animation: funkPulseGlow 2.4s ease-in-out infinite;
}
[data-theme="funk"] .menu-label {
  font-family: 'Bungee', sans-serif;
  letter-spacing: 0.06em;
}

[data-theme="funk"] .progress-fill {
  background: linear-gradient(90deg, #ff40c0 0%, #ff8830 35%, #c8ff20 70%, #40e8ff 100%);
  background-size: 200% 100%;
  animation: funkRainbowText 4s linear infinite;
  box-shadow: 0 0 12px rgba(255,64,192,0.5), 0 0 24px rgba(200,255,32,0.25);
  position: relative;
  overflow: hidden;
}
[data-theme="funk"] .progress-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
  animation: metalProgShimmer 1.6s linear infinite;
}

[data-theme="funk"] .note-input {
  background: #1a0a30;
  border-color: var(--gold-dim);
  border-radius: 12px;
}
[data-theme="funk"] .note-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(255,64,192,0.35), inset 0 0 8px rgba(200,255,32,0.08);
}
[data-theme="funk"] .submit-btn {
  background: linear-gradient(90deg, rgba(255,64,192,0.14), rgba(160,64,255,0.14));
  border-color: var(--gold-dim);
  color: var(--gold);
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}
[data-theme="funk"] .submit-btn::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(200,255,32,0.4), transparent);
  transition: left 0.5s;
}
[data-theme="funk"] .submit-btn:hover::before { left: 100%; }
[data-theme="funk"] .submit-btn:hover {
  background: linear-gradient(90deg, rgba(255,64,192,0.28), rgba(200,255,32,0.16));
  border-color: var(--funk-lime);
  color: var(--funk-lime);
  box-shadow: 0 0 18px rgba(255,64,192,0.45);
  transform: translateY(-1px);
}
[data-theme="funk"] .back-btn {
  background: rgba(255,64,192,0.08);
  border-color: var(--border);
  border-radius: 999px;
}
[data-theme="funk"] .back-btn:hover {
  color: var(--funk-lime);
  background: rgba(200,255,32,0.12);
  border-color: var(--funk-lime);
}
[data-theme="funk"] .scale-btn.active {
  background: rgba(255,64,192,0.14);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 10px rgba(255,64,192,0.3);
}
[data-theme="funk"] .game-title {
  background: linear-gradient(90deg, var(--gold), var(--funk-lime));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="funk"] .prompt-text {
  font-family: 'Fraunces', serif;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--funk-cyan);
}
[data-theme="funk"] .note-list-title {
  font-family: 'Bungee', sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--gold), var(--funk-lime), var(--funk-cyan));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: funkRainbowText 5s linear infinite;
}
[data-theme="funk"] .note-list-item {
  font-family: 'Bungee', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

[data-theme="funk"] .tweaks-panel {
  background: linear-gradient(180deg, #1a0a30 0%, #0d0420 100%);
  border-color: rgba(255,64,192,0.35);
  border-radius: 16px;
  box-shadow: 0 0 24px rgba(255,64,192,0.2);
}
[data-theme="funk"] .tweaks-title {
  background: linear-gradient(90deg, var(--gold), var(--funk-lime));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="funk"] .tweak-opt.active { background: rgba(255,64,192,0.18); border-color: var(--gold); color: var(--gold); }

[data-theme="funk"] .amp-panel {
  background: linear-gradient(180deg,#1a0a30 0%,#0d0420 100%);
  border-color: #4a1a60;
  box-shadow: 0 0 0 1px #2a0a40, 0 4px 24px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,64,192,0.1);
  border-radius: 16px;
}
[data-theme="funk"] .amp-panel::before { background: linear-gradient(90deg,transparent,var(--gold),var(--funk-lime),var(--funk-cyan),transparent); }
[data-theme="funk"] .amp-label { color: var(--funk-lime); background: #0d0420; font-family: 'Bungee', sans-serif; letter-spacing: 0.12em; }
[data-theme="funk"] .amp-screw { background: radial-gradient(circle at 35% 35%, #6a2090, #1a0420); border-color: #2a0a40; }
[data-theme="funk"] .amp-content a { color: var(--funk-cyan); }
[data-theme="funk"] .amp-content a:hover { color: var(--funk-lime); }
[data-theme="funk"] .amp-cmd { background: rgba(255,64,192,0.08); border-color: rgba(255,64,192,0.22); color: var(--text-dim); }
[data-theme="funk"] .theme-btn.active { background: rgba(255,64,192,0.16); border-color: var(--gold); color: var(--gold); }

html { overflow-x: clip; }

/* ── TWEAKS CTA BUTTON ───────────────────────── */
.tweaks-cta {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 400;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1.5px solid var(--gold);
  background: linear-gradient(135deg, rgba(216,152,56,0.18), rgba(176,64,32,0.10));
  color: var(--gold);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 0 0 0 rgba(216,152,56,0);
  animation: ctaPulseVintage 2.4s ease-in-out infinite;
}
.tweaks-cta:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 22px rgba(216,152,56,0.55);
}
.tweaks-cta-icon {
  display: inline-block;
  font-size: 1.1rem;
  animation: ctaSpin 4s linear infinite;
}
.tweaks-cta-label { white-space: nowrap; }

/* Stop CTA animations during gameplay */
[data-in-game] .tweaks-cta,
[data-in-game] .tweaks-cta-icon,
[data-in-game] [data-theme="metal"] .tweaks-cta,
[data-in-game] [data-theme="funk"] .tweaks-cta,
[data-in-game] [data-theme="funk"] .tweaks-cta-icon {
  animation: none !important;
}

@keyframes ctaSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes ctaPulseVintage {
  0%,100% { box-shadow: 0 0 0 0 rgba(216,152,56,0.45), 0 4px 14px rgba(0,0,0,0.4); }
  50%     { box-shadow: 0 0 0 10px rgba(216,152,56,0), 0 4px 14px rgba(0,0,0,0.4); }
}
@keyframes ctaPulseMetal {
  0%,100% { box-shadow: 0 0 0 0 rgba(0,200,255,0.55), 0 4px 14px rgba(0,0,0,0.5); }
  50%     { box-shadow: 0 0 0 12px rgba(0,200,255,0), 0 4px 14px rgba(0,0,0,0.5); }
}
@keyframes ctaPulseFunk {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,64,192,0.55), 0 4px 14px rgba(0,0,0,0.5); }
  50%     { box-shadow: 0 0 0 12px rgba(255,64,192,0), 0 4px 14px rgba(0,0,0,0.5); }
}

[data-theme="metal"] .tweaks-cta {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(0,200,255,0.16), rgba(0,100,140,0.08));
  color: var(--gold);
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  animation: ctaPulseMetal 2.2s ease-in-out infinite;
}
[data-theme="metal"] .tweaks-cta:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.6), 0 0 22px rgba(0,200,255,0.6);
}

[data-theme="funk"] .tweaks-cta {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(255,64,192,0.20), rgba(160,64,255,0.12));
  color: #ffe8f5;
  font-family: 'Bungee', sans-serif;
  letter-spacing: 0.06em;
  animation: ctaPulseFunk 1.8s ease-in-out infinite, funkBoogie 1.8s ease-in-out infinite;
}
[data-theme="funk"] .tweaks-cta-icon {
  animation: ctaSpin 2s linear infinite;
}
[data-theme="funk"] .tweaks-cta:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.6), 0 0 22px rgba(255,64,192,0.6);
}
body {
  background-color: var(--bg);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  color: var(--text);
  font-family: 'Playfair Display', Georgia, serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* --- MENU --- */
.menu-wrap {
  text-align: center;
  max-width: 640px;
  width: 100%;
  animation: fadeIn 0.5s ease;
}
.menu-logo {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-shadow: 0 0 40px rgba(200,144,48,0.3);
  margin-bottom: 4px;
  font-style: italic;
}
.menu-tagline {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 48px;
}
.menu-divider {
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 48px;
}
.menu-list { list-style: none; display: flex; flex-direction: column; gap: 4px; padding: 0; margin: 0 auto; max-width: 480px; }
.menu-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
}
.menu-item:hover, .menu-item.active {
  border-color: var(--border);
  background: var(--selected);
}
.menu-item.active { border-color: rgba(200,144,48,0.5); }
.menu-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: var(--gold-dim);
  min-width: 20px;
}
.menu-label { font-size: 1.05rem; color: var(--text); }
.menu-hint {
  margin-top: 48px;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
}
.menu-hint span { color: var(--gold-dim); }

.amp-panel {
  margin-top: 48px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  border: 2px solid #6a4a1a;
  border-radius: 8px;
  background: linear-gradient(180deg, #1a0e06 0%, #0f0804 100%);
  box-shadow:
    0 0 0 1px #3a2808,
    inset 0 1px 0 rgba(200,144,48,0.08),
    0 4px 24px rgba(0,0,0,0.6);
  padding: 18px 28px 16px;
  position: relative;
}
.amp-panel::before {
  content: '';
  position: absolute; top: -1px; left: 20px; right: 20px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,144,48,0.4), transparent);
}
.amp-panel::after {
  content: '';
  position: absolute; bottom: -1px; left: 20px; right: 20px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,144,48,0.2), transparent);
}
.amp-label {
  position: absolute;
  top: -10px; left: 50%; transform: translateX(-50%);
  background: #0f0804;
  padding: 0 10px;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--gold-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}
.amp-screws {
  position: absolute;
  top: 8px; left: 10px; right: 10px;
  display: flex; justify-content: space-between;
  pointer-events: none;
}
.amp-screw {
  width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8a6830, #3a2810);
  border: 1px solid #2a1c08;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
}
.amp-content {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.8;
  letter-spacing: 0.05em;
  text-align: center;
  margin-top: 6px;
}
.amp-content a {
  color: var(--gold-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.amp-content a:hover { color: var(--gold); }
.amp-content .amp-cmd {
  display: inline-block;
  background: rgba(200,144,48,0.08);
  border: 1px solid rgba(200,144,48,0.2);
  border-radius: 3px;
  padding: 2px 8px;
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 2px;
  letter-spacing: 0.06em;
}
/* --- GAME SCREEN --- */
.game-wrap {
  width: 100%;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: fadeIn 0.35s ease;
}
.game-header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.game-title {
  font-size: 0.7rem;
  font-family: 'DM Mono', monospace;
  color: var(--text-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.back-btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  background: rgba(200,144,48,0.08);
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 4px;
  transition: all 0.15s;
}
.back-btn:hover { color: var(--gold); background: rgba(200,144,48,0.16); border-color: var(--gold-dim); }

/* --- FRETBOARD WRAPPER --- */
.fretboard-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0;
}
.fretboard-wrap svg { display: block; }
@media (max-width: 960px) {
  .fretboard-wrap { overflow-x: visible; }
  .fretboard-wrap svg { width: 100%; height: auto; }
  .theme-bar { display: none; }
}

/* --- INPUT AREA --- */
.input-area {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 100%;
}
.prompt-text {
  font-size: 1.2rem;
  color: var(--text);
  font-style: italic;
}
.note-input-row { display: flex; gap: 10px; align-items: center; }
.note-input {
  background: var(--surface);
  border: 1px solid var(--gold-dim);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 1.4rem;
  text-align: center;
  width: 120px;
  padding: 10px 16px;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s;
  caret-color: var(--gold);
}
.note-input:focus { border-color: var(--gold); }
.note-input.correct { border-color: var(--correct); color: var(--correct); }
.note-input.wrong { border-color: var(--wrong); color: var(--wrong); }
.submit-btn {
  background: rgba(200,144,48,0.12);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: all 0.15s;
}
.submit-btn:hover { background: rgba(200,144,48,0.2); border-color: var(--gold); }

.feedback-msg {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  height: 20px;
  transition: opacity 0.2s;
}
.feedback-msg.correct { color: var(--correct); }
.feedback-msg.wrong { color: var(--wrong); }

/* --- PROGRESS --- */
.stats-row {
  display: flex; gap: 32px; align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.stat-label { color: var(--text-muted); }
.stat-val { color: var(--text-dim); }
.stat-val.good { color: var(--correct); }

.progress-bar-wrap { width: 100%; max-width: 600px; }
.progress-label {
  display: flex; justify-content: space-between;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.progress-track {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* --- NOTE LIST MODE --- */
.note-list-wrap { text-align: center; }
.note-list-title {
  font-size: 1.4rem;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 32px;
  letter-spacing: 0.06em;
}
.note-list-items {
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
}
.note-list-item {
  font-family: 'DM Mono', monospace;
  font-size: 1.6rem;
  color: var(--text);
  padding: 6px 32px;
  border-bottom: 1px solid var(--border);
  min-width: 180px;
  text-align: center;
  animation: slideIn 0.3s ease both;
}
.note-list-item:nth-child(1) { animation-delay: 0.0s }
.note-list-item:nth-child(2) { animation-delay: 0.05s }
.note-list-item:nth-child(3) { animation-delay: 0.1s }
.note-list-item:nth-child(4) { animation-delay: 0.15s }
.note-list-item:nth-child(5) { animation-delay: 0.2s }
.note-list-item:nth-child(6) { animation-delay: 0.25s }
.note-list-item:nth-child(7) { animation-delay: 0.3s }
.note-list-item:nth-child(8) { animation-delay: 0.35s }
.note-list-item:nth-child(9) { animation-delay: 0.4s }
.note-list-item:nth-child(10) { animation-delay: 0.45s }
.note-list-item:nth-child(11) { animation-delay: 0.5s }
.note-list-item:nth-child(12) { animation-delay: 0.55s }
.note-list-hint {
  margin-top: 32px;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}
.note-list-hint span { color: var(--gold-dim); }

/* --- FREE LEARN --- */
.free-legend {
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}
.free-legend span { color: var(--gold-dim); }

/* scale selector */
.scale-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center;
}
.scale-btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  padding: 6px 14px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.08em;
}
.scale-btn:hover { border-color: var(--gold-dim); color: var(--text); }
.scale-btn.active { background: rgba(200,144,48,0.15); border-color: var(--gold); color: var(--gold); }
.root-select {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  padding: 6px 10px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  outline: none;
}

/* --- NOTE KEYBOARD (mobile) --- */
.note-keyboard {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-width: 360px;
}
/* 12-note chromatic picker: 4 columns × 3 rows. Applied to the note variant
   (mode 1, mode 3 intervals); chord-quality picker keeps the flex-wrap. */
.note-keyboard.grid-12 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  max-width: 280px;
}
.note-keyboard.grid-12 .note-key { min-width: 0; }
.note-key {
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 44px;
  padding: 10px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.note-key:active { background: var(--selected); border-color: var(--gold); color: var(--gold); }
.note-key:disabled { opacity: 0.4; pointer-events: none; }

/* --- CHORD MODE --- */
.chord-input-wide {
  width: 220px;
  font-size: 1.2rem;
  text-align: center;
}

/* --- THEME BAR --- */
.theme-bar {
  position: fixed; bottom: 16px; right: 16px;
  display: flex; flex-direction: row; gap: 12px; align-items: flex-end;
  z-index: 500;
}
.theme-group {
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.theme-group-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.theme-group-btns { display: flex; gap: 4px; }
.theme-btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.15s;
  opacity: 0.7;
}
.theme-btn:hover { opacity: 1; border-color: var(--gold-dim); color: var(--text-dim); }
.theme-btn.active { opacity: 1; background: rgba(200,144,48,0.12); border-color: var(--gold); color: var(--gold); }
[data-theme="metal"] .theme-btn.active { background: rgba(0,200,255,0.1); border-color: var(--gold); color: var(--gold); }
.theme-sep { width: 1px; height: 32px; background: var(--border); align-self: flex-end; margin-bottom: 4px; }
.tweaks-panel {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  width: 220px;
  z-index: 1000;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: fadeIn 0.2s ease;
}
.tweaks-title {
  color: var(--gold);
  font-size: 0.8rem;
  margin-bottom: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tweak-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.tweak-label { color: var(--text-muted); letter-spacing: 0.1em; font-size: 0.68rem; }
.tweak-options { display: flex; gap: 6px; flex-wrap: wrap; }
.tweak-opt {
  padding: 4px 10px; border-radius: 3px;
  border: 1px solid var(--border);
  background: none; color: var(--text-dim);
  cursor: pointer; font-family: inherit; font-size: 0.7rem;
  transition: all 0.12s;
}
.tweak-opt:hover { border-color: var(--gold-dim); color: var(--text); }
.tweak-opt.active { background: rgba(200,144,48,0.15); border-color: var(--gold); color: var(--gold); }
.tweak-toggle {
  display: flex; align-items: center; justify-content: space-between;
}
.tweak-switch {
  width: 32px; height: 16px; border-radius: 8px;
  background: var(--border);
  border: none; cursor: pointer;
  position: relative; transition: background 0.2s;
}
.tweak-switch.on { background: var(--gold-dim); }
.tweak-switch::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--text);
  transition: transform 0.2s;
}
.tweak-switch.on::after { transform: translateX(16px); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes flash { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.flash { animation: flash 0.15s ease 2; }

@keyframes markerBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
.marker-blink { animation: markerBlink 1.3s ease-in-out infinite; }

/* ── AUDIO MUTE/UNMUTE BUTTON ────────────────── */
.audio-cta {
  position: fixed;
  bottom: 24px; left: 24px;
  z-index: 400;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1.5px solid var(--gold);
  background: linear-gradient(135deg, rgba(216,152,56,0.18), rgba(176,64,32,0.10));
  color: var(--gold);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.18s ease, box-shadow 0.25s ease, opacity 0.2s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.audio-cta:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 22px rgba(0,0,0,0.5), 0 0 18px rgba(216,152,56,0.45);
}
.audio-cta.muted {
  border-color: var(--text-muted);
  background: linear-gradient(135deg, rgba(120,80,40,0.18), rgba(40,20,10,0.10));
  color: var(--text-dim);
  opacity: 0.85;
}
.audio-cta-icon {
  font-size: 1.1rem;
  line-height: 1;
  display: inline-block;
}
.audio-cta-label { white-space: nowrap; }

[data-theme="metal"] .audio-cta {
  background: linear-gradient(135deg, rgba(0,200,255,0.16), rgba(0,100,140,0.08));
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
[data-theme="metal"] .audio-cta:hover {
  box-shadow: 0 6px 22px rgba(0,0,0,0.6), 0 0 20px rgba(0,200,255,0.55);
}
[data-theme="metal"] .audio-cta.muted {
  background: linear-gradient(135deg, rgba(40,60,80,0.20), rgba(8,16,24,0.10));
  border-color: var(--text-muted);
  color: var(--text-dim);
}

[data-theme="funk"] .audio-cta {
  background: linear-gradient(135deg, rgba(255,64,192,0.20), rgba(160,64,255,0.12));
  color: #ffe8f5;
  font-family: 'Bungee', sans-serif;
  letter-spacing: 0.06em;
}
[data-theme="funk"] .audio-cta:hover {
  box-shadow: 0 6px 22px rgba(0,0,0,0.6), 0 0 20px rgba(255,64,192,0.55);
}
[data-theme="funk"] .audio-cta.muted {
  background: linear-gradient(135deg, rgba(80,40,60,0.20), rgba(40,16,30,0.10));
  border-color: var(--text-muted);
  color: var(--text-dim);
}
