@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;750;800&display=swap");
:root {
  font-family: "DM Sans", sans-serif;
  color: #e7ebf1;
  background: #080b10;
  font-synthesis: none;
  --muted: #8b94a3;
  --line: rgba(170, 193, 221, 0.13);
  --blue: #a8ceef;
  --accent: #bbddfa;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button {
  border: 0;
  background: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
}
a {
  color: inherit;
  text-decoration: none;
}
button:hover {
  color: white;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
[hidden] {
  display: none !important;
}
#space {
  position: fixed;
  inset: 0;
  touch-action: none;
}
#space canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      #080b10 0%,
      rgba(8, 11, 16, 0.86) 22%,
      transparent 53%
    ),
    linear-gradient(
      0deg,
      #080b10 3%,
      transparent 27%,
      transparent 80%,
      rgba(8, 11, 16, 0.8)
    );
  z-index: 1;
}
.topbar {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 108px;
  margin: 0 4.4%;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font:
    750 29px "Manrope",
    sans-serif;
  letter-spacing: -1.2px;
}
.brand svg {
  width: 35px;
  height: 35px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.3;
}
.brand svg circle {
  fill: #b6d6ec;
  stroke: none;
}
.brand-dot {
  color: var(--blue);
}
.main-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 20, 28, 0.7);
}
.main-nav button {
  font-size: 14px;
  padding: 11px 23px;
  color: #929dad;
  border-radius: 25px;
  white-space: nowrap;
  transition:
    background 0.25s,
    color 0.25s;
}
.main-nav button.active {
  background: #26303e;
  color: #e8eff8;
}
.main-nav button:hover {
  background: #1b2532;
}
.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 22px;
  border-radius: 50%;
  color: #a9b5c5;
  transition: background 0.2s;
}
.icon-button:hover {
  background: #ffffff10;
}
.info-icon {
  width: 22px;
  height: 22px;
  border: 0;
  display: grid;
  place-items: center;
}
.info-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
.object-info {
  position: absolute;
  z-index: 4;
  top: 25%;
  left: 4.4%;
  width: 410px;
  transition:
    width 0.35s ease,
    padding 0.35s ease,
    background 0.35s ease,
    border-color 0.35s ease;
}
.object-info:not(.expanded) .intro,
.object-info:not(.expanded) .stats,
.object-info:not(.expanded) .object-actions,
.object-info:not(.expanded) .details-close {
  display: none;
}
.object-info.expanded {
  top: 132px;
  width: 390px;
  padding: 28px;
  border: 1px solid rgba(174, 205, 235, 0.16);
  border-radius: 18px;
  background: rgba(11, 16, 23, 0.78);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}
