:root {
  color-scheme: dark;
  --bg: #05070b;
  --panel: rgba(13, 19, 30, .88);
  --panel-strong: #0d1420;
  --border: rgba(137, 177, 207, .17);
  --text: #edf6ff;
  --muted: #91a4b8;
  --cyan: #4fd8ff;
  --blue: #6394ff;
  --radius: 18px;
  --shadow: 0 18px 60px rgba(0, 0, 0, .3);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% -25%, rgba(32, 105, 155, .16), transparent 55%),
    radial-gradient(ellipse at 100% 70%, rgba(36, 69, 132, .09), transparent 40%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #a4ecff; }
button {
  color: inherit;
  cursor: pointer;
}
button:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}
::selection { background: rgba(79, 216, 255, .25); }

#scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
}
.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  pointer-events: none;
}
.shell a, .shell button, .shell input, .shell select,
.shell textarea, .shell main, .shell nav, .shell footer {
  pointer-events: auto;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 52px);
  border-bottom: 1px solid var(--border);
  background: rgba(5, 8, 14, .78);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -.035em;
}
.brand svg { filter: drop-shadow(0 0 10px rgba(79, 216, 255, .25)); }
.nav-desktop {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  width: 100%;
}
.nav-desktop a, .drawer-links a {
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.nav-desktop a:hover, .nav-desktop a[aria-current="page"],
.drawer-links a:hover, .drawer-links a[aria-current="page"] {
  border-color: var(--border);
  background: rgba(79, 216, 255, .08);
  color: var(--text);
}
.menu-btn, .btn.icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}
.menu-btn { display: none; }
#view {
  width: min(1440px, 100%);
  min-height: 60vh;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 54px);
  outline: none;
}
#view:empty { min-height: 70vh; }

h1, h2, h3, h4 {
  color: var(--text);
  line-height: 1.16;
  letter-spacing: -.035em;
}
h1 { font-size: clamp(2.2rem, 6vw, 4.8rem); }
h2 { font-size: clamp(1.55rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.45rem); }
p { color: #c1cfdd; }
small, .muted { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--border); }

button, .btn, [role="button"] {
  border-radius: 12px;
  transition: transform .18s ease, border-color .18s ease,
    background .18s ease, box-shadow .18s ease;
}
button:hover:not(:disabled), .btn:hover {
  border-color: rgba(79, 216, 255, .45);
}
button:active:not(:disabled), .btn:active { transform: translateY(1px); }

input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(4, 9, 16, .8);
  color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #71849a; }
label { display: block; margin-bottom: 6px; color: #d5e3ef; font-size: 13px; font-weight: 650; }

.card, .panel, .glass, .modal, dialog,
article, .stat-card, .relic-card, .planet-card, .story-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(17, 27, 41, .94), rgba(8, 13, 22, .9));
  box-shadow: var(--shadow);
}
.card, .panel, .glass, article { padding: clamp(16px, 2.5vw, 26px); }
button.primary, .btn.primary, .primary {
  border: 1px solid rgba(79, 216, 255, .4);
  background: linear-gradient(135deg, #147da0, #2458a6);
  color: white;
  box-shadow: 0 8px 28px rgba(28, 131, 194, .15);
}
button.secondary, .btn.secondary {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.045);
  color: var(--text);
}
.badge, .tag, .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(79,216,255,.22);
  border-radius: 999px;
  background: rgba(79,216,255,.07);
  color: #a5eaff;
  font-size: 12px;
  font-weight: 650;
}
img, video, svg { max-width: 100%; }
img { height: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; }
th { color: #b8cddd; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

.footer {
  margin-top: auto;
  padding: 22px clamp(16px, 4vw, 52px) 30px;
  border-top: 1px solid var(--border);
  background: rgba(5, 8, 14, .76);
  backdrop-filter: blur(16px);
}
.footer-disclaimer { max-width: 850px; color: var(--muted); font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; font-size: 12px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--cyan); }

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: 8px;
  background: var(--cyan);
  color: #001018;
}
.skip:focus { transform: translateY(0); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.loading {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(3, 6, 12, .86);
  color: var(--text);
  backdrop-filter: blur(12px);
}
.loading[hidden], .tip[hidden], .to-top[hidden] { display: none; }
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(79,216,255,.2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.tip {
  position: fixed;
  z-index: 60;
  max-width: 280px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: var(--shadow);
}
.scrim {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0,0,0,.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: min(360px, 88vw);
  height: 100dvh;
  padding: 22px;
  border-left: 1px solid var(--border);
  background: #080d16;
  box-shadow: -20px 0 60px rgba(0,0,0,.4);
  transform: translateX(105%);
  visibility: hidden;
  transition: transform .25s ease, visibility .25s ease;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-links { display: flex; flex-direction: column; gap: 6px; }
body.drawer-open .drawer { transform: translateX(0); visibility: visible; }
body.drawer-open .scrim { opacity: 1; pointer-events: auto; }
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 15;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--cyan);
  box-shadow: var(--shadow);
}
.noscript {
  position: fixed;
  inset: 15px;
  z-index: 100;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-strong);
  color: var(--text);
}

@media (max-width: 900px) {
  .topbar { min-height: 64px; gap: 12px; }
  .nav-desktop { display: none; }
  .menu-btn { display: inline-grid; margin-left: auto; }
  #view { padding: 22px 18px 36px; }
}
@media (max-width: 520px) {
  .brand { gap: 8px; font-size: 13px; }
  .brand svg { width: 23px; height: 23px; }
  #view { padding: 18px 14px 28px; }
  .footer { padding: 20px 15px 26px; }
  .footer-links { gap: 10px 14px; }
  th, td { padding: 9px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html[data-reduced-motion="true"] *, html[data-reduced-motion="true"] *::before,
  html[data-reduced-motion="true"] *::after {
    animation: none !important;
    transition: none !important;
  }
}
html[data-contrast="high"] {
  --border: rgba(220, 239, 255, .48);
  --muted: #c0d1e1;
  --text: #fff;
}
html[data-text-size="large"] { font-size: 18px; }

/* Premium cinematic space refinement */
:root {
  --cyan: #66e4ff;
  --blue: #628dff;
  --panel: rgba(10, 20, 34, .94);
  --border: rgba(102, 228, 255, .22);
}

body {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(14, 105, 154, .23), transparent 48%),
    radial-gradient(ellipse at 8% 42%, rgba(39, 63, 143, .15), transparent 35%),
    radial-gradient(ellipse at 90% 78%, rgba(10, 118, 155, .12), transparent 36%),
    #03050a;
}

.topbar {
  background: linear-gradient(180deg, rgba(4, 9, 17, .96), rgba(5, 10, 18, .82));
  border-bottom-color: rgba(102, 228, 255, .19);
  box-shadow: 0 8px 40px rgba(0, 0, 0, .18);
}

.brand {
  letter-spacing: -.045em;
  text-shadow: 0 0 24px rgba(102, 228, 255, .14);
}

.brand svg {
  filter: drop-shadow(0 0 8px rgba(102, 228, 255, .55));
}

#view {
  animation: view-arrive .55s ease both;
}

@keyframes view-arrive {
  from { opacity: .35; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.card, .panel, .glass, article, .stat-card, .relic-card,
.planet-card, .story-card, .modal, dialog {
  border-color: rgba(102, 228, 255, .2);
  background:
    linear-gradient(145deg, rgba(16, 30, 47, .96), rgba(7, 13, 24, .96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 18px 55px rgba(0,0,0,.27),
    0 0 28px rgba(22, 133, 177, .045);
}

.card:hover, .relic-card:hover, .planet-card:hover,
.story-card:hover, article:hover {
  border-color: rgba(102, 228, 255, .42);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 20px 55px rgba(0,0,0,.34),
    0 0 30px rgba(22, 166, 213, .09);
}

h1 {
  text-wrap: balance;
  text-shadow: 0 0 38px rgba(65, 179, 255, .13);
}

h2, h3 {
  text-wrap: balance;
}

button.primary, .btn.primary, .primary {
  background: linear-gradient(115deg, #087da2, #315ec4);
  border-color: rgba(125, 232, 255, .48);
  box-shadow: 0 8px 28px rgba(20, 135, 194, .22);
}

button.primary:hover, .btn.primary:hover, .primary:hover {
  box-shadow: 0 10px 34px rgba(20, 171, 220, .3);
  filter: brightness(1.12);
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(102, 228, 255, .7);
  box-shadow: 0 0 0 3px rgba(102, 228, 255, .09);
  outline: none;
}

.badge, .tag, .chip {
  background: linear-gradient(120deg, rgba(35, 159, 194, .16), rgba(67, 105, 194, .12));
  border-color: rgba(102, 228, 255, .27);
  color: #b8f1ff;
}

.footer {
  background: rgba(4, 8, 15, .88);
  border-top-color: rgba(102, 228, 255, .16);
}

@media (prefers-reduced-motion: reduce) {
  #view { animation: none; }
}

/* ── Space Relics Explorer: cinematic home ── */
.hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 1120px;
  margin: clamp(18px, 5vh, 64px) auto 34px;
  padding: clamp(26px, 5vw, 64px);
  overflow: hidden;
  border: 1px solid rgba(92, 220, 255, .24);
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 82% 12%, rgba(30, 125, 190, .20), transparent 34%),
    radial-gradient(ellipse at 15% 100%, rgba(48, 74, 174, .18), transparent 38%),
    linear-gradient(135deg, rgba(10, 22, 38, .88), rgba(4, 9, 18, .82));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.055),
    0 30px 90px rgba(0,0,0,.30),
    0 0 65px rgba(24, 142, 196, .07);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 340px;
  height: 340px;
  top: -190px;
  right: -95px;
  border: 1px solid rgba(102, 228, 255, .16);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(102, 228, 255, .025),
    0 0 0 60px rgba(102, 228, 255, .018),
    0 0 90px rgba(40, 154, 220, .08);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, transparent, #55dfff 30%, #648cff 75%, transparent);
  opacity: .8;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: #8fe9ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.6;
  text-transform: uppercase;
}

.hero .eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: #63dfff;
  box-shadow: 0 0 12px #35cfff;
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.8rem, 7.5vw, 6.6rem);
  font-weight: 850;
  line-height: .99;
  letter-spacing: -.075em;
  background: linear-gradient(110deg, #ffffff 8%, #d8f7ff 48%, #70dfff 80%, #a0baff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  text-wrap: balance;
}

.hero .hero-quote {
  max-width: 750px;
  margin: 26px 0 12px;
  padding-left: 17px;
  border-left: 2px solid rgba(92, 220, 255, .72);
  color: #d6eaff;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.55;
}

.hero .hero-copy {
  max-width: 660px;
  margin: 18px 0 0;
  color: #aebfd1;
  font-size: clamp(.96rem, 1.5vw, 1.1rem);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
}

.hero-actions .btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 17px;
  border: 1px solid rgba(155, 190, 220, .23);
  border-radius: 12px;
  background: rgba(12, 23, 38, .72);
  color: #e4f5ff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.hero-actions .btn:hover {
  transform: translateY(-2px);
  border-color: rgba(100, 225, 255, .55);
  background: rgba(25, 65, 88, .78);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.hero-actions .btn.primary {
  border-color: rgba(118, 235, 255, .55);
  background: linear-gradient(115deg, #087c9d, #2858bd);
  color: white;
  box-shadow: 0 8px 28px rgba(23, 143, 199, .2);
}

.hero-actions .btn.primary:hover {
  background: linear-gradient(115deg, #0997bc, #376be0);
  box-shadow: 0 10px 32px rgba(23, 164, 219, .27);
}

.hero .stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 38px 0 0;
  padding: 0;
  list-style: none;
}

.hero .stats li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 106px;
  justify-content: center;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(126, 182, 214, .17);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(21, 39, 59, .74), rgba(8, 16, 28, .76));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.hero .stats li::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -38px;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(102, 228, 255, .10);
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(102, 228, 255, .025);
}

