/* Sprint C2 Foundation (Gemini) — Unified Deep-Space Cold Silver & Ice-Blue UI Palette */
:root {
  --sx-accent: #78b5ff;
  --sx-accent-strong: #9bc9ff;
  --sx-accent-soft: rgba(120, 181, 255, 0.16);
  --sx-accent-glow: rgba(120, 181, 255, 0.36);
  --sx-silver-text: rgba(238, 246, 255, 0.94);
  --sx-silver-muted: rgba(176, 204, 236, 0.74);
  --sx-panel-bg: rgba(7, 13, 26, 0.82);
  --sx-panel-border: rgba(148, 197, 255, 0.24);
  --tm-accent: #78b5ff;
  --tm-dock-accent: #78b5ff;
}

.tm-lightday__bars.is-running .tm-lightday__beam--voyager {
  background: linear-gradient(90deg, transparent, #78b5ff, #eaf4ff) !important;
  box-shadow: 0 0 14px rgba(120, 181, 255, 0.45) !important;
}

.atlas .tm-pillar-chip[aria-pressed="true"],
.atlas .tm-pillar-chip.is-active,
.atlas .tm-pillar-tab[aria-selected="true"],
.atlas .tm-pillar-tab.is-active {
  color: #f4f9ff !important;
  border-color: rgba(120, 181, 255, 0.62) !important;
  background: rgba(120, 181, 255, 0.18) !important;
  box-shadow: 0 0 14px rgba(120, 181, 255, 0.24) !important;
}

.atlas .archive,
.atlas .mission-drawer,
.atlas .spacecraft-archive,
.atlas .planet-archive,
.atlas .tm-pillar-archive-card {
  background: var(--sx-panel-bg) !important;
  border-color: var(--sx-panel-border) !important;
  color: var(--sx-silver-text);
}

.atlas .mission-drawer a,
.atlas .spacecraft-archive a,
.atlas .planet-archive a,
.atlas .tm-pillar-archive-card a {
  color: var(--sx-accent-strong);
}

.atlas .archive__unified-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120, 181, 255, 0.42);
  background: rgba(120, 181, 255, 0.14);
  color: #cfe6ff;
  font-size: 11.5px;
  line-height: 1.35;
}

.atlas .archive__unified-source {
  margin-top: 10px;
}

.atlas .archive__unified-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120, 181, 255, 0.36);
  background: rgba(120, 181, 255, 0.12);
  color: #9bc9ff;
  font-size: 11.5px;
  text-decoration: none;
}

.atlas .archive__unified-link:hover {
  color: #ffffff;
  border-color: #9bc9ff;
  background: rgba(120, 181, 255, 0.24);
}

/* Sprint C3: Unified Cold-Silver / Ice-Blue Chrome + MoonRail Collapse + Archive Row Hitboxes */
.atlas .tm-drawer,
.atlas .tm-archive-drawer,
.atlas .tm-particle-popover {
  border-color: rgba(148, 197, 255, 0.26);
  color: var(--sx-silver-text);
}

.atlas .tm-archive-row {
  padding: 8px 10px !important;
  min-height: 36px;
  align-items: center;
  border: 1px solid rgba(148, 197, 255, 0.14);
  border-radius: 6px;
  color: #eef6ff;
  background: rgba(12, 22, 40, 0.62);
  transition: border-color 140ms ease, background 140ms ease;
}

.atlas .tm-archive-row:hover,
.atlas .tm-archive-row:focus-visible {
  border-color: rgba(120, 181, 255, 0.62);
  background: rgba(120, 181, 255, 0.16);
}

.atlas .sx-moons__headbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.atlas .sx-moons__headbar .sx-moons__head {
  flex: 1 1 auto;
}

.atlas .sx-moons__close {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 197, 255, 0.28);
  border-radius: 999px;
  background: rgba(10, 18, 34, 0.72);
  color: #cfe6ff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.atlas .sx-moons__close:hover,
.atlas .sx-moons__close:focus-visible {
  color: #ffffff;
  border-color: rgba(120, 181, 255, 0.75);
  background: rgba(120, 181, 255, 0.22);
}