.details-close {
  position: absolute;
  top: 13px;
  right: 16px;
  color: #7f8da0;
  font-size: 24px;
  line-height: 1;
}
h1 {
  font:
    500 clamp(58px, 6.6vw, 108px)/1.1 "Manrope",
    sans-serif;
  letter-spacing: -5px;
  margin: 0 0 22px;
}
h1 span {
  color: var(--blue);
}
.object-info.expanded h1 {
  margin-right: 22px;
  font-size: 48px;
  line-height: 1.04;
  letter-spacing: -3px;
}
.intro {
  font-size: 16px;
  line-height: 1.8;
  max-width: 290px;
  color: #a3adbb;
  margin: 0 0 29px;
}
.object-info.expanded .intro {
  max-width: 320px;
  line-height: 1.65;
  margin-bottom: 24px;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 23px 8px;
  max-width: 340px;
}
.stats > div:first-child {
  border-right: 1px solid var(--line);
  margin-right: 13px;
}
.stats > div:nth-child(2) {
  padding-left: 3px;
}
.stats > div:nth-child(3) {
  grid-column: 1/-1;
}
.stats > div:only-child {
  grid-column: 1/-1;
  border-right: 0;
  margin-right: 0;
}
.stats span {
  display: block;
  font-size: 10px;
  letter-spacing: 1.6px;
  color: #768599;
  margin-bottom: 7px;
}
.stats strong {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.35px;
  white-space: nowrap;
}
.stats small {
  font-size: 13px;
  font-weight: 400;
  color: #96a4b8;
  margin-left: 2px;
}
.object-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-top: 28px;
}
.primary-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: #c3def5;
  color: #182533;
  font-size: 14px;
  font-weight: 550;
  padding: 14px 18px;
  border-radius: 7px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.primary-action:hover {
  color: #101a25;
  background: #e0effd;
  transform: translateY(-2px);
}
.primary-action span {
  font-size: 19px;
}
.text-action {
  color: #9aacc1;
  font-size: 13px;
  padding: 4px 0;
}
.text-action span {
  margin-left: 16px;
  color: #bdd5ee;
}
.view-tools {
  position: absolute;
  z-index: 6;
  right: 3.4%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 3px;
  padding: 7px;
  border: 1px solid rgba(174, 205, 235, 0.14);
  border-radius: 28px;
  background: rgba(11, 16, 23, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(15px);
}
.view-tools .icon-button,
#speed-button {
  width: 40px;
  height: 40px;
}
.view-tools .icon-button.active {
  color: #eef7ff;
  background: #2a394b;
}
.view-tools .control-divider {
  height: 1px;
  background: var(--line);
  width: 24px;
  margin: 6px 0;
}
.compare-toggle {
  font-size: 19px;
}
#play-pause {
  display: grid;
  place-items: center;
}
#play-pause svg {
  width: 13px;
  height: 13px;
  stroke: #b8cadf;
  stroke-width: 1.5;
}
#speed-button {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #b6c9df;
  font-size: 11px;
  transition: background 0.2s;
}
#speed-button:hover {
  background: #ffffff10;
  color: white;
}
.view-menu {
  position: absolute;
  z-index: 6;
  right: calc(3.4% + 64px);
  top: 50%;
  width: 285px;
  padding: 12px;
  border: 1px solid rgba(174, 205, 235, 0.16);
  border-radius: 17px;
  background: rgba(11, 16, 23, 0.86);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translate(12px, -50%) scale(0.97);
  transform-origin: right center;
  transition:
    opacity 0.2s ease,
    transform 0.25s ease;
}
.view-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%) scale(1);
}
.view-menu-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 7px 12px;
}
.view-menu-heading strong {
  font-size: 14px;
  font-weight: 550;
}
.view-menu-heading button {
  color: #7f8da0;
  font-size: 22px;
  line-height: 1;
}
.view-choice {
  width: 100%;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  text-align: left;
  color: #9ca9ba;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.view-choice:hover,
.view-choice.active {
  background: rgba(82, 117, 151, 0.18);
  border-color: rgba(150, 193, 231, 0.16);
}
.choice-mark {
  display: grid;
  place-items: center;
  height: 40px;
  border-radius: 10px;
  background: #121d29;
  color: #b8d9f5;
  font-size: 12px;
  letter-spacing: 1px;
}
.view-choice strong,
.view-choice small {
  display: block;
}
.view-choice strong {
  color: #d9e5f0;
  font-size: 13px;
  font-weight: 550;
}
.view-choice small {
  margin-top: 4px;
  color: #718196;
  font-size: 11px;
}
.scene-label {
  position: absolute;
  left: 76%;
  top: 36%;
  z-index: 2;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  pointer-events: none;
}
.scene-label > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #bfddfb;
  margin-top: 6px;
  box-shadow: 0 0 8px #aaceff70;
}
.scene-label strong {
  font-size: 13px;
  font-weight: 450;
  display: block;
  letter-spacing: 0.2px;
}
.explorer-footer {
  position: absolute;
  bottom: 22px;
  left: 4.4%;
  right: 4.4%;
  z-index: 3;
}
.destinations {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 13px 0 14px;
}
.destination {
  height: 82px;
  border: 1px solid transparent;
  border-radius: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #8b98a9;
  font-size: 12px;
  transition:
    background 0.3s,
    border 0.3s;
}
.destination:hover {
  background: #14202d88;
}
.destination.active {
  background: linear-gradient(160deg, #203247aa, #15203066);
  border-color: #6c94b34d;
  color: #d6eaff;
}
.destination.active:after {
  content: "";
  position: absolute;
  bottom: -14px;
  width: 21px;
  height: 2px;
  background: #acd7f9;
}
.planet-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.loading {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #080b10;
  font-size: 14px;
  color: #a8c0d8;
  transition: opacity 0.7s;
}
.loading.done {
  opacity: 0;
  pointer-events: none;
}
.loading-orbit {
  height: 25px;
  width: 25px;
  border: 1px solid #273f55;
  border-top-color: #badbff;
  border-radius: 50%;
  animation: spin 1.3s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.texture-credit {
  position: fixed;
  z-index: 3;
  left: 4.4%;
  bottom: 7px;
  color: #445164;
  font-size: 9px;
}
.moon-controls {
  position: absolute;
  z-index: 4;
  left: 40%;
  right: 15%;
  bottom: 246px;
  padding: 18px 22px;
  background: #101823d9;
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.phase-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 12px;
}
.phase-top span {
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: #7f93ab;
  font-size: 10px;
}
.phase-top strong {
  font-weight: 500;
  color: #bfdcf5;
}
input[type="range"] {
  width: 100%;
  height: 3px;
  accent-color: #baddf8;
  cursor: pointer;
}
.phase-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
.phase-ticks button {
  font-size: 10px;
  color: #8ca0b7;
  padding: 0;
}
.phase-ticks button:hover {
  color: white;
}
.moon-inset {
  position: absolute;
  z-index: 3;
  right: 6%;
  top: 190px;
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 150px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0c131bcc;
  padding: 8px 10px 17px;
}
#moon-preview {
  width: 100px;
  height: 100px;
}
.moon-inset span {
  font-size: 9px;
  color: #8c9aaf;
  letter-spacing: 1.6px;
  margin: 3px 0 7px;
}
.moon-inset strong {
  font-size: 12px;
  font-weight: 450;
}
.sun-layers {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 265px;
  display: flex;
  border: 1px solid var(--line);
  background: #0c1521;
  border-radius: 25px;
  padding: 4px;
}
.sun-layers button {
  font-size: 12px;
  color: #99acc0;
  padding: 9px 15px;
  border-radius: 20px;
}
.sun-layers button.active {
  background: #543926;
  color: #f9d9ae;
}
.world-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 11px;
  z-index: 2;
  white-space: nowrap;
  color: #a7b6ca;
  pointer-events: none;
  text-shadow: 0 1px 7px #000;
}
.world-label:before {
  content: "";
  display: block;
  width: 1px;
  height: 12px;
  background: #6a89a450;
  margin: 0 auto 6px;
}
.world-hotspot {
  position: absolute;
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.world-hotspot:hover,
.world-hotspot:focus-visible {
  background: rgba(190, 221, 249, 0.1);
  box-shadow: 0 0 0 1px rgba(190, 221, 249, 0.22);
}
body[data-view="system"] .object-info,
body[data-view="galaxy"] .object-info,
body[data-view="compare"] .object-info {
  top: 25%;
}
body[data-view="system"] h1,
body[data-view="galaxy"] h1,
body[data-view="compare"] h1,
body[data-view="moon"] h1 {
  font-size: clamp(45px, 4.8vw, 72px);
  letter-spacing: -3px;
}
body[data-view="compare"] .object-info {
  width: 290px;
}
body[data-view="moon"] .scene-hint {
  display: none;
}
body[data-view="galaxy"] .destinations {
  opacity: 0.65;
}
body[data-view="galaxy"] .scene-label {
  left: 71%;
  top: 49%;
}
@media (min-height: 900px) {
  .object-info {
    top: 29%;
  }
  .intro {
    margin-bottom: 35px;
  }
  .stats {
    gap: 30px 8px;
  }
  .object-actions {
    margin-top: 35px;
  }
  .scene-hint {
    bottom: 240px;
  }
  .destinations {
    padding-top: 19px;
    padding-bottom: 19px;
  }
  .destination {
    height: 103px;
  }
  .planet-thumb {
    width: 55px;
    height: 55px;
  }
  .bottom-bar {
    height: 70px;
  }
}
@media (max-width: 1100px) {
  .object-info {
    width: 260px;
  }
  .intro {
    font-size: 14px;
  }
  .stats strong {
    font-size: 17px;
  }
  .stats span {
    font-size: 9px;
  }
  .topbar {
    height: 94px;
  }
  .scene-hint {
    left: 67%;
    font-size: 10px;
  }
  .quiet-button {
    max-width: 260px;
    font-size: 9px;
  }
  .main-nav button {
    padding: 9px 16px;
  }
  .moon-controls {
    left: 37%;
    right: 12%;
  }
  .time-controls {
    left: 57%;
  }
  .object-actions {
    gap: 10px;
  }
  .primary-action {
    font-size: 13px;
    padding: 12px 15px;
  }
}
@media (max-height: 760px) and (min-width: 761px) {
  .topbar {
    height: 82px;
  }
  .object-info {
    top: 24%;
  }
  h1 {
    font-size: 66px;
    margin: 10px 0 12px;
  }
  .intro {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 18px;
  }
  .stats {
    gap: 15px;
  }
  .stats strong {
    font-size: 17px;
  }
  .stats > div:nth-child(3) {
    display: none;
  }
  .object-actions {
    margin-top: 22px;
  }
  .destinations {
    padding: 8px 0;
  }
  .destination {
    height: 71px;
  }
  .planet-thumb {
    width: 37px;
    height: 37px;
  }
  .bottom-bar {
    height: 48px;
  }
  .scene-hint {
    bottom: 174px;
  }
  .moon-controls {
    bottom: 190px;
  }
  .moon-inset {
    top: 145px;
  }
  .sun-layers {
    bottom: 195px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 78px;
    margin: 0 6%;
  }
  .brand {
    font-size: 24px;
    gap: 8px;
  }
  .brand svg {
    width: 27px;
  }
  .main-nav {
    left: auto;
    right: 0;
    transform: none;
    gap: 0;
    padding: 3px;
  }
  .main-nav button {
    font-size: 10px;
    padding: 8px 10px;
  }
  .topbar > #about-button {
    display: none;
  }
  .object-info {
    top: 145px;
    left: 6%;
    width: 54%;
    pointer-events: none;
  }
  h1 {
    font-size: 54px;
    letter-spacing: -3px;
    margin: 7px 0 13px;
  }
  .intro {
    font-size: 12px;
    line-height: 1.7;
    max-width: 240px;
    margin: 0;
  }
  .stats {
    display: none;
  }
  .object-actions {
    pointer-events: auto;
    margin-top: 20px;
    gap: 8px;
  }
  .primary-action {
    font-size: 11px;
    padding: 10px 12px;
    gap: 15px;
  }
  .text-action {
    font-size: 11px;
  }
  .scene-label {
    display: none;
  }
  .vignette {
    background:
      linear-gradient(0deg, #080b10 2%, transparent 33%),
      linear-gradient(90deg, rgba(8, 11, 16, 0.5), transparent 70%);
  }
  .view-tools {
    right: 3%;
    top: 48%;
    gap: 0;
  }
  .view-tools .icon-button {
    width: 33px;
    height: 33px;
    font-size: 19px;
  }
  .view-tools > span {
    margin: 6px 0;
  }
  .scene-hint {
    bottom: 190px;
    left: 50%;
    font-size: 9px;
    gap: 8px;
  }
  .scene-hint svg {
    width: 13px;
  }
  .explorer-footer {
    left: 6%;
    right: 6%;
  }
  .destinations {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding: 9px 0;
    scrollbar-width: none;
  }
  .destination {
    flex: 0 0 65px;
    height: 73px;
    font-size: 10px;
  }
  .planet-thumb {
    width: 39px;
    height: 39px;
  }
  .destination .index {
    font-size: 7px;
    right: 5px;
    top: 5px;
  }
  .destination.active:after {
    bottom: -10px;
  }
  .bottom-bar {
    height: 60px;
  }
  .bottom-bar > .quiet-button {
    font-size: 8px;
    max-width: 150px;
  }
  .bottom-bar > #home-button {
    display: none;
  }
  .time-controls {
    left: auto;
    right: 0;
    transform: none;
    gap: 8px;
    font-size: 9px;
  }
  #speed-button {
    font-size: 9px;
  }
  #time-label {
    display: none;
  }
  .moon-controls {
    left: 6%;
    right: 6%;
    bottom: 185px;
    padding: 12px;
  }
  .phase-top {
    font-size: 10px;
  }
  .phase-top span {
    font-size: 8px;
  }
  .phase-ticks button {
    font-size: 8px;
  }
  .moon-inset {
    top: 139px;
    right: 6%;
    width: 92px;
    padding: 4px 5px 10px;
  }
  #moon-preview {
    height: 65px;
    width: 65px;
  }
  .moon-inset span {
    font-size: 6px;
    letter-spacing: 0.8px;
  }
  .moon-inset strong {
    font-size: 8px;
  }
  body[data-view="system"] .object-info,
  body[data-view="galaxy"] .object-info,
  body[data-view="compare"] .object-info {
    top: 144px;
    width: 65%;
  }
  body[data-view="system"] h1,
  body[data-view="galaxy"] h1,
  body[data-view="compare"] h1,
  body[data-view="moon"] h1 {
    font-size: 43px;
    letter-spacing: -2px;
  }
  body[data-view="compare"] .scene-hint,
  body[data-view="system"] .scene-hint {
    display: none;
  }
  .sun-layers {
    left: 50%;
    transform: translateX(-50%);
    bottom: 225px;
  }
  .sun-layers button {
    font-size: 10px;
    padding: 8px 11px;
  }
  .world-label {
    font-size: 8px;
  }
  dialog {
    padding: 32px 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
/* Keep the information column inside the space above the destination rail. */
.object-info {
  top: 22%;
}
.intro {
  margin-bottom: 25px;
}
.stats {
  gap: 21px 8px;
}
.object-actions {
  margin-top: 25px;
}
@media (min-height: 900px) {
  .object-info {
    top: 22%;
  }
  .intro {
    margin-bottom: 26px;
  }
  .stats {
    gap: 22px 8px;
  }
  .object-actions {
    margin-top: 26px;
  }
}
@media (max-height: 950px) and (min-width: 761px) {
  .stats > div:nth-child(3) {
    display: none;
  }
  .object-info {
    top: 23%;
  }
}
@media (max-height: 650px) and (min-width: 761px) {
  .object-info {
    top: 25%;
  }
  .stats {
    display: none;
  }
  .object-actions {
    margin-top: 18px;
  }
  .intro {
    font-size: 13px;
    max-width: 280px;
  }
  .object-actions {
    gap: 8px;
  }
  body[data-view="system"] h1,
  body[data-view="galaxy"] h1,
  body[data-view="compare"] h1,
  body[data-view="moon"] h1 {
    font-size: 44px;
  }
  .object-info h1 {
    margin: 8px 0 12px;
  }
  .scene-hint {
    bottom: 175px;
  }
}
@media (max-width: 760px) {
  .object-info {
    top: 145px;
  }
  .intro {
    margin-bottom: 0;
  }
  .object-actions {
    margin-top: 18px;
  }
  .error-state {
    max-width: 80vw;
  }
  #moon-preview canvas {
    max-width: 100%;
    height: auto !important;
  }
}
.error-state {
  max-width: 450px;
  line-height: 1.8;
}
.error-state strong {
  font-size: 22px;
  color: #cbe3f7;
}
.error-state p {
  color: #96acc2;
  font-size: 14px;
}
.stats > div:nth-child(3) {
  display: none;
}
@media (min-width: 761px) {
  body .object-info,
  body[data-view="system"] .object-info,
  body[data-view="galaxy"] .object-info,
  body[data-view="compare"] .object-info {
    top: 22%;
  }
  body[data-view="moon"] .intro,
  body[data-view="system"] .intro,
  body[data-view="galaxy"] .intro {
    line-height: 1.7;
    font-size: 15px;
  }
  body[data-view="moon"] h1,
  body[data-view="system"] h1,
  body[data-view="galaxy"] h1,
  body[data-view="compare"] h1,
  body[data-view="distance"] h1 {
    font-size: 64px;
    letter-spacing: -3px;
  }
  body[data-view="distance"] .object-info {
    top: 22%;
  }
  body[data-view="distance"] .intro {
    font-size: 15px;
    line-height: 1.7;
  }
}
@media (max-height: 760px) and (min-width: 761px) {
  body .object-info,
  body[data-view="system"] .object-info,
  body[data-view="galaxy"] .object-info,
  body[data-view="compare"] .object-info,
  body[data-view="distance"] .object-info {
    top: 25%;
  }
  body[data-view="moon"] h1,
  body[data-view="system"] h1,
  body[data-view="galaxy"] h1,
  body[data-view="compare"] h1,
  body[data-view="distance"] h1 {
    font-size: 44px;
  }
  body[data-view="moon"] .intro,
  body[data-view="system"] .intro,
  body[data-view="galaxy"] .intro,
  body[data-view="distance"] .intro {
    font-size: 13px;
  }
  .stats {
    gap: 12px;
  }
  .object-actions {
    margin-top: 16px;
  }
}
@media (max-height: 650px) and (min-width: 761px) {
  .object-info h1 {
    font-size: 55px;
  }
  .stats {
    display: none;
  }
  .intro {
    max-width: 270px;
  }
  .object-actions {
    margin-top: 12px;
  }
  .object-actions .primary-action {
    padding: 10px 13px;
  }
  .object-actions {
    gap: 6px;
  }
}
@media (max-width: 760px) {
  .object-info {
    width: 84%;
  }
  .intro {
    max-width: 320px;
  }
  .object-actions {
    flex-direction: row;
    gap: 16px;
    align-items: center;
  }
  .primary-action {
    gap: 16px;
  }
  .text-action {
    font-size: 10px;
  }
  .text-action span {
    margin-left: 5px;
  }
  body[data-view="moon"] .object-info {
    width: 64%;
  }
  body[data-view="moon"] .object-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  body[data-view="moon"] .intro {
    max-width: 250px;
  }
  .scene-hint {
    font-size: 8px;
  }
  body[data-view="galaxy"] .object-info,
  body[data-view="system"] .object-info,
  body[data-view="compare"] .object-info,
  body[data-view="distance"] .object-info {
    width: 85%;
  }
  body[data-view="distance"] h1 {
    font-size: 43px;
    letter-spacing: -2px;
  }
  .object-actions .primary-action {
    font-size: 10px;
  }
}
@media (min-width: 761px) {
  body[data-view="galaxy"] .stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  body[data-view="galaxy"] .stats > div:first-child {
    border-right: 0;
  }
  body[data-view="galaxy"] .stats > div:nth-child(2) {
    padding-left: 0;
  }
  .scene-label {
    left: 84%;
    top: 32%;
  }
}