.hero .stats li:hover {
  transform: translateY(-3px);
  border-color: rgba(102, 228, 255, .38);
  background: linear-gradient(145deg, rgba(23, 53, 75, .86), rgba(8, 18, 32, .86));
}

.hero .stats strong {
  color: #8be9ff;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.06em;
  text-shadow: 0 0 24px rgba(75, 210, 255, .18);
}

.hero .stats span {
  color: #afc3d6;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

.hero .hint {
  margin: 22px 0 0;
  color: #8fa9bd;
  font-size: 12px;
  letter-spacing: .025em;
}

.hero .notice {
  margin-top: 20px;
}

@media (max-width: 700px) {
  .hero {
    margin: 14px auto 24px;
    padding: 27px 20px;
    border-radius: 21px;
  }

  .hero .eyebrow {
    margin-bottom: 19px;
    font-size: 10px;
    letter-spacing: .11em;
  }

  .hero .hero-quote {
    margin-top: 21px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 27px;
  }

  .hero .stats li {
    min-height: 92px;
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero .stats li,
  .hero-actions .btn {
    transition: none;
  }

  .hero .stats li:hover,
  .hero-actions .btn:hover {
    transform: none;
  }
}

/* Fix: keep the 3D solar system visible behind the homepage */
.hero {
  width: min(860px, calc(100% - 36px));
  max-width: 860px;
  margin: clamp(18px, 4vh, 42px) auto 30px 5vw;
  padding: clamp(22px, 3.5vw, 42px);
  background:
    linear-gradient(
      135deg,
      rgba(8, 20, 36, 0.62),
      rgba(4, 9, 18, 0.38)
    );
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.hero::before,
.hero::after {
  pointer-events: none;
}

.hero .stats li {
  background: rgba(8, 20, 36, 0.38);
}

@media (max-width: 700px) {
  .hero {
    width: calc(100% - 24px);
    margin: 18px auto 24px;
    padding: 22px 18px;
    backdrop-filter: blur(2px);
  }
}

/* ===== FINAL HOMEPAGE REDESIGN ===== */

/* Let the 3D scene remain visible */
#scene {
  z-index: 0;
}

.shell {
  background: transparent;
}

.topbar {
  background: rgba(3, 8, 18, .42);
  border-bottom: 1px solid rgba(112, 224, 255, .13);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#view {
  width: 100%;
  max-width: none;
  padding: 20px 5vw 100px;
}

/* No giant card: clean, floating hero */
.hero {
  isolation: auto;
  width: min(620px, 58%);
  max-width: 620px;
  margin: clamp(35px, 9vh, 100px) 0 0;
  padding: 24px 0 20px 24px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: linear-gradient(
    90deg,
    rgba(3, 8, 18, .82),
    rgba(3, 8, 18, .48) 65%,
    transparent
  );
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero::before {
  display: none;
}

.hero::after {
  width: 2px;
  height: 76%;
  top: 12%;
  left: 0;
  background: linear-gradient(
    180deg,
    transparent,
    #70e7ff 25%,
    #70e7ff 70%,
    transparent
  );
  opacity: .7;
}

.hero .eyebrow {
  margin-bottom: 22px;
  font-size: 10px;
  letter-spacing: .19em;
  color: #7ce8ff;
}

.hero h1 {
  max-width: 580px;
  font-size: clamp(3.2rem, 6.5vw, 6rem);
  font-weight: 750;
  line-height: .98;
  letter-spacing: -.075em;
  text-shadow: 0 4px 45px rgba(0, 0, 0, .4);
}

.hero .hero-quote {
  margin: 23px 0 12px;
  padding: 0;
  border: 0;
  color: #e7f5ff;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 550;
  line-height: 1.5;
}

.hero .hero-copy {
  max-width: 440px;
  margin-top: 13px;
  color: #aebed0;
  font-size: 14px;
  line-height: 1.85;
}

.hero-actions {
  gap: 12px;
  margin-top: 25px;
}

.hero-actions .btn {
  min-height: 45px;
  padding: 12px 17px;
  border-radius: 6px;
  background: rgba(7, 20, 34, .55);
  border: 1px solid rgba(130, 220, 255, .28);
  font-size: 12px;
}

.hero-actions .btn.primary {
  background: linear-gradient(110deg, #71e5fa, #56b9e7);
  color: #06111c;
  border-color: transparent;
  box-shadow: 0 5px 28px rgba(57, 196, 255, .18);
}

.hero-actions .btn.primary:hover {
  background: #a0efff;
}

.hero .hint {
  margin-top: 27px;
  color: #8199ae;
  font-size: 10px;
  letter-spacing: .08em;
}

/* Minimal stats — no individual cards */
.hero .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(130, 204, 240, .17);
}

.hero .stats li {
  flex: 0 1 auto;
  min-height: auto;
  gap: 5px;
  justify-content: center;
  padding: 2px 19px;
  border: 0;
  border-right: 1px solid rgba(130, 204, 240, .2);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero .stats li:first-child {
  padding-left: 0;
}

.hero .stats li:last-child {
  border-right: 0;
}

.hero .stats li::after {
  display: none;
}

.hero .stats li:hover {
  transform: none;
  border-color: rgba(130, 204, 240, .2);
  background: transparent;
}

.hero .stats strong {
  color: #e8f8ff;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -.04em;
  text-shadow: none;
}

.hero .stats span {
  color: #8da4b8;
  font-size: 9px;
  font-weight: 550;
  letter-spacing: .035em;
}

/* Keep the full scene visible on smaller screens */
@media (max-width: 700px) {
  #view {
    padding: 18px 20px 100px;
  }

  .hero {
    width: 100%;
    max-width: 520px;
    margin: 28px 0 0;
    padding: 23px 0 18px 17px;
    background: linear-gradient(
      90deg,
      rgba(3, 8, 18, .78),
      rgba(3, 8, 18, .35),
      transparent
    );
  }

  .hero h1 {
    font-size: clamp(3rem, 12vw, 4.5rem);
  }

  .hero .hero-copy {
    max-width: 340px;
  }

  .hero .stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 8px;
  }

  .hero .stats li,
  .hero .stats li:first-child {
    padding: 0 8px 0 0;
    border-right: 0;
  }

  .hero .stats strong {
    font-size: 21px;
  }

  .hero .stats span {
    font-size: 9px;
  }
}

@media (max-width: 400px) {
  .hero-actions .btn {
    padding: 11px 12px;
    font-size: 11px;
  }
}


/* FIX: Keep the cinematic hero styling exclusive to the homepage */
body[data-layout="scene"] #view > .hero {
  width: min(620px, 58%);
  max-width: 620px;
  margin: clamp(35px, 9vh, 100px) 0 0;
  padding: 24px 0 20px 24px;
}

/* Non-home pages must use their own normal content layout */
body[data-layout="page"] #view > .page {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

body[data-layout="page"] #view > .hero {
  width: 100%;
  max-width: none;
  margin: 0 auto 24px;
  padding: 24px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@media (max-width: 700px) {
  body[data-layout="scene"] #view > .hero {
    width: 100%;
    max-width: 620px;
    margin: 28px auto 0;
    padding: 22px 18px;
  }
}

/* ===== FIX: Keep 3D scene visible on Solar System, Moon and Mars ===== */

/* Keep the main scene fullscreen; only arrange the overlay panels. */
body[data-layout="scene"] #view {
  position: relative;
  min-height: calc(100vh - 72px);
  padding: 24px clamp(16px, 3vw, 42px) 36px;
  pointer-events: none;
}

/* Panels remain interactive and no longer stretch across the globe. */
body[data-layout="scene"] #view > .panel {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  max-height: calc(100vh - 125px);
  overflow-y: auto;
  background: rgba(5, 12, 23, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Solar System controls: compact panel on the left. */
body[data-layout="scene"] #view > .dock {
  width: min(390px, 36vw);
  margin: 12px 0 0;
}

/* Moon and Mars site list: compact sidebar on the left. */
body[data-layout="scene"] #view > .side {
  width: min(390px, 36vw);
  margin: 12px 0 0;
}

/* Planet details appear on the right, leaving the planet visible. */
body[data-layout="scene"] #view > .detail:not([hidden]) {
  position: fixed;
  top: 96px;
  right: clamp(16px, 3vw, 42px);
  width: min(350px, 30vw);
  margin: 0;
}

/* Don't let the homepage hero inherit scene-panel sizing. */
body[data-layout="scene"] #view > .hero {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

@media (max-width: 760px) {
  body[data-layout="scene"] #view {
    padding: 12px;
  }

  body[data-layout="scene"] #view > .dock,
  body[data-layout="scene"] #view > .side {
    width: min(100%, 390px);
    max-height: 52vh;
    margin: 8px 0 0;
    padding: 16px;
  }

  body[data-layout="scene"] #view > .detail:not([hidden]) {
    top: auto;
    right: 12px;
    bottom: 12px;
    width: min(350px, calc(100% - 24px));
    max-height: 42vh;
  }
}

/* ===== PREMIUM 3D EXPLORER PANELS ===== */

body[data-layout="scene"] #view > .panel {
  border: 1px solid rgba(112, 210, 255, .2);
  border-radius: 18px;
  padding: 20px;
  color: #edf6ff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  line-height: 1.55;
}

body[data-layout="scene"] #view > .side h2,
body[data-layout="scene"] #view > .detail h2 {
  margin: 10px 0 12px;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  letter-spacing: -.045em;
  line-height: 1.15;
}

body[data-layout="scene"] #view > .side h3 {
  margin: 22px 0 10px;
  color: #8ee8ff;
  font-size: 1rem;
  letter-spacing: .01em;
}

body[data-layout="scene"] #view > .side p,
body[data-layout="scene"] #view > .dock p,
body[data-layout="scene"] #view > .detail p {
  font-size: 13px;
  line-height: 1.7;
}

body[data-layout="scene"] #view > .side .sites {
  display: grid;
  gap: 8px;
  margin: 12px 0 18px;
  padding: 0;
  list-style: none;
}

body[data-layout="scene"] #view > .side .site-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(137, 177, 207, .15);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  color: #e7f3ff;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
}

body[data-layout="scene"] #view > .side .site-btn .muted {
  font-size: 11px;
}

body[data-layout="scene"] #view > .side .site-btn:hover {
  border-color: rgba(79, 216, 255, .5);
  background: rgba(79, 216, 255, .08);
}

body[data-layout="scene"] #view > .side .site-btn.on {
  border-color: rgba(79, 216, 255, .65);
  background: linear-gradient(110deg, rgba(30, 155, 195, .2), rgba(79, 216, 255, .06));
  box-shadow: inset 3px 0 #4fd8ff;
}

