:root {
  --bg: #05060b;
  --text: #f4f2fa;
  --muted: #a09eaa;
  --line: rgba(221, 216, 255, .12);
  --accent: #c7ff48;
  --mono: "DM Mono", monospace;
  --sans: "Space Grotesk", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: radial-gradient(ellipse at 66% 47%, #171229 0%, #0b0c16 44%, var(--bg) 78%);
  color: var(--text);
  font-family: var(--sans);
  transition: background .45s, color .45s;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.starfield { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: .9; }
.topbar {
  position: relative;
  z-index: 10;
  height: 76px;
  padding: 0 5.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 11, .48);
  backdrop-filter: blur(14px);
}
.wordmark { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
.mark { color: var(--accent); font-size: 22px; }
.wordmark-dot { color: var(--accent); }
.universe-label { display: flex; align-items: center; gap: 10px; color: #a6a3b5; font: 9px var(--mono); letter-spacing: .14em; }
.universe-divider { color: #5d5c6d; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(212, 208, 230, .2);
  background: transparent;
  color: #d5d2df;
  font: 9px var(--mono);
  letter-spacing: .1em;
  cursor: pointer;
  transition: border-color .2s;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-orbit { color: var(--accent); font-size: 15px; }
.galaxy-screen {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: 100%;
  height: calc(100svh - 76px);
  min-height: 690px;
  max-height: 1100px;
  overflow: hidden;
}
.galaxy-screen::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 67% 48%, rgba(94, 66, 152, .1), transparent 52%), linear-gradient(180deg, rgba(5, 6, 11, .04), rgba(5, 6, 11, .2));
  content: "";
}
.nebula { position: fixed; z-index: 0; pointer-events: none; border-radius: 50%; filter: blur(90px); opacity: .18; }
.nebula-one { top: 30vh; right: 3vw; width: 48vw; height: 34vw; background: #6741aa; transform: rotate(-25deg); }
.nebula-two { top: 35vh; right: 33vw; width: 24vw; height: 38vw; background: #17468e; opacity: .12; transform: rotate(38deg); }
.galaxy-heading { position: absolute; z-index: 3; top: 7.2%; left: 7.2%; pointer-events: none; }
.heading-overline { color: #9794a7; font: 9px var(--mono); letter-spacing: .2em; }
.galaxy-heading h1 { margin: 13px 0 12px; font-size: clamp(38px, 5vw, 67px); font-weight: 500; letter-spacing: -.075em; line-height: .98; }
.galaxy-heading h1 span { color: var(--accent); }
.galaxy-heading p { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: .01em; }
.galaxy-map { position: absolute; inset: 0; overflow: hidden; isolation: isolate; }
.galaxy-map::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.85) .7px, transparent 1px), radial-gradient(rgba(171,182,255,.78) .8px, transparent 1.2px), radial-gradient(rgba(246,198,255,.45) 1px, transparent 1.5px);
  background-position: 17px 6px, 52px 29px, 8px 80px;
  background-size: 91px 91px, 153px 153px, 241px 241px;
  content: "";
  opacity: .34;
  pointer-events: none;
}
.cosmic-haze { position: absolute; z-index: -2; top: 10%; left: 32%; width: 68%; height: 80%; border-radius: 50%; background: radial-gradient(ellipse, rgba(71,50,122,.13), rgba(37,43,88,.1) 28%, rgba(18,23,44,.07) 53%, transparent 72%); filter: blur(18px); transform: rotate(-19deg); }
.map-orbit { position: absolute; top: 49%; left: 63%; border: 1px solid rgba(192,180,230,.2); border-radius: 50%; transform: translate(-50%,-50%) rotate(-21deg); pointer-events: none; }
.map-orbit-one { width: 31%; height: 21%; border-color: rgba(217,181,255,.28); }
.map-orbit-two { width: 52%; height: 36%; border-color: rgba(153,188,255,.2); }
.map-orbit-three { width: 76%; height: 54%; border-color: rgba(220,175,255,.17); border-style: dashed; }
.map-orbit-four { width: 99%; height: 71%; border-color: rgba(160,187,246,.13); }
.map-sun {
  position: absolute;
  top: 49%; left: 63%;
  display: grid;
  width: clamp(98px, 12vw, 156px);
  height: clamp(98px, 12vw, 156px);
  padding: 0;
  border: 0;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle at 37% 34%, #fffed2 0%, #ffe69b 8%, #ffae55 21%, #fb704f 38%, #c44883 57%, #6c39a4 75%, #221833 91%);
  box-shadow: 0 0 28px rgba(255,174,90,.58), 0 0 86px rgba(211,93,224,.27), inset -17px -14px 28px rgba(25,9,45,.8);
  transform: translate(-50%,-50%);
  animation: solar-breathe 7s ease-in-out infinite;
  appearance: none;
  cursor: pointer;
}
.map-sun:hover { filter: brightness(1.12); }
.map-sun:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.sun-grain { position: absolute; inset: 0; border-radius: 50%; background: repeating-linear-gradient(165deg, transparent 0 8px, rgba(255,222,161,.16) 9px, transparent 11px 20px); mix-blend-mode: screen; opacity: .35; }
.sun-label { z-index: 1; color: #2a1839; font: 500 12px var(--mono); letter-spacing: .18em; text-shadow: 0 1px 8px rgba(255,250,199,.8); }
.orbit-speck { position: absolute; z-index: 1; width: 5px; height: 5px; border-radius: 50%; background: #e9d5ff; box-shadow: 0 0 14px #c5a5ff; }
.speck-one { top: 39%; left: 50.5%; }
.speck-two { top: 61%; left: 82%; width: 3px; height: 3px; }
.speck-three { top: 27%; left: 39%; background: #b4eaff; box-shadow: 0 0 12px #79bfff; }
.planet {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transform-origin: center;
  transition: filter .3s, transform .3s;
}
.planet:hover, .planet:focus-visible { filter: brightness(1.15); outline: none; transform: scale(1.07); }
.planet:focus-visible .planet-body { outline: 1px solid white; outline-offset: 5px; }
.planet-body { position: relative; display: block; flex: 0 0 auto; width: clamp(63px, 7.2vw, 96px); height: clamp(63px, 7.2vw, 96px); overflow: hidden; border-radius: 50%; isolation: isolate; box-shadow: inset -15px -8px 19px rgba(0,0,0,.72), inset 4px 4px 13px rgba(255,255,255,.28), 0 0 24px rgba(150,147,255,.18); transition: box-shadow .25s; }
.planet-body::before, .planet-body::after { position: absolute; inset: 0; border-radius: 50%; content: ""; pointer-events: none; }
.planet-body::before { z-index: 1; background: linear-gradient(105deg, transparent 37%, rgba(2,3,12,.3) 74%, rgba(0,0,0,.72)); }
.planet-body::after { z-index: 0; background: repeating-radial-gradient(ellipse at 40% 50%, transparent 0 6px, rgba(255,255,255,.09) 7px, transparent 8px 14px); mix-blend-mode: soft-light; opacity: .52; }
.planet.selected .planet-body { box-shadow: inset -15px -8px 19px rgba(0,0,0,.72), inset 4px 4px 13px rgba(255,255,255,.32), 0 0 30px rgba(205,255,113,.48), 0 0 0 1px rgba(214,255,156,.54); }
.planet-ember { background: radial-gradient(ellipse at 30% 24%, #fff2c3 0%, #f7be82 8%, transparent 22%), radial-gradient(ellipse at 63% 70%, #5e2555, transparent 42%), radial-gradient(ellipse at 38% 44%, #f99a5e, #ce5949 34%, #7f344e 66%, #29213a); }
.planet-glow { position: absolute; inset: -15%; border-radius: 50%; background: radial-gradient(ellipse at 26% 29%, rgba(255,246,193,.45), transparent 41%); filter: blur(6px); }
.planet-crater { position: absolute; z-index: 2; border-radius: 50%; background: radial-gradient(circle at 34% 32%, rgba(46,24,43,.08), rgba(46,24,43,.47) 70%, rgba(255,207,148,.28)); box-shadow: inset 2px 2px 4px rgba(34,12,24,.47), 0 0 2px rgba(255,221,181,.4); }
.crater-a { top: 52%; left: 28%; width: 18%; height: 18%; }
.crater-b { top: 33%; left: 60%; width: 10%; height: 10%; }
.planet-nacre { overflow: visible; background: radial-gradient(ellipse at 25% 22%, #d9fbff 0%, #9de4ec 8%, transparent 29%), radial-gradient(ellipse at 36% 44%, #46b8c8, #277dba 39%, #213b82 75%, #172044); }
.planet-cloud { position: absolute; z-index: 2; left: -20%; width: 145%; height: 17%; border-radius: 50%; background: linear-gradient(90deg, transparent, rgba(231,253,246,.72), rgba(212,237,255,.14), transparent); filter: blur(2px); transform: rotate(-24deg); }
.cloud-a { top: 31%; }
.cloud-b { top: 64%; height: 9%; opacity: .65; transform: rotate(17deg); }
.planet-ring { position: absolute; z-index: 3; top: 39%; left: -24%; width: 148%; height: 33%; border: 4px solid rgba(219,220,232,.64); border-right-color: rgba(242,214,190,.55); border-left-color: rgba(160,198,233,.14); border-radius: 50%; box-shadow: 0 0 6px rgba(187,220,255,.43), inset 0 0 3px rgba(255,255,255,.2); transform: rotate(-23deg); }
.planet-vesper { background: radial-gradient(ellipse at 31% 22%, #fff3d1 0%, #f9cf9d 8%, transparent 25%), radial-gradient(ellipse at 50% 45%, #e99c73, #bd6f89 34%, #725a99 68%, #252846); }
.planet-band { position: absolute; z-index: 2; left: -20%; width: 145%; height: 13%; border-radius: 50%; background: rgba(255,226,190,.38); filter: blur(1.5px); transform: rotate(13deg); }
.band-a { top: 28%; height: 9%; }
.band-b { top: 49%; height: 15%; background: rgba(63,41,83,.24); }
.band-c { top: 72%; height: 8%; background: rgba(239,191,172,.36); }
.planet-moss { background: radial-gradient(ellipse at 28% 22%, #e7ffd7 0%, #b5df94 8%, transparent 24%), radial-gradient(ellipse at 48% 50%, #84bb79, #407f77 35%, #344669 66%, #1b2438); }
.planet-land { position: absolute; z-index: 2; border-radius: 48% 52% 57% 43%; background: linear-gradient(135deg, rgba(205,229,133,.77), rgba(70,127,82,.7)); filter: blur(1px); transform: rotate(-28deg); }
.land-a { top: 31%; left: 20%; width: 38%; height: 23%; }
.land-b { top: 58%; left: 55%; width: 24%; height: 17%; transform: rotate(31deg); }
.planet-moon { position: absolute; z-index: 4; top: 4%; right: -3%; width: 22%; height: 22%; border-radius: 50%; background: radial-gradient(circle at 30% 27%, #eef0dc, #8d99a3 55%, #45465a); box-shadow: 0 0 7px rgba(216,229,255,.4); }
.planet-rl { background: radial-gradient(ellipse at 29% 20%, #fff0c2 0%, #ffd07b 7%, transparent 24%), radial-gradient(ellipse at 58% 68%, #b95329, transparent 39%), radial-gradient(ellipse at 42% 42%, #f2a24f, #d55e38 38%, #70354d 72%, #29213a); }
.rl-stadium { position: absolute; z-index: 2; top: 28%; left: -12%; width: 124%; height: 46%; border: 1px solid rgba(255,231,181,.72); border-radius: 50%; background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(255,226,166,.2) 8px 9px, transparent 10px 14px); box-shadow: 0 0 12px rgba(255,181,102,.44), inset 0 0 9px rgba(255,214,160,.22); transform: rotate(-23deg); }
.rl-glint { position: absolute; z-index: 2; top: 21%; left: 26%; width: 20%; height: 9%; border-radius: 50%; background: rgba(255,244,202,.72); filter: blur(3px); transform: rotate(-34deg); }
.planet-caption { display: flex; min-width: 94px; flex-direction: column; gap: 4px; text-shadow: 0 1px 10px #06060c, 0 1px 4px #06060c; }
.planet-index, .planet-state { color: #a7a4b5; font: 8px var(--mono); letter-spacing: .13em; }
.planet-title { font-size: 13px; font-weight: 600; letter-spacing: .11em; }
.planet-state { color: #8c8998; font-size: 8px; letter-spacing: .09em; }
.planet-one { top: 25%; left: 41%; flex-direction: column; gap: 4px; }
.planet-one .planet-body { width: clamp(83px, 9.8vw, 128px); height: clamp(83px, 9.8vw, 128px); }
.planet-one .planet-caption, .planet-two .planet-caption, .planet-three .planet-caption { align-items: center; }
.planet-two { top: 57%; left: 72%; flex-direction: column; gap: 5px; }
.planet-two .planet-body { width: clamp(59px, 6.6vw, 88px); height: clamp(59px, 6.6vw, 88px); }
.planet-three { top: 21%; left: 79%; flex-direction: column; gap: 5px; }
.planet-three .planet-body { width: clamp(102px, 12vw, 155px); height: clamp(102px, 12vw, 155px); }
.planet-four { top: 66%; left: 40%; flex-direction: row-reverse; }
.planet-four .planet-body { width: clamp(68px, 8vw, 105px); height: clamp(68px, 8vw, 105px); }
.planet-four .planet-caption { align-items: flex-end; }
.planet-five { top: 43%; left: 13%; flex-direction: column; gap: 5px; }
.planet-five .planet-body { width: clamp(73px, 8.4vw, 110px); height: clamp(73px, 8.4vw, 110px); }
.planet-five .planet-caption { align-items: center; }
.map-coordinate { position: absolute; z-index: 2; bottom: 22px; color: #777587; font: 8px var(--mono); letter-spacing: .13em; }
.coordinate-left { left: 7.2%; }
.coordinate-right { right: 5.2%; }
.planet-info { position: absolute; z-index: 5; top: 50%; right: 5.2%; width: min(330px, 26vw); padding: 24px; border: 1px solid rgba(221,216,255,.18); background: rgba(9,10,20,.78); box-shadow: 0 20px 80px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.04); backdrop-filter: blur(16px); opacity: 0; transform: translate(24px,-50%); transition: opacity .38s ease, transform .38s ease, visibility .38s; visibility: hidden; }
.planet-info.is-visible { opacity: 1; transform: translate(0,-50%); visibility: visible; }
.map-return { display: block; margin: 0 0 28px; padding: 0; border: 0; background: none; color: #918da1; font: 8px var(--mono); letter-spacing: .13em; cursor: pointer; }
.map-return:hover { color: var(--accent); }
.info-index { color: var(--accent); font: 8px var(--mono); letter-spacing: .16em; }
.planet-info h2 { margin: 12px 0 10px; font-size: clamp(31px, 4vw, 48px); font-weight: 500; letter-spacing: -.07em; line-height: 1; }
.planet-info p { max-width: 265px; margin: 0 0 17px; color: #aaa8b5; font-size: 12px; line-height: 1.65; }
.planet-launch { display: flex; width: 100%; max-width: 240px; min-width: 0; height: 44px; align-items: center; justify-content: space-between; padding: 0 13px; border: 1px solid rgba(217,255,143,.5); background: rgba(172,220,81,.12); color: #e3ffb5; font: 9px var(--mono); letter-spacing: .14em; transition: background .2s, border-color .2s; }
.planet-launch:hover { border-color: var(--accent); background: rgba(172,220,81,.24); }
.planet-launch.is-unavailable { border-color: rgba(160,156,179,.23); background: rgba(27,27,38,.4); color: #777583; pointer-events: none; }
.launch-arrow { font-size: 17px; }
.info-foot { display: block; margin-top: 13px; color: #747282; font: 8px var(--mono); letter-spacing: .12em; }
.map-legend { position: absolute; z-index: 5; right: 5.2%; bottom: 26px; display: flex; gap: 18px; color: #878494; font: 8px var(--mono); letter-spacing: .09em; }
.map-legend > span { display: flex; align-items: center; gap: 7px; }
.legend-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; }
.legend-live { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.legend-new { background: #8c8a9c; }
.screen-footer { position: absolute; z-index: 5; right: 5.2%; bottom: 57px; left: 7.2%; display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid rgba(199,195,220,.12); color: #777585; font: 8px var(--mono); letter-spacing: .13em; }
.footer-star { padding: 0 5px; color: var(--accent); }
.flight-streaks { position: fixed; z-index: 8; inset: 0; overflow: hidden; pointer-events: none; }
.flight-streaks::before { position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at var(--streak-x,50%) var(--streak-y,50%), transparent 0deg 5.5deg, rgba(176,193,255,.24) 5.8deg 6deg, transparent 6.3deg 12deg); content: ""; mask-image: radial-gradient(ellipse at var(--streak-x,50%) var(--streak-y,50%), transparent 8%, #000 34%, transparent 70%); animation: forward-streaks 850ms cubic-bezier(.15,.65,.25,1) both; }
.flight-running .galaxy-map { will-change: transform; }
.flight-running .planet { pointer-events: none; }

body.theme-day { --bg: #efedf2; --text: #1c1924; color-scheme: light; background: radial-gradient(ellipse at 66% 47%, #d4cee7 0%, #e5e3ed 48%, #efedf2 85%); }
body.theme-day .topbar { border-bottom-color: rgba(43,34,63,.12); background: rgba(238,236,242,.62); }
body.theme-day .universe-label, body.theme-day .galaxy-heading p, body.theme-day .planet-info p { color: #625d6d; }
body.theme-day .planet-caption { text-shadow: 0 1px 8px #eeedf2, 0 1px 3px #eeedf2; }
body.theme-day .planet-title { color: #25212d; }
body.theme-day .planet-index, body.theme-day .planet-state, body.theme-day .screen-footer, body.theme-day .map-legend, body.theme-day .map-coordinate { color: #625d6d; }
body.theme-day .planet-launch { border-color: rgba(90,124,34,.5); background: rgba(172,220,81,.18); color: #394c19; }

@keyframes solar-breathe {
  0%, 100% { filter: brightness(1); transform: translate(-50%,-50%) scale(1); }
  50% { filter: brightness(1.12); transform: translate(-50%,-50%) scale(1.035); }
}
@keyframes forward-streaks { from { transform: scale(.55) rotate(0deg); opacity: 0; } 28% { opacity: .75; } to { transform: scale(1.2) rotate(15deg); opacity: 0; } }

@media (max-width: 760px) {
  .topbar { height: 68px; padding: 0 5%; }
  .wordmark { gap: 6px; font-size: 11px; }
  .wordmark .mark { font-size: 19px; }
  .universe-label { gap: 5px; font-size: 7px; }
  .theme-toggle { padding: 8px; font-size: 8px; }
  .galaxy-screen { height: calc(100svh - 68px); min-height: 690px; }
  .galaxy-heading { top: 5%; left: 6%; }
  .galaxy-heading h1 { font-size: 47px; }
  .galaxy-heading p { font-size: 11px; }
  .map-sun, .map-orbit { top: 45%; left: 58%; }
  .map-sun { width: 94px; height: 94px; }
  .map-orbit-one { width: 55%; height: 25%; }
  .map-orbit-two { width: 82%; height: 44%; }
  .map-orbit-three { width: 112%; height: 66%; }
  .map-orbit-four { width: 142%; height: 83%; }
  .planet-one { top: 21%; left: 34%; }
  .planet-two { top: 52%; left: 70%; }
  .planet-three { top: 20%; left: 72%; }
  .planet-four { top: 58%; left: 32%; }
  .planet-five { top: 41%; left: 7%; }
  .planet-info { top: 50%; right: 4%; width: 38vw; padding: 18px; }
  .planet-info h2 { font-size: 34px; }
  .planet-info p { font-size: 11px; }
  .planet-launch { min-width: 100%; height: 40px; font-size: 8px; }
  .map-return { margin-bottom: 20px; }
  .screen-footer { right: 6%; bottom: 47px; left: 6%; font-size: 7px; }
  .map-coordinate { bottom: 17px; font-size: 7px; }
  .map-legend { right: 6%; bottom: 17px; gap: 9px; font-size: 7px; }
}
@media (max-width: 500px) {
  .topbar { height: 61px; }
  .universe-label { display: none; }
  .galaxy-screen { height: calc(100svh - 61px); min-height: 730px; }
  .galaxy-heading { top: 4.3%; }
  .galaxy-heading h1 { margin: 9px 0; font-size: 41px; }
  .galaxy-heading p { max-width: 250px; }
  .map-sun, .map-orbit { top: 42%; left: 57%; }
  .map-sun { width: 75px; height: 75px; }
  .map-orbit-one { width: 66%; height: 27%; }
  .map-orbit-two { width: 103%; height: 47%; }
  .map-orbit-three { width: 139%; height: 69%; }
  .map-orbit-four { width: 178%; height: 91%; }
  .planet-one { top: 18%; left: 31%; }
  .planet-one .planet-body { width: 79px; height: 79px; }
  .planet-two { top: 44%; left: 65%; }
  .planet-three { top: 15%; left: 67%; }
  .planet-three .planet-body { width: 91px; height: 91px; }
  .planet-four { top: 54%; left: 25%; }
  .planet-four .planet-body { width: 61px; height: 61px; }
  .planet-five { top: 38%; left: 3%; }
  .planet-five .planet-body { width: 66px; height: 66px; }
  .planet-two .planet-body { width: 56px; height: 56px; }
  .planet-caption { min-width: 0; gap: 3px; }
  .planet-title { font-size: 10px; }
  .planet-index, .planet-state { font-size: 6px; }
  .planet-info { top: 50%; right: 3%; width: 43vw; padding: 12px; }
  .planet-info h2 { margin: 8px 0; font-size: 25px; }
  .planet-info p { max-width: 230px; margin-bottom: 12px; font-size: 9px; }
  .planet-launch { min-width: 100%; height: 36px; padding: 0 8px; font-size: 7px; }
  .map-return { margin-bottom: 17px; font-size: 7px; }
  .info-foot { font-size: 6px; }
  .map-legend { right: auto; bottom: 50px; left: 6%; gap: 13px; }
  .screen-footer { bottom: 30px; padding-top: 9px; font-size: 6px; }
  .map-coordinate { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
