/**
 * Dojo — Sunlit overrides (Orbitron / academy shell).
 * Dark defaults stay in each page’s inline :root. Contract: html[data-theme="sunlit"].
 */
html[data-theme="sunlit"] {
  color-scheme: light;
  /* Hub + rhythm_hub shared tokens */
  --bg: #f0ebe3;
  --panel: rgba(255, 252, 247, 0.88);
  --blue: #1b6fa8;
  --gold: #9a7224;
  --border: rgba(27, 111, 168, 0.22);
  --red: #b91c1c;
  --purple: #5a4d86;
  --green: #0d8060;
  --text: #121a22;
  --text-muted: #5c6570;
  --text-soft: #5a6b7a;
  --header-border: rgba(30, 50, 70, 0.12);
  --dojo-radial-a: rgba(27, 111, 168, 0.12);
  --dojo-radial-b: rgba(13, 128, 96, 0.1);
  --dojo-radial-c: rgba(154, 114, 36, 0.1);
  /* Drum academy */
  --academy-bg: #f4f1ea;
  --academy-blue: #1b6fa8;
  --academy-green: #0d8060;
  --academy-gold: #9a7224;
  --academy-border: rgba(27, 111, 168, 0.22);
  --academy-text: #121a22;
  --academy-muted: #cbd5e1;
  /* Dojo landing (index) */
  --dojo-landing-bg: radial-gradient(circle, #e8ecf2 0%, #dce3ec 100%);
  --dojo-landing-heading: #0f172a;
  --dojo-landing-body: #334155;
}

/* Neutralize global brightness tweak in sunlit (hub / hubs ship this) */
html[data-theme="sunlit"] {
  filter: none !important;
}

html[data-theme="sunlit"] body.hub-shell,
html[data-theme="sunlit"] body.rhythm-hub-shell,
html[data-theme="sunlit"] body.pitch-hub-shell {
  color: var(--text);
  background-image:
    radial-gradient(circle at 0% 0%, var(--dojo-radial-a) 0%, transparent 42%),
    radial-gradient(circle at 100% 100%, var(--dojo-radial-b) 0%, transparent 42%),
    radial-gradient(circle at 50% 50%, var(--dojo-radial-c) 0%, transparent 55%);
}

html[data-theme="sunlit"] body.pitch-hub-shell {
  background-image: radial-gradient(circle at center, #e2e8f0 0%, var(--bg) 100%);
}

html[data-theme="sunlit"] body.dojo-landing {
  --hero-gold: #8a6a1f;
  --hero-blue: #1b6fa8;
  --muted: #475569;
  --line: rgba(27, 111, 168, 0.22);
  --panel: rgba(255, 252, 247, 0.92);
  background: var(--dojo-landing-bg);
  color: var(--dojo-landing-body);
}

html[data-theme="sunlit"] body.dojo-landing h1 {
  color: var(--dojo-landing-heading);
}

html[data-theme="sunlit"] body.dojo-landing .kicker,
html[data-theme="sunlit"] body.dojo-landing .section-label {
  color: #64748b;
}

html[data-theme="sunlit"] body.dojo-landing .card-desc {
  color: #475569;
}

html[data-theme="sunlit"] body.pitch-hub-shell header {
  flex-wrap: wrap;
  gap: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

html[data-theme="sunlit"] body.dojo-drum-academy {
  color: var(--academy-text);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(27, 111, 168, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(13, 128, 96, 0.1) 0%, transparent 42%);
}

html[data-theme="sunlit"] .dojo-drum-academy .subtle-grid {
  background-image: radial-gradient(rgba(15, 40, 60, 0.08) 1px, transparent 1px);
}

html[data-theme="sunlit"] .leaderboard-panel {
  background: rgba(255, 252, 247, 0.75);
  border-color: var(--border);
}

html[data-theme="sunlit"] #hub-search {
  background: rgba(255, 252, 247, 0.95);
  color: var(--text);
  border-color: var(--border);
}

/* --- Hub (hub.html): search, cards, mission, broadcast --- */
html[data-theme="sunlit"] body.hub-shell .search-wrap {
  background: rgba(27, 111, 168, 0.07);
  border-color: var(--border);
}

html[data-theme="sunlit"] body.hub-shell #hub-search:focus {
  box-shadow: 0 0 0 2px rgba(27, 111, 168, 0.18);
}

html[data-theme="sunlit"] body.hub-shell .search-clear:hover {
  background: rgba(27, 111, 168, 0.08);
  border-color: var(--blue);
  color: var(--blue);
}

html[data-theme="sunlit"] body.hub-shell #hub-no-results {
  color: var(--text-soft);
}

html[data-theme="sunlit"] body.hub-shell .card:hover {
  background: rgba(27, 111, 168, 0.07);
  border-color: var(--blue);
  box-shadow: 0 10px 28px rgba(26, 45, 61, 0.07);
}

html[data-theme="sunlit"] body.hub-shell .card-icon {
  background: rgba(27, 111, 168, 0.07);
  border-color: var(--border);
}

html[data-theme="sunlit"] body.hub-shell .card.kids-card {
  background: rgba(255, 214, 120, 0.2);
  border-color: var(--gold);
}

html[data-theme="sunlit"] body.hub-shell #mission-tracker {
  background: linear-gradient(90deg, rgba(90, 77, 134, 0.14), rgba(255, 252, 247, 0.92));
}

html[data-theme="sunlit"] body.hub-shell #m-desc {
  color: var(--text-soft) !important;
}

html[data-theme="sunlit"] body.hub-shell .progress-container {
  background: rgba(15, 40, 60, 0.12);
}

html[data-theme="sunlit"] body.hub-shell #broadcast-overlay {
  background: rgba(15, 23, 41, 0.5);
}