body[data-layout="scene"] #view > .side .dock-row,
body[data-layout="scene"] #view > .dock .dock-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
}

body[data-layout="scene"] #view > .side .btn,
body[data-layout="scene"] #view > .dock .btn,
body[data-layout="scene"] #view > .detail .btn {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(137, 177, 207, .22);
  border-radius: 10px;
  background: rgba(255, 255, 255, .055);
  color: #eaf7ff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

body[data-layout="scene"] #view > .side .btn:hover,
body[data-layout="scene"] #view > .dock .btn:hover,
body[data-layout="scene"] #view > .detail .btn:hover {
  border-color: rgba(79, 216, 255, .55);
  background: rgba(79, 216, 255, .1);
}

body[data-layout="scene"] #view > .side .btn.icon,
body[data-layout="scene"] #view > .dock .btn.icon {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 17px;
}

body[data-layout="scene"] #view > .side .site-detail {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(79, 216, 255, .17);
  border-radius: 13px;
  background: rgba(79, 216, 255, .045);
}

body[data-layout="scene"] #view > .side .site-detail h3 {
  margin-top: 0;
}

body[data-layout="scene"] #view > .side .links {
  padding-left: 18px;
}

body[data-layout="scene"] #view > .side .links li {
  margin: 7px 0;
  font-size: 13px;
}

body[data-layout="scene"] #view > .dock .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

body[data-layout="scene"] #view > .dock .chip {
  padding: 7px 10px;
  border: 1px solid rgba(137, 177, 207, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: #dcecff;
  font-size: 12px;
}

body[data-layout="scene"] #view > .dock .chip.on {
  border-color: rgba(79, 216, 255, .65);
  background: rgba(79, 216, 255, .13);
  color: #a4efff;
}

body[data-layout="scene"] #view > .side .crumbs,
body[data-layout="scene"] #view > .side nav {
  font-size: 11px;
}

body[data-layout="scene"] #view > .side .small,
body[data-layout="scene"] #view > .dock .small {
  font-size: 11px;
}

@media (max-width: 760px) {
  body[data-layout="scene"] #view > .panel {
    padding: 15px;
    border-radius: 15px;
  }

  body[data-layout="scene"] #view > .side .sites {
    gap: 6px;
  }

  body[data-layout="scene"] #view > .side .site-btn {
    padding: 10px;
  }
}

/* ===== RIGHT-SIDE MISSION INFORMATION ===== */
body[data-layout="scene"] #view > .mission-info {
  position: fixed;
  z-index: 4;
  top: 96px;
  right: clamp(16px, 3vw, 42px);
  width: min(450px, 37vw);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid rgba(112, 210, 255, .22);
  border-radius: 18px;
  background: rgba(5, 12, 23, .91);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.mission-results-head {
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(137, 177, 207, .18);
}

.mission-kicker {
  color: #70e7ff;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.mission-results-head h2,
.mission-empty h2 {
  margin: 8px 0;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.2;
}

.mission-cards {
  display: grid;
  gap: 16px;
}

.mission-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(137, 177, 207, .17);
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  box-shadow: none;
}

.mission-art {
  display: grid;
  place-items: center;
  min-height: 145px;
  padding: 12px;
  background: radial-gradient(ellipse at center, rgba(35, 114, 160, .19), transparent 72%);
}

.mission-art svg,
.mission-art img {
  display: block;
  width: 100%;
  max-width: 260px;
  height: 145px;
  object-fit: contain;
}

.mission-card-content {
  padding: 15px;
}

.mission-card-content h3 {
  margin: 6px 0 10px;
  font-size: 19px;
  line-height: 1.3;
}

.mission-card-content > p {
  font-size: 13px;
  line-height: 1.7;
}

.mission-card details {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(137, 177, 207, .14);
  border-radius: 10px;
  background: rgba(0, 0, 0, .13);
}

.mission-card summary {
  color: #9beaff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.mission-card details p {
  font-size: 12px;
  line-height: 1.65;
}

.mission-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 15px 0 0;
}

.mission-links a {
  font-size: 12px;
  font-weight: 650;
}

.mission-empty {
  padding: 28px 8px;
  text-align: center;
}

.mission-empty-icon {
  margin-bottom: 15px;
  color: #70e7ff;
  font-size: 36px;
}

.mission-empty p {
  font-size: 13px;
  line-height: 1.8;
}

@media (max-width: 760px) {
  body[data-layout="scene"] #view > .mission-info {
    top: auto;
    right: 12px;
    bottom: 12px;
    width: min(430px, calc(100% - 24px));
    max-height: 43vh;
    padding: 14px;
  }

  .mission-art {
    min-height: 95px;
  }

  .mission-art svg,
  .mission-art img {
    height: 95px;
  }

  .mission-card-content {
    padding: 12px;
  }
}

/* Compact mission panel; keep the 3D globe prominent */
body[data-layout="scene"] #view > .mission-info[hidden] {
  display: none !important;
}

body[data-layout="scene"] #view > .mission-info:not([hidden]) {
  width: min(340px, 29vw);
  max-height: calc(100vh - 140px);
  top: 100px;
  right: 24px;
  padding: 15px;
  border-radius: 15px;
}

.mission-results-head h2 {
  font-size: 21px;
}

.mission-card-content {
  padding: 12px;
}

.mission-card-content h3 {
  font-size: 16px;
}

.mission-card-content > p {
  font-size: 12px;
}

.mission-art {
  min-height: 115px;
}

.mission-art svg,
.mission-art img {
  height: 115px;
}

@media (max-width: 760px) {
  body[data-layout="scene"] #view > .mission-info:not([hidden]) {
    top: auto;
    bottom: 12px;
    right: 12px;
    width: min(340px, calc(100% - 24px));
    max-height: 38vh;
  }
}

/* NASA mission photographs in the compact info panel */
.mission-photo-wrap {
  overflow: hidden;
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
}

.mission-photo-wrap:has(.mission-photo[hidden]) {
  display: none;
}

.mission-photo {
  display: block;
  width: 100%;
  max-height: 190px;
  object-fit: contain;
  background: #070d16;
}

.mission-photo-caption {
  padding: 7px 10px;
  margin: 0;
  color: #a8bfd2;
  font-size: 10px;
  line-height: 1.5;
}

.mission-art[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .mission-photo {
    max-height: 125px;
  }
}

/* Deep Space premium cinematic theme */
.deep-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr);
  align-items: center;
  gap: 28px;
  min-height: 340px;
  padding: clamp(24px, 5vw, 54px);
  margin: 18px 0 32px;
  overflow: hidden;
  border: 1px solid rgba(129,140,248,.25);
  border-radius: 25px;
  background:
    radial-gradient(ellipse at 78% 50%, rgba(91,33,182,.27), transparent 44%),
    radial-gradient(ellipse at 20% 100%, rgba(14,165,233,.13), transparent 45%),
    linear-gradient(125deg,#080e20,#11152e 58%,#080d1a);
  box-shadow: 0 24px 75px rgba(0,0,0,.22);
}
.deep-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .32;
  pointer-events: none;
  background-image: radial-gradient(#c4b5fd 1px,transparent 1.5px);
  background-size: 37px 37px;
}
.deep-hero-content { position: relative; z-index: 2; max-width: 650px; }
.deep-hero-content > .badge {
  display: inline-flex;
  padding: 7px 11px;
  border: 1px solid rgba(167,139,250,.4);
  border-radius: 999px;
  color: #c4b5fd;
  background: rgba(109,40,217,.13);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}
.deep-hero h2 {
  margin: 20px 0 14px;
  color: #f5f3ff;
  font-size: clamp(32px,4.5vw,57px);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.deep-hero .lead { max-width: 570px; color: #b9c5dd; font-size: 15px; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.deep-hero .hero-actions .btn,
.deep-source-panel .hero-actions .btn { text-decoration: none; transition: transform .2s ease,border-color .2s ease; }
.deep-hero .hero-actions .btn:hover,
.deep-source-panel .hero-actions .btn:hover { transform: translateY(-2px); }
.deep-hero .hero-actions .btn.primary {
  color: #fff;
  border-color: #7c6cf4;
  background: linear-gradient(135deg,#6d5dfc,#8b5cf6);
  box-shadow: 0 8px 24px rgba(109,93,252,.24);
}
.deep-orbit-art {
  position: relative;
  width: min(100%,300px);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(56,189,248,.08),transparent 65%);
  animation: deep-float 7s ease-in-out infinite;
}
.deep-orbit {
  position: absolute;
  inset: 15%;
  border: 1px solid rgba(165,180,252,.48);
  border-radius: 50%;
}
.orbit-one { transform: rotate(-28deg) scaleY(.43); }
.orbit-two { inset: 5%; transform: rotate(55deg) scaleY(.57); border-color: rgba(56,189,248,.4); }
.deep-planet {
  position: absolute;
  width: 36%;
  aspect-ratio: 1;
  top: 32%;
  left: 32%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 24%,#c4b5fd,transparent 18%),radial-gradient(circle at 34% 28%,#5b65cb,#302e81 48%,#11152e 76%);
  box-shadow: inset -14px -8px 24px rgba(0,0,0,.6),0 0 30px rgba(129,140,248,.3),0 0 75px rgba(99,102,241,.16);
}
.deep-star { position: absolute; color: #c4b5fd; text-shadow: 0 0 14px #818cf8; }
.star-one { top: 13%; right: 18%; font-size: 24px; }
.star-two { bottom: 17%; left: 10%; font-size: 28px; }
.star-three { top: 47%; right: 3%; font-size: 30px; }
@keyframes deep-float {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-9px) rotate(3deg); }
}
.deep-intro {
  display: grid;
  grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr);
  align-items: start;
  gap: 25px;
  margin: 32px 0 22px;
}
.mission-kicker { display: block; margin-bottom: 9px; color: #818cf8; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.deep-intro h2,.deep-section-heading h2,.deep-source-panel h2 { margin: 0 0 10px; font-size: clamp(22px,3vw,31px); letter-spacing: -.025em; }
.deep-intro > p,.deep-source-panel > p { margin: 0; line-height: 1.8; opacity: .8; }
.deep-missions { margin-top: 38px; scroll-margin-top: 25px; }
.deep-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.deep-section-heading .muted { margin: 0; }
.deep-card-grid { gap: 18px; }
.deep-card-grid > li { min-width: 0; }
.deep-card-grid .card {
  height: 100%;
  overflow: hidden;
  border-color: rgba(129,140,248,.17);
  border-radius: 17px;
  background: linear-gradient(145deg,rgba(30,41,72,.48),rgba(12,19,35,.7));
  transition: transform .22s ease,border-color .22s ease,box-shadow .22s ease;
}
.deep-card-grid .card:hover { transform: translateY(-4px); border-color: rgba(129,140,248,.55); box-shadow: 0 14px 35px rgba(5,8,25,.2); }
.deep-card-grid .card-art { overflow: hidden; background: radial-gradient(ellipse at center,rgba(79,70,229,.16),transparent 72%); }
.deep-card-grid .card-body { padding: 18px; }
.deep-card-grid .card-body h3 { margin-top: 12px; line-height: 1.35; }
.deep-card-grid .card-body p { line-height: 1.75; }
.deep-source-panel {
  position: relative;
  margin: 38px 0 18px;
  padding: clamp(22px,4vw,36px);
  overflow: hidden;
  border: 1px solid rgba(129,140,248,.2);
  border-radius: 20px;
  background: radial-gradient(ellipse at 100% 0%,rgba(91,33,182,.17),transparent 48%),rgba(99,102,241,.045);
}
.deep-source-panel h2 { margin-bottom: 12px; }
@media (max-width:760px) {
  .deep-hero { grid-template-columns: 1fr; gap: 8px; padding: 25px 21px; }
  .deep-orbit-art { width: min(68vw,230px); margin: 5px auto 0; }
  .deep-intro { grid-template-columns: 1fr; gap: 8px; }
  .deep-section-heading { align-items: flex-start; }
  .deep-source-panel .hero-actions { align-items: stretch; flex-direction: column; }
  .deep-source-panel .hero-actions .btn { text-align: center; }
}
@media (prefers-reduced-motion:reduce) {
  .deep-orbit-art { animation: none; }
  .deep-card-grid .card,.deep-hero .hero-actions .btn,.deep-source-panel .hero-actions .btn { transition: none; }
}

/* Real NASA photos on mission archive cards */
.relic-card-photo-wrap {
  position: relative;
  height: 175px;
  overflow: hidden;
  background: #080e20;
}
.relic-card-photo-wrap[hidden] {
  display: none !important;
}
.relic-card-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.deep-card-grid .card:hover .relic-card-photo {
  transform: scale(1.045);
}
.relic-photo-credit {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  color: #fff;
  background: rgba(4,8,20,.72);
  font-size: 10px;
}
@media (max-width: 760px) {
  .relic-card-photo-wrap { height: 155px; }
}

/* Deep Space mission photos: consistent, less-cropped presentation */
.deep-card-grid .relic-card-photo-wrap {
  height: 220px;
  display: block;
  overflow: hidden;
  background: #080e20;
}

.deep-card-grid .relic-card-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 1;
  visibility: visible;
  background: #080e20;
}

