/* default look: the classic vivid purple the site launched with */
body:not(.light) {
  background:
    radial-gradient(ellipse 130% 62% at 50% -12%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #7c3aed 0%, #6d28d9 52%, #5b21b6 100%);
  background-attachment: fixed;
}
/* Name 100 Challenge — light theme (body.light), default ON.
   Dark stays the alt look; toggle persists to localStorage.
   Only surfaces are flipped; brand accents, posters, buttons untouched. */

body.light {
  background:
    radial-gradient(1200px 500px at 50% -120px, rgba(124, 58, 237, 0.14), transparent 70%),
    linear-gradient(180deg, #f6f2ff 0%, #efe9ff 55%, #e9e2fb 100%);
  color: #241640;
}
body.light .site-header { border-bottom-color: rgba(30, 12, 64, 0.25); }

/* hero + prose */
body.light .hero h1, body.light .hero .lede { color: #241640; }
body.light .hero .lede { opacity: 0.75; }
body.light .prose, body.light main.page { color: #2c1d4a; }
body.light .prose strong { color: #1e0c40; }

/* daily row + banners keep their photo/gradient cards (already readable) */

/* variant chips + cards */
body.light .cards > .card { background: #ffffff; border-color: rgba(30, 12, 64, 0.14); }
body.light .cards > .card h2 { color: #241640; }
body.light .cards > .card p { color: #5c4d7d; }

/* game panel: the big flip — light cabinet, dark text */
body.light .game-panel {
  background: linear-gradient(180deg, #ffffff, #f5f1ff);
  border-color: rgba(30, 12, 64, 0.22);
  box-shadow: 8px 8px 0 rgba(30, 12, 64, 0.12), inset 0 0 0 2px rgba(255, 255, 255, 0.6);
  color: #241640;
}
body.light .game-panel .timer { color: #b8860b; text-shadow: none; }
body.light .game-panel .timer.low { color: #d6455c; text-shadow: none; }
body.light .game-panel .timer::before { color: #7a6a99; }
body.light .game-panel .score-chip {
  background: #efe9fb; color: #241640; border-color: rgba(30, 12, 64, 0.16);
  box-shadow: inset 0 2px 6px rgba(30, 12, 64, 0.08);
}
body.light .game-panel .score-chip small { color: #7a6a99; }
body.light .game-panel .progress { background: #e7dff6; border-color: rgba(30, 12, 64, 0.14); }
body.light .game-panel .entry-form input {
  background: #ffffff; color: #241640; border-color: rgba(30, 12, 64, 0.2);
  box-shadow: inset 0 2px 6px rgba(30, 12, 64, 0.06);
}
body.light .game-panel .entry-form input::placeholder { color: #9d8ec0; }
body.light .game-panel .feedback { color: #241640; }
body.light .game-panel .entries { background: #f6f2fc; border-color: rgba(30, 12, 64, 0.14); }
body.light .game-panel .entries li { color: #33245a; }
body.light .game-panel .entries:empty::after { color: #9d8ec0; }
body.light .game-panel .btn-ghost { color: #5c4d7d; border-color: rgba(30, 12, 64, 0.25); }
body.light .game-panel .audio-mute { background: #efe9fb; }
body.light .game-panel .group-chip { background: #efe9fb; color: #4a3670; }

/* leaderboard */
body.light .legends { background: #ffffff; border-color: rgba(30, 12, 64, 0.14); color: #241640; }
body.light .legends .legends-name { color: #33245a; }
body.light .legends .legends-ago,
body.light .legends .legends-time { color: #8b7cb0; }
body.light .legends-list li:nth-child(odd) { background: #f6f2fc; }
body.light .legends .legends-tab { background: #efe9fb; color: #4a3670; }
body.light .legends .legends-tab.on { background: #241640; color: #fff; }
body.light .legends-empty { color: #8b7cb0; }

/* end screen */
body.light .game-panel .end-screen { color: #33245a; }
body.light .game-panel .end-score { color: #b8860b; text-shadow: none; }
body.light .game-panel .end-score span { color: #9d8ec0; }
body.light .game-panel .end-verdict { color: #8a6d00; text-shadow: none; }
body.light .game-panel .end-meta, body.light .game-panel .end-missed { color: #7a6a99; }
body.light .game-panel .end-stats { border-color: rgba(30, 12, 64, 0.14); }
body.light .game-panel .end-stat + .end-stat::before { background: rgba(30, 12, 64, 0.14); }
body.light .game-panel .end-stat b { color: #241640; }
body.light .game-panel .end-stat small { color: #8b7cb0; }
body.light .game-panel .end-screen .btn-secondary {
  background: #efe9fb; color: #33245a; border-color: rgba(30, 12, 64, 0.2);
}
body.light .game-panel .end-screen .end-next { border-color: rgba(184, 134, 11, 0.5); }
body.light .game-panel .end-screen .end-next strong { color: #8a6d00; }
body.light .game-panel .party-stars span { color: rgba(30, 12, 64, 0.1); -webkit-text-stroke-color: rgba(30, 12, 64, 0.3); }
body.light .game-panel .lb-name-label { color: #7a6a99; }
body.light .game-panel .lb-name-chip { background: #efe9fb; color: #33245a; border-color: rgba(30, 12, 64, 0.25); }
body.light .game-panel .facts-hall-title { color: #4a3670; }
body.light .game-panel .facts-tile { background: #f6f2fc; }
body.light .game-panel .facts-card { background: #f6f2fc; color: #33245a; }

/* fan wall */
body.light .wall-title { color: #241640; }
body.light .wall-item:nth-child(odd) { background: #f6f2fc; }
body.light .wall-name, body.light .game-panel .wall-name { color: #33245a; }
body.light .wall-msg, body.light .game-panel .wall-msg { color: #5c4d7d; }
body.light .wall-form-title { color: #4a3670; }

/* dungeon hud + hud chips */
body.light .dg-hud { background: #efe9fb; color: #241640; }
body.light .dg-hud .dg-floor b { color: #8a6d00; }
body.light .dg-hud .dg-pip { background: rgba(30, 12, 64, 0.15); border-color: rgba(30, 12, 64, 0.3); }

/* theme toggle button itself */
.theme-toggle {
  flex: none; margin-left: 12px; cursor: pointer;
  font-size: 1.05rem; line-height: 1; padding: 6px 8px;
  background: rgba(255, 255, 255, 0.12); border: none; border-radius: 8px;
  color: inherit;
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.22); }
body.light .theme-toggle { background: rgba(30, 12, 64, 0.08); }

/* touch target: 29px → 40px on phones (impeccable audit, WCAG 2.5.5) */
@media (max-width: 640px) {
  .theme-toggle { padding: 10px; }
}