/* Full-screen explorer interface */
.vignette {
  background:
    radial-gradient(circle at center, transparent 54%, rgba(4, 7, 12, 0.34) 100%),
    linear-gradient(180deg, rgba(4, 7, 12, 0.62), transparent 22%, transparent 78%, rgba(4, 7, 12, 0.5));
}

.topbar {
  height: 86px;
  margin: 0 3.2%;
  border-bottom-color: rgba(178, 204, 231, 0.09);
}

.brand {
  font-size: 24px;
}

.brand svg {
  width: 30px;
  height: 30px;
}

.main-nav {
  padding: 4px;
  background: rgba(9, 14, 21, 0.72);
  border-color: rgba(174, 205, 235, 0.12);
  backdrop-filter: blur(14px);
}

.main-nav button {
  padding: 9px 18px;
  font-size: 13px;
}

.object-info,
body .object-info,
body[data-view="system"] .object-info,
body[data-view="galaxy"] .object-info,
body[data-view="compare"] .object-info,
body[data-view="distance"] .object-info {
  position: absolute;
  top: 110px;
  left: 3.2%;
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(174, 205, 235, 0.15);
  border-radius: 20px;
  background: rgba(9, 14, 21, 0.82);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transition:
    opacity 0.2s ease,
    transform 0.25s ease,
    visibility 0.2s;
}

