/* Shared color themes. The selected theme is stored in this browser. */
:root {
  color-scheme: dark;
  --bg: #071b29;
  --bg-deep: #0c2638;
  --panel: #12364b;
  --panel-raised: #19445a;
  --panel-hover: #20536c;
  --panel-glow: #174a63;
  --line: #39708a;
  --line-soft: #e7f8ff16;
  --text: #e7f8ff;
  --text-soft: #c4e2ee;
  --muted: #b3d0dd;
  --muted-strong: #9bc8da;
  --mint: #56d8f4;
  --blue: #b0baff;
  --accent-ink: #062335;
  --accent-highlight: #a8efff;
  --accent-mid: #2b9eb6;
  --error: #ff9ea7;
  --shadow: #00101acc;
  --tone-071116: var(--bg);
  --tone-050e13: var(--bg);
  --tone-0a171b: var(--bg-deep);
  --tone-0a161b: var(--bg-deep);
  --tone-091419: var(--bg-deep);
  --tone-0b181d: var(--bg-deep);
  --tone-0b1a1f: var(--bg-deep);
  --tone-0d1b21: var(--panel);
  --tone-0d1b2185: color-mix(in srgb, var(--panel) 52%, transparent);
  --tone-0e1b21: var(--panel-raised);
  --tone-101e25: var(--panel-raised);
  --tone-102327: var(--panel-raised);
  --tone-10272c: var(--panel-raised);
  --tone-0e2026: var(--panel-raised);
  --tone-142a2e: var(--panel-hover);
  --tone-142b30: var(--panel-hover);
  --tone-123037: var(--panel-glow);
  --tone-233a40: var(--line);
  --tone-294047: var(--line);
  --tone-2d484c: var(--line);
  --tone-ffffff12: var(--line-soft);
  --tone-e7f1ef: var(--text);
  --tone-c8d6d4: var(--text);
  --tone-afc1be: var(--text-soft);
  --tone-a9bcba: var(--text-soft);
  --tone-91a8a8: var(--muted);
  --tone-9bb3bb: var(--muted);
  --tone-83a7a1: var(--muted-strong);
  --tone-718d8c: var(--muted-strong);
  --tone-718381: var(--muted-strong);
  --tone-6e8887: var(--muted-strong);
  --tone-708583: var(--muted-strong);
  --tone-72918f: var(--muted-strong);
  --tone-59e0c0: var(--mint);
  --tone-59e0c014: color-mix(in srgb, var(--mint) 8%, transparent);
  --tone-59e0c020: color-mix(in srgb, var(--mint) 12%, transparent);
  --tone-59e0c024: color-mix(in srgb, var(--mint) 14%, transparent);
  --tone-59e0c033: color-mix(in srgb, var(--mint) 20%, transparent);
  --tone-59e0c044: color-mix(in srgb, var(--mint) 27%, transparent);
  --tone-59e0c055: color-mix(in srgb, var(--mint) 33%, transparent);
  --tone-59e0c066: color-mix(in srgb, var(--mint) 40%, transparent);
  --tone-59e0c077: color-mix(in srgb, var(--mint) 47%, transparent);
  --tone-59e0c080: color-mix(in srgb, var(--mint) 50%, transparent);
  --tone-59e0c099: color-mix(in srgb, var(--mint) 60%, transparent);
  --tone-59e0c0a0: color-mix(in srgb, var(--mint) 63%, transparent);
  --tone-75a7ff: var(--blue);
  --tone-75a7ff44: color-mix(in srgb, var(--blue) 27%, transparent);
  --tone-8ef0d6: var(--accent-highlight);
  --tone-287f79: var(--accent-mid);
  --tone-ff9e94: var(--error);
  --tone-0008: var(--shadow);
}

