/* Module surfaces for the shared dark theme. Game colors and artwork stay intact. */
:root[data-theme="dark"] :is(.daily-rules span, .weekly-page #daily-week, .device-badge, .device-specs span) {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line);
}

:root[data-theme="dark"] :is(.weekly-page .daily-board, .progress-shell, .spin-card, .device-card, .how-card) {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
  box-shadow: 0 6px 0 #0b1220;
}

:root[data-theme="dark"] :is(.daily-own, .weekly-page .daily-own, .share-output, .collection-summary, .spin-result) {
  background: linear-gradient(120deg, #203650, #22334a);
  color: #d5e6ff;
}

:root[data-theme="dark"] .weekly-page .daily-own > :is(small, strong) {
  color: var(--lime);
}

:root[data-theme="dark"] .weekly-page .daily-own > span {
  color: var(--muted);
}

:root[data-theme="dark"] .weekly-progress i { background: #3b4c64; }
:root[data-theme="dark"] .weekly-progress i.played { background: var(--lime); }

:root[data-theme="dark"] .daily-board li {
  color: var(--text);
  border-color: var(--line);
}

:root[data-theme="dark"] .weekly-page .daily-board li {
  background: var(--surface-2);
  border-color: var(--line);
}

:root[data-theme="dark"] .daily-board li[data-me="true"] {
  background: #203b59;
  border-color: #4773a7;
}

:root[data-theme="dark"] .weekly-page .daily-rank {
  background: #172235;
  color: var(--lime);
}

:root[data-theme="dark"] :is(.daily-board li small, .weekly-winner > small) {
  color: var(--muted);
}

:root[data-theme="dark"] .daily-board .board-scope-tabs {
  background: #131c2b;
  border: 1px solid var(--line);
}

:root[data-theme="dark"] .daily-board .board-scope-tabs button {
  background: transparent;
  color: var(--muted);
}

:root[data-theme="dark"] .daily-board .board-scope-tabs button:hover {
  background: var(--surface-2);
  color: var(--text);
}

:root[data-theme="dark"] .daily-board .board-scope-tabs button:is([aria-selected="true"], [aria-pressed="true"]) {
  background: #1768be;
  color: #fff;
}

/* The podium keeps its distinct prize colors, with light text on dark tints. */
:root[data-theme="dark"] .weekly-winner {
  background: linear-gradient(150deg, #51411e, #3b321e);
  color: #fff0bc;
  box-shadow: 0 5px 0 #272113;
}

:root[data-theme="dark"] .weekly-winner.place-1 {
  background: linear-gradient(150deg, #33455e, #27384f);
  color: #e1ebfa;
  box-shadow: 0 5px 0 #1a293b;
}

:root[data-theme="dark"] .weekly-winner.place-2 {
  background: linear-gradient(150deg, #294b3d, #223c33);
  color: #d9f5e5;
  box-shadow: 0 5px 0 #182c24;
}

:root[data-theme="dark"] .weekly-winner > small { color: inherit; opacity: .85; }

:root[data-theme="dark"] :is(.streak-banner, .weekly-page #daily-board-status:not(:empty), .how-note) {
  background: #443920;
  color: #ffe6a6;
}

:root[data-theme="dark"] .daily-arena #daily-error { color: #ff9eab; }

:root[data-theme="dark"] .daily-page .challenge-rank-link {
  background: #21344f;
  border-color: #39577d;
  color: #d5e6ff;
  box-shadow: 0 3px 0 #15253c;
}

:root[data-theme="dark"] .daily-page .challenge-rank-link:hover {
  background: #29405f;
  box-shadow: 0 5px 0 #15253c;
}

:root[data-theme="dark"] .daily-page .rank-week {
  background: #253f32;
  border-color: #466750;
  color: #d9efda;
  box-shadow: 0 3px 0 #182d23;
}

:root[data-theme="dark"] .daily-page .rank-week:hover {
  background: #2d4a3b;
  box-shadow: 0 5px 0 #182d23;
}

:root[data-theme="dark"] .rank-link-icon { background: #2d4b70; color: #a5caff; }
:root[data-theme="dark"] .rank-week .rank-link-icon { background: #375b41; color: #ace0b4; }

:root[data-theme="dark"] :is(#weekly-rewards, .spin-inventory) {
  background: #182233;
  color: var(--text);
}

:root[data-theme="dark"] :is(#weekly-rewards > p, #weekly-rewards > small, .reward-tier small) {
  color: var(--muted);
}

:root[data-theme="dark"] .reward-tier {
  background: var(--surface-2);
  color: var(--text);
}

:root[data-theme="dark"] .reward-tier[data-earned="true"] { background: #254437; }
:root[data-theme="dark"] .reward-tier[data-earned="true"] small { color: #a9e7c8; }

:root[data-theme="dark"] :is(.reward-tier progress, .collection-item progress) {
  accent-color: var(--lime);
  background: #3a465a;
  border-radius: 9px;
}

:root[data-theme="dark"] :is(.reward-tier progress, .collection-item progress)::-webkit-progress-bar {
  background: #3a465a;
  border-radius: 9px;
}

:root[data-theme="dark"] :is(.reward-tier progress, .collection-item progress)::-webkit-progress-value {
  background: var(--lime);
  border-radius: 9px;
}

:root[data-theme="dark"] :is(.reward-tier progress, .collection-item progress)::-moz-progress-bar {
  background: var(--lime);
  border-radius: 9px;
}

:root[data-theme="dark"] .monthly-prize {
  background: linear-gradient(120deg, #493a1f, #302b23);
  color: #fff0c0;
  border-color: #b38d35;
}

:root[data-theme="dark"] .monthly-prize p { color: #e7d8b8; }
:root[data-theme="dark"] #monthly-champions { background: #352747; border-color: #6f5099; }
:root[data-theme="dark"] #monthly-benefits { background: #223e32; }
:root[data-theme="dark"] .champion-name { color: #d0abff; }

:root[data-theme="dark"] .champion-frame-choice {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .champion-frame-choice:hover:not(:disabled) { background: #30415c; }
:root[data-theme="dark"] .champion-frame-choice[aria-pressed="true"] {
  background: #3d2b54;
  border-color: #be93ef;
  box-shadow: 0 0 0 2px #be93ef26;
}

:root[data-theme="dark"] :is(.champion-frame-preview .champion-frame-portrait, .champion-photo-shell.has-champion-frame .champion-frame-portrait) {
  background: #3a465a;
}

:root[data-theme="dark"] :is(.progress-tabs button, .collection-filters button) {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--muted);
}

:root[data-theme="dark"] :is(.progress-tabs button, .collection-filters button):hover {
  background: #30415c;
  color: var(--text);
}

:root[data-theme="dark"] :is(.progress-tabs button[aria-selected="true"], .collection-filters button[aria-pressed="true"]) {
  background: #1768be;
  border-color: #589bed;
  color: #fff;
  box-shadow: 0 3px 0 #102c4d;
}

:root[data-theme="dark"] :is(.progress-card, .event-list article, .reward-guide-card, .collection-item) {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}

:root[data-theme="dark"] .progress-card > strong { color: var(--lime); }
:root[data-theme="dark"] .progress-chart { background: #20344d; }
:root[data-theme="dark"] .progress-chart text { fill: var(--muted); }
:root[data-theme="dark"] .progress-chart rect[fill="#1467d8"] { fill: var(--lime); }
:root[data-theme="dark"] .progress-chart rect[fill="#d5dfed"] { fill: #52627a; }
:root[data-theme="dark"] .progress-message { color: #ff9eab; }
:root[data-theme="dark"] .social-board li { border-color: var(--line); }
:root[data-theme="dark"] .reward-guide-note { background: #203650; }
:root[data-theme="dark"] .reward-guide-champion { background: #44371f; }
:root[data-theme="dark"] :is(.reward-guide-card a, .reward-guide-note a, .reward-guide-champion a) { color: var(--lime); }

:root[data-theme="dark"] .collection-item { box-shadow: 0 3px 0 #111b2b; }
:root[data-theme="dark"] .collection-item[data-owned="true"] {
  background: linear-gradient(155deg, #26384f, #20344f);
  border-color: #4773a7;
}

:root[data-theme="dark"] .collection-item > strong { color: var(--text); }
:root[data-theme="dark"] .collection-category { background: #38445a; color: #d4dce8; }
:root[data-theme="dark"] :is(.collection-unlock, .collection-availability) { color: var(--muted); }
:root[data-theme="dark"] .collection-progress-note { color: var(--lime); }
:root[data-theme="dark"] .collection-item[data-owned="true"] .collection-availability { color: #a9e7c8; }
:root[data-theme="dark"] .collection-item .collection-emoji { background: #192335; }
:root[data-theme="dark"] .collection-portrait { background: #3b4a60; }
:root[data-theme="dark"] .collection-portrait:before,
:root[data-theme="dark"] .collection-portrait:after { background: #7889a1; }
:root[data-theme="dark"] .collection-item button:disabled {
  background: #2d3748;
  color: #b8c2d3;
  border-color: var(--line);
}

:root[data-theme="dark"] .collection-item button[aria-pressed="true"] {
  background: #1768be;
  color: #fff;
  border-color: #589bed;
}

:root[data-theme="dark"] .spin-prizes article { background: var(--surface-2); border-color: var(--line); }
:root[data-theme="dark"] .spin-color.spin-empty { background: var(--surface-2); color: var(--muted); }
:root[data-theme="dark"] .spin-color.lit { box-shadow: 0 0 0 5px #dce7ff, inset 0 -7px 0 #0002; }
:root[data-theme="dark"] .roulette { filter: drop-shadow(0 10px 0 #0b1220); }
:root[data-theme="dark"] .roulette-pointer { border-top-color: #f4f6fb; }
:root[data-theme="dark"] .roulette-hub { background: #1c2637; border-color: #dab34f; }
:root[data-theme="dark"] .roulette-disc path { stroke: #1c2637; }
:root[data-theme="dark"] .roulette-disc path[fill="#e5dfd5"] { fill: #354258; }
:root[data-theme="dark"] .roulette-disc text[fill="#62615e"] { fill: #d4dce8; }

:root[data-theme="dark"] :is(.apps-heading h1 span, .apps-heading-note strong) { color: var(--text); }
:root[data-theme="dark"] .device-tag { color: var(--lime); }
:root[data-theme="dark"] .device-features { color: var(--muted); }
:root[data-theme="dark"] .device-features li:before { color: #91dcb8; }
:root[data-theme="dark"] .device-art:before { background: #263c5a; }
:root[data-theme="dark"] .watch-art:before { background: #483c23; }
:root[data-theme="dark"] :is(.phone-shell, .watch-shell) { background: #1c2637; border-color: #546277; }
:root[data-theme="dark"] :is(.phone-shell, .watch-shell) { box-shadow: 8px 10px 0 #0b122066; }
:root[data-theme="dark"] :is(.phone-camera, .phone-bar, .watch-shell:after) { background: #8390a4; }
:root[data-theme="dark"] .watch-strap { background: #3b485b; border-color: #637084; }
:root[data-theme="dark"] :is(.device-install a, .apps-browser-link a) { color: var(--lime); }
:root[data-theme="dark"] .apps-install-note { background: #423722; border-color: #75603b; color: #f3dbab; }
:root[data-theme="dark"] .apps-install-note p { color: #dfcda9; }

:root[data-theme="dark"] .how-art { background: var(--surface-2); }
:root[data-theme="dark"] .round-example { background: #172235; }
:root[data-theme="dark"] :is(.art-label, .how-art small, .sequence-caption) { color: var(--muted); }
:root[data-theme="dark"] .step-number { background: #28496e; color: #c2dcff; }
:root[data-theme="dark"] .example-pin { color: var(--lime); }
:root[data-theme="dark"] .connection-line { border-color: #7389a6; }
:root[data-theme="dark"] .friends span { background: #304b71; color: #e0ecff; }
:root[data-theme="dark"] .friends span:first-child { background: #663844; color: #ffe1e7; }
:root[data-theme="dark"] .friends span:last-child { background: #655222; color: #fff0b9; }
:root[data-theme="dark"] .how-demo { background: #203650; }
:root[data-theme="dark"] .how-demo #demo-status { color: #c2dcff; }
:root[data-theme="dark"] .practice-pads button.lit { outline-color: #f4f6fb; }