.object-info.expanded {
  top: 110px;
  width: min(390px, calc(100vw - 32px));
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.object-info:not(.expanded) h1 {
  display: none;
}

.object-info.expanded h1,
body[data-view="system"] .object-info.expanded h1,
body[data-view="galaxy"] .object-info.expanded h1,
body[data-view="compare"] .object-info.expanded h1,
body[data-view="distance"] .object-info.expanded h1,
body[data-view="moon"] .object-info.expanded h1 {
  margin: 0 28px 18px 0;
  font-size: 43px;
  line-height: 1.02;
  letter-spacing: -2.5px;
}

.object-info.expanded .intro {
  max-width: none;
  margin: 0 0 22px;
  color: #aeb9c7;
  font-size: 15px;
  line-height: 1.65;
}

.view-tools {
  position: fixed;
  z-index: 8;
  top: auto;
  right: auto;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 3px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 7px;
  border: 1px solid rgba(174, 205, 235, 0.15);
  border-radius: 18px;
  background: rgba(9, 14, 21, 0.78);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(20px);
}

.tool-button,
.view-tools .tool-button,
#speed-button.tool-button {
  display: flex;
  min-width: 76px;
  height: 54px;
  padding: 7px 11px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border-radius: 12px;
  color: #9eabba;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.tool-button.compact,
#speed-button.tool-button.compact {
  min-width: 60px;
}