:root[data-theme="venom"] {
  color-scheme: dark;
  --bg: #071116;
  --bg-deep: #0a171b;
  --panel: #0d1b21;
  --panel-raised: #102327;
  --panel-hover: #142a2e;
  --panel-glow: #123037;
  --line: #294047;
  --line-soft: color-mix(in srgb, var(--text) 8%, transparent);
  --text: #e7f1ef;
  --text-soft: #afc1be;
  --muted: #91a8a8;
  --muted-strong: #83a7a1;
  --mint: #59e0c0;
  --blue: #75a7ff;
  --accent-ink: #071116;
  --accent-highlight: #8ef0d6;
  --accent-mid: #287f79;
  --error: #ff9e94;
  --shadow: #0008;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6f8;
  --bg-deep: #e9eff3;
  --panel: #fff;
  --panel-raised: #f7f9fa;
  --panel-hover: #e5edf1;
  --panel-glow: #dce9ed;
  --line: #c3d0d8;
  --line-soft: #1c344018;
  --text: #16252e;
  --text-soft: #314651;
  --muted: #4a606c;
  --muted-strong: #3c5862;
  --mint: #007865;
  --blue: #2457c5;
  --accent-ink: #fff;
  --accent-highlight: #8be0ca;
  --accent-mid: #429b88;
  --error: #a32626;
  --shadow: #13222b30;
}

:root[data-theme="midnight"] {
  color-scheme: dark;
  --bg: #101827;
  --bg-deep: #0b1220;
  --panel: #1b2738;
  --panel-raised: #233249;
  --panel-hover: #30415a;
  --panel-glow: #283c59;
  --line: #465a73;
  --line-soft: #f4f7ff14;
  --text: #f1f5ff;
  --text-soft: #d2dbea;
  --muted: #b7c4d8;
  --muted-strong: #9eafca;
  --mint: #b69aff;
  --blue: #74baff;
  --accent-ink: #1d1530;
  --accent-highlight: #d7c5ff;
  --accent-mid: #755bb4;
  --error: #ffaaa4;
  --shadow: #0009;
}

:root[data-theme="solar"] {
  color-scheme: dark;
  --bg: #17120d;
  --bg-deep: #211910;
  --panel: #2b2117;
  --panel-raised: #382a1c;
  --panel-hover: #49371f;
  --panel-glow: #49341d;
  --line: #665039;
  --line-soft: #fff3e012;
  --text: #fff1dc;
  --text-soft: #e7d2b0;
  --muted: #d0b997;
  --muted-strong: #c5a773;
  --mint: #ffbd59;
  --blue: #8dc9ff;
  --accent-ink: #291702;
  --accent-highlight: #ffdf99;
  --accent-mid: #c57b28;
  --error: #ff9d8b;
  --shadow: #090603aa;
}

:root[data-theme="arctic"] {
  color-scheme: dark;
  --bg: #071b29;
  --bg-deep: #0c2638;
  --panel: #12364b;
  --panel-raised: #19445a;
  --panel-hover: #20536c;
  --panel-glow: #174a63;
  --line: #39708a;
  --line-soft: #e7f8ff16;
  --text: #e7f8ff;
  --text-soft: #c4e2ee;
  --muted: #b3d0dd;
  --muted-strong: #9bc8da;
  --mint: #56d8f4;
  --blue: #b0baff;
  --accent-ink: #062335;
  --accent-highlight: #a8efff;
  --accent-mid: #2b9eb6;
  --error: #ff9ea7;
  --shadow: #00101acc;
}

/* Keep controls and keyboard navigation legible under every palette. */
body { background-image: radial-gradient(ellipse at 74% 17%, var(--panel-glow), transparent 37%); }
.primary-link, .submit-button { color: var(--accent-ink); }
.planet { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { border-color: var(--blue); }
select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-deep); color: var(--text); font: 13px Manrope, Segoe UI, sans-serif; }
.profile-theme-card { margin-top: 24px; }
.profile-theme-card label { display: block; margin: 14px 0 7px; }
.profile-theme-card select { width: 100%; max-width: 480px; }
.profile-theme-card p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