.deep-card-grid .card {
  height: 100%;
}

.deep-card-grid .card-body {
  min-height: 175px;
}

@media (max-width: 760px) {
  .deep-card-grid .relic-card-photo-wrap {
    height: 200px;
  }
}

/* Real NASA photographs on Deep Space detail pages */
.relic-detail-photo-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(129, 140, 248, .2);
  border-radius: 18px;
  background: #080e20;
}

.relic-detail-photo-wrap[hidden] {
  display: none !important;
}

.relic-detail-photo {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 760px) {
  .relic-detail-photo {
    height: 230px;
  }
}

/* ===== Space Relics Explorer: Premium Timeline ===== */
.timeline {
  position: relative;
  list-style: none;
  margin: 30px auto;
  padding: 8px 0 8px 34px;
  max-width: 1050px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10px;
  width: 2px;
  background: linear-gradient(
    180deg,
    transparent,
    #38bdf8 8%,
    #818cf8 50%,
    #a78bfa 90%,
    transparent
  );
  box-shadow: 0 0 14px rgba(56, 189, 248, .3);
}

.tl-year {
  position: relative;
  margin: 30px 0 18px;
  color: #7dd3fc;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: .04em;
  text-shadow: 0 0 22px rgba(56, 189, 248, .22);
}

.tl-year::before {
  content: "";
  position: absolute;
  left: -31px;
  top: .45em;
  width: 12px;
  height: 12px;
  border: 3px solid #7dd3fc;
  border-radius: 50%;
  background: #0b1225;
  box-shadow: 0 0 14px rgba(56, 189, 248, .6);
}

.tl-item {
  position: relative;
  margin: 0 0 16px;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 25px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #818cf8;
  border: 2px solid #c7d2fe;
  box-shadow: 0 0 12px rgba(129, 140, 248, .55);
  transition: transform .2s ease, background .2s ease;
}

.tl-link {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr auto;
  align-items: center;
  gap: 10px 16px;
  padding: 19px 21px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(148, 163, 184, .19);
  border-radius: 16px;
  background: linear-gradient(
    120deg,
    rgba(30, 41, 59, .82),
    rgba(15, 23, 42, .76)
  );
  box-shadow: 0 8px 26px rgba(0, 0, 0, .12);
  transition: transform .22s ease, border-color .22s ease,
              box-shadow .22s ease, background .22s ease;
}

.tl-link:hover,
.tl-link:focus-visible {
  transform: translateX(5px);
  border-color: rgba(56, 189, 248, .55);
  background: linear-gradient(
    120deg,
    rgba(30, 58, 95, .92),
    rgba(30, 27, 75, .82)
  );
  box-shadow: 0 12px 32px rgba(56, 189, 248, .09);
  outline: none;
}

.tl-date {
  color: #7dd3fc;
  font-size: .85rem;
  font-weight: 750;
  letter-spacing: .02em;
}

.tl-badge {
  justify-self: start;
  padding: 5px 9px;
  border: 1px solid rgba(129, 140, 248, .28);
  border-radius: 999px;
  color: #c7d2fe;
  background: rgba(99, 102, 241, .12);
  font-size: .72rem;
  font-weight: 700;
}

.tl-title {
  grid-column: 1 / 3;
  color: #f1f5f9;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.35;
}

.tl-label {
  grid-column: 1 / 3;
  color: #cbd5e1;
  font-size: .92rem;
  line-height: 1.55;
}

.tl-dest {
  grid-column: 3;
  grid-row: 1 / span 3;
  justify-self: end;
  align-self: center;
  padding: 7px 10px;
  border-radius: 10px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, .11);
  border: 1px solid rgba(34, 211, 238, .18);
  font-size: .76rem;
  font-weight: 700;
}

.filters {
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(129, 140, 248, .22);
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, .72),
    rgba(15, 23, 42, .6)
  );
}

.filters label {
  gap: 8px;
  font-weight: 700;
}

.filters select {
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 10px;
  padding: 8px 12px;
}

@media (max-width: 640px) {
  .timeline {
    padding-left: 27px;
    margin-top: 22px;
  }

  .timeline::before {
    left: 7px;
  }

  .tl-year::before {
    left: -26px;
  }

  .tl-item::before {
    left: -25px;
  }

  .tl-link {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 15px;
    border-radius: 13px;
  }

  .tl-date {
    grid-column: 1;
  }

  .tl-badge {
    grid-column: 2;
    grid-row: 1;
  }

  .tl-title,
  .tl-label {
    grid-column: 1 / -1;
  }

  .tl-dest {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl-link,
  .tl-item::before {
    transition: none;
  }
}

/* Mission photographs on relic detail pages */
.relic-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 1.5rem;
  align-items: start;
}

.relic-detail-photo-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border, #383838);
  background: var(--panel, #222);
}

.relic-detail-photo {
  display: block;
  width: 100%;
  height: auto;
  min-height: 220px;
  max-height: 420px;
  object-fit: contain;
}

.relic-photo-credit {
  display: block;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--muted, #999);
}

@media (max-width: 700px) {
  .relic-top {
    grid-template-columns: 1fr;
  }
}

/* Echoes — refined premium button design */
.story-nav .btn,
.echoes-controlbar .btn,
.echoes-quiz > .btn,
.echoes-choice,
.echoes-answer {
  position: relative;
  min-height: 44px;
  border: 1px solid rgba(125, 164, 205, .3);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(31, 43, 65, .96), rgba(19, 27, 43, .98));
  color: #eaf4ff;
  font: inherit;
  font-weight: 650;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.story-nav .btn,
.echoes-controlbar .btn,
.echoes-quiz > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
}

.story-nav .btn:hover:not(:disabled),
.echoes-controlbar .btn:hover,
.echoes-quiz > .btn:hover,
.echoes-choice:hover,
.echoes-answer:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(79, 216, 255, .85);
  background: linear-gradient(180deg, #233c59, #182b43);
  box-shadow: 0 7px 22px rgba(0, 0, 0, .2), 0 0 0 3px rgba(79, 216, 255, .07);
}

.story-nav .btn:active:not(:disabled),
.echoes-controlbar .btn:active,
.echoes-quiz > .btn:active,
.echoes-choice:active,
.echoes-answer:active:not(:disabled) {
  transform: translateY(0) scale(.985);
}

.story-nav .btn.primary,
.echoes-quiz > .btn {
  border-color: transparent;
  color: #071523;
  background: linear-gradient(115deg, #73e5ff, #68baff 55%, #a4a0ff);
  box-shadow: 0 4px 16px rgba(79, 180, 255, .18);
}

.story-nav .btn.primary:hover:not(:disabled),
.echoes-quiz > .btn:hover {
  background: linear-gradient(115deg, #a0eeff, #8bcaff 55%, #c0bdff);
  box-shadow: 0 8px 25px rgba(79, 180, 255, .25);
}

.story-nav .btn:disabled {
  opacity: .38;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.story-nav .btn:focus-visible,
.echoes-controlbar .btn:focus-visible,
.echoes-quiz > .btn:focus-visible,
.echoes-choice:focus-visible,
.echoes-answer:focus-visible {
  outline: 3px solid #73e5ff;
  outline-offset: 3px;
}

.echoes-choice {
  width: 100%;
  min-height: 76px;
  padding: 14px 16px;
}

.echoes-choice-icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(79, 216, 255, .22);
  border-radius: 12px;
  background: rgba(79, 216, 255, .08);
}

.echoes-answer {
  padding: 13px 16px;
}

.echoes-answer.is-correct {
  border-color: #32c98a;
  background: rgba(50, 201, 138, .12);
  color: #a8f5d3;
}

.echoes-answer.is-wrong {
  border-color: #ff7474;
  background: rgba(255, 116, 116, .1);
  color: #ffc0c0;
}

@media (max-width: 560px) {
  .story-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .story-nav .btn {
    min-width: 0;
    padding: 11px 10px;
    font-size: .9rem;
  }

  .story-nav .btn:last-child {
    grid-column: 1 / -1;
  }

  .echoes-controlbar {
    align-items: stretch;
  }

  .echoes-controlbar .btn {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-nav .btn,
  .echoes-controlbar .btn,
  .echoes-quiz > .btn,
  .echoes-choice,
  .echoes-answer {
    transition: none;
  }
}

/* Echoes mission cards — premium navigation design */
.echoes-grid .echoes-mission-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(125, 164, 205, .24);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 90% 0%, rgba(79,216,255,.09), transparent 45%),
    var(--panel, #171923);
  box-shadow: 0 5px 20px rgba(0,0,0,.12);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.echoes-grid .echoes-mission-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79,216,255,.75);
  box-shadow: 0 14px 32px rgba(0,0,0,.2), 0 0 0 1px rgba(79,216,255,.08);
}

.echoes-grid .echoes-mission-card:focus-visible {
  outline: 3px solid #73e5ff;
  outline-offset: 3px;
}

.echoes-grid .echoes-card-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 145px;
  padding: 16px;
  border-bottom: 1px solid rgba(125,164,205,.14);
  background:
    radial-gradient(circle at 50% 45%, rgba(79,216,255,.12), transparent 60%),
    linear-gradient(145deg, rgba(20,36,58,.65), rgba(13,18,32,.35));
}