.tool-button:hover,
.tool-button.active {
  color: #eef6ff;
  background: rgba(128, 170, 209, 0.14);
}

.tool-button:active {
  transform: translateY(1px);
}

.tool-icon {
  display: grid;
  place-items: center;
  min-height: 22px;
  color: #c3d9ee;
  font-size: 19px;
  line-height: 1;
}

.tool-label {
  color: currentColor;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.info-icon {
  width: 22px;
  height: 22px;
  border: 0;
}

.play-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.5;
}

.speed-value {
  font-size: 14px;
  font-weight: 600;
}

.view-tools .control-divider {
  width: 1px;
  height: 32px;
  margin: 11px 5px;
  flex: 0 0 1px;
  background: rgba(174, 205, 235, 0.12);
}

.view-menu {
  position: fixed;
  z-index: 7;
  top: auto;
  right: auto;
  bottom: 96px;
  left: 50%;
  width: 310px;
  transform: translate(-50%, 10px) scale(0.97);
  transform-origin: center bottom;
}

.view-menu.open {
  transform: translate(-50%, 0) scale(1);
}

.view-choice {
  grid-template-columns: 48px 1fr;
}

.moon-controls {
  left: 50%;
  right: auto;
  bottom: 108px;
  width: min(620px, calc(100vw - 32px));
  transform: translateX(-50%);
}