.atlas .tm-particle-lane[data-track-id="earth-watch"] .tm-particle-standalone-btn {
  border-color: rgba(110, 231, 183, 0.42);
  color: #e6fff6;
}

.atlas .tm-particle-lane[data-track-id="earth-watch"] .tm-particle-standalone-btn:hover,
.atlas .tm-particle-lane[data-track-id="earth-watch"] .tm-particle-standalone-btn.is-selected {
  border-color: rgba(110, 231, 183, 0.85);
  background: rgba(52, 211, 153, 0.18);
}

/* R1 Item 2: Custom Deep-Space Thin Ice-Blue Scrollbar for EventArchiveDrawer & Drawers */
.atlas .tm-archive-drawer__list,
.atlas .tm-body,
.atlas .tm-pillar-archive-card {
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 181, 255, 0.34) transparent;
}

.atlas .tm-archive-drawer__list {
  padding-right: 6px;
}

.atlas .tm-archive-drawer__list::-webkit-scrollbar,
.atlas .tm-body::-webkit-scrollbar,
.atlas .tm-pillar-archive-card::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.atlas .tm-archive-drawer__list::-webkit-scrollbar-track,
.atlas .tm-body::-webkit-scrollbar-track,
.atlas .tm-pillar-archive-card::-webkit-scrollbar-track {
  background: transparent;
}

.atlas .tm-archive-drawer__list::-webkit-scrollbar-thumb,
.atlas .tm-body::-webkit-scrollbar-thumb,
.atlas .tm-pillar-archive-card::-webkit-scrollbar-thumb {
  background: rgba(120, 181, 255, 0.32);
  border-radius: 999px;
  border: 1px solid rgba(155, 201, 255, 0.14);
}

.atlas .tm-archive-drawer__list::-webkit-scrollbar-thumb:hover,
.atlas .tm-body::-webkit-scrollbar-thumb:hover,
.atlas .tm-pillar-archive-card::-webkit-scrollbar-thumb:hover {
  background: rgba(155, 201, 255, 0.58);
}

.atlas .tm-archive-drawer__list::-webkit-scrollbar-button,
.atlas .tm-body::-webkit-scrollbar-button,
.atlas .tm-pillar-archive-card::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

/* R1 Item 6: Unified Cold-Silver & Ice-Blue 3D Floating Labels, Subtitles & Leaders */
.atlas .label__text,
.atlas .label--planet .label__text {
  color: #eef6ff !important;
  text-shadow: 0 1px 4px rgba(3, 8, 18, 0.88), 0 0 12px rgba(4, 10, 24, 0.72) !important;
}

.atlas .label__sub,
.atlas .label--moon .label__text,
.atlas .label--region .label__text {
  color: #9ec8ff !important;
  text-shadow: 0 1px 4px rgba(3, 8, 18, 0.88) !important;
}

.atlas .label--object .label__text {
  color: rgba(214, 234, 255, 0.92) !important;
  text-shadow: 0 1px 4px rgba(3, 8, 18, 0.88) !important;
}

.atlas .label--object .label__sub {
  color: rgba(176, 212, 255, 0.88) !important;
  text-shadow: 0 1px 4px rgba(3, 8, 18, 0.88) !important;
}

.atlas .label.is-hovered .label__text,
.atlas .label.is-selected .label__text {
  color: #ffffff !important;
}

.atlas .leader {
  background: linear-gradient(90deg, rgba(120, 181, 255, 0.52), rgba(120, 181, 255, 0.16)) !important;
}

.atlas .leader:after {
  border-color: #78b5ff !important;
  background: rgba(120, 181, 255, 0.32) !important;
  box-shadow: 0 0 6px rgba(120, 181, 255, 0.62) !important;
}

/* R1 Item 4: Real-Time UTC+8 Live Clock Pill in Navigation HUD */
.atlas .sx-live-clock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(120, 181, 255, 0.38);
  background: rgba(7, 13, 26, 0.82);
  color: #eef6ff;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(2, 6, 16, 0.48);
}

.atlas .sx-live-clock__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.85);
}