html[data-theme="sunlit"] body.hub-shell .broadcast-box {
  background: #faf8f4;
  color: var(--text);
  border-color: var(--green);
  box-shadow: 0 20px 50px rgba(26, 45, 61, 0.12);
}

html[data-theme="sunlit"] body.hub-shell #b-text {
  color: var(--text) !important;
}

/* --- Rhythm hub --- */
html[data-theme="sunlit"] body.rhythm-hub-shell .stat-pill {
  background: rgba(255, 252, 247, 0.85);
  border-color: var(--border);
  color: var(--green);
}

html[data-theme="sunlit"] body.rhythm-hub-shell .btn-back {
  color: var(--text);
  border-color: var(--border);
  background: rgba(27, 111, 168, 0.06);
}

html[data-theme="sunlit"] body.rhythm-hub-shell .btn-back:hover {
  border-color: var(--green);
  background: rgba(13, 128, 96, 0.1);
  color: var(--green);
}

html[data-theme="sunlit"] body.rhythm-hub-shell .card:hover {
  background: rgba(13, 128, 96, 0.08);
  border-color: var(--green);
  box-shadow: 0 10px 28px rgba(26, 45, 61, 0.08);
}

html[data-theme="sunlit"] body.rhythm-hub-shell .card-icon {
  background: rgba(13, 128, 96, 0.08);
  border-color: var(--border);
}

html[data-theme="sunlit"] body.rhythm-hub-shell .chevron {
  color: rgba(26, 45, 61, 0.2);
}

/* --- Pitch hub --- */
html[data-theme="sunlit"] body.pitch-hub-shell .btn-exit {
  color: var(--text-muted);
  border-color: var(--border);
  background: rgba(255, 252, 247, 0.75);
}

html[data-theme="sunlit"] body.pitch-hub-shell .btn-exit:hover {
  color: var(--red);
  border-color: var(--red);
  background: rgba(185, 28, 28, 0.06);
}

html[data-theme="sunlit"] body.pitch-hub-shell .card:hover {
  background: rgba(27, 111, 168, 0.07);
  border-color: var(--blue);
}

html[data-theme="sunlit"] body.pitch-hub-shell .lb-row {
  border-bottom-color: rgba(26, 45, 61, 0.08);
}

html[data-theme="sunlit"] body.pitch-hub-shell .chevron {
  color: rgba(26, 45, 61, 0.25);
}

/* --- Drum academy: chrome + Tailwind slate islands --- */
html[data-theme="sunlit"] .dojo-drum-chrome {
  border-bottom: 1px solid rgba(27, 111, 168, 0.14);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(244, 241, 234, 0.55));
}

/* Drum: scrollbars on light surfaces (header strip uses .scrollbar-thin) */
html[data-theme="sunlit"] .dojo-drum-academy .scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: rgba(27, 111, 168, 0.42) rgba(15, 40, 60, 0.1);
}

html[data-theme="sunlit"] .dojo-drum-academy .scrollbar-thin::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

html[data-theme="sunlit"] .dojo-drum-academy .scrollbar-thin::-webkit-scrollbar-thumb {
  background: rgba(27, 111, 168, 0.38);
  border-radius: 999px;
}

html[data-theme="sunlit"] .dojo-drum-academy .scrollbar-thin::-webkit-scrollbar-track {
  background: rgba(15, 40, 60, 0.09);
  border-radius: 999px;
}

html[data-theme="sunlit"] #root header[class*="sticky"] {
  background-color: rgba(255, 252, 247, 0.94) !important;
  border-color: rgba(27, 111, 168, 0.14) !important;
}

html[data-theme="sunlit"] #root [class*="bg-black/80"] {
  background-color: rgba(15, 23, 41, 0.42) !important;
}

/* Opacity variants after base so nested /30 /50 /70 keep hierarchy vs solid bg-slate-950 */
html[data-theme="sunlit"] #root [class*="bg-slate-950"] {
  background-color: rgba(255, 252, 247, 0.96) !important;
}

html[data-theme="sunlit"] #root [class*="bg-slate-950/70"] {
  background-color: rgba(255, 252, 247, 0.88) !important;
}

html[data-theme="sunlit"] #root [class*="bg-slate-950/50"] {
  background-color: rgba(255, 252, 247, 0.62) !important;
}

html[data-theme="sunlit"] #root [class*="bg-slate-950/30"] {
  background-color: rgba(255, 252, 247, 0.36) !important;
}

html[data-theme="sunlit"] #root [class*="bg-slate-900"] {
  background-color: rgba(255, 252, 247, 0.86) !important;
}

html[data-theme="sunlit"] #root [class*="shadow-[0_24px_80px_rgba(0,0,0,.45)]"] {
  box-shadow: 0 14px 40px rgba(26, 45, 61, 0.08) !important;
}

html[data-theme="sunlit"] #root [class*="shadow-[0_18px_60px_rgba(0,0,0,.5)]"] {
  box-shadow: 0 10px 32px rgba(26, 45, 61, 0.08) !important;
}

html[data-theme="sunlit"] #root [class*="text-slate-100"],
html[data-theme="sunlit"] #root [class*="text-slate-200"] {
  color: var(--academy-text) !important;
}

html[data-theme="sunlit"] #root [class*="text-slate-300"] {
  color: #334155 !important;
}

html[data-theme="sunlit"] #root [class*="text-slate-400"] {
  color: #475569 !important;
}

html[data-theme="sunlit"] #root [class*="text-slate-500"] {
  color: #64748b !important;
}

/* Future: html[data-theme="rose"|"ocean"] — extend here + css/jg-themes-future.css when UI ships. */