.sun-layers {
  left: 50%;
  bottom: 106px;
  transform: translateX(-50%);
}

.texture-credit {
  left: 14px;
  bottom: 8px;
  z-index: 2;
}

@media (max-width: 920px) {
  .view-tools {
    left: 12px;
    right: 12px;
    max-width: none;
    width: auto;
    transform: none;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .view-tools::-webkit-scrollbar {
    display: none;
  }

  .tool-button,
  .view-tools .tool-button,
  #speed-button.tool-button {
    flex: 0 0 auto;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 72px;
    margin: 0 16px;
  }

  .brand span {
    display: none;
  }

  .main-nav {
    right: 0;
  }

  .main-nav button {
    padding: 8px 11px;
    font-size: 11px;
  }

  .object-info,
  body .object-info,
  body[data-view="system"] .object-info,
  body[data-view="galaxy"] .object-info,
  body[data-view="compare"] .object-info,
  body[data-view="distance"] .object-info,
  .object-info.expanded {
    top: 88px;
    left: 16px;
    width: calc(100vw - 32px);
    max-height: calc(100vh - 190px);
    padding: 22px;
  }

  .object-info.expanded h1,
  body[data-view="system"] .object-info.expanded h1,
  body[data-view="galaxy"] .object-info.expanded h1,
  body[data-view="compare"] .object-info.expanded h1,
  body[data-view="distance"] .object-info.expanded h1,
  body[data-view="moon"] .object-info.expanded h1 {
    font-size: 38px;
  }

  .stats {
    display: grid;
  }

  .view-tools {
    bottom: 12px;
  }

  .tool-button,
  .view-tools .tool-button,
  #speed-button.tool-button {
    min-width: 68px;
    height: 50px;
    padding: 6px 9px;
  }

  .tool-button.compact,
  #speed-button.tool-button.compact {
    min-width: 56px;
  }

  .view-menu {
    bottom: 82px;
    width: min(310px, calc(100vw - 32px));
  }

  .moon-controls {
    bottom: 82px;
  }

  .sun-layers {
    bottom: 80px;
  }

  .moon-inset {
    top: 88px;
  }
}
@media (max-width: 760px) {
  .brand {
    font-size: 22px;
  }
  .main-nav button {
    font-size: 11px;
    padding: 8px;
  }
  .object-actions .primary-action {
    font-size: 12px;
  }
  .text-action {
    font-size: 11px;
  }
  .phase-ticks button {
    font-size: 10px;
  }
  .phase-top {
    font-size: 12px;
  }
  .phase-top span {
    font-size: 9px;
  }
  .moon-inset span {
    font-size: 7px;
  }
  .moon-inset strong {
    font-size: 9px;
  }
  .destination {
    font-size: 11px;
  }
  .scene-hint {
    font-size: 9px;
  }
  .bottom-bar > .quiet-button {
    font-size: 9px;
  }
  .moon-controls {
    bottom: 185px;
  }
}
@media (min-width: 761px) {
  body[data-view="galaxy"] .stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  body[data-view="galaxy"] .stats strong {
    font-size: 17px;
  }
  body[data-view="galaxy"] .stats small {
    font-size: 11px;
  }
  body[data-view="galaxy"] .stats span {
    font-size: 9px;
  }
}
/* Leave room for the lunar interaction at every supported viewport height. */
body[data-view="moon"] .stats {
  display: none;
}