.echoes-grid .echoes-card-art svg {
  width: 100%;
  max-height: 125px;
  transition: transform .25s ease;
}

.echoes-grid .echoes-mission-card:hover .echoes-card-art svg {
  transform: scale(1.045);
}

.echoes-grid .echoes-card-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  top: 12px;
  right: 12px;
  border: 1px solid rgba(79,216,255,.28);
  border-radius: 50%;
  color: #73e5ff;
  background: rgba(8,15,30,.88);
  transition: transform .2s ease, background .2s ease;
}

.echoes-grid .echoes-mission-card:hover .echoes-card-icon {
  transform: translate(2px,-2px);
  background: #17334b;
}

.echoes-grid .echoes-mission-card .card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
}

.echoes-grid .echoes-mission-card h3 {
  margin: 12px 0 8px;
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--text, inherit);
}

.echoes-grid .echoes-mission-card .card-body > p {
  line-height: 1.65;
  color: var(--muted, #a5adbd);
}

.echoes-grid .echoes-progress-meta {
  margin-top: auto;
  padding-top: 16px;
  width: 100%;
}

.echoes-grid .echoes-progress-track {
  width: 100%;
  height: 4px;
  margin-top: 8px;
  background: rgba(125,164,205,.16);
}

.echoes-grid .echoes-progress-track span {
  border-radius: 999px;
  background: linear-gradient(90deg, #4fd8ff, #9c96ff);
}

@media (max-width: 560px) {
  .echoes-grid .echoes-card-art {
    min-height: 115px;
  }

  .echoes-grid .echoes-card-art svg {
    max-height: 100px;
  }

  .echoes-grid .echoes-mission-card .card-body {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .echoes-grid .echoes-mission-card,
  .echoes-grid .echoes-card-art svg,
  .echoes-grid .echoes-card-icon {
    transition: none;
  }
}

/* Echoes archive mission-card photos */
.echoes-card-art {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 20%, #203e63, #091323 75%);
}
.echoes-card-art .echoes-card-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: .8;
}
.echoes-card-art .echoes-card-fallback svg {
  width: 100%;
  height: 100%;
  max-height: 190px;
}
.echoes-card-art .echoes-card-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .35s ease;
}
.echoes-mission-card:hover .echoes-card-photo {
  transform: scale(1.045);
  filter: brightness(1.08);
}
.echoes-card-art.has-photo .echoes-card-fallback {
  opacity: .12;
}
.echoes-card-art .echoes-card-icon {
  z-index: 2;
  position: absolute;
  right: 12px;
  top: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .echoes-card-art .echoes-card-photo { transition: none; }
}

/* Fix: show complete NASA images on Echoes mission cards */
.echoes-card-art .echoes-card-photo {
  object-fit: contain !important;
  object-position: center !important;
  background: #091323;
}

.echoes-card-art .echoes-card-fallback {
  opacity: 0.12;
}

.echoes-card-art.has-photo .echoes-card-photo {
  padding: 8px;
}


/* Final tuning: larger mission-card images */
.echoes-card-art {
  height: 220px !important;
  min-height: 220px;
  overflow: hidden;
  background: #091323;
}

.echoes-card-art .echoes-card-photo {
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
}

.echoes-card-art .echoes-card-fallback {
  inset: 0;
}

@media (max-width: 600px) {
  .echoes-card-art {
    height: 190px !important;
    min-height: 190px;
  }
}


/* Robin — premium owner profile avatar */
.profile .owner-avatar {
  width: 112px;
  height: 112px;
  min-width: 112px;
  border-radius: 50%;
  overflow: hidden;
  padding: 3px;
  background: linear-gradient(135deg, #60a5fa, #22d3ee, #818cf8);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, .12),
              0 8px 28px rgba(59, 130, 246, .22);
}

.profile .owner-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 520px) {
  .profile .owner-avatar {
    width: 88px;
    height: 88px;
    min-width: 88px;
  }
}

/* ==========================================================
   CINEMATIC PREMIUM — HOME + SHARED COMPONENTS
   Additive overrides; preserve the existing 3D scene.
   ========================================================== */

:root {
  --premium-blue: #60a5fa;
  --premium-cyan: #67e8f9;
  --premium-border: rgba(148, 184, 226, .19);
  --premium-glass: rgba(10, 22, 42, .78);
}

/* Home hero: cinematic glass over the live solar-system scene */
body[data-layout="scene"] #view > .hero {
  box-sizing: border-box;
  border: 1px solid var(--premium-border);
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(37, 99, 235, .19), transparent 58%),
    linear-gradient(145deg, rgba(8, 19, 38, .91), rgba(8, 17, 32, .76));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, .25),
    inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

body[data-layout="scene"] #view > .hero .eyebrow {
  color: var(--premium-cyan);
  letter-spacing: .17em;
  font-weight: 750;
  text-transform: uppercase;
}

body[data-layout="scene"] #view > .hero h1 {
  color: #f8fbff;
  letter-spacing: -.045em;
  line-height: 1.06;
  text-wrap: balance;
  text-shadow: 0 4px 32px rgba(96, 165, 250, .15);
}

body[data-layout="scene"] #view > .hero .hero-quote {
  color: #dbeafe;
  line-height: 1.65;
}

body[data-layout="scene"] #view > .hero .hero-copy {
  color: #b8c7dc;
  line-height: 1.8;
  max-width: 54ch;
}

body[data-layout="scene"] #view > .hero .hero-actions {
  gap: 11px;
}

body[data-layout="scene"] #view > .hero .hero-actions .btn {
  min-height: 44px;
  border-radius: 13px;
  border: 1px solid rgba(157, 190, 230, .24);
  background: rgba(15, 31, 53, .78);
  color: #edf6ff;
  font-weight: 650;
  text-decoration: none;
  transition: transform .22s ease, background .22s ease,
              border-color .22s ease, box-shadow .22s ease;
}

body[data-layout="scene"] #view > .hero .hero-actions .btn.primary {
  color: #071426;
  border-color: transparent;
  background: linear-gradient(120deg, #93c5fd, #67e8f9);
  box-shadow: 0 7px 24px rgba(56, 189, 248, .19);
}

body[data-layout="scene"] #view > .hero .hero-actions .btn:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, .55);
  background-color: rgba(30, 52, 80, .95);
}

body[data-layout="scene"] #view > .hero .hero-actions .btn.primary:hover {
  background: linear-gradient(120deg, #bfdbfe, #a5f3fc);
  box-shadow: 0 10px 30px rgba(56, 189, 248, .27);
}

body[data-layout="scene"] #view > .hero .stats li {
  border-color: rgba(148, 184, 226, .16);
  background: rgba(8, 19, 36, .46);
  border-radius: 15px;
  transition: border-color .2s ease, background .2s ease,
              transform .2s ease;
}

body[data-layout="scene"] #view > .hero .stats li:hover {
  border-color: rgba(103, 232, 249, .36);
  background: rgba(24, 45, 72, .7);
  transform: translateY(-2px);
}

body[data-layout="scene"] #view > .hero .stats strong {
  color: #e7f5ff;
  font-variant-numeric: tabular-nums;
}

body[data-layout="scene"] #view > .hero .stats span,
body[data-layout="scene"] #view > .hero .hint {
  color: #a9bdd5;
}

/* Shared cards: subtle depth, consistent borders and hover feedback */
.card,
.relic-card,
.planet-card,
.deep-card-grid .card,
.echoes-mission-card {
  border-color: var(--premium-border);
  transition: transform .22s ease, border-color .22s ease,
              box-shadow .22s ease;
}

.card:hover,
.relic-card:hover,
.planet-card:hover,
.deep-card-grid .card:hover,
.echoes-mission-card:hover {
  border-color: rgba(96, 165, 250, .48);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .17);
}

/* Standard content buttons; leave 3D scene controls untouched */
.page .btn,
.page button.btn,
#view > .hero .hero-actions .btn {
  font-weight: 650;
  border-radius: 11px;
  transition: transform .2s ease, border-color .2s ease,
              background-color .2s ease, box-shadow .2s ease;
}

.page .btn:focus-visible,
#view > .hero .hero-actions .btn:focus-visible,
.card:focus-visible,
.echoes-mission-card:focus-visible {
  outline: 3px solid var(--premium-cyan);
  outline-offset: 3px;
}

/* Keep readable layouts on mobile */
@media (max-width: 700px) {
  body[data-layout="scene"] #view > .hero {
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  body[data-layout="scene"] #view > .hero .hero-actions {
    gap: 9px;
  }

  body[data-layout="scene"] #view > .hero .hero-actions .btn {
    min-height: 43px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-layout="scene"] #view > .hero .hero-actions .btn,
  body[data-layout="scene"] #view > .hero .stats li,
  .card,
  .relic-card,
  .planet-card,
  .deep-card-grid .card,
  .echoes-mission-card,
  .page .btn {
    transition: none !important;
  }

  body[data-layout="scene"] #view > .hero .stats li:hover,
  body[data-layout="scene"] #view > .hero .hero-actions .btn:hover {
    transform: none;
  }
}


/* HOME FIX: reveal more of the live 3D solar system */
body[data-layout="scene"] #view > .hero {
  width: min(440px, calc(100vw - 32px)) !important;
  max-width: 440px !important;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 20px 22px !important;
  background: linear-gradient(
    145deg,
    rgba(8, 19, 38, .76),
    rgba(8, 17, 32, .57)
  ) !important;
  backdrop-filter: blur(8px) saturate(110%) !important;
  -webkit-backdrop-filter: blur(8px) saturate(110%) !important;
}

body[data-layout="scene"] #view > .hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.65rem) !important;
  line-height: 1.08 !important;
  margin-block: 10px !important;
}

body[data-layout="scene"] #view > .hero .hero-quote {
  font-size: .95rem !important;
  margin-block: 8px !important;
}

body[data-layout="scene"] #view > .hero .hero-copy {
  font-size: .9rem !important;
  line-height: 1.55 !important;
  margin-block: 8px 12px !important;
}

body[data-layout="scene"] #view > .hero .stats {
  gap: 8px !important;
  margin-block: 12px !important;
}

body[data-layout="scene"] #view > .hero .stats li {
  padding: 9px 10px !important;
}

body[data-layout="scene"] #view > .hero .hint {
  font-size: .75rem !important;
  margin-top: 8px !important;
}

body[data-layout="scene"] #view > .hero .hero-actions {
  gap: 7px !important;
}

body[data-layout="scene"] #view > .hero .hero-actions .btn {
  min-height: 36px !important;
  padding: 8px 11px !important;
  font-size: .82rem !important;
}

@media (max-width: 700px) {
  body[data-layout="scene"] #view > .hero {
    width: calc(100vw - 24px) !important;
    max-width: 440px !important;
    max-height: calc(100dvh - 100px) !important;
    padding: 15px !important;
  }
}

