:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #101e30;
  --panel2: #14263b;
  --text: #eef5ff;
  --muted: #9aacc2;
  --line: #263b53;
  --accent: #65d6c4;
  --accent2: #8aa9ff;
  --sun: #ffbd63;
  --shadow: 0 18px 60px #0004;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: Manrope, system-ui, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse at 15% 0%, #15345455, transparent 35%), radial-gradient(ellipse at 90% 15%, #2b245044, transparent 32%);
  transition: background-color .25s, color .25s;
}
body.light {
  color-scheme: light;
  --bg: #f3f6fb;
  --panel: #fff;
  --panel2: #edf2f8;
  --text: #14243a;
  --muted: #62738a;
  --line: #d9e2ee;
  --accent: #087e72;
  --accent2: #395fc0;
  --shadow: 0 18px 50px #1d355515;
  background-image: radial-gradient(ellipse at 15% 0%, #d5e8f5, transparent 35%);
}
body.access {
  color-scheme: dark;
  --bg: #000;
  --panel: #101010;
  --panel2: #1d1d1d;
  --text: #fff;
  --muted: #f0e68c;
  --line: #fff;
  --accent: #00ffff;
  --accent2: #ffff00;
  --sun: #ff0;
  --shadow: 0 0 0 1px #fff;
  background-image: none;
}

a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible {
  outline: 3px solid var(--accent2);
  outline-offset: 3px;
}
.mono { font-family: "DM Mono", monospace; }
.muted { color: var(--muted); }
.navbar { background: #07111fe8 !important; backdrop-filter: blur(16px); border-bottom: 1px solid #ffffff16; }
.light .navbar { background: #ffffffdf !important; }
.access .navbar { background: #000 !important; }
.brand { font-weight: 800; letter-spacing: .16em; }
.brand > span:first-child { color: var(--accent); }
.brand small { font-size: .52rem; letter-spacing: .19em; }
.copyright { letter-spacing: 0; }
.hero { padding: 78px 0 42px; }
.eyebrow { color: var(--accent); letter-spacing: .2em; font-size: .72rem; font-weight: 800; }
.hero h1 { font-size: clamp(2.7rem, 7vw, 6.4rem); font-weight: 800; line-height: .98; letter-spacing: -.075em; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { max-width: 650px; color: var(--muted); font-size: 1.05rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.panel-soft { background: var(--panel2); border: 1px solid var(--line); border-radius: 16px; }
.section-kicker { color: var(--accent); font-size: .7rem; font-weight: 800; letter-spacing: .18em; }
.section-title { font-weight: 800; letter-spacing: -.04em; }
.btn-accent { color: #06141d; background: var(--accent); border: 0; font-weight: 800; }
.btn-accent:hover { color: #fff; background: var(--accent2); }
.btn-outline-soft { color: var(--text); border: 1px solid var(--line); }
.btn-outline-soft:hover, .btn-outline-soft.active { color: #06141d; background: var(--accent); border-color: var(--accent); }
.btn-outline-soft:active { color: var(--text) !important; }
.not-found-page { min-height: 100vh; display: flex; flex-direction: column; }
.not-found-page .navbar { flex: 0 0 auto; }
.not-found-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 3rem; padding-bottom: 2rem; }
.not-found-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; min-height: 460px; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(115deg, var(--panel) 0%, var(--panel) 53%, color-mix(in srgb, var(--panel2) 85%, var(--accent) 15%) 100%); box-shadow: var(--shadow); }
.not-found-orbit { position: relative; display: grid; width: min(78%, 330px); aspect-ratio: 1; margin: auto; place-items: center; border: 1px solid #8aa9ff30; border-radius: 50%; }
.not-found-orbit::before, .not-found-orbit::after { position: absolute; inset: 12%; border: 1px solid #65d6c433; border-radius: 50%; content: ""; transform: rotate(-35deg) scaleY(.42); }
.not-found-orbit::after { inset: -2%; border-color: #8aa9ff28; transform: rotate(38deg) scaleY(.36); }
.not-found-planet { position: relative; z-index: 1; width: 76px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #e8ffff 0 3%, #65d6c4 18%, #327f9b 52%, #152944 78%); box-shadow: 0 0 35px #65d6c455, inset -12px -10px 20px #07111f99; }
.not-found-star { position: absolute; z-index: 2; top: 20%; right: 16%; color: var(--sun); font-size: 1.5rem; text-shadow: 0 0 18px #ffbd63aa; }
.not-found-coordinate { position: absolute; bottom: 17%; left: 50%; color: var(--muted); font: .6rem "DM Mono", monospace; letter-spacing: .08em; white-space: nowrap; transform: translateX(-50%); }
.not-found-copy { max-width: 470px; padding: 3rem 3rem 3rem 1rem; }
.not-found-copy h1 { margin: 1rem 0; font-size: clamp(2.8rem, 5vw, 4.7rem); font-weight: 800; line-height: .98; letter-spacing: -.075em; }
.not-found-copy h1 em { color: var(--accent); font-style: normal; }
.not-found-copy p { max-width: 390px; }
.not-found-foot { margin: 1.25rem 0 0; color: var(--muted); font-size: .62rem; letter-spacing: .12em; text-align: center; }
.light .not-found-orbit::before, .light .not-found-orbit::after { border-color: #395fc033; }
.access .not-found-orbit::before, .access .not-found-orbit::after { border-color: var(--accent); }
.orbit-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid #29415d;
  border-radius: 20px;
  background: radial-gradient(circle at center, #182b43 0, #0b1727 48%, #081321 100%);
}
.light .orbit-wrap { background: radial-gradient(circle at center, #e7f0fa 0, #cddbeb 55%, #b9cadc 100%); }
.access .orbit-wrap { background: #080808; }
.light .orbit-hint, .light .orbit-legend { color: #364e68; }
.universe { position: relative; display: grid; min-height: 570px; overflow: hidden; place-items: center; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v18M3 12h18' stroke='%2379e6d5' stroke-width='2'/%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%23ffffff' stroke-width='1'/%3E%3C/svg%3E") 12 12, crosshair; }
.solar-system { position: relative; width: min(96%, 1100px); aspect-ratio: 2.1; max-height: 520px; }
.orbital-bodies { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.orbit { position: absolute; top: 50%; left: 50%; border: 1px solid #c5d5e51d; border-radius: 50%; transform: translate(-50%, -50%); transition: border-color .2s, box-shadow .2s; pointer-events: none; }
.orbit.selected-orbit { border-color: color-mix(in srgb, var(--accent) 72%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 11%, transparent); }
.pos { position: absolute; top: 50%; left: 50%; width: 0; height: 0; }
.planet-marker { position: absolute; top: 0; left: 0; width: 88px; height: 72px; transform: translate(-50%, -50%); pointer-events: none; }
.planet {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: max(30px, var(--planet-size));
  height: max(30px, var(--planet-size));
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: inherit;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}
.planet:focus-visible, .sun:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.planet-surface {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border: 1px solid #ffffff36;
  border-radius: 50%;
  isolation: isolate;
  box-shadow: inset -14px -10px 24px #02071199, 0 0 18px #9dcfff28;
  background-color: var(--planet-base, #4984b7);
}
.planet-surface::before {
  position: absolute;
  z-index: 1;
  inset: -2%;
  border-radius: inherit;
  background: linear-gradient(110deg, #ffffff35 0%, transparent 28%, transparent 43%, #06111b25 72%, #02050c9e 100%);
  content: "";
  pointer-events: none;
}
.planet-surface::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background-image: var(--planet-texture, none);
  background-position: center;
  background-size: 210% 100%;
  animation: planet-rotation var(--rotation-time, 16s) linear infinite;
  content: "";
}
.planet-surface.real-image {
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  animation: none;
  border: 0;
  box-shadow: none;
}
.planet-surface.real-image::after { display: none; }
.planet-surface.real-image::before { display: none; }
.planet-surface.real-image.planet-mercury { background-image: url("../assets/mercury.png"); }
.planet-surface.real-image.planet-venus { background-image: url("../assets/venus.png"); }
.planet-surface.real-image.planet-earth { background-image: url("../assets/earth.png"); }
.planet-surface.real-image.planet-mars { background-image: url("../assets/mars.png"); }
.planet-surface.real-image.planet-jupiter { background-image: url("../assets/jupiter.png"); }
.planet-surface.real-image.planet-saturn { background-image: url("../assets/saturn.png"); }
.planet-surface.real-image.planet-uranus { background-image: url("../assets/uranus.png"); }
.planet-surface.real-image.planet-neptune { background-image: url("../assets/neptune.png"); }
.planet-surface.real-image.planet-sun { background-image: url("../assets/sun.png"); background-size: 112% 112%; }
.planet-mercury { --planet-base: #85847e; --planet-texture: radial-gradient(ellipse at 18% 28%, #cac5b7 0 2%, transparent 3%), radial-gradient(ellipse at 68% 18%, #373834 0 5%, #a7a194 6% 8%, transparent 9%), radial-gradient(ellipse at 49% 63%, #4b4a45 0 7%, #b4ad9e 8% 10%, transparent 11%), radial-gradient(ellipse at 82% 72%, #d2cbbb 0 3%, transparent 4%), radial-gradient(ellipse at 18% 82%, #4d4b46 0 4%, #b1aa9a 5% 7%, transparent 8%), repeating-radial-gradient(ellipse at 40% 40%, transparent 0 12px, #514f4933 13px 15px); }
.planet-venus { --planet-base: #bd8050; --planet-rotation: 28s; --planet-texture: repeating-linear-gradient(166deg, transparent 0 11px, #f8d69b99 12px 17px, #d98e5dcc 18px 22px, transparent 23px 34px), radial-gradient(ellipse at 50% 34%, #ffe1aa 0 5%, transparent 42%); }
.planet-earth { --planet-base: #1264a1; --planet-rotation: 18s; --planet-texture: radial-gradient(ellipse 20% 13% at 25% 31%, #78a954 0 52%, #417c43 70%, transparent 76%), radial-gradient(ellipse 17% 22% at 37% 40%, #6f9c4a 0 56%, #3b7841 73%, transparent 79%), radial-gradient(ellipse 15% 11% at 68% 27%, #78a953 0 51%, #3d7941 72%, transparent 79%), radial-gradient(ellipse 18% 26% at 66% 70%, #679249 0 52%, #39713f 72%, transparent 79%), radial-gradient(ellipse 6% 9% at 80% 47%, #6b984c 0 50%, transparent 75%), radial-gradient(ellipse 39% 9% at 47% 12%, #f4fbf2bf 0 28%, transparent 74%), radial-gradient(ellipse 20% 7% at 80% 75%, #f5faf1aa 0 30%, transparent 75%), radial-gradient(ellipse 34% 8% at 20% 76%, #e8f4edbb 0 28%, transparent 75%); }
.planet-mars { --planet-base: #a64e32; --planet-texture: radial-gradient(ellipse 19% 14% at 23% 27%, #743c30 0 54%, #d0855d 65%, transparent 78%), radial-gradient(ellipse 23% 18% at 68% 34%, #d17a50 0 44%, #773c30 60%, transparent 72%), radial-gradient(ellipse 22% 16% at 48% 74%, #763c30 0 56%, #d1855b 67%, transparent 77%), radial-gradient(ellipse 5% 4% at 30% 63%, #472f29 0 45%, #e2a076 57%, transparent 76%), radial-gradient(ellipse 6% 5% at 78% 79%, #51352d 0 50%, #e0a17a 62%, transparent 76%); }
.planet-jupiter { --planet-base: #bc8a67; --planet-rotation: 30s; --planet-texture: repeating-linear-gradient(0deg, #efd4aa 0 9px, #aa704f 10px 15px, #d9aa80 16px 21px, #8e614e 22px 26px, #e1bf95 27px 37px), radial-gradient(ellipse at 68% 58%, #b34e37 0 8%, #e0a176 9% 12%, transparent 13%); }
.planet-jupiter .planet-surface::after { background-image: radial-gradient(ellipse at 68% 58%, #ad4b35 0 8%, #e1a174 9% 12%, transparent 13%), repeating-linear-gradient(0deg, #efd4aa 0 9px, #aa704f 10px 15px, #d9aa80 16px 21px, #8e614e 22px 26px, #e1bf95 27px 37px); }
.planet-saturn { --planet-base: #c9b17c; --planet-rotation: 36s; --planet-texture: repeating-linear-gradient(0deg, #eddaa9 0 10px, #b49867 11px 15px, #dfca91 16px 24px, #98815b 25px 29px); }
.planet-uranus { --planet-base: #62b9c3; --planet-rotation: 24s; --planet-texture: radial-gradient(ellipse at 35% 30%, #b4e6dc 0 8%, transparent 42%), repeating-linear-gradient(0deg, transparent 0 19px, #338b99aa 20px 23px, transparent 24px 39px); }
.planet-neptune { --planet-base: #2852bf; --planet-rotation: 18s; --planet-texture: radial-gradient(ellipse at 62% 43%, #17377a 0 8%, #83aaff 9% 11%, transparent 12%), repeating-linear-gradient(0deg, transparent 0 17px, #1d3c91aa 18px 22px, transparent 23px 36px); }
.planet-ring {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 174%;
  height: 49%;
  border: 3px solid #d9c99cdd;
  border-left-color: #e7d8b27a;
  border-right-color: #a18b5caa;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-24deg);
  pointer-events: none;
}
.planet-ring.ring-saturn-outer { width: calc(var(--planet-size) * 2.4); height: calc(var(--planet-size) * .68); border-width: 4px; border-color: #e2d0a8f0; box-shadow: 0 0 6px #d9c99caa; }
.planet-ring.ring-saturn-inner { width: calc(var(--planet-size) * 1.8); height: calc(var(--planet-size) * .52); border-width: 3px; border-color: #aa9162dd; }
.planet-ring.ring-uranus { width: calc(var(--planet-size) * 2.3); height: calc(var(--planet-size) * .62); border-width: 2px; border-color: #a8d7d6dd; transform: translate(-50%, -50%) rotate(72deg); }
.planet-ring.ring-jupiter { width: calc(var(--planet-size) * 1.75); height: calc(var(--planet-size) * .62); border-width: 1px; border-color: #d7bd9a88; }
.planet-ring.ring-neptune { width: calc(var(--planet-size) * 2); height: calc(var(--planet-size) * .6); border-width: 1px; border-style: dashed; border-color: #93a6d688; }
.planet-name {
  position: absolute;
  z-index: 4;
  top: calc(50% + 24px);
  left: 50%;
  padding: 1px 5px;
  border: 1px solid #8da7bd55;
  border-radius: 5px;
  color: #f3f8ff;
  background: #071321d9;
  font: 10px "DM Mono", monospace;
  white-space: nowrap;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.planet-marker[data-label-side="left"] .planet-name { top: 50%; left: auto; right: calc(50% + 17px); transform: translateY(-50%); }
.planet-marker[data-label-side="right"] .planet-name { top: 50%; left: calc(50% + 17px); transform: translateY(-50%); }
.planet-marker[data-label-side="top"] .planet-name { top: calc(50% - 23px); }
.planet-marker[data-label-side="bottom"] .planet-name { top: calc(50% + 24px); }
.sun-marker { position: absolute; z-index: 3; top: 50%; left: 50%; width: 82px; height: 70px; transform: translate(-50%, -50%); pointer-events: none; }
.sun {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: clamp(35px, 5vw, 58px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff8cc 0 5%, #ffe57e 15%, #ffad35 42%, #f06c1b 68%, #a93112 100%);
  box-shadow: 0 0 16px 5px #ffae46aa, 0 0 40px 14px #ff8b3266, inset -9px -8px 18px #81270d88;
  cursor: inherit;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
.sun::before { position: absolute; inset: -55%; border-radius: 50%; background: radial-gradient(circle, #ffae4655 0 23%, transparent 70%); content: ""; }
.sun-marker .planet-name { top: calc(50% + 32px); font-size: 11px; }
.sun.real-image {
  background: url("../assets/sun.png") center / 142% 142% no-repeat;
  box-shadow: 0 0 18px 6px #ffae46aa, 0 0 42px 14px #ff8b3299;
}
.sun.real-image::before { display: none; }
.planet.selected-body { outline: none; box-shadow: none; }
.sun.selected-body { box-shadow: 0 0 18px 6px #ffae46aa, 0 0 42px 14px #ff8b3299; }
.orbit-mercury { --planet-size: 16px; }
.orbit-venus { --planet-size: 22px; }
.orbit-earth { --planet-size: 23px; }
.orbit-mars { --planet-size: 19px; }
.orbit-jupiter { --planet-size: 42px; }
.orbit-saturn { --planet-size: 38px; }
.orbit-uranus { --planet-size: 29px; }
.orbit-neptune { --planet-size: 28px; }
.orbit-jupiter { --planet-size: clamp(25px, 4vw, 42px); }
.orbit-saturn { --planet-size: clamp(24px, 3.5vw, 36px); }
.orbit .planet-surface { inset: auto; top: 50%; left: 50%; width: var(--planet-size); height: var(--planet-size); transform: translate(-50%, -50%); }
.moon-orbit { position: absolute; z-index: 1; top: 50%; left: 50%; width: 48px; height: 48px; border: 1px solid #dce8f277; border-radius: 50%; transform: translate(-50%, -50%); animation: moon-orbit 5s linear infinite; }
.moon { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border: 1px solid #ffffffaa; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff 0, #cdd9e7 38%, #67758b 100%); box-shadow: 0 0 7px #cce5ff; transform: translateX(-50%); }
.moon-label { position: absolute; z-index: 4; top: 4px; right: 3px; color: #d7e5f6; font: 8px "DM Mono", monospace; text-shadow: 0 1px 3px #000; }
.planet-visual {
  position: relative;
  flex: 0 0 auto;
  width: min(42%, 190px);
  min-width: 100px;
  aspect-ratio: 1;
  overflow: visible;
  border-radius: 50%;
  isolation: isolate;
  background: none;
  box-shadow: none;
}
.planet-visual .planet-surface { inset: 0; width: 100%; height: 100%; border: 0; box-shadow: none; }
.planet-visual .planet-surface::before { background: linear-gradient(110deg, #ffffff42 0%, transparent 31%, transparent 46%, #06111b24 68%, #02050ca8 100%); }
.planet-visual .planet-surface::after { background-size: 210% 100%; }
.planet-visual .planet-name { display: none; }
.planet-visual .planet-ring { border-width: 9px; }
.planet-visual .planet-ring.ring-saturn { width: 148%; height: 39%; border-width: 9px; }
.planet-visual .planet-ring.ring-uranus { width: 140%; height: 34%; border-width: 3px; border-color: #a8d7d688; }
.planet-visual .planet-ring.ring-jupiter { width: 145%; height: 38%; border-width: 2px; border-color: #d7bd9a88; }
.planet-visual .planet-ring.ring-neptune { width: 150%; height: 40%; border-width: 2px; border-style: dashed; border-color: #93a6d688; }
.planet-visual .planet-sun.planet-surface { width: 100%; height: 100%; background: radial-gradient(circle at 34% 30%, #fff8cc 0 5%, #ffe57e 15%, #ffad35 42%, #f06c1b 68%, #a93112 100%); box-shadow: 0 0 26px #ffae46aa, 0 0 55px #ff8b3299, inset -12px -10px 24px #8e321866; }
.planet-visual .planet-sun.planet-surface::after { background: repeating-linear-gradient(165deg, transparent 0 10px, #fff4 11px 13px, transparent 14px 23px), radial-gradient(ellipse at 63% 34%, #fff1a966 0 12%, transparent 42%); }
.orbit-hint, .orbit-legend { position: absolute; z-index: 1; color: #d7e5f6; font-size: .68rem; pointer-events: none; }
.orbit-hint { top: 16px; left: 18px; }
.orbit-legend { right: 16px; bottom: 14px; text-align: right; }
.orbit-controls { border-radius: 14px; }
.speed-range { width: min(210px, 45vw); }
.form-range { accent-color: var(--accent); }
.stat { padding: 18px; }
.stat .value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.04em; overflow-wrap: anywhere; }
.stat .label { color: var(--muted); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.planet-selector { display: flex; gap: .55rem; overflow-x: auto; padding: 2px 2px 8px; scrollbar-color: var(--accent) var(--panel2); }
.planet-row { display: flex; flex: 0 0 auto; align-items: center; gap: .15rem; min-height: 46px; padding: 10px 12px; color: var(--text); text-align: left; white-space: nowrap; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; transition: transform .2s, border-color .2s; }
.planet-row:hover, .planet-row.active { border-color: var(--accent); transform: translateY(-2px); }
.planet-row.active { box-shadow: 0 0 0 1px var(--accent); }
.planet-dot { display: inline-block; width: 11px; height: 11px; margin-right: 8px; border-radius: 50%; }
.planet-distance { margin-left: 9px; color: var(--muted); font: .68rem "DM Mono", monospace; }
.chartbox { position: relative; height: 270px; }
.cutaway { display: grid; min-height: 300px; place-items: center; overflow: hidden; border-radius: 16px; color: var(--text); background: radial-gradient(circle, #1e3855, #0a1727); }
.light .cutaway { background: radial-gradient(circle, #e7f1fc, #cbd8e8); }
.access .cutaway { background: #080808; }
.cutaway svg { display: block; width: 100%; height: 300px; max-width: 500px; overflow: visible; }
.layer-shape { cursor: pointer; transition: transform .45s cubic-bezier(.2,.8,.2,1), filter .2s; transform-box: fill-box; transform-origin: center; }
.layer-shape:hover, .layer-shape.selected { filter: brightness(1.3) drop-shadow(0 0 5px #fff8); }
.layer-shape:focus-visible { outline: 2px solid var(--accent); }
.layer-list button { width: 100%; margin: 4px 0; text-align: left; }
.layer-list button.active { color: #06141d; background: var(--accent); border-color: var(--accent); }
.form-select, .form-control { color: var(--text); background-color: var(--panel2); border-color: var(--line); }
.form-select:focus, .form-control:focus { color: var(--text); background-color: var(--panel2); border-color: var(--accent); box-shadow: 0 0 0 .2rem #65d6c433; }
.badge-live { color: #79e6d5; background: #143d39; border: 1px solid #2a7168; }
.light .badge-live { color: #075e53; background: #d9f4ed; }
.divider { height: 1px; margin: 18px 0; background: var(--line); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--line); }
.table th { color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.table td { overflow-wrap: anywhere; }
.alert-warning { color: var(--text); background: color-mix(in srgb, #ffbd63 12%, var(--panel)); border-color: #ffbd6380; }
.apod-image { min-height: 220px; max-height: 340px; object-fit: cover; background: var(--panel2); }
.apod-image[hidden] { display: none !important; }
.news-card { border-color: color-mix(in srgb, var(--line) 75%, var(--accent)); }
.news-original { border-left: 2px solid var(--line); padding-left: .7rem; }
.image-card a { color: inherit; text-decoration: none; }
.image-card img { display: block; width: 100%; height: 220px; object-fit: cover; background: var(--panel2); transition: transform .3s ease; }
.image-card a:hover img { transform: scale(1.035); }
.image-card .p-3 { position: relative; }
footer { color: var(--muted); border-top: 1px solid var(--line); }
#apoie[hidden], .support-card[hidden] { display: none !important; }
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr)); gap: 1.5rem; }
.toast-container { z-index: 1080; }
.space-panel[hidden] { display: none !important; }
.space-tabs .active { color: #06141d; background: var(--accent); border-color: var(--accent); }
.horizons-map { min-height: 360px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: radial-gradient(circle at center, #172c45, #07111f 72%); }
.horizons-map svg { display: block; width: 100%; height: auto; min-height: 360px; }
.horizons-map .orbit-track { fill: none; stroke: #9fb6cf2b; stroke-width: 1; }
.horizons-map .orbit-body { stroke: #07111f; stroke-width: 2; cursor: help; }
.horizons-map .orbit-label { fill: #eef5ff; font: 12px "DM Mono", monospace; paint-order: stroke; stroke: #07111f; stroke-width: 4px; stroke-linejoin: round; }
.horizons-map .sun-core { fill: #ffbd63; filter: drop-shadow(0 0 12px #ffbd63aa); }
.horizons-map .orbit-vector { fill: none; stroke: #65d6c488; stroke-width: 1; stroke-dasharray: 4 5; }
.nasa-eyes-frame { overflow: hidden; }
.nasa-eyes-frame iframe { display: block; width: 100%; height: min(72vh, 760px); min-height: 480px; border: 0; border-radius: 14px; background: #07111f; }
.epic-image { display: block; width: 100%; min-height: 130px; max-height: 210px; border-radius: 12px; object-fit: cover; background: var(--panel2); }
.neo-list { display: grid; gap: .55rem; }
.neo-item { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft, var(--panel2)); padding: .8rem; }
.api-value { color: var(--text); font-weight: 700; }
@keyframes planet-rotation { from { background-position: 0 0; } to { background-position: 210% 0; } }
@keyframes moon-orbit { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (max-width: 767px) {
  .not-found-main { padding-top: 2rem; }
  .not-found-panel { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 2rem 1.25rem 2.25rem; }
  .not-found-orbit { width: min(58vw, 220px); margin-bottom: 1.5rem; }
  .not-found-planet { width: 58px; }
  .not-found-copy { padding: .5rem 0 0; text-align: center; }
  .not-found-copy h1 { font-size: clamp(2.7rem, 12vw, 4rem); }
  .not-found-copy p { margin-right: auto; margin-left: auto; }
  .not-found-copy .d-flex { justify-content: center; }
  .hero { padding: 55px 0 28px; }
  .nasa-eyes-frame iframe { height: 70vh; min-height: 420px; }
  .universe { min-height: 420px; }
  .solar-system { width: 100%; aspect-ratio: 1.45; }
  .hero h1 { font-size: 3.5rem; }
  .stat .value { font-size: 1.1rem; }
  .orbit-controls { gap: .55rem !important; }
  .orbit-controls .speed-range { width: 135px; }
  .orbit-controls > span:last-child { width: 100%; margin-left: 0 !important; }
  .orbit-jupiter { --planet-size: 29px; }
  .orbit-saturn { --planet-size: 26px; }
  .orbit .planet-name { font-size: 9px; }
  .planet-row { min-height: 48px; }
  .orbit-hint { max-width: 72%; font-size: .58rem; }
  .orbit-legend { font-size: .58rem; }
  .cutaway, .cutaway svg { min-height: 270px; height: 270px; }
  .table th, .table td { min-width: 95px; }
  .world-data-table-wrap { overflow: visible; }
  .world-data-table,
  .world-data-table tbody { display: block; width: 100%; }
  .world-data-table tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
  }
  .world-data-table tr {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: .7rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel2);
  }
  .world-data-table tr:nth-child(n+3) { grid-column: 1 / -1; }
  .world-data-table th,
  .world-data-table td {
    display: block;
    width: auto;
    min-width: 0 !important;
    padding: .12rem 0;
    border: 0;
    overflow-wrap: anywhere;
  }
  .world-data-table td { font-size: .95rem; }
}
@media (max-width: 380px) {
  .world-data-table tbody { grid-template-columns: minmax(0, 1fr); }
  .world-data-table tr:nth-child(n+3) { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