/* Canvas-first explorer layout */
.object-info,
body[data-view="system"] .object-info,
body[data-view="galaxy"] .object-info,
body[data-view="compare"] .object-info,
body[data-view="distance"] .object-info {
  top: 25%;
  width: 410px;
}
.object-info.expanded,
body[data-view="system"] .object-info.expanded,
body[data-view="galaxy"] .object-info.expanded,
body[data-view="compare"] .object-info.expanded,
body[data-view="distance"] .object-info.expanded {
  top: 132px;
  width: 390px;
}
.object-info.expanded h1,
body[data-view="system"] .object-info.expanded h1,
body[data-view="galaxy"] .object-info.expanded h1,
body[data-view="compare"] .object-info.expanded h1,
body[data-view="distance"] .object-info.expanded h1,
body[data-view="moon"] .object-info.expanded h1 {
  margin: 0 22px 20px 0;
  font-size: 48px;
  line-height: 1.04;
  letter-spacing: -3px;
}
.object-info.expanded .stats,
body[data-view="moon"] .object-info.expanded .stats {
  display: grid;
}
.object-info.expanded .stats > div:nth-child(3) {
  display: block;
}
.explorer-footer {
  bottom: 22px;
}
.destination {
  height: 82px;
}
.moon-controls {
  bottom: 150px;
}
.sun-layers {
  bottom: 155px;
}

@media (max-height: 760px) and (min-width: 761px) {
  .object-info.expanded,
  body[data-view="system"] .object-info.expanded,
  body[data-view="galaxy"] .object-info.expanded,
  body[data-view="compare"] .object-info.expanded,
  body[data-view="distance"] .object-info.expanded {
    top: 96px;
    width: 360px;
    max-height: calc(100vh - 205px);
    overflow: auto;
  }
  .object-info.expanded h1,
  body[data-view="system"] .object-info.expanded h1,
  body[data-view="galaxy"] .object-info.expanded h1,
  body[data-view="compare"] .object-info.expanded h1,
  body[data-view="distance"] .object-info.expanded h1,
  body[data-view="moon"] .object-info.expanded h1 {
    font-size: 40px;
  }
  .destination {
    height: 64px;
  }
  .planet-thumb {
    width: 34px;
    height: 34px;
  }
  .moon-controls {
    bottom: 124px;
  }
  .sun-layers {
    bottom: 128px;
  }
}

