/* ===== Theme switcher controls (Dark & White) + Full White (Light) Theme ===== */

/* ---------- Header controls & Theme Toggle (all themes) ---------- */
.header-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.kb-header .kb-wrap {
  gap: 12px;
}
.kb-header .kb-nav {
  flex-wrap: nowrap;
  margin-left: 4px;
}
.kb-header .kb-nav a {
  white-space: nowrap;
  padding: 7px 7px;
}
.kb-header .btn {
  white-space: nowrap;
  flex-shrink: 0;
}
.site-header .header-tools-compact {
  order: 4;
  gap: 6px;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid #617e9a;
  border-radius: 6px;
  background: #0d1d30;
  color: #dfedff;
  font: 600 12px/1 'Exo 2', sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.theme-toggle svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle:hover {
  background: #162e49;
  border-color: #7de5de;
  color: #ffffff;
}
.theme-toggle:focus-visible {
  outline: 2px solid #68cfff;
  outline-offset: 2px;
}
.theme-toggle-compact {
  min-height: 29px;
  padding: 4px 8px;
  font-size: 11px;
  gap: 5px;
}
.theme-toggle-compact svg {
  width: 13px;
  height: 13px;
}
.theme-toggle-menu {
  width: 100%;
  margin-top: 8px;
  justify-content: center;
}
.theme-toggle-floating {
  position: fixed;
  right: 136px;
  top: 12px;
  z-index: 1000;
}
.si-theme.is-light .si-swatch {
  border: 1px solid rgba(15, 34, 62, 0.22);
}

@media (max-width: 980px) {
  .kb-header .header-tools {
    grid-area: language;
    justify-self: end;
    gap: 6px;
  }
  .kb-header .theme-toggle {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 11px;
  }
  .kb-header .theme-toggle span {
    display: none;
  }
}
@media (max-width: 700px) {
  .theme-toggle-floating {
    right: 108px;
  }
  .site-header .theme-toggle-compact span {
    display: none;
  }
}

/* ==========================================================================
   WHITE / LIGHT THEME — Fully optimized contrast, surfaces, cards & controls
   ========================================================================== */
:root[data-theme-mode="light"] {
  color-scheme: light;
  --accent-rgb: 2, 132, 199;
  --accent2-rgb: 37, 99, 235;
  --highlight-rgb: 124, 58, 237;
  --tint-rgb: 30, 58, 95;
  --deep-rgb: 241, 245, 251;
  --surface-rgb: 255, 255, 255;
  --raised-rgb: 244, 247, 252;
  --btn1: #0284c7;
  --btn2: #2563eb;
  --btn-text: #ffffff;
  --btn-glow-rgb: 37, 99, 235;
  --bg: #f4f7fb;
  --text: #0f1b2d;
  --muted: #4b5e78;
  --dim: #64748b;
  --text-soft: #2c3e57;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --panel-soft: #eef3f9;
  --line: rgba(15, 34, 62, 0.12);
  --line-strong: rgba(15, 34, 62, 0.24);
  --cyan: #0284c7;
  --blue: #2563eb;
  --gold: #b45309;
  --green: #047857;
  --red: #dc2626;
  --violet: #6d28d9;
  --metal: #475569;
  --crystal: #0284c7;
  --deut: #047857;
  --energy: #b45309;
  --shadow: 0 12px 32px rgba(15, 34, 62, 0.08), 0 1px 2px rgba(15, 34, 62, 0.05);
  --glow: 0 0 0 3px rgba(2, 132, 199, 0.16);
}

:root[data-theme-mode="light"] body {
  background: var(--bg);
  color: var(--text);
}

:root[data-theme-mode="light"] a {
  color: #0369a1;
}
:root[data-theme-mode="light"] a:hover {
  color: #075985;
}

:root[data-theme-mode="light"] .skip-link {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #0284c7;
  box-shadow: 0 8px 24px rgba(15, 34, 62, 0.16);
}

:root[data-theme-mode="light"] ::-webkit-scrollbar-thumb {
  background: rgba(15, 34, 62, 0.22);
}
:root[data-theme-mode="light"] ::-webkit-scrollbar-thumb:hover {
  background-color: rgba(15, 34, 62, 0.38);
}

/* ---------- Shared buttons, inputs, tags, panels, modals, toasts ---------- */
:root[data-theme-mode="light"] .panel {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.88), rgba(244, 248, 255, 0.80));
  border-color: rgba(148, 184, 224, 0.45);
  box-shadow:
    0 12px 34px rgba(14, 42, 82, 0.08),
    0 1px 2px rgba(14, 42, 82, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px) saturate(1.38);
  -webkit-backdrop-filter: blur(18px) saturate(1.38);
}
:root[data-theme-mode="light"] .panel::before {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), transparent 34%, transparent 66%, rgba(99, 102, 241, 0.07));
}
:root[data-theme-mode="light"] .btn {
  background: linear-gradient(135deg, #0ea5e9, #2563eb 58%, #4f46e5);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}
:root[data-theme-mode="light"] .btn:hover:not(:disabled) {
  box-shadow: 0 10px 26px rgba(14, 165, 233, 0.34), 0 0 0 1px rgba(56, 189, 248, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
:root[data-theme-mode="light"] .btn.gold {
  --c1: #f59e0b;
  --c2: #d97706;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.28);
}
:root[data-theme-mode="light"] .btn.green {
  --c1: #10b981;
  --c2: #059669;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.25);
}
:root[data-theme-mode="light"] .btn.red {
  --c1: #ef4444;
  --c2: #dc2626;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.25);
}
:root[data-theme-mode="light"] .btn.ghost {
  background: #ffffff;
  color: #1e293b;
  box-shadow: inset 0 0 0 1px #cbd5e1;
}
:root[data-theme-mode="light"] .btn.ghost:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f1b2d;
  box-shadow: inset 0 0 0 1px #0284c7, 0 4px 12px rgba(2, 132, 199, 0.14);
}
:root[data-theme-mode="light"] .btn:disabled,
:root[data-theme-mode="light"] .btn.ghost:disabled,
:root[data-theme-mode="light"] .btn.gold:disabled,
:root[data-theme-mode="light"] .btn.green:disabled,
:root[data-theme-mode="light"] .btn.red:disabled {
  filter: none;
  background: #e2e8f0;
  color: #64748b;
  border-color: #cbd5e1;
  box-shadow: inset 0 0 0 1px #cbd5e1;
  opacity: 0.9;
}
.eco-top {
  flex-wrap: wrap;
  row-gap: 4px;
}
.eco-rate {
  font-size: 11px;
}
:root[data-theme-mode="light"] input[type=text],
:root[data-theme-mode="light"] input[type=password],
:root[data-theme-mode="light"] input[type=email],
:root[data-theme-mode="light"] input[type=number],
:root[data-theme-mode="light"] input[type=search],
:root[data-theme-mode="light"] select,
:root[data-theme-mode="light"] textarea {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f1b2d;
}
:root[data-theme-mode="light"] input::placeholder,
:root[data-theme-mode="light"] textarea::placeholder {
  color: #7c8ea6;
}
:root[data-theme-mode="light"] select option {
  background: #ffffff;
  color: #0f1b2d;
}
:root[data-theme-mode="light"] label {
  color: #334155;
}
:root[data-theme-mode="light"] .tag {
  background: #e2e8f0;
  color: #334155;
}
:root[data-theme-mode="light"] .tag.cyan {
  background: #e0f2fe;
  color: #0369a1;
}
:root[data-theme-mode="light"] .tag.green {
  background: #d1fae5;
  color: #065f46;
}
:root[data-theme-mode="light"] .tag.red {
  background: #fee2e2;
  color: #b91c1c;
}
:root[data-theme-mode="light"] .tag.gold {
  background: #fef3c7;
  color: #92400e;
}
:root[data-theme-mode="light"] .tag.violet {
  background: #ede9fe;
  color: #5b21b6;
}
:root[data-theme-mode="light"] .toast {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
  box-shadow: 0 14px 36px rgba(15, 34, 62, 0.14);
}
:root[data-theme-mode="light"] dialog.modal::backdrop {
  background: rgba(15, 27, 45, 0.45);
}
:root[data-theme-mode="light"] .modal {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
}

/* ---------- Language picker, theme toggle & privacy banner in Light mode ---------- */
:root[data-theme-mode="light"] .language-picker,
:root[data-theme-mode="light"] .theme-toggle {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 34, 62, 0.05);
}
:root[data-theme-mode="light"] .language-picker select {
  background: transparent;
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .theme-toggle:hover {
  background: #eff6ff;
  border-color: #0284c7;
  color: #0369a1;
}
:root[data-theme-mode="light"] .privacy-panel {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
  box-shadow: 0 18px 48px rgba(15, 34, 62, 0.18);
}
:root[data-theme-mode="light"] .privacy-panel h2 {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .privacy-panel p {
  color: #334155;
}
:root[data-theme-mode="light"] .privacy-panel a {
  color: #0369a1;
}
:root[data-theme-mode="light"] .privacy-panel button[data-choice="reject"] {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}
:root[data-theme-mode="light"] .privacy-panel button[data-choice="reject"]:hover {
  background: #e2e8f0;
}
:root[data-theme-mode="light"] .privacy-panel button[data-choice="accept"] {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}
:root[data-theme-mode="light"] .privacy-panel button[data-choice="accept"]:hover {
  background: #0369a1;
}
:root[data-theme-mode="light"] .privacy-opener {
  color: #334155;
  border-color: #cbd5e1;
  background: #ffffff;
}
:root[data-theme-mode="light"] .privacy-opener:hover {
  color: #0f1b2d;
  border-color: #0284c7;
  background: #f0f9ff;
}

/* ==========================================================================
   HOMEPAGE (body.landing) — Bright Aerospace Daylight Editorial Aesthetic
   ========================================================================== */
:root[data-theme-mode="light"]:has(body.landing),
:root[data-theme-mode="light"] body.landing {
  background: #f4f7fb;
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .landing #scene {
  background:
    linear-gradient(90deg, rgba(244, 247, 251, 0.96) 5%, rgba(244, 247, 251, 0.90) 36%, rgba(244, 247, 251, 0.68) 66%, rgba(244, 247, 251, 0.84) 100%),
    linear-gradient(0deg, #f4f7fb 4%, rgba(244, 247, 251, 0.2) 55%),
    var(--landing-bg, url('/img/exploration/action-fleet.webp')) center 38% / cover;
}
:root[data-theme-mode="light"] .landing .site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #dbe4f0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
:root[data-theme-mode="light"] .landing .site-nav a {
  color: #334863;
}
:root[data-theme-mode="light"] .landing .site-nav a:hover,
:root[data-theme-mode="light"] .landing .site-nav a.active {
  color: #0f1b2d;
  background: #edf3fa;
}
:root[data-theme-mode="light"] .landing .site-nav a[href="#play"] {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}
:root[data-theme-mode="light"] .landing .site-nav a[href="#play"]:hover {
  background: #0369a1;
  color: #ffffff;
}
:root[data-theme-mode="light"] .landing .menu-toggle {
  border-color: #cbd5e1;
  background: #ffffff;
}
:root[data-theme-mode="light"] .landing .menu-toggle span {
  background: #0f1b2d;
}
@media (max-width: 1024px) {
  :root[data-theme-mode="light"] .landing .site-header.open .site-nav {
    background: #ffffff;
    border-bottom: 1px solid #dbe4f0;
    box-shadow: 0 18px 36px rgba(15, 34, 62, 0.12);
  }
}

:root[data-theme-mode="light"] .home-eyebrow {
  color: #0369a1;
}
:root[data-theme-mode="light"] .home-eyebrow i,
:root[data-theme-mode="light"] .home-universe-label i {
  background: #0284c7;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.45);
}
:root[data-theme-mode="light"] .landing .brand .home-headline {
  color: #0c1a2e;
}
:root[data-theme-mode="light"] .home-headline > span {
  color: #3c506b;
}
:root[data-theme-mode="light"] .home-headline em {
  color: #0284c7;
}
:root[data-theme-mode="light"] .landing .brand .logo {
  color: #425672;
}
:root[data-theme-mode="light"] .landing .brand .logo b {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .landing .brand p.tagline {
  color: #2f435e;
}
:root[data-theme-mode="light"] .home-play {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(2, 132, 199, 0.28);
}
:root[data-theme-mode="light"] .home-play:hover {
  background: #0369a1;
  color: #ffffff;
}
:root[data-theme-mode="light"] .home-preview {
  border-color: #bfd0e4;
  background: rgba(255, 255, 255, 0.88);
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .home-preview:hover {
  background: #ffffff;
  color: #0284c7;
  border-color: #0284c7;
}
:root[data-theme-mode="light"] .home-trust {
  color: #465a75;
}
:root[data-theme-mode="light"] .home-trust span::before {
  color: #059669;
}
:root[data-theme-mode="light"] .landing .features {
  border-top-color: #d2deed;
}
:root[data-theme-mode="light"] .landing .feature .fi {
  color: #0284c7;
}
:root[data-theme-mode="light"] .landing .feature b {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .landing .feature span {
  color: #475a75;
}
:root[data-theme-mode="light"] .landing .social-row .btn {
  color: #364b67;
  background: transparent;
  box-shadow: none;
}
:root[data-theme-mode="light"] .landing .social-row .btn:hover {
  color: #0284c7;
}

/* Homepage Auth Panel */
:root[data-theme-mode="light"] .landing .auth {
  background: rgba(255, 255, 255, 0.96);
  border-color: #d0ddec;
  box-shadow: 0 22px 60px rgba(15, 34, 62, 0.12), 0 2px 6px rgba(15, 34, 62, 0.05);
}
:root[data-theme-mode="light"] .home-auth-heading {
  border-bottom-color: #e2eaf4;
}
:root[data-theme-mode="light"] .home-auth-heading > span {
  color: #0369a1;
}
:root[data-theme-mode="light"] .home-auth-heading h2 {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .home-auth-heading p {
  color: #4b5e78;
}
:root[data-theme-mode="light"] .home-worlds {
  background: #f4f7fc;
  border-color: #d5e0ee;
}
:root[data-theme-mode="light"] .home-worlds summary > span {
  color: #546985;
}
:root[data-theme-mode="light"] .home-worlds summary b {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .home-worlds summary small {
  color: #0284c7;
}
:root[data-theme-mode="light"] .home-worlds[open] > summary {
  border-bottom-color: #d5e0ee;
}
:root[data-theme-mode="light"] .landing .uni-pick-label {
  color: #334863;
}
:root[data-theme-mode="light"] .landing .mode-tabs {
  background: #eaf0f8;
  border-color: #d5e0ee;
}
:root[data-theme-mode="light"] .landing .mode-tabs button {
  color: #475a75;
}
:root[data-theme-mode="light"] .landing .mode-tabs button.active {
  background: #ffffff;
  color: #0369a1;
  box-shadow: 0 1px 4px rgba(15, 34, 62, 0.1), inset 0 0 0 1px rgba(2, 132, 199, 0.35);
}
:root[data-theme-mode="light"] .landing .uni-card {
  background: #ffffff;
  border-color: #d8e3f0;
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .landing .uni-card b {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .landing .uni-card span,
:root[data-theme-mode="light"] .landing .uni-card small {
  color: #4b5e78;
}
:root[data-theme-mode="light"] .landing .uni-card.on {
  background: #eff6ff;
  border-color: #0284c7;
}
:root[data-theme-mode="light"] .landing .tabs {
  background: #eaf0f8;
  border: 1px solid #d5e0ee;
}
:root[data-theme-mode="light"] .landing .tabs button {
  color: #475a75;
}
:root[data-theme-mode="light"] .landing .tabs button.active {
  background: #ffffff;
  color: #0f1b2d;
  box-shadow: 0 2px 8px rgba(15, 34, 62, 0.1);
}
:root[data-theme-mode="light"] .landing .field label {
  color: #334155;
}
:root[data-theme-mode="light"] .landing .auth input[type=text],
:root[data-theme-mode="light"] .landing .auth input[type=password],
:root[data-theme-mode="light"] .landing .auth input[type=email] {
  background: #f8fafd;
  border-color: #cbd5e1;
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .landing .auth input:focus {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.16);
}
:root[data-theme-mode="light"] .landing .auth .btn[type=submit] {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border-color: #0284c7;
}
:root[data-theme-mode="light"] .landing .auth .btn[type=submit]:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
}
:root[data-theme-mode="light"] .landing .auth .check {
  color: #334155;
}
:root[data-theme-mode="light"] .landing .auth .form-hint {
  color: #4b5e78;
}
:root[data-theme-mode="light"] .landing .auth .or-line::before,
:root[data-theme-mode="light"] .landing .auth .or-line::after {
  background: #dbe4f0;
}
:root[data-theme-mode="light"] .landing .auth .or-line span {
  color: #5c708c;
}
:root[data-theme-mode="light"] .landing .auth .btn.social.gmail {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(15, 34, 62, 0.08);
}
:root[data-theme-mode="light"] .landing .auth .btn.social.gmail:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
:root[data-theme-mode="light"] .landing .auth .btn.social.discord-login {
  background: #5865f2;
  color: #ffffff;
}
:root[data-theme-mode="light"] .landing .auth .btn.social.discord-login:hover {
  background: #4752c4;
}

/* Homepage Stats Strip, Gallery & Vote Showcase */
:root[data-theme-mode="light"] .landing .home-universe-strip {
  border-top-color: #d5e0ee;
  border-bottom-color: #d5e0ee;
}
:root[data-theme-mode="light"] .home-universe-label {
  color: #0369a1;
}
:root[data-theme-mode="light"] .landing .stats-line {
  color: #4b5e78;
}
:root[data-theme-mode="light"] .landing .stats-line > div {
  border-right-color: #d5e0ee;
}
:root[data-theme-mode="light"] .landing .stats-line b {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .landing .gallery-discover-link {
  color: #334863;
  background: transparent;
}
:root[data-theme-mode="light"] .landing .gallery-discover-link:hover {
  color: #0284c7;
}
:root[data-theme-mode="light"] .landing .home-gallery {
  background: radial-gradient(ellipse at 50% 0, rgba(2, 132, 199, 0.08), transparent 60%), #edf2f8;
  border-top-color: #d5e0ee;
}
:root[data-theme-mode="light"] .landing .gallery-heading h2 {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .landing .gallery-heading p,
:root[data-theme-mode="light"] .landing .gallery-note {
  color: #475a75;
}
:root[data-theme-mode="light"] .landing .gallery-card {
  background: #ffffff;
  border-color: #d5e0ee;
  box-shadow: 0 10px 28px rgba(15, 34, 62, 0.07);
}
:root[data-theme-mode="light"] .landing .gallery-card:hover {
  border-color: #0284c7;
  box-shadow: 0 16px 36px rgba(15, 34, 62, 0.12);
}
:root[data-theme-mode="light"] .landing .gallery-card img {
  border-bottom-color: #e2eaf4;
}
:root[data-theme-mode="light"] .landing .gallery-card:first-child img {
  border-right-color: #e2eaf4;
}
:root[data-theme-mode="light"] .landing .gallery-card h3 {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .landing .gallery-card p {
  color: #475a75;
}
:root[data-theme-mode="light"] .gallery-viewer {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
  box-shadow: 0 24px 64px rgba(15, 34, 62, 0.25);
}
:root[data-theme-mode="light"] .gallery-viewer::backdrop {
  background: rgba(15, 27, 45, 0.65);
}
:root[data-theme-mode="light"] .gallery-viewer button {
  background: #f1f5f9;
  color: #0f1b2d;
  border-color: #cbd5e1;
}
:root[data-theme-mode="light"] .gallery-viewer button:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}

:root[data-theme-mode="light"] .landing .home-vote-info {
  background: radial-gradient(ellipse at 85% 85%, rgba(217, 119, 6, 0.08), transparent 55%), #f7f9fc;
  border-top-color: #d5e0ee;
}
:root[data-theme-mode="light"] .landing .home-vote-info .vote-info-kicker {
  color: #b45309;
}
:root[data-theme-mode="light"] .landing .home-vote-info h2 {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .landing .home-vote-info p {
  color: #475a75;
}
:root[data-theme-mode="light"] .landing .home-feature-card {
  background: #ffffff;
  border-color: #d5e0ee;
  box-shadow: 0 8px 24px rgba(15, 34, 62, 0.06);
}
:root[data-theme-mode="light"] .landing .home-feature-card h3 {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .landing .home-feature-card p {
  color: #475a75;
}
:root[data-theme-mode="light"] .landing .home-vote-showcase {
  background: linear-gradient(125deg, #fffdf8, #f7f2e5);
  border-color: #dec283;
  box-shadow: 0 16px 40px rgba(146, 64, 14, 0.08);
}
:root[data-theme-mode="light"] .landing .home-vote-art {
  background: radial-gradient(ellipse at center, rgba(217, 119, 6, 0.12), transparent 70%);
  border-right-color: #e6d5ad;
}
/* Prevent mix-blend-mode:screen from hiding glowing supply art on light surfaces */
:root[data-theme-mode="light"] .landing .home-vote-art > img {
  mix-blend-mode: normal;
  background: radial-gradient(circle at center, #1b2f4a 0%, #0d192b 75%);
  padding: 16px;
  border-radius: 22px;
  border: 1px solid #d4b87a;
  box-shadow: 0 14px 32px rgba(15, 34, 62, 0.18);
  filter: none;
}
:root[data-theme-mode="light"] .landing .home-vote-rewards img {
  background: #0f1f36;
  border-color: #d4b87a;
  box-shadow: 0 6px 14px rgba(15, 34, 62, 0.14);
}
:root[data-theme-mode="light"] .landing .home-vote-copy h3 {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .landing .home-vote-copy p {
  color: #3d4f69;
}
:root[data-theme-mode="light"] .landing .site-footer {
  background: #ffffff;
  border-top-color: #d5e0ee;
  color: #475a75;
}
:root[data-theme-mode="light"] .landing .site-footer a {
  color: #334863;
}
:root[data-theme-mode="light"] .landing .site-footer a:hover {
  color: #0284c7;
}
:root[data-theme-mode="light"] .landing .footer-copy {
  color: #64748b;
}

/* ==========================================================================
   PUBLIC PAGES, GUIDES, KNOWLEDGE BASE & UPDATES (body.kb)
   ========================================================================== */
:root[data-theme-mode="light"]:has(body.kb),
:root[data-theme-mode="light"] body.kb {
  background:
    radial-gradient(circle at 18% 12%, rgba(14, 165, 233, 0.14), transparent 46%),
    radial-gradient(circle at 84% 8%, rgba(99, 102, 241, 0.12), transparent 44%),
    radial-gradient(circle at 52% 96%, rgba(139, 92, 246, 0.08), transparent 48%),
    radial-gradient(1.5px 1.5px at 14% 22%, rgba(14, 116, 180, 0.32), transparent 100%),
    radial-gradient(1.2px 1.2px at 76% 18%, rgba(79, 70, 229, 0.28), transparent 100%),
    radial-gradient(1.5px 1.5px at 42% 68%, rgba(2, 132, 199, 0.26), transparent 100%),
    linear-gradient(180deg, #ebf2fc 0%, #f4f7fc 48%, #ebf1fa 100%);
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .kb-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: #d5e0ee;
}
:root[data-theme-mode="light"] .kb-brand,
:root[data-theme-mode="light"] .kb-brand:hover {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .kb-nav a {
  color: #3b4f6b;
}
:root[data-theme-mode="light"] .kb-nav a:hover {
  color: #0f1b2d;
  background: #edf3fa;
}
:root[data-theme-mode="light"] .kb-nav a.active {
  background: #e0f2fe;
  color: #0369a1;
}
:root[data-theme-mode="light"] .kb-crumbs a {
  color: #475a75;
}
:root[data-theme-mode="light"] .kb-crumbs a:hover {
  color: #0284c7;
}
:root[data-theme-mode="light"] .kb-crumbs .mark {
  background: #d97706;
}
:root[data-theme-mode="light"] .kb-hero h1,
:root[data-theme-mode="light"] .si-hero h1,
:root[data-theme-mode="light"] .up-hero h1,
:root[data-theme-mode="light"] .kb-prose h1,
:root[data-theme-mode="light"] .kb-prose h2,
:root[data-theme-mode="light"] .kb-h,
:root[data-theme-mode="light"] .kb-lead,
:root[data-theme-mode="light"] .up-lead,
:root[data-theme-mode="light"] .kb-blurb b,
:root[data-theme-mode="light"] .kb-section h3,
:root[data-theme-mode="light"] .kb-pop b,
:root[data-theme-mode="light"] .kb-note h3,
:root[data-theme-mode="light"] .kb-faq summary,
:root[data-theme-mode="light"] .kb-card b,
:root[data-theme-mode="light"] .kb-pager b,
:root[data-theme-mode="light"] .kb-livehead b,
:root[data-theme-mode="light"] .kb-step b,
:root[data-theme-mode="light"] .si-step h3,
:root[data-theme-mode="light"] .si-race b,
:root[data-theme-mode="light"] .si-class b,
:root[data-theme-mode="light"] .si-steps b,
:root[data-theme-mode="light"] .si-cta h2,
:root[data-theme-mode="light"] .si-pill b,
:root[data-theme-mode="light"] .si-copy h2,
:root[data-theme-mode="light"] .si-theme b,
:root[data-theme-mode="light"] .si-statbox b,
:root[data-theme-mode="light"] .si-coords b,
:root[data-theme-mode="light"] .si-trips td:last-child,
:root[data-theme-mode="light"] .si-orbits b,
:root[data-theme-mode="light"] .si-planet b,
:root[data-theme-mode="light"] .si-rules b,
:root[data-theme-mode="light"] .up-pill b,
:root[data-theme-mode="light"] .up-item b {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .kb-go,
:root[data-theme-mode="light"] .kb-pop em,
:root[data-theme-mode="light"] .si-step small,
:root[data-theme-mode="light"] .kb-kicker,
:root[data-theme-mode="light"] .kb-step .n,
:root[data-theme-mode="light"] .up-date,
:root[data-theme-mode="light"] .up-item time,
:root[data-theme-mode="light"] .si-orbits small {
  color: #b45309;
}
:root[data-theme-mode="light"] .si-copy .kb-go:hover {
  color: #92400e;
}
:root[data-theme-mode="light"] .up-new {
  background: #fef3c7;
  color: #92400e;
}

/* Cards & elevated surfaces on public/kb pages */
:root[data-theme-mode="light"] .kb-search,
:root[data-theme-mode="light"] .kb-toolbar input,
:root[data-theme-mode="light"] .kb-stat,
:root[data-theme-mode="light"] .kb-section,
:root[data-theme-mode="light"] .kb-pop,
:root[data-theme-mode="light"] .kb-links a,
:root[data-theme-mode="light"] .kb-note,
:root[data-theme-mode="light"] .kb-card,
:root[data-theme-mode="light"] .kb-pager a,
:root[data-theme-mode="light"] .kb-filters button,
:root[data-theme-mode="light"] .kb-filters a,
:root[data-theme-mode="light"] .kb-sidebox,
:root[data-theme-mode="light"] .kb-do,
:root[data-theme-mode="light"] .kb-path,
:root[data-theme-mode="light"] .kb-form,
:root[data-theme-mode="light"] .si-step,
:root[data-theme-mode="light"] .si-race,
:root[data-theme-mode="light"] .si-class,
:root[data-theme-mode="light"] .si-steps li,
:root[data-theme-mode="light"] .si-pill,
:root[data-theme-mode="light"] .si-missions a,
:root[data-theme-mode="light"] .si-theme,
:root[data-theme-mode="light"] .si-statbox div,
:root[data-theme-mode="light"] .si-coords div,
:root[data-theme-mode="light"] .si-planet,
:root[data-theme-mode="light"] .up-pill,
:root[data-theme-mode="light"] .up-item {
  background: #ffffff;
  border-color: #d5e0ee;
  box-shadow: 0 4px 16px rgba(15, 34, 62, 0.05);
}
:root[data-theme-mode="light"] .kb-search button {
  color: #0f1b2d;
  background: #edf3fa;
}
:root[data-theme-mode="light"] .kb-search button:hover {
  background: #e0f2fe;
  color: #0284c7;
}
:root[data-theme-mode="light"] .kb-links a:hover,
:root[data-theme-mode="light"] .si-jump a:hover,
:root[data-theme-mode="light"] .kb-sidebox a:hover,
:root[data-theme-mode="light"] .kb-sidebox a.on,
:root[data-theme-mode="light"] .kb-strip a:hover,
:root[data-theme-mode="light"] .si-art-grid a:hover,
:root[data-theme-mode="light"] .si-portraits a:hover {
  color: #0369a1;
  border-color: #0284c7;
}
:root[data-theme-mode="light"] .kb-filters .on,
:root[data-theme-mode="light"] .kb-filters a.on {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}
:root[data-theme-mode="light"] .kb-chips i,
:root[data-theme-mode="light"] .si-types span {
  background: #f1f5f9;
  border-color: #d5e0ee;
  color: #334863;
}
:root[data-theme-mode="light"] .kb-orbits i {
  background: #f1f5f9;
  color: #475a75;
}
:root[data-theme-mode="light"] .kb-orbits i.on {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}
:root[data-theme-mode="light"] .kb-prose code,
:root[data-theme-mode="light"] .formula {
  background: #eef3f9;
  border-color: #cbd5e1;
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .kb-livebox,
:root[data-theme-mode="light"] .kb-result {
  background: #f0f9ff;
  border-color: #bae6fd;
}
:root[data-theme-mode="light"] .kb-bar i {
  background: #dbe4f0;
}
:root[data-theme-mode="light"] .si-missions a {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .si-jump {
  background: rgba(244, 247, 251, 0.94);
}
:root[data-theme-mode="light"] .si-cta {
  background:
    radial-gradient(600px 220px at 0% 0%, rgba(2, 132, 199, 0.1), transparent 70%),
    radial-gradient(520px 220px at 100% 100%, rgba(217, 119, 6, 0.1), transparent 70%),
    #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 12px 32px rgba(15, 34, 62, 0.08);
}
:root[data-theme-mode="light"] .si-steps li::before {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
:root[data-theme-mode="light"] .si-race em {
  color: color-mix(in srgb, var(--edge) 68%, #0f1b2d);
  font-weight: 600;
}
:root[data-theme-mode="light"] .kb-foot {
  background: #ffffff;
  border-top-color: #d5e0ee;
}
:root[data-theme-mode="light"] .kb-foot a {
  color: #3b4f6b;
}
:root[data-theme-mode="light"] .kb-foot a:hover {
  color: #0284c7;
}
:root[data-theme-mode="light"] .up-filters {
  background: rgba(244, 247, 251, 0.95);
}

/* Preserve readable white ink over dark space-art banners */
:root[data-theme-mode="light"] .si-uni-hero {
  color: #eef4ff;
  border-color: #cbd5e1;
  box-shadow: 0 14px 36px rgba(15, 34, 62, 0.14);
}
:root[data-theme-mode="light"] .si-uni-hero h1,
:root[data-theme-mode="light"] .si-uni-hero .si-uni-stats b {
  color: #ffffff;
}
:root[data-theme-mode="light"] .si-uni-hero .kb-lead {
  color: #eaf2fc;
}
:root[data-theme-mode="light"] .si-uni-hero .sub {
  color: #d2dfef;
}
:root[data-theme-mode="light"] .si-uni-hero .si-eyebrow {
  color: #7de5de;
}
:root[data-theme-mode="light"] .si-uni-hero .si-uni-stats span {
  color: #a9bbd3;
}
:root[data-theme-mode="light"] .si-orbit {
  border-color: #cbd5e1;
}
:root[data-theme-mode="light"] .si-orbit .si-slot em {
  color: #cbd5e1;
}
:root[data-theme-mode="light"] .uni-pick.public .uni-card {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .uni-pick.public .uni-card.on {
  background: #eff6ff;
  border-color: #0284c7;
}

/* ==========================================================================
   IN-GAME INTERFACE (body.game) — Unified Daylight Mission Control
   Covers all 21 game stylesheets with consistent porcelain/white surfaces,
   crisp obsidian ink, and framed dark viewports only for space/3D art.
   ========================================================================== */
html[data-theme-mode="light"] body.game {
  background: #edf2f8;
  color: #0f1b2d;
  --text: #0f1b2d;
  --text-soft: #334863;
  --muted: #52657f;
  --dim: #64748b;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --panel-soft: #f4f7fb;
  --line: #d6e1ee;
  --line-strong: #bfd0e4;
  --shadow: 0 8px 24px rgba(15, 34, 62, 0.06), 0 1px 2px rgba(15, 34, 62, 0.04);
  --glow: 0 0 0 3px rgba(2, 132, 199, 0.16);
}

/* ---------- Orbital Starlight Space Backdrop (sunlit high-orbit atmosphere) ---------- */
@keyframes orbitalDrift {
  0%, 100% { opacity: 0.72; transform: translate3d(0, 0, 0); }
  50% { opacity: 0.96; transform: translate3d(-8px, -6px, 0); }
}
html[data-theme-mode="light"] body.game #bg,
html[data-theme-mode="light"] body.game[data-space-bg='art'] #bg {
  background:
    radial-gradient(ellipse 68% 50% at 14% -4%, rgba(14, 165, 233, 0.18), transparent 62%),
    radial-gradient(ellipse 56% 48% at 88% 8%, rgba(99, 102, 241, 0.15), transparent 60%),
    radial-gradient(ellipse 52% 42% at 52% 106%, rgba(139, 92, 246, 0.12), transparent 60%),
    radial-gradient(ellipse 38% 32% at 6% 88%, rgba(245, 158, 11, 0.08), transparent 58%),
    radial-gradient(circle at 50% 142%, transparent 56%, rgba(14, 165, 233, 0.12) 56.25%, rgba(99, 102, 241, 0.05) 57.4%, transparent 59%),
    linear-gradient(180deg, #e7effa 0%, #f2f6fc 48%, #e8eef9 100%);
}
html[data-theme-mode="light"] body.game #bg::before,
html[data-theme-mode="light"] body.game[data-space-bg='art'] #bg::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.85;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(14, 116, 180, 0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 116, 180, 0.042) 1px, transparent 1px);
  background-size: 76px 76px;
}
html[data-theme-mode="light"] body.game #bg::after {
  content: '';
  position: absolute;
  inset: -16px;
  opacity: 0.84;
  pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 24px 36px, rgba(2, 132, 199, 0.55), transparent 100%),
    radial-gradient(1.2px 1.2px at 96px 118px, rgba(79, 70, 229, 0.45), transparent 100%),
    radial-gradient(1.4px 1.4px at 178px 64px, rgba(14, 165, 233, 0.50), transparent 100%),
    radial-gradient(2px 2px at 244px 168px, rgba(99, 102, 241, 0.42), transparent 100%),
    radial-gradient(1px 1px at 62px 210px, rgba(15, 27, 45, 0.24), transparent 100%),
    radial-gradient(1.5px 1.5px at 312px 92px, rgba(217, 119, 6, 0.36), transparent 100%);
  background-size: 340px 240px;
  animation: orbitalDrift 26s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme-mode="light"] body.game #bg::after { animation: none; }
}
html[data-theme-mode="light"] body.game #bg canvas,
html[data-theme-mode="light"] body.game #bg > * {
  opacity: 0.14;
  filter: invert(0.92) hue-rotate(195deg) saturate(1.15);
}

/* ---------- Top Orbital Command Deck (chamfered pearl-titanium capsules) ---------- */
html[data-theme-mode="light"] body.game .topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 245, 254, 0.88));
  border-bottom: 1px solid rgba(148, 184, 224, 0.55);
  box-shadow:
    0 2px 0 rgba(56, 189, 248, 0.18),
    0 10px 30px rgba(14, 42, 82, 0.08);
  backdrop-filter: blur(20px) saturate(1.45);
  -webkit-backdrop-filter: blur(20px) saturate(1.45);
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .topbar::before {
  display: block;
  inset: auto 0 0 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(90deg, transparent 0%, rgba(14, 165, 233, 0.65) 22%, rgba(99, 102, 241, 0.72) 50%, rgba(14, 165, 233, 0.65) 78%, transparent 100%);
}
html[data-theme-mode="light"] body.game .topbar .logo::before {
  display: none;
}
html[data-theme-mode="light"] body.game .topbar .logo .menu-logo {
  filter: drop-shadow(0 1px 3px rgba(14, 42, 82, 0.25));
}
html[data-theme-mode="light"] body.game .topbar .logo small,
html[data-theme-mode="light"] body.game .topbar .logo #uni-name {
  color: #0369a1;
  -webkit-text-fill-color: #0369a1;
}
html[data-theme-mode="light"] body.game .topbar .logo #uni-name:hover {
  color: #075985;
  -webkit-text-fill-color: #075985;
}
/* Iconic sci-fi chamfered resource pods re-engineered in pearl-titanium + holographic bevel */
html[data-theme-mode="light"] body.game .topbar .res {
  background: none;
  border: 0;
  border-radius: 0;
}
html[data-theme-mode="light"] body.game .topbar .res::before {
  display: block;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.72), rgba(148, 184, 224, 0.55) 45%, rgba(129, 140, 248, 0.68));
}
html[data-theme-mode="light"] body.game .topbar .res::after {
  display: block;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 245, 253, 0.94));
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 8px rgba(14, 165, 233, 0.08);
}
html[data-theme-mode="light"] body.game .topbar .res .ri {
  background: radial-gradient(circle at 40% 35%, #ffffff, #e2eefb 72%);
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.18);
}
html[data-theme-mode="light"] body.game .topbar .res .ri .res-img {
  filter: drop-shadow(0 1px 2px rgba(15, 34, 62, 0.2));
}
html[data-theme-mode="light"] body.game .topbar .res .rl {
  color: #52657f;
}
html[data-theme-mode="light"] body.game .topbar .res .rv {
  color: #0f1b2d;
  text-shadow: none;
}
html[data-theme-mode="light"] body.game .topbar .res.full .rv,
html[data-theme-mode="light"] body.game .topbar .res .rv.c-red {
  color: #dc2626;
  text-shadow: none;
}
html[data-theme-mode="light"] body.game .topbar .res .tip {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
  box-shadow: 0 14px 36px rgba(15, 34, 62, 0.14);
}
html[data-theme-mode="light"] body.game .topbar .userbox {
  background: transparent;
  border-color: #d5e0ee;
}
@media (max-width: 1024px) {
  html[data-theme-mode="light"] body.game .topbar .userbox {
    background: #f4f7fb;
    border-color: #d5e0ee;
  }
}
html[data-theme-mode="light"] body.game .topbar .aether-pill {
  color: #5b21b6;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-color: #c4b5fd;
  box-shadow: 0 1px 3px rgba(91, 33, 182, 0.08);
}
html[data-theme-mode="light"] body.game .topbar .aether-pill:hover {
  color: #4c1d95;
  background: #ede9fe;
  border-color: #8b5cf6;
}
html[data-theme-mode="light"] body.game .topbar .aether-pill.low {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fca5a5;
}
html[data-theme-mode="light"] body.game .topbar .aether-pill .aether-ico {
  filter: drop-shadow(0 1px 2px rgba(91, 33, 182, 0.3));
}
html[data-theme-mode="light"] body.game .topbar .top-link {
  color: #334863;
  border-right-color: #e2eaf4;
}
html[data-theme-mode="light"] body.game .topbar .top-link svg {
  filter: none;
}
html[data-theme-mode="light"] body.game .topbar .top-link::after {
  background: #0284c7;
  box-shadow: none;
  opacity: 0;
}
html[data-theme-mode="light"] body.game .topbar .top-link:hover,
html[data-theme-mode="light"] body.game .topbar .top-link.active {
  color: #0369a1;
  background: #eff6ff;
}
html[data-theme-mode="light"] body.game .topbar .top-link.active::after,
html[data-theme-mode="light"] body.game .topbar .top-link:hover::after {
  opacity: 1;
}
@keyframes shopGlowLight {
  50% {
    color: #92400e;
    text-shadow: 0 0 10px rgba(217, 119, 6, 0.35);
  }
}
html[data-theme-mode="light"] body.game .topbar .top-link[data-page="shop"] {
  color: #b45309;
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.55), transparent);
}
html[data-theme-mode="light"] body.game .topbar .top-link[data-page="shop"].ready {
  animation-name: shopGlowLight;
}
html[data-theme-mode="light"] body.game .topbar .top-link[data-page="shop"] svg {
  filter: none;
}
html[data-theme-mode="light"] body.game .topbar .top-link[data-page="shop"]::after {
  background: #d97706;
  box-shadow: none;
}
html[data-theme-mode="light"] body.game .topbar .top-link[data-page="shop"]:hover,
html[data-theme-mode="light"] body.game .topbar .top-link[data-page="shop"].active {
  color: #92400e;
  background: #fef3c7;
}
html[data-theme-mode="light"] body.game .topbar .clock {
  color: #334863;
  background: #f4f7fb;
  border-color: #d5e0ee;
  box-shadow: none;
}
html[data-theme-mode="light"] body.game .topbar .account-btn {
  color: #0f1b2d;
  background: #f4f7fb;
  border-color: #cbd5e1;
  box-shadow: none;
}
html[data-theme-mode="light"] body.game .topbar .account-avatar {
  fill: #0284c7;
  filter: none;
}
html[data-theme-mode="light"] body.game .topbar .iconbtn {
  color: #334863;
  background: #f4f7fb;
  border-color: #cbd5e1;
  box-shadow: none;
}
html[data-theme-mode="light"] body.game .topbar .iconbtn svg {
  filter: none;
}
html[data-theme-mode="light"] body.game .topbar #msg-btn {
  color: #6d28d9;
  background: #f5f3ff;
  border-color: #c4b5fd;
}
html[data-theme-mode="light"] body.game .topbar .iconbtn:hover,
html[data-theme-mode="light"] body.game .topbar .account-btn:hover,
html[data-theme-mode="light"] body.game .topbar #msg-btn:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}
html[data-theme-mode="light"] body.game .vac-pill {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}
html[data-theme-mode="light"] body.game .alert-pill {
  background: #fee2e2;
  color: #991b1b;
  border-color: #dc2626;
}
html[data-theme-mode="light"] body.game .guest-bar {
  background: #fffbeb;
  color: #78350f;
  border-bottom-color: #fcd34d;
}
html[data-theme-mode="light"] body.game .account-drop {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
  box-shadow: 0 18px 48px rgba(15, 34, 62, 0.16);
}
html[data-theme-mode="light"] body.game .account-drop a[role="menuitem"].active {
  color: #0369a1;
  background: #eff6ff;
}

/* ---------- Left Navigation & Side Panels ---------- */
html[data-theme-mode="light"] body.game .nav {
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.88), rgba(242, 247, 254, 0.82));
  background-image: none;
  border: 1px solid rgba(148, 184, 224, 0.48);
  box-shadow: 0 10px 28px rgba(14, 42, 82, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}
html[data-theme-mode="light"] body.game .nav-close {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #334863;
}
html[data-theme-mode="light"] body.game .nav-close:hover {
  background: #eff6ff;
  border-color: #0284c7;
  color: #0369a1;
}
html[data-theme-mode="light"] body.game .nav a {
  color: #334863;
}
html[data-theme-mode="light"] body.game .nav a:hover {
  background: #eff6ff;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .nav a.active {
  background: linear-gradient(90deg, #e0f2fe, #f0f9ff);
  color: #0369a1;
  box-shadow: inset 3px 0 0 #0284c7;
}
html[data-theme-mode="light"] body.game .nav a[data-page="dungeons"].active {
  background: linear-gradient(90deg, #fef3c7, #fffbeb);
  color: #92400e;
  box-shadow: inset 3px 0 0 #d97706;
}
html[data-theme-mode="light"] body.game .nav-drop {
  background: #f4f7fb;
  color: #334863;
}
html[data-theme-mode="light"] body.game .nav-drop:hover {
  background: #eff6ff;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .nav-group.has-active > .nav-drop {
  background: #e0f2fe;
  color: #0369a1;
  box-shadow: inset 3px 0 0 #0284c7;
}
html[data-theme-mode="light"] body.game .panel-reopen,
html[data-theme-mode="light"] body.game .chat-reopen button {
  background: #ffffff;
  color: #1e293b;
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(15, 34, 62, 0.1);
}
html[data-theme-mode="light"] body.game .panel-reopen:hover,
html[data-theme-mode="light"] body.game .chat-reopen button:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #0284c7;
}

/* ---------- Right Sidebar: Planets & Live Chat ---------- */
html[data-theme-mode="light"] body.game .pl-item {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .pl-item:hover {
  background: #f8fbff;
  border-color: #93c5fd;
}
html[data-theme-mode="light"] body.game .pl-item.active {
  background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}
html[data-theme-mode="light"] body.game .pl-item .moonbtn {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .side-chat {
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.88), rgba(242, 247, 254, 0.82));
  border-color: rgba(148, 184, 224, 0.48);
  box-shadow: 0 10px 28px rgba(14, 42, 82, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}
html[data-theme-mode="light"] body.game .side-chat::after {
  display: none;
}
html[data-theme-mode="light"] body.game .side-chat .chat-head {
  background: rgba(244, 248, 254, 0.78);
  border-bottom-color: #dce7f5;
}
html[data-theme-mode="light"] body.game .side-chat .chat-log {
  background: linear-gradient(180deg, rgba(235, 243, 253, 0.65), rgba(245, 248, 254, 0.86));
}
html[data-theme-mode="light"] body.game .side-chat .chat-form {
  background: #f8fafd;
  border-top-color: #e2eaf4;
}
html[data-theme-mode="light"] body.game .chat-row input {
  color-scheme: light;
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f1b2d;
  box-shadow: inset 0 1px 2px rgba(15, 34, 62, 0.05);
}
html[data-theme-mode="light"] body.game .chat-row input:-webkit-autofill {
  -webkit-text-fill-color: #0f1b2d;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
}
html[data-theme-mode="light"] body.game .chat-emoji-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334863;
}
html[data-theme-mode="light"] body.game .chat-channel-btn,
html[data-theme-mode="light"] body.game .chat-close,
html[data-theme-mode="light"] body.game .chat-thread,
html[data-theme-mode="light"] body.game .chat-friends-btn {
  background: #ffffff;
  color: #1e293b;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .chat-channel-btn:hover,
html[data-theme-mode="light"] body.game .chat-channel-btn[aria-expanded="true"],
html[data-theme-mode="light"] body.game .chat-channel-menu button.on,
html[data-theme-mode="light"] body.game .chat-close:hover,
html[data-theme-mode="light"] body.game .chat-thread:hover,
html[data-theme-mode="light"] body.game .chat-thread.active,
html[data-theme-mode="light"] body.game .chat-friends-btn:hover,
html[data-theme-mode="light"] body.game .chat-friends-btn[aria-expanded="true"],
html[data-theme-mode="light"] body.game .chat-chips button:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #0284c7;
}
html[data-theme-mode="light"] body.game .chat-menu {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 14px 36px rgba(15, 34, 62, 0.16);
}
html[data-theme-mode="light"] body.game .chat-menu button {
  background: #f8fafd;
  color: #0f1b2d;
  border-color: #e2eaf4;
}
html[data-theme-mode="light"] body.game .chat-menu button:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #0284c7;
}
html[data-theme-mode="light"] body.game .chat-empty {
  text-shadow: none;
  color: #52657f;
}
html[data-theme-mode="light"] body.game .chat-bubble,
html[data-theme-mode="light"] body.game .chat-msg {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #dbe4f0;
  box-shadow: 0 1px 3px rgba(15, 34, 62, 0.05);
}
html[data-theme-mode="light"] body.game .chat-line.mine .chat-bubble,
html[data-theme-mode="light"] body.game .chat-line.mine .chat-msg {
  background: #e0f2fe;
  color: #0c2340;
  border-color: #7dd3fc;
}
html[data-theme-mode="light"] body.game .chat-world {
  background: #eef3f9;
  color: #475a75;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .chat-deal {
  background: #f8fafd;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .chat-system .chat-bubble {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #78350f;
}
html[data-theme-mode="light"] body.game .chat-system .who {
  color: #b45309;
}
html[data-theme-mode="light"] #release-status {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
  box-shadow: 0 8px 24px rgba(15, 34, 62, 0.12);
}
html[data-theme-mode="light"] #release-status button {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}
html[data-theme-mode="light"] .release-chat-notice {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

/* Fix mix-blend-mode:screen icons inside the game */
html[data-theme-mode="light"] body.game .sec-ico {
  mix-blend-mode: normal;
  background: #0f1f36;
  padding: 4px;
  border-radius: 8px;
}
html[data-theme-mode="light"] body.game .pl-item img,
html[data-theme-mode="light"] body.game .pl-img,
html[data-theme-mode="light"] body.game .gal-row-planet img {
  mix-blend-mode: normal;
  background: #0c1626;
  border: 1px solid #cbd5e1;
}

/* ---------- Overview Hero, Page Banners & Dashboard Cards ---------- */
html[data-theme-mode="light"] body.game .hero > .viewport {
  background: #07111f;
  border-color: #cbd5e1;
  box-shadow: none;
}
html[data-theme-mode="light"] body.game .hero > .viewport::after {
  display: none;
}
html[data-theme-mode="light"] body.game .hero .viewport .title {
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(6, 14, 28, 0.78), rgba(6, 14, 28, 0.45));
  backdrop-filter: blur(6px);
}
html[data-theme-mode="light"] body.game .hero .viewport .title h1 {
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
}
html[data-theme-mode="light"] body.game .hero .viewport .title div,
html[data-theme-mode="light"] body.game .hero .viewport .title .wx-chip,
html[data-theme-mode="light"] body.game .hero .viewport .title .wx-chip b {
  color: #e0f2fe;
}
html[data-theme-mode="light"] body.game .hero .viewport .title .wx-chip small {
  color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .hero .side {
  background: #ffffff;
  border-left-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .page-banner {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(15, 34, 62, 0.08);
}
html[data-theme-mode="light"] body.game .page-banner h1,
html[data-theme-mode="light"] body.game .gov-banner h1,
html[data-theme-mode="light"] body.game .pop-banner h1 {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
html[data-theme-mode="light"] body.game .page-banner .sub,
html[data-theme-mode="light"] body.game .gov-kicker,
html[data-theme-mode="light"] body.game .gov-banner-stats span,
html[data-theme-mode="light"] body.game .gov-banner-stats b {
  color: #e2edf8;
}
html[data-theme-mode="light"] body.game .dash-card {
  background: #ffffff;
  border-color: #d5e0ee;
  box-shadow: 0 8px 24px rgba(15, 34, 62, 0.06);
}
html[data-theme-mode="light"] body.game .dash-card:hover {
  border-color: #0284c7;
  box-shadow: 0 14px 32px rgba(15, 34, 62, 0.11);
}
html[data-theme-mode="light"] body.game .dash-card-shade {
  background: linear-gradient(180deg, rgba(4, 10, 22, 0.55), rgba(4, 10, 22, 0.2) 55%, rgba(4, 10, 22, 0.72));
}
html[data-theme-mode="light"] body.game .dash-card-top h2 {
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}
html[data-theme-mode="light"] body.game .dash-card-icon {
  background: rgba(10, 20, 36, 0.82);
  color: #7dd3fc;
}
html[data-theme-mode="light"] body.game .dash-card-badge {
  background: rgba(10, 20, 36, 0.88);
  color: #f1f5f9;
}
html[data-theme-mode="light"] body.game .dash-card-status {
  background: #ffffff;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .dash-card-footer {
  background: #f4f7fb;
  color: #0369a1;
  border-color: #d5e0ee;
}

/* ---------- Economy Strip, Item Grid (Resources, Facilities, Research, Shipyard, Defense) & Detail Panel ---------- */
html[data-theme-mode="light"] body.game .eco-card {
  background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 8%, #ffffff), #ffffff 72%);
  border-color: color-mix(in srgb, var(--tone) 32%, #d5e0ee);
  box-shadow: 0 6px 20px rgba(15, 34, 62, 0.06);
}
html[data-theme-mode="light"] body.game .eco-ico {
  background: #f1f5f9;
  border-color: color-mix(in srgb, var(--tone) 30%, #cbd5e1);
}
html[data-theme-mode="light"] body.game .eco-value {
  color: color-mix(in srgb, var(--tone) 75%, #0f1b2d);
  text-shadow: none;
}
html[data-theme-mode="light"] body.game .eco-bar,
html[data-theme-mode="light"] body.game .bar,
html[data-theme-mode="light"] body.game .card .progress,
html[data-theme-mode="light"] body.game .capbar,
html[data-theme-mode="light"] body.game .mv-meter-bar,
html[data-theme-mode="light"] body.game .al-meter-bar,
html[data-theme-mode="light"] body.game .emp-fill,
html[data-theme-mode="light"] body.game .op-bar,
html[data-theme-mode="light"] body.game .shop-bar,
html[data-theme-mode="light"] body.game .advisor-lvl-track,
html[data-theme-mode="light"] body.game .sc-cap-bar,
html[data-theme-mode="light"] body.game .sc-vitals-track,
html[data-theme-mode="light"] body.game .technology-progress {
  background: #dce5f1;
}
html[data-theme-mode="light"] body.game .eco-bar i {
  background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 82%, #0f1b2d), var(--tone));
  box-shadow: none;
}
html[data-theme-mode="light"] body.game[data-race-sliders] :is(.bar, .eco-bar, .progress, .advisor-lvl-track, .al-meter-bar, .sc-cap-bar, .sc-vitals-track, .emp-fill, .capbar, .op-bar, .lw-meter, .mv-meter-bar, .shop-bar, .technology-progress) > i,
html[data-theme-mode="light"] body.game[data-race-sliders] progress::-webkit-progress-value,
html[data-theme-mode="light"] body.game[data-race-sliders] progress::-moz-progress-bar {
  background-image: var(--race-meter-pattern), linear-gradient(90deg, color-mix(in srgb, var(--race-meter-color) 75%, #0f1b2d), var(--race-meter-color));
}
html[data-theme-mode="light"] body.game[data-race-sliders] progress,
html[data-theme-mode="light"] body.game[data-race-sliders] progress::-webkit-progress-bar {
  background: #dce5f1;
}
html[data-theme-mode="light"] body.game[data-race-sliders] input[type="range"]::-webkit-slider-runnable-track,
html[data-theme-mode="light"] body.game[data-race-sliders] input[type="range"]::-moz-range-track {
  background-color: #cbd5e1;
}

html[data-theme-mode="light"] body.game .card,
html[data-theme-mode="light"] body.game .item-card {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
  box-shadow: 0 4px 14px rgba(15, 34, 62, 0.06);
}
html[data-theme-mode="light"] body.game .card:hover {
  border-color: #0284c7;
  box-shadow: 0 12px 28px rgba(15, 34, 62, 0.12), 0 0 0 1px rgba(2, 132, 199, 0.25);
}
html[data-theme-mode="light"] body.game .card.selected {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px #0284c7, 0 10px 26px rgba(2, 132, 199, 0.18);
}
html[data-theme-mode="light"] body.game .card .thumb,
html[data-theme-mode="light"] body.game .card.toned .thumb {
  background: #0c1626;
}
html[data-theme-mode="light"] body.game .card .info {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.92) 34%, #ffffff 70%);
  padding-top: 30px;
}
html[data-theme-mode="light"] body.game .card .name {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .card .state {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .card .yield {
  color: color-mix(in srgb, var(--tone, #0284c7) 75%, #0f1b2d);
}
html[data-theme-mode="light"] body.game .card .lvl {
  background: rgba(255, 255, 255, 0.94);
  color: #0f1b2d;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 34, 62, 0.14);
}
html[data-theme-mode="light"] body.game .card.afford .lvl {
  border-color: #10b981;
  color: #047857;
}
html[data-theme-mode="light"] body.game .card.working .lvl {
  border-color: #d97706;
  color: #b45309;
}
html[data-theme-mode="light"] body.game .card.locked::after {
  background-color: rgba(255, 255, 255, 0.92);
  border: 1px solid #fca5a5;
}

/* Detail panel: crisp white right pane paired with framed dark 3D/artwork viewer */
html[data-theme-mode="light"] body.game .detail {
  background: #ffffff;
  border-color: #d5e0ee;
  box-shadow: 0 10px 28px rgba(15, 34, 62, 0.08);
}
html[data-theme-mode="light"] body.game .detail .viewer {
  background: #0a1624;
  border-right-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .detail .viewer .viewer-loading {
  color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .detail .body {
  background:
    radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--tone, #0ea5e9) 11%, transparent), transparent 58%),
    linear-gradient(rgba(14, 116, 180, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 116, 180, 0.032) 1px, transparent 1px),
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.94));
  background-size: auto, 28px 28px, 28px 28px, auto;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .detail .body h2 {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .detail .desc {
  color: #334863;
}
html[data-theme-mode="light"] body.game .detail .body > .kv {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .detail-insight {
  background: #f4f7fb;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .detail-insight span {
  color: #52657f;
}
html[data-theme-mode="light"] body.game .detail-insight b {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .cost,
html[data-theme-mode="light"] body.game .stat,
html[data-theme-mode="light"] body.game .q-item,
html[data-theme-mode="light"] body.game .event {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .q-item.current {
  background: linear-gradient(90deg, #fffbeb, #ffffff);
  border-color: #f59e0b;
}
html[data-theme-mode="light"] body.game .cost.short {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}
html[data-theme-mode="light"] body.game .req {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}
html[data-theme-mode="light"] body.game .req.ok {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}
html[data-theme-mode="light"] body.game .tag.tone-tag {
  color: color-mix(in srgb, var(--tone) 72%, #0f1b2d);
  background: color-mix(in srgb, var(--tone) 14%, #f4f7fb);
  border: 1px solid color-mix(in srgb, var(--tone) 30%, #d5e0ee);
}
/* Illustrated worker timer retains dark scrim + crisp white/bright text */
html[data-theme-mode="light"] body.game .detail-work-timer,
html[data-theme-mode="light"] body.game .detail-work-timer .spread > span,
html[data-theme-mode="light"] body.game .detail-work-timer .work-scale {
  color: #e2edf8;
}
html[data-theme-mode="light"] body.game .detail-work-timer .work-time,
html[data-theme-mode="light"] body.game .detail-work-timer .work-scale b {
  color: var(--work-light, #bae6fd);
}

/* ---------- Tables, Commander Profile Modal, Galaxy & Galaxy Atlas ---------- */
html[data-theme-mode="light"] body.game table.t th {
  background: #f4f7fb;
  color: #475a75;
  border-bottom-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game table.t td {
  border-bottom-color: #e2eaf4;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game table.t tr:hover td {
  background: #f0f7ff;
}
html[data-theme-mode="light"] body.game table.t tr.me td,
html[data-theme-mode="light"] body.game table.t tr.sel td {
  background: #e0f2fe;
}
html[data-theme-mode="light"] body.game .prod-t tr.boosted td:first-child {
  color: #6d28d9;
  font-weight: 700;
}
html[data-theme-mode="light"] body.game .player-name.vac,
html[data-theme-mode="light"] body.game .st-v {
  color: #2563eb;
}
html[data-theme-mode="light"] body.game .st-i {
  color: #64748b;
}
html[data-theme-mode="light"] body.game .st-II {
  color: #475569;
}
html[data-theme-mode="light"] body.game .st-s {
  color: #c2410c;
}
html[data-theme-mode="light"] body.game .system-3d {
  background: #060d1a;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .sys-label {
  background: rgba(8, 17, 32, 0.86);
  border-color: rgba(148, 197, 255, 0.35);
  color: #f1f5f9;
}
html[data-theme-mode="light"] body.game .sys-label b {
  color: #93c5fd;
}
html[data-theme-mode="light"] body.game .sys-label small {
  color: #fcd34d;
}
html[data-theme-mode="light"] body.game .sys-label.own small {
  color: #7dd3fc;
}
html[data-theme-mode="light"] body.game .sys-label.npc small {
  color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .commander-profile.modal {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .commander-profile-head {
  background: linear-gradient(120deg, #f4f7fb, #ffffff);
  border-bottom-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .commander-profile-stats > div {
  background: #f4f7fb;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .commander-profile-specialization,
html[data-theme-mode="light"] body.game .commander-profile .modal-actions {
  border-color: #e2eaf4;
}
html[data-theme-mode="light"] body.game .commander-profile-planets a {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .commander-profile-planets a:hover {
  background: #e0f2fe;
  border-color: #0284c7;
}
/* Galaxy Atlas: white frame & controls around dark star-map viewport */
html[data-theme-mode="light"] body.game .galaxy-atlas {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .atlas-head h2 {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .atlas-head p,
html[data-theme-mode="light"] body.game .atlas-note {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .atlas-stats span {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .atlas-stats b,
html[data-theme-mode="light"] body.game .atlas-sector-heading h3,
html[data-theme-mode="light"] body.game .atlas-plan h3 {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .atlas-sector,
html[data-theme-mode="light"] body.game .atlas-system {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #1e293b;
}
html[data-theme-mode="light"] body.game .atlas-sector:hover,
html[data-theme-mode="light"] body.game .atlas-system:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}
html[data-theme-mode="light"] body.game .atlas-sector.selected,
html[data-theme-mode="light"] body.game .atlas-system.selected {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
}
html[data-theme-mode="light"] body.game .atlas-plan,
html[data-theme-mode="light"] body.game .atlas-map-toolbar {
  background: #f8fafd;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .galaxy-atlas [data-atlas-status] {
  color: #b91c1c;
}
/* Keep constellation buttons inside the dark space viewport high-contrast */
html[data-theme-mode="light"] body.game .atlas-constellation .atlas-system {
  background: rgba(6, 20, 36, 0.82);
  border-color: rgba(125, 211, 252, 0.35);
  color: #e0f2fe;
}
html[data-theme-mode="light"] body.game .atlas-constellation .atlas-system.selected {
  background: rgba(180, 83, 9, 0.85);
  border-color: #fcd34d;
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .atlas-constellation .atlas-system small {
  color: #bae6fd;
}

/* ---------- Fleet, Movements & Fleet Intel ---------- */
html[data-theme-mode="light"] body.game .ship-pick,
html[data-theme-mode="light"] body.game .fleet-page .ship-pick,
html[data-theme-mode="light"] body.game .mission,
html[data-theme-mode="light"] body.game .fleet-page .mission,
html[data-theme-mode="light"] body.game .fleet-stat,
html[data-theme-mode="light"] body.game .fleet-meters .meter,
html[data-theme-mode="light"] body.game .fleet-suggest,
html[data-theme-mode="light"] body.game .suggest-picks span,
html[data-theme-mode="light"] body.game .target-readout,
html[data-theme-mode="light"] body.game .cargo-meter,
html[data-theme-mode="light"] body.game .mv-fact,
html[data-theme-mode="light"] body.game .mv-chip {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .fleet-page .ship-pick:hover,
html[data-theme-mode="light"] body.game .fleet-page .mission:hover {
  background: #eff6ff;
  border-color: #0284c7;
}
html[data-theme-mode="light"] body.game .fleet-stat.fleet-stat-illustrated {
  background: #071320;
  border-color: #cbd5e1;
  color: #f0f7ff;
}
html[data-theme-mode="light"] body.game .fleet-stat.fleet-stat-illustrated > span {
  color: #cbe3f5;
}
html[data-theme-mode="light"] body.game .fleet-stat.fleet-stat-illustrated > b {
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .mv-craft {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .fleet-preset-fields input,
html[data-theme-mode="light"] body.game .fleet-preset-fields select,
html[data-theme-mode="light"] body.game .intel-toolbar input[type=search] {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
}

/* ---------- Messages, Composer, Technology Tree, Advisor & Empire (command-ui.css) ---------- */
html[data-theme-mode="light"] body.game .mail-center,
html[data-theme-mode="light"] body.game .mail-hero,
html[data-theme-mode="light"] body.game .mail-folders,
html[data-theme-mode="light"] body.game .message-composer.modal,
html[data-theme-mode="light"] body.game .compose-header {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .mail-hero,
html[data-theme-mode="light"] body.game .compose-header {
  background: linear-gradient(120deg, #f0f9ff, #ffffff);
  border-bottom-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .mail-hero p,
html[data-theme-mode="light"] body.game .compose-header p,
html[data-theme-mode="light"] body.game .mail-empty {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .mail-empty h3 {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .mail-empty > i {
  background: #e0f2fe;
  color: #0284c7;
}
html[data-theme-mode="light"] body.game .mail-folders > button,
html[data-theme-mode="light"] body.game .msg-tabs button {
  background: #f4f7fb;
  color: #334863;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .mail-folders > button:hover,
html[data-theme-mode="light"] body.game .msg-tabs button:hover {
  background: #eff6ff;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .mail-folders > button.active,
html[data-theme-mode="light"] body.game .msg-tabs button.active {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #0284c7;
}
html[data-theme-mode="light"] body.game .mail-count,
html[data-theme-mode="light"] body.game .mail-type,
html[data-theme-mode="light"] body.game .mail-report-icon {
  background: #e8f0f9;
  color: #334863;
}
html[data-theme-mode="light"] body.game .mail-center .msg,
html[data-theme-mode="light"] body.game .msg {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .mail-center .msg.unread {
  background: #f0f9ff;
  border-color: #7dd3fc;
}
html[data-theme-mode="light"] body.game .mail-center .subj,
html[data-theme-mode="light"] body.game .mail-center .unread .subj,
html[data-theme-mode="light"] body.game .msg.unread .msg-head .subj {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .mail-center .msg-body,
html[data-theme-mode="light"] body.game .report .side,
html[data-theme-mode="light"] body.game .battle-economy-grid > div {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .mail-delete {
  color: #dc2626 !important;
}
html[data-theme-mode="light"] body.game .compose-form label {
  color: #334155;
}
html[data-theme-mode="light"] body.game .compose-form input,
html[data-theme-mode="light"] body.game .compose-form textarea {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .compose-feedback {
  color: #b91c1c;
}

/* Technology Tree */
html[data-theme-mode="light"] body.game .technology-hub {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .technology-hub .technology-hero {
  background: #0d1f33;
  border-color: #cbd5e1;
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .technology-hub .technology-hero .mail-eyebrow {
  color: #7dd3fc;
}
html[data-theme-mode="light"] body.game .technology-hub .technology-hero h1,
html[data-theme-mode="light"] body.game .technology-hub .technology-hero h2 {
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .technology-hub .technology-hero p,
html[data-theme-mode="light"] body.game .technology-hub .technology-totals span {
  color: #dbeafe;
}
html[data-theme-mode="light"] body.game .technology-hub .technology-totals b {
  color: #7dd3fc;
}
html[data-theme-mode="light"] body.game .technology-search input {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .technology-search > span,
html[data-theme-mode="light"] body.game .technology-section > header span,
html[data-theme-mode="light"] body.game .technology-node-level,
html[data-theme-mode="light"] body.game .technology-node-copy > small,
html[data-theme-mode="light"] body.game .technology-node-copy > small span {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .technology-jumps button {
  background: #f4f7fb;
  color: #334863;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .technology-jumps button:hover,
html[data-theme-mode="light"] body.game .technology-jumps button.active {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #0284c7;
}
html[data-theme-mode="light"] body.game .technology-section.panel {
  background: #ffffff;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .technology-hub .tree-item {
  background: #f8fafd;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .technology-node-head b {
  color: #0f1b2d;
}

/* Advisor & Empire Overview */
html[data-theme-mode="light"] body.game .advisor-desk,
html[data-theme-mode="light"] body.game .advisor-command .advisor-panel,
html[data-theme-mode="light"] body.game .advisor-command .advisor-desk,
html[data-theme-mode="light"] body.game .advisor-say,
html[data-theme-mode="light"] body.game .advisor-command .advisor-say,
html[data-theme-mode="light"] body.game .advisor-item,
html[data-theme-mode="light"] body.game .advisor-command .advisor-item,
html[data-theme-mode="light"] body.game .advisor-command-metrics {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .advisor-command .advisor-say,
html[data-theme-mode="light"] body.game .advisor-command .advisor-item,
html[data-theme-mode="light"] body.game .advisor-command-metrics,
html[data-theme-mode="light"] body.game .advisor-item {
  background: #f4f7fb;
}
html[data-theme-mode="light"] body.game .advisor-command-head p,
html[data-theme-mode="light"] body.game .advisor-development > div:first-child {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .advisor-command .advisor-say p,
html[data-theme-mode="light"] body.game .advisor-command-metrics b {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .advisor-close {
  background: #f1f5f9;
  color: #334863;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .emp-command .emp-board,
html[data-theme-mode="light"] body.game .emp-world-card {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .emp-command-head > div:last-child,
html[data-theme-mode="light"] body.game .emp-world-resources {
  background: #f4f7fb;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .emp-command-head p {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .emp-command-head > div:last-child b {
  color: #0369a1;
}
html[data-theme-mode="light"] body.game .emp-world-resources b,
html[data-theme-mode="light"] body.game .emp-world-capacity > span b {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .emp-tab.on {
  color: #0369a1;
  background: #e0f2fe;
}

/* ---------- Market, Bonuses, Vote Shop, Premium Shop & Referral ---------- */
html[data-theme-mode="light"] body.game .mk-browse,
html[data-theme-mode="light"] body.game .mk-sell {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .mk-search {
  background: #f4f7fb;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .mk-filters {
  border-bottom-color: #e2eaf4;
}
html[data-theme-mode="light"] body.game .mk-filters button {
  background: #f4f7fb;
  color: #334863;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .mk-filters button span {
  background: #e2e8f0;
  color: #334155;
}
html[data-theme-mode="light"] body.game .mk-filters button:hover,
html[data-theme-mode="light"] body.game .mk-filters button.active {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #0284c7;
}
html[data-theme-mode="light"] body.game .mk-card,
html[data-theme-mode="light"] body.game .mk-empty {
  background: #f8fafd;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .mk-market-emblem {
  background: #e0f2fe;
  border-color: #7dd3fc;
  text-shadow: none;
}
html[data-theme-mode="light"] body.game .mk-how,
html[data-theme-mode="light"] body.game .mk-sell-note {
  border-top-color: #e2eaf4;
}

html[data-theme-mode="light"] body.game .bonus-card,
html[data-theme-mode="light"] body.game .vote-site,
html[data-theme-mode="light"] body.game .shop-pack,
html[data-theme-mode="light"] body.game .shop-item,
html[data-theme-mode="light"] body.game .pay-method,
html[data-theme-mode="light"] body.game .shop-amount-card,
html[data-theme-mode="light"] body.game .shop-donation-checkout,
html[data-theme-mode="light"] body.game .donate-rank {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
  box-shadow: 0 4px 14px rgba(15, 34, 62, 0.05);
}
html[data-theme-mode="light"] body.game .bonus-loot-row,
html[data-theme-mode="light"] body.game .bonus-aether.none,
html[data-theme-mode="light"] body.game .bonus-note,
html[data-theme-mode="light"] body.game .vote-get,
html[data-theme-mode="light"] body.game .vote-site-img,
html[data-theme-mode="light"] body.game .vote-art,
html[data-theme-mode="light"] body.game .vote-cap.none,
html[data-theme-mode="light"] body.game .shop-filter,
html[data-theme-mode="light"] body.game .shop-colors,
html[data-theme-mode="light"] body.game .shop-variant {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .shop-nav-btn:hover {
  background: #eff6ff;
}
html[data-theme-mode="light"] body.game .shop-pips i,
html[data-theme-mode="light"] body.game .swatch-none,
html[data-theme-mode="light"] body.game .vu {
  background: #dce5f1;
}
html[data-theme-mode="light"] body.game .bonus-aether span,
html[data-theme-mode="light"] body.game .bonus-pip.monthly,
html[data-theme-mode="light"] body.game .vote-get.aether,
html[data-theme-mode="light"] body.game .vote-get.aether b,
html[data-theme-mode="light"] body.game .aether-amt,
html[data-theme-mode="light"] body.game .shop-balance,
html[data-theme-mode="light"] body.game .perk-live b,
html[data-theme-mode="light"] body.game .perk-pill,
html[data-theme-mode="light"] body.game .shop-amount-reward,
html[data-theme-mode="light"] body.game .ref-aether {
  color: #6d28d9;
}
html[data-theme-mode="light"] body.game .vp-amt {
  color: #0369a1;
}
html[data-theme-mode="light"] body.game .perk-times b {
  color: #047857;
}
html[data-theme-mode="light"] body.game .shop-warn {
  color: #b91c1c;
}

/* Referral */
html[data-theme-mode="light"] body.game .ref-head,
html[data-theme-mode="light"] body.game .ref-page .panel {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .ref-head {
  background: linear-gradient(120deg, #f0f9ff, #f5f3ff 65%, #ffffff);
}
html[data-theme-mode="light"] body.game .ref-head h1,
html[data-theme-mode="light"] body.game .ref-card h2,
html[data-theme-mode="light"] body.game .ref-stat-value,
html[data-theme-mode="light"] body.game .ref-steps strong {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .ref-head p,
html[data-theme-mode="light"] body.game .ref-stat-sub,
html[data-theme-mode="light"] body.game .ref-steps li > span,
html[data-theme-mode="light"] body.game .ref-empty h2 {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .ref-reward-icon {
  background: #ede9fe;
  color: #6d28d9;
}
html[data-theme-mode="light"] body.game .ref-reward strong {
  color: #5b21b6;
}
html[data-theme-mode="light"] body.game .ref-reward div > span {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .ref-link-row input {
  background: #f4f7fb;
  color: #0369a1;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .ref-steps li {
  background: #f4f7fb;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .ref-progress,
html[data-theme-mode="light"] body.game .ref-progress::-webkit-progress-bar {
  background: #dce5f1;
}

/* ---------- Race, Class Doctrines, Officers, Gear & Equipment ---------- */
html[data-theme-mode="light"] body.game .class-command,
html[data-theme-mode="light"] body.game .class-doctrine,
html[data-theme-mode="light"] body.game .class-card,
html[data-theme-mode="light"] body.game .race-card {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
  box-shadow: 0 6px 20px rgba(15, 34, 62, 0.06);
}
html[data-theme-mode="light"] body.game .class-dossier h2 {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .class-dossier li {
  color: #334863;
}
html[data-theme-mode="light"] body.game .class-sector {
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}
html[data-theme-mode="light"] body.game .class-landscape::after {
  background: linear-gradient(0deg, rgba(4, 9, 18, 0.8), transparent 55%);
}
html[data-theme-mode="light"] body.game .race-overview .race-tabs {
  background: #eef3f9;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .ro-switch button.on,
html[data-theme-mode="light"] body.game .rs-branch-tabs button.on,
html[data-theme-mode="light"] body.game .char-tabs button.on,
html[data-theme-mode="light"] body.game .al-tab.on {
  background: #0284c7;
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .rs-branch-head {
  color: #f8fafc;
}
html[data-theme-mode="light"] body.game .rs-branch-head h2,
html[data-theme-mode="light"] body.game .rs-branch-head h3,
html[data-theme-mode="light"] body.game .rs-branch-head b {
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .rs-branch-head p,
html[data-theme-mode="light"] body.game .rs-branch-head small {
  color: #dbeafe;
}
html[data-theme-mode="light"] body.game .rs-pips i {
  background: #cbd5e1;
}
html[data-theme-mode="light"] body.game .rs-req,
html[data-theme-mode="light"] body.game .rs-node.locked .rs-state,
html[data-theme-mode="light"] body.game .rs-state-txt.locked {
  color: #dc2626;
}
html[data-theme-mode="light"] body.game .rs-node.ult .rs-tier {
  color: #b45309;
}
html[data-theme-mode="light"] body.game .rs-detail-box,
html[data-theme-mode="light"] body.game .rs-mile,
html[data-theme-mode="light"] body.game .krythori-abilities article {
  background: #f4f7fb;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .krythori-abilities article b {
  color: #0369a1;
}

/* Officers, Character Equipment & Reveal Dialogs */
html[data-theme-mode="light"] body.game .of-card,
html[data-theme-mode="light"] body.game .of-dossier,
html[data-theme-mode="light"] body.game .of-track,
html[data-theme-mode="light"] body.game .of-assign,
html[data-theme-mode="light"] body.game .of-flight {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.94), rgba(243, 247, 254, 0.88));
  border-color: rgba(148, 184, 224, 0.48);
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .of-rank,
html[data-theme-mode="light"] body.game .of-offer-skills b {
  color: color-mix(in srgb, var(--rc, #0284c7) 68%, #0f1b2d);
}
html[data-theme-mode="light"] body.game .brief-rail {
  background: linear-gradient(180deg, color-mix(in srgb, var(--mc, #0284c7) 18%, #ffffff), #edf3fb);
  color: #0f1b2d;
  border-right: 1px solid #d5e0ee;
}
html[data-theme-mode="light"] body.game .brief-mark {
  background: #ffffff;
  color: color-mix(in srgb, var(--mc, #0284c7) 75%, #0f1b2d);
  border: 1px solid color-mix(in srgb, var(--mc, #0284c7) 40%, #cbd5e1);
}
html[data-theme-mode="light"] body.game .brief-rail span:last-child {
  color: color-mix(in srgb, var(--mc, #0284c7) 72%, #0f1b2d);
}
html[data-theme-mode="light"] body.game .of-offer-skills li,
html[data-theme-mode="light"] body.game .of-statgrid div,
html[data-theme-mode="light"] body.game .of-bonus,
html[data-theme-mode="light"] body.game .doll,
html[data-theme-mode="light"] body.game .slot-btn,
html[data-theme-mode="light"] body.game .worn-piece,
html[data-theme-mode="light"] body.game .gear-card,
html[data-theme-mode="light"] body.game .gear-ico,
html[data-theme-mode="light"] body.game .of-pay,
html[data-theme-mode="light"] body.game .of-node-card {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .of-node-mark {
  background: #e2e8f0;
  color: #334863;
}
html[data-theme-mode="light"] body.game .of-node.on .of-node-mark {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .kit-line .item-art {
  background: #0c1626;
}
html[data-theme-mode="light"] body.game .rarity-pill {
  color: color-mix(in srgb, var(--rr, #334863) 72%, #0f1b2d);
}
html[data-theme-mode="light"] body.game .sc-frame {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .sc-tile,
html[data-theme-mode="light"] body.game .sc-weapon,
html[data-theme-mode="light"] body.game .sc-stage,
html[data-theme-mode="light"] body.game .sc-node,
html[data-theme-mode="light"] body.game .sc-pager button {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .sc-tier,
html[data-theme-mode="light"] body.game .sc-foot,
html[data-theme-mode="light"] body.game .sc-stack,
html[data-theme-mode="light"] body.game .sc-vitals b {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .sc-wires line {
  stroke: #94a3b8;
}
html[data-theme-mode="light"] body.game .reveal-card,
html[data-theme-mode="light"] body.game .reward-dossier.reveal-card {
  background: #ffffff;
  color: #0f1b2d;
  border-color: color-mix(in srgb, var(--rr, #0284c7) 55%, #cbd5e1);
}
html[data-theme-mode="light"] body.game .reward-identity h3 {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .reward-dossier footer,
html[data-theme-mode="light"] body.game .reward-stats {
  background: #f4f7fb;
  border-color: #d5e0ee;
}

/* ---------- Alliance, Operations, Government, Forum, Population, Climate, Achievements, Gathering, Tutorial ---------- */
html[data-theme-mode="light"] body.game .al-card,
html[data-theme-mode="light"] body.game .al-flag-pick,
html[data-theme-mode="light"] body.game .al-face.empty,
html[data-theme-mode="light"] body.game .al-station.empty,
html[data-theme-mode="light"] body.game .banner-card,
html[data-theme-mode="light"] body.game .tr-mat,
html[data-theme-mode="light"] body.game .tr-offer,
html[data-theme-mode="light"] body.game .op-steps li,
html[data-theme-mode="light"] body.game .op-clock,
html[data-theme-mode="light"] body.game .op-loot,
html[data-theme-mode="light"] body.game .gov-policy,
html[data-theme-mode="light"] body.game .gov-cand,
html[data-theme-mode="light"] body.game .gov-pulse > div,
html[data-theme-mode="light"] body.game .fo-board,
html[data-theme-mode="light"] body.game .fo-row,
html[data-theme-mode="light"] body.game .fo-post,
html[data-theme-mode="light"] body.game .fo-compose,
html[data-theme-mode="light"] body.game .fo-editing,
html[data-theme-mode="light"] body.game .ach-search,
html[data-theme-mode="light"] body.game .ach-card,
html[data-theme-mode="light"] body.game .pop-ship,
html[data-theme-mode="light"] body.game .pop-plan,
html[data-theme-mode="light"] body.game .demo-person,
html[data-theme-mode="light"] body.game .demo-prof,
html[data-theme-mode="light"] body.game .pop-now-stats > div,
html[data-theme-mode="light"] body.game .rg-source,
html[data-theme-mode="light"] body.game .rg-storage,
html[data-theme-mode="light"] body.game .rg-upgrade {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .al-station.empty {
  border-style: dashed;
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .al-station.empty p {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .banner-card {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .banner-card span {
  color: #0f1b2d;
  background: #ffffff;
}
html[data-theme-mode="light"] body.game .banner-card small {
  color: #52657f;
}
html[data-theme-mode="light"] body.game .al-share,
html[data-theme-mode="light"] body.game .op-steps b {
  background: #e2e8f0;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .al-chip {
  border-top-color: #e2eaf4;
}
html[data-theme-mode="light"] body.game .al-chip.staff b {
  color: #6d28d9;
}
html[data-theme-mode="light"] body.game .op-status.warn {
  color: #b45309;
}
html[data-theme-mode="light"] body.game .op-slot {
  color: #f8fafc;
}
html[data-theme-mode="light"] body.game .op-slot h3,
html[data-theme-mode="light"] body.game .op-slot b {
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .op-slot p,
html[data-theme-mode="light"] body.game .op-slot small {
  color: #dbeafe;
}
html[data-theme-mode="light"] body.game .fo-face,
html[data-theme-mode="light"] body.game .fo-face-slot .fo-avatar,
html[data-theme-mode="light"] body.game .fo-compose-face {
  border-color: #ffffff;
}
html[data-theme-mode="light"] body.game .pop-pri select,
html[data-theme-mode="light"] body.game .pop-manual input,
html[data-theme-mode="light"] body.game .pop-transfer select,
html[data-theme-mode="light"] body.game .pop-transfer input,
html[data-theme-mode="light"] body.game .rg-saved input[data-rg-name] {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .pop-now-stats > .pop-now-illustrated {
  background: #0b1b2a !important;
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .pop-now-illustrated > span {
  color: #dbeafe !important;
}
html[data-theme-mode="light"] body.game .pop-now-illustrated > b {
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .wx-day {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .wx-day.clear { background: linear-gradient(180deg, #fef9c3, #ffffff); }
html[data-theme-mode="light"] body.game .wx-day.cloud { background: linear-gradient(180deg, #e2e8f0, #ffffff); }
html[data-theme-mode="light"] body.game .wx-day.rain  { background: linear-gradient(180deg, #dbeafe, #ffffff); }
html[data-theme-mode="light"] body.game .wx-day.snow  { background: linear-gradient(180deg, #e0f2fe, #ffffff); }
html[data-theme-mode="light"] body.game .wx-day.storm { background: linear-gradient(180deg, #fef3c7, #ffffff); }
html[data-theme-mode="light"] body.game .wx-day.dust  { background: linear-gradient(180deg, #ffedd5, #ffffff); }
html[data-theme-mode="light"] body.game .wx-day.heat  { background: linear-gradient(180deg, #fee2e2, #ffffff); }
html[data-theme-mode="light"] body.game .wx-day.toxic { background: linear-gradient(180deg, #ecfccb, #ffffff); }
html[data-theme-mode="light"] body.game .wx-day.rad   { background: linear-gradient(180deg, #cffafe, #ffffff); }

/* Tutorial & Launcher Consent */
html[data-theme-mode="light"] body.game .tut {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .tut-body {
  background: #ffffff;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .tut-title h2,
html[data-theme-mode="light"] body.game .tut-card b {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .tut-card {
  background: #f4f7fb;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .tut-card small {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .tut-dot {
  background: #cbd5e1;
}
html[data-theme-mode="light"] .launcher-consent {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] .launcher-consent input {
  background: #f4f7fb;
  color: #0f1b2d;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] .field-error {
  color: #b91c1c;
}
html[data-theme-mode="light"] .support-guide {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .color-field,
html[data-theme-mode="light"] body.game .tree-item {
  background: #f8fafd;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .alliance-voice {
  background: #f0f9ff;
  border-color: #7dd3fc;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .voice-members li {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .voice-floating {
  background: #ffffff;
  border-color: #0284c7;
  color: #0f1b2d;
  box-shadow: 0 12px 32px rgba(15, 34, 62, 0.16);
}

/* ---------- Progression Hub (progression.css) ---------- */
html[data-theme-mode="light"] body.game .pg-hub {
  --pg-gold: #b45309;
  --pg-blue: #0284c7;
  --pg-line: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .pg-hero {
  background: #ffffff;
  border-color: #d5e0ee;
  box-shadow: 0 8px 24px rgba(15, 34, 62, 0.06);
}
html[data-theme-mode="light"] body.game .pg-hero::before,
html[data-theme-mode="light"] body.game .pg-hero::after {
  display: none;
}
html[data-theme-mode="light"] body.game .pg-commander-art::after {
  background: linear-gradient(90deg, #ffffff, transparent 35%), linear-gradient(0deg, #ffffff, transparent 30%);
}
html[data-theme-mode="light"] body.game .pg-hero-intro,
html[data-theme-mode="light"] body.game .pg-rank-line p,
html[data-theme-mode="light"] body.game .pg-command-stats p,
html[data-theme-mode="light"] body.game .pg-cosmetics,
html[data-theme-mode="light"] body.game .pg-card-body > p,
html[data-theme-mode="light"] body.game .pg-summary p {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .pg-level {
  background: linear-gradient(140deg, #fef3c7, #fde68a);
  color: #92400e;
  border-color: #f59e0b;
}
html[data-theme-mode="light"] body.game .pg-rank-line strong {
  color: #b45309;
}
html[data-theme-mode="light"] body.game .pg-command-stats > div {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .pg-hub progress,
html[data-theme-mode="light"] body.game .pg-hub progress::-webkit-progress-bar {
  background: #dce5f1;
}
html[data-theme-mode="light"] body.game .pg-hub .pg-tabs {
  background: #eef3f9;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .pg-hub .pg-tabs button {
  color: #475a75;
}
html[data-theme-mode="light"] body.game .pg-hub .pg-tabs button.active {
  background: #ffffff;
  color: #0369a1;
  border-color: #0284c7;
  box-shadow: 0 2px 8px rgba(15, 34, 62, 0.08);
}
html[data-theme-mode="light"] body.game .pg-hub .pg-card,
html[data-theme-mode="light"] body.game .pg-hub .pg-card.panel,
html[data-theme-mode="light"] body.game .pg-summary > .panel {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .pg-hub .pg-card h3,
html[data-theme-mode="light"] body.game .pg-summary h2 {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .pg-card-art::after,
html[data-theme-mode="light"] body.game .pg-milestone-art::after,
html[data-theme-mode="light"] body.game .pg-card-art.pg-portrait-art::after {
  background: linear-gradient(0deg, rgba(15, 27, 45, 0.25), transparent 25%);
}
html[data-theme-mode="light"] body.game .pg-card[data-state="ready-to-claim"] .tag {
  color: #92400e;
  background: #fef3c7;
}
html[data-theme-mode="light"] body.game .pg-card[data-state="locked"] .tag {
  color: #475569;
  background: #e2e8f0;
}
html[data-theme-mode="light"] body.game .pg-card[data-state="claimed"] .tag {
  color: #065f46;
  background: #d1fae5;
}
html[data-theme-mode="light"] body.game .pg-error {
  color: #b91c1c;
}

/* ---------- Professions & Academy (professions.css) ---------- */
html[data-theme-mode="light"] body.game .pf-page {
  --pf-line: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .pf-page .panel {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
/* Illustrated banners keep white text over dark scrim */
html[data-theme-mode="light"] body.game .pf-hero h1,
html[data-theme-mode="light"] body.game .pf-academy-banner h2 {
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .pf-hero .sub,
html[data-theme-mode="light"] body.game .pf-academy-banner p {
  color: #dbeafe;
}
html[data-theme-mode="light"] body.game .pf-academy-steps span {
  background: rgba(8, 19, 36, 0.78);
  color: #e2edf8;
}
html[data-theme-mode="light"] body.game .pf-academy-steps b {
  color: #7dd3fc;
}
html[data-theme-mode="light"] body.game .pf-metric {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .pf-metric strong,
html[data-theme-mode="light"] body.game .pf-card-head h3 {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .pf-page .msg-tabs button {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #334863;
}
html[data-theme-mode="light"] body.game .pf-page .msg-tabs button.active {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
}
html[data-theme-mode="light"] body.game .pf-guide summary {
  color: #334863;
}
html[data-theme-mode="light"] body.game .pf-filter input,
html[data-theme-mode="light"] body.game .pf-filter select {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .pf-page .pf-card {
  background: #ffffff;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .pf-card .pf-preview {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0c4a6e;
}
html[data-theme-mode="light"] body.game .pf-page progress,
html[data-theme-mode="light"] body.game .pf-page progress::-webkit-progress-bar {
  background: #dce5f1;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .pf-page .btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border-color: #d97706;
}
html[data-theme-mode="light"] body.game .pf-page .btn.ghost,
html[data-theme-mode="light"] body.game .pf-page .pf-enroll .btn,
html[data-theme-mode="light"] body.game .pf-page .pf-assign .btn {
  background: #eff6ff;
  border-color: #0284c7;
  color: #0369a1;
}
html[data-theme-mode="light"] body.game .pf-table thead {
  background: #f4f7fb;
}
html[data-theme-mode="light"] body.game .pf-table tbody tr:nth-child(even) {
  background: #f8fafd;
}
html[data-theme-mode="light"] body.game .pf-table tbody tr:hover {
  background: #eff6ff;
}
html[data-theme-mode="light"] body.game .pf-page .pf-spec {
  background: #f4f7fb;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .pf-program-name img {
  border-color: #cbd5e1;
}

/* ---------- Ship & Defense Engineering (ship-engineering.css) ---------- */
html[data-theme-mode="light"] body.game .se-page {
  --se-accent: #0284c7;
  background: #ffffff;
  color: #0f1b2d;
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .se-header h1,
html[data-theme-mode="light"] body.game .se-header h2 {
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .se-header p {
  color: #dbeafe;
}
html[data-theme-mode="light"] body.game .se-tabs {
  border-bottom-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .se-tabs button {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .se-tabs button.active {
  background: #e0f2fe;
  color: #0369a1;
}
html[data-theme-mode="light"] body.game .se-page .panel {
  background: #f8fafd;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .se-page label,
html[data-theme-mode="light"] body.game .se-workshop-link small,
html[data-theme-mode="light"] body.game .se-mastery small {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .se-page select,
html[data-theme-mode="light"] body.game .se-page input[type=number],
html[data-theme-mode="light"] body.game .se-page input:not([type]) {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .se-hangar {
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .se-hangar-stats {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .se-slot,
html[data-theme-mode="light"] body.game .se-part-pick,
html[data-theme-mode="light"] body.game .se-branch,
html[data-theme-mode="light"] body.game .se-part-head,
html[data-theme-mode="light"] body.game .se-mastery {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .se-part-pick:hover {
  background: #eff6ff;
  border-color: #0284c7;
}
html[data-theme-mode="light"] body.game .se-branch.active {
  background: #e0f2fe;
  border-color: #0284c7;
}
html[data-theme-mode="light"] body.game .se-branch h3,
html[data-theme-mode="light"] body.game .se-part > strong {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .se-part-head small {
  background: #eef3f9;
  color: #334863;
}
html[data-theme-mode="light"] body.game .se-cost-metal {
  color: #475569;
}
html[data-theme-mode="light"] body.game .se-stage-track > span,
html[data-theme-mode="light"] body.game .se-job {
  border-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .se-workshop-link {
  background: #f0f9ff;
  border-color: #bae6fd;
}

/* ---------- Lost Worlds / Exploration (lost-worlds.css) ---------- */
html[data-theme-mode="light"] body.game .lw {
  --lw-cyan: #0284c7;
  --lw-gold: #b45309;
  --lw-green: #047857;
  --lw-red: #dc2626;
  --lw-line: #d5e0ee;
  --lw-panel: #ffffff;
  background: none;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .lw h2,
html[data-theme-mode="light"] body.game .lw h3 {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .lw p,
html[data-theme-mode="light"] body.game .lw-sector-heading > span {
  color: #4b5e78;
}
/* Hero & sector cards have full-bleed art: keep readable white ink over dark scrim */
html[data-theme-mode="light"] body.game .lw-hero {
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .lw-hero h1 {
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .lw-hero p {
  color: #dbeafe;
}
html[data-theme-mode="light"] body.game .lw-summary {
  background: rgba(6, 15, 28, 0.78);
  border-color: rgba(148, 197, 255, 0.35);
  color: #e2edf8;
}
html[data-theme-mode="light"] body.game .lw-summary b {
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .lw-actions > button:not(.illustrated) {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .lw-actions > button:not(.illustrated):hover {
  background: #eff6ff;
  border-color: #0284c7;
  color: #0369a1;
}
html[data-theme-mode="light"] body.game .lw-tabs {
  border-bottom-color: #d5e0ee;
}
html[data-theme-mode="light"] body.game .lw-tabs button {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .lw-tabs button:hover,
html[data-theme-mode="light"] body.game .lw-tabs > button.on {
  color: #0369a1;
  background: #e0f2fe;
}
html[data-theme-mode="light"] body.game .lw-console,
html[data-theme-mode="light"] body.game .lw-sector-console,
html[data-theme-mode="light"] body.game .lw-empty,
html[data-theme-mode="light"] body.game .lw-recent,
html[data-theme-mode="light"] body.game .lw-mission,
html[data-theme-mode="light"] body.game .lw-encounter,
html[data-theme-mode="light"] body.game .lw-artifact,
html[data-theme-mode="light"] body.game .lw-artifact:has(.lw-relic-image),
html[data-theme-mode="light"] body.game .lw-codex,
html[data-theme-mode="light"] body.game .lw-story,
html[data-theme-mode="light"] body.game .lw-dock,
html[data-theme-mode="light"] body.game .lw-loading,
html[data-theme-mode="light"] body.game .lw-prep-modal.modal.wide {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .lw-console-head,
html[data-theme-mode="light"] body.game .lw-sector-console .lw-console-head,
html[data-theme-mode="light"] body.game .lw-sector-intro,
html[data-theme-mode="light"] body.game .lw-filters,
html[data-theme-mode="light"] body.game .lw-sector-console .lw-filters,
html[data-theme-mode="light"] body.game .lw-dossier,
html[data-theme-mode="light"] body.game .lw-sector-console .lw-dossier,
html[data-theme-mode="light"] body.game .lw-prep-footer,
html[data-theme-mode="light"] body.game .lw-prep-destination,
html[data-theme-mode="light"] body.game .lw-map-key,
html[data-theme-mode="light"] body.game .lw-sector-console .lw-map-key {
  background: #f8fafd;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .lw-sector-intro h2,
html[data-theme-mode="light"] body.game .lw-dossier h2,
html[data-theme-mode="light"] body.game .lw-dossier h3,
html[data-theme-mode="light"] body.game .lw-dossier .lw-facts dd,
html[data-theme-mode="light"] body.game .lw-facts dd,
html[data-theme-mode="light"] body.game .lw-mission-coordinate,
html[data-theme-mode="light"] body.game .lw-mission-meta b,
html[data-theme-mode="light"] body.game .lw-composition b,
html[data-theme-mode="light"] body.game .lw-loot b,
html[data-theme-mode="light"] body.game .lw-codex-stats b,
html[data-theme-mode="light"] body.game .lw-quote-stats b,
html[data-theme-mode="light"] body.game .lw-result strong {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .lw-sector-intro p,
html[data-theme-mode="light"] body.game .lw-dossier p,
html[data-theme-mode="light"] body.game .lw-dossier .lw-meter-label,
html[data-theme-mode="light"] body.game .lw-dossier .lw-reward-hint > p,
html[data-theme-mode="light"] body.game .lw-dossier .lw-reward-hint > small:last-child,
html[data-theme-mode="light"] body.game .lw-notice,
html[data-theme-mode="light"] body.game .lw-operation-time,
html[data-theme-mode="light"] body.game .lw-result p {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .lw-console-head select,
html[data-theme-mode="light"] body.game .lw-ship-row input,
html[data-theme-mode="light"] body.game .lw-form-grid input,
html[data-theme-mode="light"] body.game .lw-form-grid select,
html[data-theme-mode="light"] body.game .lw-officer select {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .lw-filters button,
html[data-theme-mode="light"] body.game .lw-sector-console .lw-filters button,
html[data-theme-mode="light"] body.game .lw-signal-strip > button,
html[data-theme-mode="light"] body.game .lw-recent > button,
html[data-theme-mode="light"] body.game .lw-ship-row,
html[data-theme-mode="light"] body.game .lw-composition > span,
html[data-theme-mode="light"] body.game .lw-dossier .lw-facts > div,
html[data-theme-mode="light"] body.game .lw-dossier .lw-notice,
html[data-theme-mode="light"] body.game .lw-dossier .lw-reward-hint,
html[data-theme-mode="light"] body.game .lw-sector-console .lw-dossier .lw-reward-hint,
html[data-theme-mode="light"] body.game .lw-quote {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #1e293b;
}
html[data-theme-mode="light"] body.game .lw-filters button:hover,
html[data-theme-mode="light"] body.game .lw-filters button.on,
html[data-theme-mode="light"] body.game .lw-sector-console .lw-filters button.on,
html[data-theme-mode="light"] body.game .lw-signal-strip > button.selected {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}
html[data-theme-mode="light"] body.game .lw-composition b {
  background: #e0f2fe;
}
html[data-theme-mode="light"] body.game .lw-mission-art:after {
  background: linear-gradient(0deg, #ffffff, transparent 55%);
}
html[data-theme-mode="light"] body.game .lw-stages li:before {
  background: #cbd5e1;
}
html[data-theme-mode="light"] body.game .lw-stages li i {
  background: #ffffff;
  border-color: #0284c7;
}
html[data-theme-mode="light"] body.game .lw-facts,
html[data-theme-mode="light"] body.game .lw-reward-hint,
html[data-theme-mode="light"] body.game .lw-signal-strip,
html[data-theme-mode="light"] body.game .lw-outcome,
html[data-theme-mode="light"] body.game .lw-log li,
html[data-theme-mode="light"] body.game .lw-repair,
html[data-theme-mode="light"] body.game .lw-prep-layout > section,
html[data-theme-mode="light"] body.game .lw-capabilities,
html[data-theme-mode="light"] body.game .lw-prep-warning {
  border-color: #e2eaf4;
}
html[data-theme-mode="light"] body.game .lw-meter {
  background: repeating-linear-gradient(90deg, #cbd5e1 0, #cbd5e1 10px, transparent 10px, transparent 13px);
}
html[data-theme-mode="light"] body.game .lw-story-pips i {
  background: #cbd5e1;
}
html[data-theme-mode="light"] body.game .lw-result {
  background: #ecfdf5;
  border-color: #6ee7b7;
}
html[data-theme-mode="light"] body.game .lw-result.failure {
  background: #fef2f2;
  border-color: #fca5a5;
}
html[data-theme-mode="light"] body.game .lw-result.failure h3 {
  color: #b91c1c;
}
html[data-theme-mode="light"] body.game .lw-prep-heading {
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .lw-prep-heading h2,
html[data-theme-mode="light"] body.game .lw-prep-heading p {
  color: #ffffff;
}

/* ---------- Alliance Dungeons (dungeons.css) ---------- */
html[data-theme-mode="light"] body.game .dg-page {
  --dg-accent: #0284c7;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .dg-page h1,
html[data-theme-mode="light"] body.game .dg-stage b,
html[data-theme-mode="light"] body.game .dg-contract h3,
html[data-theme-mode="light"] body.game .dg-contract-price span,
html[data-theme-mode="light"] body.game .dg-run-controls strong {
  color: #0f1b2d;
}
/* Illustrated top dungeon header & selected raid scene keep dark artwork + crisp pure white ink */
html[data-theme-mode="light"] body.game .dg-frame.dg-header {
  background: linear-gradient(90deg, rgba(7, 18, 31, 0.94), rgba(7, 18, 31, 0.66)), url('/img/dungeons/abyssal.jpg') center / cover;
  border-color: #cbd5e1;
  color: #f8fafc;
}
html[data-theme-mode="light"] body.game .dg-header h1,
html[data-theme-mode="light"] body.game .dg-header p {
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .dg-header h1 em {
  color: #fcd34d;
}
html[data-theme-mode="light"] body.game .dg-header aside {
  background: rgba(6, 17, 28, 0.86);
  border-color: rgba(125, 211, 252, 0.35);
  color: #f1f5f9;
}
html[data-theme-mode="light"] body.game .dg-header aside b,
html[data-theme-mode="light"] body.game .dg-header aside strong {
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .dg-header aside small {
  color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .dg-detail .dg-scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 13, 24, 0.68) 0%, rgba(5, 13, 24, 0.56) 55%, #ffffff 100%);
}
html[data-theme-mode="light"] body.game .dg-detail .dg-intro,
html[data-theme-mode="light"] body.game .dg-detail .dg-title h2,
html[data-theme-mode="light"] body.game .dg-detail .dg-title b,
html[data-theme-mode="light"] body.game .dg-detail .dg-intro p,
html[data-theme-mode="light"] body.game .dg-detail .dg-boss,
html[data-theme-mode="light"] body.game .dg-detail .dg-boss h3,
html[data-theme-mode="light"] body.game .dg-detail .dg-boss small {
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}
html[data-theme-mode="light"] body.game .dg-detail .dg-boss > span {
  color: #fda4af;
}
html[data-theme-mode="light"] body.game .dg-page small,
html[data-theme-mode="light"] body.game .dg-stage-status,
html[data-theme-mode="light"] body.game .dg-member span,
html[data-theme-mode="light"] body.game .dg-hire-steps,
html[data-theme-mode="light"] body.game .dg-contracts p,
html[data-theme-mode="light"] body.game .dg-contract small,
html[data-theme-mode="light"] body.game .dg-run-controls span {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .dg-frame:not(.dg-header),
html[data-theme-mode="light"] body.game .dg-choice,
html[data-theme-mode="light"] body.game .dg-stage,
html[data-theme-mode="light"] body.game .dg-party,
html[data-theme-mode="light"] body.game .dg-rewards,
html[data-theme-mode="light"] body.game .dg-victory,
html[data-theme-mode="light"] body.game .dg-reward-dialog,
html[data-theme-mode="light"] body.game .dg-fighter,
html[data-theme-mode="light"] body.game .dg-round-feed,
html[data-theme-mode="light"] body.game .dg-contract,
html[data-theme-mode="light"] body.game .dg-contract-terms {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .dg-frame::before {
  display: none;
}
html[data-theme-mode="light"] body.game .dg-choice > div {
  background: #ffffff;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .dg-choice p {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .dg-member.empty {
  background: #f4f7fb;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .dg-battle-enemy {
  background: linear-gradient(110deg, #fee2e2, #ffffff);
  border-color: #fca5a5;
}
html[data-theme-mode="light"] body.game .dg-round-feed p,
html[data-theme-mode="light"] body.game .dg-claims article {
  border-bottom-color: #e2eaf4;
}
html[data-theme-mode="light"] body.game .dg-reward-dialog h2 {
  color: #b45309;
}
html[data-theme-mode="light"] body.game .dg-page .dg-reward-notice {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}
html[data-theme-mode="light"] body.game .dg-hire-steps .done b {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}
html[data-theme-mode="light"] body.game .dg-stage:not(:last-child):after {
  color: #d97706;
}

/* ---------- NPC Empires & Diplomacy (npc-empires.css) ---------- */
html[data-theme-mode="light"] body.game .npc-empires {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .npc-navigation a {
  color: #334863;
}
html[data-theme-mode="light"] body.game .npc-navigation a:hover,
html[data-theme-mode="light"] body.game .npc-navigation a[aria-current] {
  background: #e0f2fe;
  color: #0369a1;
}
/* Hero & faction scenes have full-bleed art: keep white ink over dark scrim */
html[data-theme-mode="light"] body.game .npc-hero h1 {
  color: #ffffff;
}
html[data-theme-mode="light"] body.game .npc-subtitle {
  color: #7dd3fc;
}
html[data-theme-mode="light"] body.game .npc-intro {
  color: #dbeafe;
}
html[data-theme-mode="light"] body.game .npc-summary > div {
  background: rgba(8, 20, 36, 0.78);
  color: #e2edf8;
}
html[data-theme-mode="light"] body.game .npc-rivals,
html[data-theme-mode="light"] body.game .npc-rival,
html[data-theme-mode="light"] body.game .npc-faction,
html[data-theme-mode="light"] body.game .npc-how,
html[data-theme-mode="light"] body.game .npc-civ-detail,
html[data-theme-mode="light"] body.game .npc-diplomacy-toolbar {
  background: #ffffff;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .npc-rival,
html[data-theme-mode="light"] body.game .npc-world,
html[data-theme-mode="light"] body.game .npc-civ-detail {
  background: #f8fafd;
  border-color: #d5e0ee;
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .npc-world.selected {
  background: #eff6ff;
  border-color: #0284c7;
}
html[data-theme-mode="light"] body.game .npc-rival h3,
html[data-theme-mode="light"] body.game .npc-description,
html[data-theme-mode="light"] body.game .npc-population-strip b,
html[data-theme-mode="light"] body.game .npc-civ-detail h3,
html[data-theme-mode="light"] body.game .npc-workforce b,
html[data-theme-mode="light"] body.game .npc-diplomacy-toolbar h2,
html[data-theme-mode="light"] body.game .npc-standing h3 {
  color: #0f1b2d;
}
html[data-theme-mode="light"] body.game .npc-rivals header p,
html[data-theme-mode="light"] body.game .npc-rival p,
html[data-theme-mode="light"] body.game .npc-how p,
html[data-theme-mode="light"] body.game .npc-feature small,
html[data-theme-mode="light"] body.game .npc-world .npc-world-race,
html[data-theme-mode="light"] body.game .npc-race-banner > span:first-child,
html[data-theme-mode="light"] body.game .npc-population-strip,
html[data-theme-mode="light"] body.game .npc-civ-detail p,
html[data-theme-mode="light"] body.game .npc-officer span,
html[data-theme-mode="light"] body.game .npc-officer small,
html[data-theme-mode="light"] body.game .npc-diplomacy-toolbar p,
html[data-theme-mode="light"] body.game .npc-diplomacy-toolbar label,
html[data-theme-mode="light"] body.game .npc-diplomacy p,
html[data-theme-mode="light"] body.game .npc-diplomacy .npc-civ-note {
  color: #4b5e78;
}
html[data-theme-mode="light"] body.game .npc-rival-world > a:first-child,
html[data-theme-mode="light"] body.game .npc-feature,
html[data-theme-mode="light"] body.game .npc-standing-band,
html[data-theme-mode="light"] body.game .npc-diplomacy-feedback,
html[data-theme-mode="light"] body.game .npc-diplomacy summary {
  color: #0369a1;
}
html[data-theme-mode="light"] body.game .npc-standing-band[data-band="Wary"] {
  color: #b91c1c;
}
html[data-theme-mode="light"] body.game .npc-diplomacy-toolbar select {
  background: #ffffff;
  color: #0f1b2d;
  border-color: #cbd5e1;
}
html[data-theme-mode="light"] body.game .npc-spy {
  background: #eff6ff;
  border-color: #0284c7;
  color: #0369a1;
}
html[data-theme-mode="light"] body.game .npc-diplomacy,
html[data-theme-mode="light"] body.game .npc-exchange,
html[data-theme-mode="light"] body.game .npc-diplomacy-history {
  border-top-color: #e2eaf4;
}

/* ==========================================================================
   PASSWORD RECOVERY PAGE (body.recovery-page)
   ========================================================================== */
:root[data-theme-mode="light"] .recovery-page {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(2, 132, 199, 0.14), transparent 55%),
    linear-gradient(rgba(244, 247, 251, 0.92), rgba(235, 241, 249, 0.95)),
    url('/img/bg-andromeda.jpg') center / cover fixed;
}
:root[data-theme-mode="light"] .recovery-brand {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .recovery-brand span {
  color: #b45309;
}
:root[data-theme-mode="light"] .recovery-card {
  background: #ffffff;
  border-color: #d5e0ee;
  border-top: 3px solid #d97706;
  box-shadow: 0 20px 56px rgba(15, 34, 62, 0.12);
}
:root[data-theme-mode="light"] .recovery-symbol {
  background: #fef3c7;
  border-color: #f59e0b;
}
:root[data-theme-mode="light"] .recovery-symbol svg {
  stroke: #b45309;
}
:root[data-theme-mode="light"] .recovery-eyebrow {
  color: #b45309;
}
:root[data-theme-mode="light"] .recovery-card h1 {
  color: #0f1b2d;
}
:root[data-theme-mode="light"] .recovery-copy,
:root[data-theme-mode="light"] .recovery-footnote {
  color: #475a75;
}
:root[data-theme-mode="light"] .recovery-card a:not(.btn),
:root[data-theme-mode="light"] .recovery-back {
  color: #0369a1;
}
:root[data-theme-mode="light"] .recovery-status {
  background: #ecfdf5;
  border-color: #34d399;
  color: #065f46;
}


/* ---------- Polished White Orbital Backdrop, Strategy Guides & AdSense Banners ---------- */
html[data-theme-mode="light"] body.landing,
html[data-theme-mode="light"] body.kb {
  background:
    radial-gradient(1200px 640px at 14% -8%, rgba(56, 189, 248, 0.20), transparent 62%),
    radial-gradient(960px 580px at 88% 4%, rgba(129, 140, 248, 0.18), transparent 60%),
    radial-gradient(760px 500px at 50% 96%, rgba(14, 165, 233, 0.12), transparent 62%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fc 52%, #e8f0fb 100%) !important;
  color: #0f1b2d !important;
}
html[data-theme-mode="light"] body.game {
  background:
    radial-gradient(1100px 600px at 16% 0%, rgba(56, 189, 248, 0.17), transparent 62%),
    radial-gradient(920px 560px at 86% 6%, rgba(99, 102, 241, 0.14), transparent 60%),
    radial-gradient(780px 520px at 50% 100%, rgba(14, 165, 233, 0.10), transparent 64%),
    linear-gradient(180deg, #f7faff 0%, #edf4fc 55%, #e6effa 100%) !important;
  color: #0f1b2d !important;
}
html[data-theme-mode="light"] .ni-ad-slot,
html[data-theme-mode="light"] .ni-ad-home {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.94), rgba(240, 247, 255, 0.90)) !important;
  border: 1px solid rgba(148, 184, 224, 0.55) !important;
  box-shadow: 0 10px 28px rgba(15, 34, 62, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}
html[data-theme-mode="light"] .ni-ad-label {
  color: #5b718f !important;
}
html[data-theme-mode="light"] .home-guides {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(241, 247, 255, 0.90)) !important;
  border: 1px solid rgba(148, 184, 224, 0.52) !important;
  box-shadow: 0 18px 46px rgba(15, 34, 62, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}
html[data-theme-mode="light"] .home-guides-head h2 {
  color: #0b1930 !important;
}
html[data-theme-mode="light"] .home-guides-head p {
  color: #425874 !important;
}
html[data-theme-mode="light"] .home-guide-card {
  background: linear-gradient(155deg, #ffffff 0%, #f4f9ff 100%) !important;
  border: 1px solid rgba(148, 184, 224, 0.55) !important;
  box-shadow: 0 4px 14px rgba(15, 34, 62, 0.05) !important;
}
html[data-theme-mode="light"] .home-guide-card:hover {
  border-color: #0284c7 !important;
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.14) !important;
}
html[data-theme-mode="light"] .home-guide-card h3 {
  color: #0369a1 !important;
}
html[data-theme-mode="light"] .home-guide-card p {
  color: #3a506b !important;
}
html[data-theme-mode="light"] .kb-prose code {
  background: #e6f0fb !important;
  color: #0369a1 !important;
  border: 1px solid rgba(2, 132, 199, 0.22) !important;
  padding: 1px 6px;
  border-radius: 6px;
}
html[data-theme-mode="light"] .kb-header,
html[data-theme-mode="light"] .site-header {
  background: rgba(250, 253, 255, 0.90) !important;
  border-bottom: 1px solid rgba(148, 184, 224, 0.45) !important;
  box-shadow: 0 6px 24px rgba(15, 34, 62, 0.05) !important;
}
html[data-theme-mode="light"] .panel.auth,
html[data-theme-mode="light"] .home-vote-showcase,
html[data-theme-mode="light"] .home-feature-card,
html[data-theme-mode="light"] .gallery-card,
html[data-theme-mode="light"] .kb-card,
html[data-theme-mode="light"] .si-step,
html[data-theme-mode="light"] .si-race,
html[data-theme-mode="light"] .si-class,
html[data-theme-mode="light"] .si-planet,
html[data-theme-mode="light"] .si-cta,
html[data-theme-mode="light"] .kb-note {
  box-shadow: 0 10px 30px rgba(15, 34, 62, 0.065), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}