/* HOME PREMIUM LAYOUT — compact glass panel, more visible 3D scene */
body[data-layout="scene"] #view > .hero {
  width: min(360px, calc(100vw - 28px)) !important;
  max-width: 360px !important;
  max-height: min(72vh, 620px) !important;
  overflow-y: auto;
  padding: 18px !important;
  border: 1px solid rgba(125, 190, 255, .22) !important;
  border-radius: 20px !important;
  background: linear-gradient(
    145deg,
    rgba(7, 19, 39, .72),
    rgba(5, 13, 28, .48)
  ) !important;
  box-shadow:
    0 18px 55px rgba(0, 0, 0, .24),
    inset 0 1px 0 rgba(255, 255, 255, .07) !important;
  backdrop-filter: blur(7px) saturate(115%) !important;
  -webkit-backdrop-filter: blur(7px) saturate(115%) !important;
}

body[data-layout="scene"] #view > .hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.35rem) !important;
  line-height: 1.06 !important;
  letter-spacing: -.035em;
  margin: 8px 0 10px !important;
}

body[data-layout="scene"] #view > .hero .eyebrow {
  font-size: .68rem !important;
  letter-spacing: .12em;
}

body[data-layout="scene"] #view > .hero .hero-quote {
  font-size: .88rem !important;
  line-height: 1.45 !important;
}

body[data-layout="scene"] #view > .hero .hero-copy {
  font-size: .84rem !important;
  line-height: 1.5 !important;
  margin: 8px 0 12px !important;
}

body[data-layout="scene"] #view > .hero .hero-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px !important;
}

body[data-layout="scene"] #view > .hero .hero-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 38px !important;
  padding: 8px 9px !important;
  text-align: center;
  font-size: .78rem !important;
  line-height: 1.25;
  border-radius: 11px !important;
}

body[data-layout="scene"] #view > .hero .stats {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px !important;
  margin: 12px 0 8px !important;
}

body[data-layout="scene"] #view > .hero .stats li {
  min-width: 0;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  background: rgba(120, 170, 230, .07);
  border: 1px solid rgba(160, 195, 245, .10);
}

body[data-layout="scene"] #view > .hero .stats li strong {
  font-size: 1.15rem;
}

body[data-layout="scene"] #view > .hero .stats li span {
  font-size: .72rem;
}

body[data-layout="scene"] #view > .hero .hint {
  font-size: .7rem !important;
  line-height: 1.4;
}

@media (max-width: 700px) {
  body[data-layout="scene"] #view > .hero {
    width: min(340px, calc(100vw - 24px)) !important;
    max-height: 64dvh !important;
    padding: 14px !important;
  }

  body[data-layout="scene"] #view > .hero h1 {
    font-size: 1.8rem !important;
  }

  body[data-layout="scene"] #view > .hero .hero-actions .btn {
    font-size: .74rem !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body[data-layout="scene"] #view > .hero .hero-actions .btn {
    transition: transform .2s ease, border-color .2s ease,
      background-color .2s ease, box-shadow .2s ease;
  }

  body[data-layout="scene"] #view > .hero .hero-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(48, 130, 255, .16);
  }
}

/* HOME PANEL — balanced medium size */
body[data-layout="scene"] #view > .hero {
  width: min(430px, calc(100vw - 32px)) !important;
  max-width: 430px !important;
  max-height: min(82vh, 740px) !important;
  padding: 24px 26px !important;
}

body[data-layout="scene"] #view > .hero h1 {
  font-size: clamp(2rem, 3.5vw, 2.8rem) !important;
  line-height: 1.1 !important;
}

body[data-layout="scene"] #view > .hero .hero-quote {
  font-size: 1rem !important;
}

body[data-layout="scene"] #view > .hero .hero-copy {
  font-size: .95rem !important;
  line-height: 1.6 !important;
}

body[data-layout="scene"] #view > .hero .hero-actions .btn {
  min-height: 42px !important;
  padding: 10px 12px !important;
  font-size: .85rem !important;
}

body[data-layout="scene"] #view > .hero .stats li {
  padding: 11px 12px !important;
}

body[data-layout="scene"] #view > .hero .stats li strong {
  font-size: 1.3rem !important;
}

body[data-layout="scene"] #view > .hero .stats li span {
  font-size: .78rem !important;
}

@media (max-width: 700px) {
  body[data-layout="scene"] #view > .hero {
    width: min(390px, calc(100vw - 24px)) !important;
    max-height: 76dvh !important;
    padding: 20px !important;
  }
}

/* PREMIUM SPACE MOTION — CSS only; never animate the 3D canvas */
:root {
  --space-glow-blue: rgba(55, 145, 255, .18);
  --space-glow-cyan: rgba(63, 225, 255, .12);
  --space-motion-speed: 220ms;
}

/* Gentle ambient light behind page content */
body {
  background-image:
    radial-gradient(ellipse at 78% 18%, rgba(28, 91, 180, .09), transparent 42%),
    radial-gradient(ellipse at 12% 78%, rgba(0, 190, 220, .055), transparent 38%);
  background-attachment: fixed;
}

/* Quiet star-like glimmers, kept behind the interface */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .20;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(210, 235, 255, .9) 50%, transparent 100%),
    radial-gradient(1px 1px at 76% 16%, rgba(150, 220, 255, .9) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 88% 63%, rgba(190, 230, 255, .8) 50%, transparent 100%),
    radial-gradient(1px 1px at 38% 82%, rgba(150, 220, 255, .8) 50%, transparent 100%),
    radial-gradient(1px 1px at 58% 42%, rgba(220, 240, 255, .8) 50%, transparent 100%);
  background-repeat: no-repeat;
  animation: space-star-breathe 7s ease-in-out infinite alternate;
}

/* Smooth hover effects for cards without changing their layout */
.card,
.relic-card,
.planet-card,
.deep-card-grid .card,
.echoes-mission-card {
  transition:
    border-color var(--space-motion-speed) ease,
    box-shadow var(--space-motion-speed) ease,
    background-color var(--space-motion-speed) ease;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover,
  .relic-card:hover,
  .planet-card:hover,
  .deep-card-grid .card:hover,
  .echoes-mission-card:hover {
    border-color: rgba(91, 183, 255, .38);
    box-shadow:
      0 10px 32px rgba(0, 0, 0, .16),
      0 0 22px var(--space-glow-blue);
  }

  .btn {
    transition:
      transform var(--space-motion-speed) ease,
      box-shadow var(--space-motion-speed) ease,
      border-color var(--space-motion-speed) ease,
      background-color var(--space-motion-speed) ease;
  }

  .btn:hover {
    box-shadow: 0 0 18px var(--space-glow-cyan);
  }
}

/* Soft focus glow for keyboard navigation */
.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(91, 205, 255, .9);
  outline-offset: 3px;
}

/* Slow ambient star shimmer */
@keyframes space-star-breathe {
  from { opacity: .12; }
  to   { opacity: .30; }
}

/* Respect accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none !important;
  }

  .card,
  .relic-card,
  .planet-card,
  .deep-card-grid .card,
  .echoes-mission-card,
  .btn {
    animation: none !important;
    transition: none !important;
  }
}

/* FLOATING CINEMATIC NAVBAR — preserve existing links and behavior */
.topbar {
  position: sticky;
  top: 10px;
  z-index: 30;
  width: calc(100% - clamp(20px, 4vw, 64px));
  min-height: 64px;
  margin: 10px auto 0;
  padding: 10px clamp(14px, 2.4vw, 30px);
  gap: clamp(12px, 2vw, 26px);
  border: 1px solid rgba(112, 210, 255, .22);
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(7, 19, 36, .84),
    rgba(5, 12, 25, .72)
  );
  box-shadow:
    0 12px 38px rgba(0, 0, 0, .24),
    inset 0 1px 0 rgba(255, 255, 255, .055),
    0 0 24px rgba(45, 153, 230, .055);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.topbar:hover {
  border-color: rgba(112, 220, 255, .32);
  box-shadow:
    0 14px 42px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 0 28px rgba(45, 153, 230, .08);
}

.brand {
  white-space: nowrap;
  font-size: 14px;
  letter-spacing: -.035em;
}

.nav-desktop {
  gap: 5px;
}