@media (max-width: 760px) {
  .object-info,
  body[data-view="system"] .object-info,
  body[data-view="galaxy"] .object-info,
  body[data-view="compare"] .object-info,
  body[data-view="distance"] .object-info,
  body[data-view="moon"] .object-info {
    top: 112px;
    left: 6%;
    width: 76%;
  }
  .object-info.expanded,
  body[data-view="system"] .object-info.expanded,
  body[data-view="galaxy"] .object-info.expanded,
  body[data-view="compare"] .object-info.expanded,
  body[data-view="distance"] .object-info.expanded,
  body[data-view="moon"] .object-info.expanded {
    top: 88px;
    left: 4%;
    width: 92%;
    max-height: calc(100vh - 245px);
    padding: 22px;
    overflow: auto;
    pointer-events: auto;
  }
  .object-info.expanded h1,
  body[data-view="system"] .object-info.expanded h1,
  body[data-view="galaxy"] .object-info.expanded h1,
  body[data-view="compare"] .object-info.expanded h1,
  body[data-view="distance"] .object-info.expanded h1,
  body[data-view="moon"] .object-info.expanded h1 {
    font-size: 40px;
  }
  .object-info.expanded .intro {
    max-width: none;
    font-size: 14px;
  }
  .object-info.expanded .stats,
  body[data-view="moon"] .object-info.expanded .stats {
    display: grid;
  }
  .view-tools {
    top: auto;
    right: 50%;
    bottom: 116px;
    flex-direction: row;
    transform: translateX(50%);
    padding: 5px;
    border-radius: 26px;
  }
  .view-tools .icon-button,
  #speed-button {
    width: 32px;
    height: 32px;
  }
  .view-tools .control-divider {
    width: 1px;
    height: 20px;
    margin: 0 3px;
  }
  .view-menu {
    top: auto;
    right: 12px;
    bottom: 169px;
    left: 12px;
    width: auto;
    transform: translateY(10px) scale(0.98);
    transform-origin: bottom center;
  }
  .view-menu.open {
    transform: translateY(0) scale(1);
  }
  .explorer-footer {
    bottom: 10px;
  }
  .destination {
    height: 68px;
  }
  .planet-thumb {
    width: 36px;
    height: 36px;
  }
  .moon-controls {
    bottom: 166px;
  }
  .sun-layers {
    bottom: 165px;
  }
  .texture-credit {
    display: none;
  }
}

/* Final v13 placement overrides */
.object-info,
body .object-info,
body[data-view="system"] .object-info,
body[data-view="galaxy"] .object-info,
body[data-view="compare"] .object-info,
body[data-view="distance"] .object-info,
.object-info.expanded,
body[data-view="system"] .object-info.expanded,
body[data-view="galaxy"] .object-info.expanded,
body[data-view="compare"] .object-info.expanded,
body[data-view="distance"] .object-info.expanded {
  top: 110px;
  width: min(390px, calc(100vw - 32px));
}

body .object-info.expanded,
body[data-view="system"] .object-info.expanded,
body[data-view="galaxy"] .object-info.expanded,
body[data-view="compare"] .object-info.expanded,
body[data-view="distance"] .object-info.expanded,
body[data-view="moon"] .object-info.expanded {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.moon-controls {
  bottom: 108px;
}

.sun-layers {
  bottom: 106px;
}

@media (max-height: 760px) and (min-width: 761px) {
  .object-info.expanded,
  body[data-view="system"] .object-info.expanded,
  body[data-view="galaxy"] .object-info.expanded,
  body[data-view="compare"] .object-info.expanded,
  body[data-view="distance"] .object-info.expanded {
    top: 92px;
    max-height: calc(100vh - 188px);
  }
}

@media (max-width: 760px) {
  .object-info,
  body .object-info,
  body[data-view="system"] .object-info,
  body[data-view="galaxy"] .object-info,
  body[data-view="compare"] .object-info,
  body[data-view="distance"] .object-info,
  body[data-view="moon"] .object-info,
  .object-info.expanded,
  body[data-view="system"] .object-info.expanded,
  body[data-view="galaxy"] .object-info.expanded,
  body[data-view="compare"] .object-info.expanded,
  body[data-view="distance"] .object-info.expanded,
  body[data-view="moon"] .object-info.expanded {
    top: 88px;
    left: 16px;
    width: calc(100vw - 32px);
    max-height: calc(100vh - 174px);
  }

  .view-tools {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    transform: none;
  }

  .view-menu {
    right: 16px;
    bottom: 82px;
    left: 16px;
    width: auto;
    transform: translateY(10px) scale(0.98);
  }

  .view-menu.open {
    transform: translateY(0) scale(1);
  }

  .moon-controls {
    bottom: 82px;
  }

  .sun-layers {
    bottom: 80px;
  }
}