/* Sprint C4 Item 1: Right-shift Topbar ViewTabs (图谱 / 三维 / 实时) flush beside Search & Tools */
@media (min-width: 1025px) {
  .atlas[data-ui-system="v5"] .sx-top {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
  }

  .atlas[data-ui-system="v5"] .sx-top__modes {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
  }

  .atlas[data-ui-system="v5"] .sx-top__side--end {
    justify-self: end;
    flex: 0 0 auto;
  }
}

/* Sprint C4 Item 5: Zero Warm-Gold / Warm-Brown on SpacecraftArchive, PlanetArchive, TOC Rail, UTC Card & sx-status Safe Clearance */
.atlas[data-ui-system="v5"]:not([data-device="mobile"]):has(.sx-status)
  :is(.archive, .catalogpanel, .sp-panel) {
  top: calc(var(--v5-top) + 40px);
}

.atlas[data-ui-system="v5"] .sx-status {
  z-index: 64;
  background: rgba(7, 13, 26, 0.86);
  border: 1px solid rgba(120, 181, 255, 0.34);
  color: #cfe6ff;
  box-shadow: 0 6px 20px rgba(2, 6, 16, 0.52);
}

.atlas[data-ui-system="v5"] .sx-status:hover {
  border-color: rgba(155, 201, 255, 0.72);
  color: #eef6ff;
  background: rgba(12, 24, 46, 0.92);
}

.atlas .archive:before {
  background: linear-gradient(120deg, rgba(7, 13, 26, 0.96), rgba(9, 17, 32, 0.96)) !important;
}

.atlas .archive__top {
  background: linear-gradient(115deg, rgba(9, 17, 32, 0.96), rgba(6, 12, 24, 0.96)) !important;
  border: 1px solid rgba(120, 181, 255, 0.30) !important;
  box-shadow: 0 8px 22px rgba(2, 6, 16, 0.56);
}

.atlas .archive__id {
  color: #9ec8ff;
}

.atlas .archive__close {
  border: 1px solid rgba(120, 181, 255, 0.42) !important;
  background: rgba(120, 181, 255, 0.12) !important;
  color: #eef6ff !important;
}

.atlas .archive__close:hover,
.atlas .archive__close:focus-visible {
  border-color: #9bc9ff !important;
  background: rgba(120, 181, 255, 0.26) !important;
  color: #ffffff !important;
}

.atlas .archive-rail,
.atlas .archive-rail.archive-rail {
  background: linear-gradient(145deg, rgba(8, 15, 30, 0.94), rgba(5, 10, 22, 0.96)) !important;
  border: 1px solid rgba(120, 181, 255, 0.30) !important;
  box-shadow: 0 14px 36px rgba(2, 6, 16, 0.62) !important;
  backdrop-filter: blur(14px);
}

.atlas .archive-rail__title {
  color: #9ec8ff !important;
  border-bottom: 1px solid rgba(120, 181, 255, 0.22) !important;
}

.atlas .archive-rail__title small {
  color: rgba(176, 208, 245, 0.72) !important;
}

.atlas .archive-rail__list {
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 181, 255, 0.34) transparent;
}

.atlas .archive-rail button {
  color: rgba(206, 226, 250, 0.80) !important;
}

.atlas .archive-rail button small {
  color: rgba(148, 188, 232, 0.74) !important;
}

.atlas .archive-rail button:hover,
.atlas .archive-rail button[aria-current] {
  color: #eef6ff !important;
  background: rgba(120, 181, 255, 0.16) !important;
  border-color: rgba(120, 181, 255, 0.44) !important;
  box-shadow: inset 3px 0 #78b5ff;
}

.atlas .orbit-telemetry {
  border: 1px solid rgba(120, 181, 255, 0.28) !important;
  background: rgba(12, 24, 46, 0.62) !important;
  color: rgba(196, 220, 248, 0.86) !important;
}

.atlas .orbit-telemetry strong {
  color: #9ec8ff !important;
}

.atlas .orbit-telemetry[data-live="true"] strong {
  color: #78b5ff !important;
}

.atlas .orbit-telemetry time {
  color: #eef6ff !important;
}

.atlas .orbit-telemetry small {
  color: rgba(176, 206, 240, 0.78) !important;
}