.nav-desktop a {
  padding: 9px 11px;
  border-radius: 11px;
  white-space: nowrap;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.nav-desktop a:hover {
  transform: translateY(-1px);
  border-color: rgba(104, 215, 255, .18);
  background: rgba(79, 216, 255, .09);
  box-shadow: 0 0 18px rgba(63, 190, 255, .07);
}

.nav-desktop a[aria-current="page"] {
  border-color: rgba(104, 215, 255, .23);
  background: linear-gradient(
    135deg,
    rgba(79, 216, 255, .14),
    rgba(70, 130, 255, .08)
  );
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.menu-btn,
.btn.icon {
  border-color: rgba(112, 210, 255, .22);
  border-radius: 13px;
  background: rgba(91, 177, 255, .07);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.menu-btn:hover,
.btn.icon:hover {
  border-color: rgba(112, 220, 255, .42);
  background: rgba(91, 177, 255, .13);
  box-shadow: 0 0 18px rgba(63, 190, 255, .09);
}

.drawer {
  border-left: 1px solid rgba(112, 210, 255, .2);
  background: rgba(5, 13, 26, .96);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.drawer-links a {
  padding: 12px 14px;
  border-radius: 12px;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

@media (max-width: 900px) {
  .topbar {
    top: 7px;
    width: calc(100% - 20px);
    min-height: 58px;
    margin-top: 7px;
    padding: 8px 14px;
    border-radius: 17px;
  }
}

@media (max-width: 520px) {
  .topbar {
    width: calc(100% - 16px);
    margin-top: 6px;
    padding: 8px 11px;
    border-radius: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar,
  .nav-desktop a,
  .menu-btn,
  .btn.icon,
  .drawer-links a {
    transition: none !important;
  }

  .nav-desktop a:hover {
    transform: none !important;
  }
}

/* UNIFIED PREMIUM CATEGORY PANELS — final visual override */
:root {
  --category-border: rgba(117, 190, 235, .22);
  --category-border-hover: rgba(91, 211, 255, .58);
  --category-surface: rgba(12, 24, 42, .88);
  --category-text-muted: #a9bad0;
}

/* Shared surface for mission, relic, planet and general content cards */
.card,
.relic-card,
.planet-card,
.deep-card-grid .card,
.echoes-grid .echoes-mission-card,
.echoes-mission-card {
  box-sizing: border-box;
  border: 1px solid var(--category-border);
  border-radius: 18px;
  background:
    radial-gradient(
      ellipse at 100% 0%,
      rgba(64, 164, 255, .075),
      transparent 48%
    ),
    linear-gradient(
      145deg,
      rgba(17, 33, 55, .96),
      rgba(8, 17, 32, .94)
    );
  box-shadow:
    0 8px 24px rgba(0, 0, 0, .14),
    inset 0 1px 0 rgba(255, 255, 255, .035);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease,
    background-color 220ms ease;
}

/* Clear hierarchy and comfortable reading */
.card h2,
.card h3,
.relic-card h2,
.relic-card h3,
.planet-card h2,
.planet-card h3,
.deep-card-grid .card h2,
.deep-card-grid .card h3,
.echoes-grid .echoes-mission-card h3 {
  color: #edf6ff;
  line-height: 1.35;
  letter-spacing: -.018em;
}

.card p,
.relic-card p,
.planet-card p,
.deep-card-grid .card p,
.echoes-grid .echoes-mission-card .card-body > p {
  color: var(--category-text-muted);
  line-height: 1.7;
}

/* Consistent internal spacing where card-body exists */
.card .card-body,
.relic-card .card-body,
.planet-card .card-body,
.deep-card-grid .card-body {
  gap: 10px;
}

/* Smooth, restrained interaction */
@media (hover: hover) and (pointer: fine) {
  .card:hover,
  .relic-card:hover,
  .planet-card:hover,
  .deep-card-grid .card:hover,
  .echoes-grid .echoes-mission-card:hover,
  .echoes-mission-card:hover {
    border-color: var(--category-border-hover);
    box-shadow:
      0 14px 34px rgba(0, 0, 0, .23),
      0 0 22px rgba(55, 167, 255, .09),
      inset 0 1px 0 rgba(255, 255, 255, .045);
  }

  .relic-card:hover,
  .planet-card:hover,
  .deep-card-grid .card:hover,
  .echoes-grid .echoes-mission-card:hover {
    transform: translateY(-3px);
  }
}

/* Keep imagery clipped cleanly inside rounded panels */
.relic-card-photo-wrap,
.deep-card-grid .relic-card-photo-wrap,
.echoes-grid .echoes-card-art {
  overflow: hidden;
}

.card:focus-visible,
.relic-card:focus-visible,
.planet-card:focus-visible,
.echoes-mission-card:focus-visible {
  outline: 2px solid #73e5ff;
  outline-offset: 3px;
}

/* Mobile: less cramped, no hover lift */
@media (max-width: 700px) {
  .card,
  .relic-card,
  .planet-card,
  .deep-card-grid .card,
  .echoes-grid .echoes-mission-card,
  .echoes-mission-card {
    border-radius: 15px;
  }

  .card .card-body,
  .relic-card .card-body,
  .planet-card .card-body,
  .deep-card-grid .card-body {
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .relic-card,
  .planet-card,
  .deep-card-grid .card,
  .echoes-grid .echoes-mission-card,
  .echoes-mission-card {
    transition: none !important;
  }

  .relic-card:hover,
  .planet-card:hover,
  .deep-card-grid .card:hover,
  .echoes-grid .echoes-mission-card:hover {
    transform: none !important;
  }
}

/* ===== PREMIUM POLISH PASS 1 ===== */

/* Refined floating glass navigation */
.topbar {
  min-height: 70px;
  border-bottom-color: rgba(112, 224, 255, .19);
  background: rgba(4, 9, 18, .72);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
}

.brand {
  gap: 12px;
  letter-spacing: -.045em;
}

.brand svg {
  filter:
    drop-shadow(0 0 7px rgba(79, 216, 255, .35))
    drop-shadow(0 0 18px rgba(79, 216, 255, .12));
}

.nav-desktop a {
  border-radius: 11px;
  padding: 9px 13px;
  transition:
    background .22s ease,
    color .22s ease,
    border-color .22s ease,
    transform .22s ease;
}

.nav-desktop a:hover {
  transform: translateY(-1px);
  background: rgba(79, 216, 255, .09);
}

/* More balanced cinematic homepage hero */
body[data-layout="scene"] #view > .hero {
  width: min(700px, 64%);
  max-width: 700px;
  padding-top: clamp(28px, 4vh, 46px);
  padding-bottom: 28px;
}

body[data-layout="scene"] .hero h1 {
  max-width: 650px;
  font-size: clamp(3.15rem, 6.1vw, 5.7rem);
  line-height: .99;
  letter-spacing: -.065em;
  text-wrap: balance;
  text-shadow:
    0 3px 24px rgba(0, 0, 0, .28),
    0 0 55px rgba(48, 155, 220, .08);
}

body[data-layout="scene"] .hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: #9beeff;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}

body[data-layout="scene"] .hero .hero-copy {
  max-width: 460px;
  line-height: 1.8;
  text-wrap: pretty;
}

/* Premium but restrained action buttons */
body[data-layout="scene"] .hero-actions .btn {
  min-height: 46px;
  border-radius: 10px;
  font-weight: 650;
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease,
    background .2s ease;
}

body[data-layout="scene"] .hero-actions .btn:hover {
  transform: translateY(-2px);
  border-color: rgba(130, 225, 255, .55);
  box-shadow: 0 9px 26px rgba(0, 0, 0, .2);
}

body[data-layout="scene"] .hero-actions .btn.primary:hover {
  box-shadow: 0 8px 30px rgba(57, 196, 255, .24);
}

/* Clearer homepage statistics */
body[data-layout="scene"] .hero .stats {
  max-width: 570px;
  border-top-color: rgba(130, 204, 240, .23);
}

body[data-layout="scene"] .hero .stats strong {
  font-variant-numeric: tabular-nums;
}

body[data-layout="scene"] .hero .stats span {
  line-height: 1.5;
}

/* Mobile layout: prevent hero content from crowding the 3D scene */
@media (max-width: 700px) {
  .topbar {
    min-height: 62px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  body[data-layout="scene"] #view > .hero {
    width: 100%;
    max-width: 540px;
    margin-top: 26px;
    padding: 22px 0 20px 16px;
  }

  body[data-layout="scene"] .hero h1 {
    max-width: 100%;
    font-size: clamp(2.8rem, 11.5vw, 4.3rem);
    line-height: 1;
  }

  body[data-layout="scene"] .hero .hero-copy {
    max-width: 360px;
    font-size: 13px;
  }

  body[data-layout="scene"] .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  body[data-layout="scene"] .hero-actions .btn {
    max-width: 100%;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-desktop a,
  body[data-layout="scene"] .hero-actions .btn {
    transition: none !important;
  }

  .nav-desktop a:hover,
  body[data-layout="scene"] .hero-actions .btn:hover {
    transform: none !important;
  }
}

/* ===== END PREMIUM POLISH PASS 1 ===== */

/* Premium planet details panel */
body[data-layout="scene"] #view > .detail:not([hidden]) {
  background: linear-gradient(
    145deg,
    rgba(17, 32, 53, .94),
    rgba(9, 19, 35, .91)
  );
  border: 1px solid rgba(111, 218, 255, .3);
  border-radius: 22px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .38),
    inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(111, 218, 255, .35) transparent;
}

body[data-layout="scene"] #view > .detail .detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(153, 207, 238, .16);
}

body[data-layout="scene"] #view > .detail .detail-head h2 {
  margin: 0;
  color: #f1f9ff;
  text-shadow: 0 0 24px rgba(79, 216, 255, .12);
}

body[data-layout="scene"] #view > .detail #d-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  font-size: 20px;
}

body[data-layout="scene"] #view > .detail dl {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 0;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid rgba(137, 177, 207, .15);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
}

body[data-layout="scene"] #view > .detail dt,
body[data-layout="scene"] #view > .detail dd {
  margin: 0;
  padding: 10px 11px;
  border-bottom: 1px solid rgba(137, 177, 207, .11);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

body[data-layout="scene"] #view > .detail dt {
  color: #9bb8ce;
  font-weight: 600;
}

body[data-layout="scene"] #view > .detail dd {
  color: #edf7ff;
}

body[data-layout="scene"] #view > .detail dt:last-of-type,
body[data-layout="scene"] #view > .detail dd:last-of-type {
  border-bottom: 0;
}

body[data-layout="scene"] #view > .detail .fact {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid rgba(79, 216, 255, .2);
  border-radius: 14px;
  background: linear-gradient(
    120deg,
    rgba(31, 143, 184, .13),
    rgba(79, 216, 255, .035)
  );
  color: #dceefa;
}

body[data-layout="scene"] #view > .detail .fact strong {
  display: block;
  margin-bottom: 5px;
  color: #8ee8ff;
}

body[data-layout="scene"] #view > .detail h3 {
  margin: 20px 0 10px;
  color: #8ee8ff;
  font-size: 14px;
}

body[data-layout="scene"] #view > .detail a:not(.btn) {
  color: #8ee8ff;
  text-decoration-color: rgba(142, 232, 255, .4);
  text-underline-offset: 3px;
}

body[data-layout="scene"] #view > .detail a:not(.btn):hover {
  color: #fff;
}

@media (prefers-reduced-motion: no-preference) {
  body[data-layout="scene"] #view > .detail:not([hidden]) {
    animation: detail-panel-enter .24s ease-out both;
  }

  @keyframes detail-panel-enter {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 760px) {
  body[data-layout="scene"] #view > .detail:not([hidden]) {
    max-height: 46vh;
    padding: 16px;
    border-radius: 18px;
  }
}


/* Milky Way explainer map */
#galaxy-explorer { margin-top: 1.25rem; padding: clamp(1rem, 3vw, 2rem); }
.galaxy-map {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 280px; aspect-ratio: 16 / 7; margin: 1rem 0;
  border: 1px solid rgba(155,170,255,.25); border-radius: 1rem;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255,222,165,.95) 0 1%, rgba(255,168,110,.38) 4%, transparent 15%),
    repeating-conic-gradient(from 12deg at 50% 50%, transparent 0deg 11deg, rgba(120,145,255,.12) 13deg 16deg, transparent 19deg 29deg),
    radial-gradient(ellipse at 50% 50%, rgba(105,91,205,.48), rgba(20,25,66,.8) 36%, #03050e 75%);
}
.galaxy-map::before {
  content:""; position:absolute; inset:8% 10%; border-radius:50%;
  background:repeating-radial-gradient(ellipse at 50% 50%, transparent 0 15px, rgba(125,170,255,.13) 18px 22px, transparent 28px 42px);
  transform:rotate(-18deg) scaleY(.56); filter:blur(2px);
}
.galaxy-map::after {
  content:""; position:absolute; inset:0;
  background-image:radial-gradient(#fff 1px,transparent 1.5px),radial-gradient(#a9c8ff 1px,transparent 1.5px);
  background-size:37px 43px,61px 59px; background-position:4px 8px,17px 23px; opacity:.55;
}
.galaxy-core {
  position:absolute; z-index:1; left:50%; top:50%; width:18px; height:18px;
  border-radius:50%; transform:translate(-50%,-50%);
  background:#05030b; border:2px solid #f8c98d;
  box-shadow:0 0 0 6px rgba(255,190,130,.12),0 0 24px 12px rgba(255,150,95,.45);
}
.galaxy-core-label,.galaxy-sun-label {
  position:absolute; z-index:2; padding:.35rem .6rem; border-radius:999px;
  font-size:.8rem; color:#fff; background:rgba(7,10,25,.85);
  border:1px solid rgba(190,205,255,.3);
}
.galaxy-core-label { left:calc(50% + 17px); top:calc(50% - 30px); }
.galaxy-sun-marker {
  position:absolute; z-index:2; left:72%; top:39%; width:11px; height:11px;
  border-radius:50%; background:#ffe46b;
  box-shadow:0 0 0 5px rgba(255,228,107,.15),0 0 20px 7px rgba(255,228,107,.75);
}
.galaxy-sun-label { left:calc(72% - 95px); top:calc(39% + 16px); }
.galaxy-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:1rem; }
.galaxy-facts article { padding:1rem; border:1px solid var(--border,rgba(140,150,180,.3)); border-radius:.8rem; }
.galaxy-facts h3 { margin-top:0; }
@media (max-width:600px) {
  .galaxy-map { min-height:230px; aspect-ratio:1 / 1; }
  .galaxy-sun-marker { left:73%; top:35%; }
  .galaxy-sun-label { left:calc(73% - 95px); top:calc(35% + 16px); }
}\n

/* ── Clean homepage: intentionally independent of the 3D scene ── */
.home-clean {
  width: min(100%, 1120px);
  min-height: 72vh;
  margin-inline: auto;
  padding: clamp(36px, 7vh, 84px) clamp(18px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(42px, 7vh, 76px);
  color: var(--text, #f4f5f7);
}

.home-clean-hero {
  max-width: 790px;
}

.home-clean-eyebrow {
  margin: 0 0 22px;
  color: #91a9c7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
}

.home-clean-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7.2vw, 82px);
  line-height: 1.04;
  letter-spacing: -.055em;
  font-weight: 750;
}

.home-clean-hero h1 span {
  color: #8ab4f8;
}

.home-clean-lead {
  max-width: 590px;
  margin: 24px 0 0;
  color: var(--muted, #a5adba);
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.8;
}

.home-clean-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.home-clean-actions .btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.home-clean-discover {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border, #303743);
  border-bottom: 1px solid var(--border, #303743);
}

.home-clean-card {
  position: relative;
  display: block;
  min-width: 0;
  padding: 24px 24px 28px 0;
  color: inherit;
  text-decoration: none;
  background: transparent;
}

.home-clean-card + .home-clean-card {
  padding-left: 24px;
  border-left: 1px solid var(--border, #303743);
}

.home-clean-number {
  color: #8ab4f8;
  font-size: 11px;
  letter-spacing: .12em;
}

.home-clean-card h2 {
  margin: 22px 0 9px;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 650;
}

.home-clean-card p {
  max-width: 250px;
  margin: 0;
  color: var(--muted, #a5adba);
  font-size: 13px;
  line-height: 1.7;
}

.home-clean-arrow {
  display: inline-block;
  margin-top: 18px;
  color: #8ab4f8;
  transition: transform .18s ease;
}

.home-clean-card:hover .home-clean-arrow {
  transform: translate(3px, -3px);
}

.home-clean-footer {
  margin: -28px 0 0;
  color: var(--muted, #8d96a4);
  font-size: 10px;
  letter-spacing: .18em;
}

@media (max-width: 680px) {
  .home-clean {
    min-height: auto;
    padding-top: 44px;
    padding-bottom: 48px;
    gap: 42px;
  }

  .home-clean-discover {
    grid-template-columns: 1fr;
  }

  .home-clean-card,
  .home-clean-card + .home-clean-card {
    padding: 20px 0;
    border-left: 0;
  }

  .home-clean-card + .home-clean-card {
    border-top: 1px solid var(--border, #303743);
  }

  .home-clean-card h2 {
    margin-top: 12px;
  }

  .home-clean-footer {
    margin-top: -18px;
  }
}

/* ==========================================================
   SPACE RELICS EXPLORER — PREMIUM UI LAYER
   CSS-only: preserve the 3D scene and existing functionality
   ========================================================== */

:root {
  --bg: #060911;
  --panel: rgba(12, 19, 33, 0.91);
  --panel-strong: #101827;
  --border: rgba(153, 184, 220, 0.17);
  --text: #edf5ff;
  --muted: #9baec5;
  --cyan: #70e1ff;
  --blue: #819cff;
  --radius: 20px;
  --shadow: 0 20px 65px rgba(0, 0, 0, 0.34);
}

/* Keep the background atmosphere subtle */
body {
  background:
    radial-gradient(ellipse at 12% 0%, rgba(48, 91, 160, 0.10), transparent 38%),
    radial-gradient(ellipse at 92% 35%, rgba(91, 62, 170, 0.07), transparent 36%),
    var(--bg);
}

/* Premium floating navigation */
.topbar {
  min-height: 76px;
  border-bottom-color: rgba(151, 185, 226, 0.13);
  background: rgba(6, 10, 19, 0.84);
  box-shadow: 0 8px 35px rgba(0, 0, 0, 0.13);
}

.brand {
  gap: 12px;
  font-size: 15px;
  letter-spacing: -0.045em;
}

.brand svg {
  filter:
    drop-shadow(0 0 9px rgba(79, 216, 255, 0.32))
    drop-shadow(0 0 20px rgba(99, 148, 255, 0.13));
}

.nav-desktop {
  gap: 5px;
}

.nav-desktop a,
.drawer-links a {
  border-radius: 12px;
  padding: 10px 13px;
  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"],
.drawer-links a:hover,
.drawer-links a[aria-current="page"] {
  border-color: rgba(112, 225, 255, 0.19);
  background: linear-gradient(
    135deg,
    rgba(79, 216, 255, 0.105),
    rgba(129, 156, 255, 0.075)
  );
  color: #f4f9ff;
}

.nav-desktop a:hover {
  transform: translateY(-1px);
}

/* Consistent page rhythm */
#view {
  width: min(1480px, 100%);
  padding: clamp(20px, 3.6vw, 52px);
}

.page {
  width: 100%;
  animation: sre-enter 360ms ease both;
}

.page-head {
  margin-bottom: 26px;
}

.page-head h1,
.page-head h2 {
  text-wrap: balance;
}

@keyframes sre-enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Shared panel language */
.panel,
.card,
.mission-card,
.mission-empty,
.notice,
.hero.overlay {
  border-color: var(--border);
  border-radius: var(--radius);
}

.panel {
  background: linear-gradient(
    145deg,
    rgba(17, 27, 45, 0.94),
    rgba(9, 15, 27, 0.91)
  );
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.card {
  overflow: hidden;
  background: linear-gradient(
    155deg,
    rgba(19, 30, 49, 0.96),
    rgba(10, 16, 29, 0.96)
  );
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.17);
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    transform 200ms ease;
}

.card:hover {
  border-color: rgba(112, 225, 255, 0.28);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
}

.card-body {
  padding: 20px;
}

/* Better headings and supporting text */
h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.eyebrow,
.mission-kicker {
  color: #8fdfff;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 750;
}

.badge {
  border: 1px solid rgba(112, 225, 255, 0.17);
  border-radius: 999px;
  background: rgba(79, 216, 255, 0.075);
  color: #c7f2ff;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 650;
}

/* Buttons and icon controls */
.btn,
button.btn,
.menu-btn {
  border: 1px solid rgba(155, 184, 221, 0.19);
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    rgba(30, 43, 64, 0.87),
    rgba(16, 25, 41, 0.92)
  );
  color: #eaf3ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.btn:hover:not(:disabled),
button.btn:hover:not(:disabled),
.menu-btn:hover {
  border-color: rgba(112, 225, 255, 0.48);
  background: linear-gradient(
    145deg,
    rgba(37, 58, 83, 0.95),
    rgba(18, 31, 50, 0.96)
  );
  box-shadow: 0 5px 22px rgba(55, 160, 205, 0.09);
}

.btn.primary,
button.primary {
  border-color: rgba(112, 225, 255, 0.38);
  background: linear-gradient(115deg, #167da5, #465dbe);
  color: #fff;
  box-shadow: 0 7px 24px rgba(43, 117, 202, 0.19);
}

.btn.primary:hover,
button.primary:hover {
  background: linear-gradient(115deg, #2094b9, #5a70d5);
  box-shadow: 0 9px 28px rgba(43, 117, 202, 0.27);
}

.btn.icon,
.menu-btn {
  border-radius: 13px;
}

/* Inputs and selection controls */
input,
select,
textarea {
  border: 1px solid rgba(155, 184, 221, 0.19);
  border-radius: 12px;
  background: rgba(5, 10, 19, 0.76);
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(112, 225, 255, 0.27);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(112, 225, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(79, 216, 255, 0.08);
  outline: none;
}

.chip {
  border: 1px solid rgba(155, 184, 221, 0.18);
  border-radius: 999px;
  background: rgba(15, 24, 40, 0.86);
  color: #c4d4e7;
  transition: all 180ms ease;
}

.chip:hover,
.chip.on {
  border-color: rgba(112, 225, 255, 0.46);
  background: rgba(79, 216, 255, 0.11);
  color: #e9faff;
  box-shadow: 0 0 20px rgba(79, 216, 255, 0.055);
}

/* Solar System controls: style the panel only, not the canvas */
.dock,
.detail,
.side,
.mission-info {
  border-color: rgba(155, 184, 221, 0.2);
  background: linear-gradient(
    150deg,
    rgba(12, 20, 34, 0.94),
    rgba(7, 12, 23, 0.91)
  );
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.31),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.detail-head {
  border-bottom-color: var(--border);
}

.kv {
  gap: 10px;
}

.kv > div {
  border: 1px solid rgba(155, 184, 221, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  padding: 11px 13px;
}

/* Moon and Mars landing-site lists */
.site-btn {
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  transition: background 180ms ease, border-color 180ms ease;
}

.site-btn:hover,
.site-btn.on {
  border-color: rgba(112, 225, 255, 0.26);
  background: rgba(79, 216, 255, 0.075);
}

/* Mission archive cards */
.mission-card {
  overflow: hidden;
  background: linear-gradient(
    155deg,
    rgba(17, 27, 45, 0.97),
    rgba(9, 15, 27, 0.97)
  );
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  transition: border-color 200ms ease, transform 200ms ease,
    box-shadow 200ms ease;
}

.mission-card:hover {
  border-color: rgba(112, 225, 255, 0.3);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.27);
  transform: translateY(-3px);
}

.mission-card-content {
  padding: 20px;
}

.mission-photo-wrap,
.relic-card-photo-wrap {
  overflow: hidden;
  background: #0a1220;
}

.mission-photo,
.relic-card-photo {
  transition: transform 350ms ease;
}

.mission-card:hover .mission-photo,
.card:hover .relic-card-photo {
  transform: scale(1.025);
}

.mission-links {
  gap: 8px;
}

.links a,
.footer-links a {
  transition: color 160ms ease;
}

/* Drawer and footer */
.drawer {
  border-left: 1px solid var(--border);
  background: rgba(7, 12, 22, 0.97);
  box-shadow: -20px 0 65px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.drawer-head {
  border-bottom: 1px solid var(--border);
}

.footer {
  border-top-color: var(--border);
}

.footer-links {
  gap: 12px 18px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--cyan);
}

/* Respect accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  .page,
  .card,
  .mission-card,
  .btn,
  button,
  a,
  .mission-photo,
  .relic-card-photo {
    animation: none !important;
    transition: none !important;
  }

  .mission-card:hover,
  .card:hover {
    transform: none;
  }
}

/* Compact navigation and comfortable mobile panels */
@media (max-width: 900px) {
  .topbar {
    gap: 14px;
    min-height: 66px;
    padding: 10px 18px;
  }

  .nav-desktop {
    gap: 2px;
  }

  .nav-desktop a {
    padding: 8px 9px;
    font-size: 12px;
  }

  #view {
    padding: 24px 20px;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 62px;
    padding: 9px 14px;
  }

  .brand {
    font-size: 14px;
    gap: 9px;
  }

  #view {
    padding: 20px 15px 32px;
  }

  .panel,
  .card,
  .mission-card {
    border-radius: 16px;
  }

  .card-body,
  .mission-card-content {
    padding: 16px;
  }

  .hero-actions {
    gap: 9px;
  }

  .hero-actions .btn {
    min-height: 43px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }
}
