:root {
  color-scheme: dark;
  --bg: #02040a;
  --panel: rgba(7, 12, 25, 0.7);
  --panel-strong: rgba(4, 8, 18, 0.93);
  --line: rgba(196, 222, 255, 0.15);
  --text: #f5f8ff;
  --muted: #a7b5ca;
  --blue: #70c8ff;
  --violet: #aa8bff;
  --success: #75f0b0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(94, 42, 8, 0.12), transparent 24%),
    radial-gradient(circle at 70% 38%, rgba(28, 78, 132, 0.1), transparent 35%),
    var(--bg);
  color: var(--text);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

#app {
  position: fixed;
  inset: 0;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.glass {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar {
  position: fixed;
  z-index: 24;
  top: 18px;
  right: 18px;
  left: 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 62px;
  padding: 10px 12px 10px 14px;
  border-radius: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.08em;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(126, 206, 255, 0.35);
  border-radius: 50%;
  background:
    radial-gradient(circle at 66% 30%, rgba(255, 255, 255, 0.85) 0 2%, transparent 3%),
    radial-gradient(circle at 36% 62%, #2aa9ef 0 14%, #114a8d 38%, #09152b 68%, #030712 100%);
  box-shadow: 0 0 28px rgba(73, 176, 255, 0.22);
  font-weight: 800;
}

.brand-mark::after {
  position: absolute;
  width: 50px;
  height: 15px;
  border: 1px solid rgba(192, 222, 255, 0.42);
  border-radius: 50%;
  content: "";
  transform: rotate(-22deg);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.88rem;
  line-height: 1.1;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}

.mission-badge {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.57rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.mission-badge strong {
  color: var(--text);
  font-size: 0.68rem;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.idle-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(166, 181, 204, 0.68);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.idle-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(117, 240, 176, 0.7);
  content: "";
}

.idle-status.is-interacting {
  color: rgba(166, 181, 204, 0.5);
}

.idle-status.is-interacting::before {
  background: #9fb0c5;
  box-shadow: none;
}

.icon-button,
.connect-phone-button,
.projector-button,
.observation-light-button,
.label-mode-button,
.primary-button,
.secondary-button,
.panel-action-button,
.destination-nav button,
.mobile-info-button,
.exit-projector-button {
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

.icon-button:hover,
.connect-phone-button:hover,
.projector-button:hover,
.observation-light-button:hover,
.label-mode-button:hover,
.primary-button:hover,
.secondary-button:hover,
.panel-action-button:hover,
.destination-nav button:hover,
.exit-projector-button:hover {
  transform: translateY(-1px);
  border-color: rgba(154, 215, 255, 0.46);
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.icon-button.is-active {
  background: rgba(112, 200, 255, 0.13);
}

.connect-phone-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 12px 0 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.connect-phone-button[data-status="waiting"] {
  border-color: rgba(112, 200, 255, 0.38);
  background: rgba(112, 200, 255, 0.08);
}

.connect-phone-button[data-status="connected"] {
  border-color: rgba(117, 240, 176, 0.48);
  background: rgba(117, 240, 176, 0.09);
  box-shadow: 0 0 24px rgba(117, 240, 176, 0.08);
}

.connect-phone-button[data-status="error"] {
  border-color: rgba(255, 132, 132, 0.42);
  background: rgba(255, 105, 105, 0.08);
}

.connect-phone-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  background: rgba(112, 200, 255, 0.1);
  color: #b8e6ff;
  font-size: 1rem;
  line-height: 1;
}

.connect-phone-copy {
  display: grid;
  justify-items: start;
  gap: 1px;
  line-height: 1;
}

.connect-phone-copy small {
  color: var(--muted);
  font-size: 0.47rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.connect-phone-copy strong {
  color: var(--text);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

.connect-phone-button > i {
  width: 6px;
  height: 6px;
  margin-left: 1px;
  border-radius: 50%;
  background: #8290a3;
  box-shadow: none;
}

.connect-phone-button[data-status="waiting"] > i {
  background: var(--blue);
  box-shadow: 0 0 10px rgba(112, 200, 255, 0.7);
  animation: pairingBlink 1.3s ease-in-out infinite;
}

.connect-phone-button[data-status="connected"] > i {
  background: var(--success);
  box-shadow: 0 0 11px rgba(117, 240, 176, 0.8);
}

.connect-phone-button[data-status="error"] > i {
  background: #ff8585;
  box-shadow: 0 0 10px rgba(255, 112, 112, 0.65);
}

.projector-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(35, 140, 217, 0.2), rgba(133, 83, 211, 0.16));
  font-size: 0.78rem;
  font-weight: 700;
}

.observation-light-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 12px 0 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.observation-light-button[data-level="soft"] {
  border-color: rgba(255, 217, 143, 0.36);
  background: rgba(255, 197, 97, 0.075);
}

.observation-light-button[data-level="bright"] {
  border-color: rgba(255, 230, 172, 0.62);
  background: rgba(255, 211, 126, 0.14);
  box-shadow: 0 0 25px rgba(255, 196, 84, 0.11);
}

.observation-light-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: rgba(154, 173, 199, 0.1);
  color: #aeb9c8;
  font-size: 1rem;
  transition:
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.observation-light-button[data-level="soft"] .observation-light-icon {
  background: rgba(255, 197, 97, 0.12);
  color: #ffd793;
  box-shadow: 0 0 14px rgba(255, 197, 97, 0.14);
}

.observation-light-button[data-level="bright"] .observation-light-icon {
  background: rgba(255, 220, 147, 0.22);
  color: #fff0c7;
  box-shadow: 0 0 20px rgba(255, 211, 126, 0.28);
}

.observation-light-copy {
  display: grid;
  justify-items: start;
  gap: 1px;
  line-height: 1;
}

.observation-light-copy small {
  color: var(--muted);
  font-size: 0.47rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.observation-light-copy strong {
  color: var(--text);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

.label-mode-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 12px 0 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.label-mode-button[data-mode="auto"] {
  border-color: rgba(112, 200, 255, 0.3);
  background: rgba(112, 200, 255, 0.07);
}

.label-mode-button[data-mode="all"] {
  border-color: rgba(170, 139, 255, 0.42);
  background: rgba(170, 139, 255, 0.1);
}

.label-mode-button[data-mode="off"] {
  opacity: 0.72;
}

.label-mode-icon {
  display: grid;
  min-width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  background: rgba(112, 200, 255, 0.1);
  color: #b8e6ff;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.label-mode-button[data-mode="all"] .label-mode-icon {
  background: rgba(170, 139, 255, 0.14);
  color: #d8caff;
}

.label-mode-button[data-mode="off"] .label-mode-icon {
  background: rgba(154, 173, 199, 0.08);
  color: #8492a5;
}

.label-mode-copy {
  display: grid;
  justify-items: start;
  gap: 1px;
  line-height: 1;
}

.label-mode-copy small {
  color: var(--muted);
  font-size: 0.47rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.label-mode-copy strong {
  color: var(--text);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

.exit-projector-button {
  position: fixed;
  z-index: 80;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.72rem;
  font-weight: 760;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

body.projector-mode .exit-projector-button {
  opacity: 0.78;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-panel {
  position: fixed;
  z-index: 10;
  top: 50%;
  left: clamp(22px, 5vw, 84px);
  width: min(610px, 50vw);
  transform: translateY(-43%);
  transition: opacity 600ms ease, transform 600ms ease;
}

.hero-panel.is-hidden {
  pointer-events: none;
  opacity: 0;
  transform: translate(-28px, -43%);
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-panel h1 {
  max-width: 780px;
  margin: 16px 0 20px;
  font-size: clamp(3rem, 6vw, 6.8rem);
  font-weight: 650;
  letter-spacing: -0.062em;
  line-height: 0.9;
  text-wrap: balance;
  text-shadow: 0 20px 70px rgba(0, 0, 0, 0.58);
}

.hero-copy {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.18vw, 1.1rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.primary-button,
.secondary-button,
.panel-action-button {
  min-height: 48px;
  padding: 0 19px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 760;
}

.primary-button,
.panel-action-button {
  border-color: rgba(122, 211, 255, 0.45);
  background: linear-gradient(135deg, #168fd2, #6552d8);
  box-shadow: 0 15px 45px rgba(33, 137, 213, 0.24);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.04);
}

.object-panel {
  position: fixed;
  z-index: 18;
  right: 22px;
  bottom: 88px;
  width: min(405px, calc(100vw - 44px));
  padding: 18px;
  border-radius: 20px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 450ms ease, transform 450ms ease;
}

.object-panel.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-close-button {
  display: none;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.panel-heading h2 {
  margin: 5px 0 0;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 1px;
  padding: 7px 9px;
  border: 1px solid rgba(117, 240, 176, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(117, 240, 176, 0.055);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  white-space: nowrap;
}

.status-pill i,
.simulation-note i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(117, 240, 176, 0.9);
}

.panel-copy {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}

.facts div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(196, 222, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.026);
}

.facts dt {
  color: var(--muted);
  font-size: 0.64rem;
}

.facts dd {
  margin: 4px 0 0;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 720;
  text-overflow: ellipsis;
}

.panel-action-button {
  width: 100%;
  min-height: 46px;
}

.source-note {
  margin: 13px 0 0;
  color: rgba(177, 193, 218, 0.66);
  font-size: 0.6rem;
  line-height: 1.5;
}

.destination-nav {
  position: fixed;
  z-index: 20;
  bottom: 18px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 3px;
  max-width: calc(100vw - 36px);
  padding: 6px;
  overflow-x: auto;
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, 15px);
  pointer-events: none;
  scrollbar-width: none;
  transition: opacity 350ms ease, transform 350ms ease;
}

.destination-nav::-webkit-scrollbar {
  display: none;
}

.destination-nav.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.destination-nav button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 11px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 760;
}

.destination-nav button.is-active {
  color: var(--text);
  background: rgba(112, 200, 255, 0.1);
}

.destination-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.sun-dot {
  background: #ffc55f;
  box-shadow: 0 0 12px rgba(255, 171, 50, 0.8);
}

.mercury-dot {
  background: #a29b91;
}

.venus-dot {
  background: #dbad62;
}

.earth-dot {
  background: #3a98e4;
  box-shadow: 0 0 10px rgba(58, 152, 228, 0.65);
}

.moon-dot {
  background: #ddd9d0;
}

.mars-dot {
  background: #c45f3c;
}

.ceres-dot {
  background: #9d968d;
  box-shadow: 0 0 8px rgba(157, 150, 141, 0.32);
}

.jupiter-dot {
  background: #d59a65;
  box-shadow: 0 0 11px rgba(213, 154, 101, 0.55);
}

.io-dot {
  background: #e2c34f;
}

.europa-dot {
  background: #d8d2bd;
}

.ganymede-dot {
  background: #9c8b76;
}

.callisto-dot {
  background: #625b57;
}

.saturn-dot {
  background: #e2c58d;
  box-shadow: 0 0 11px rgba(226, 197, 141, 0.48);
}

.enceladus-dot {
  background: #eef5f7;
  box-shadow: 0 0 8px rgba(238, 245, 247, 0.38);
}

.titan-dot {
  background: #cc9140;
  box-shadow: 0 0 8px rgba(204, 145, 64, 0.4);
}

.uranus-dot {
  background: #8bd8df;
  box-shadow: 0 0 10px rgba(139, 216, 223, 0.5);
}

.miranda-dot {
  background: #b8bab7;
}

.neptune-dot {
  background: #3e6ee8;
  box-shadow: 0 0 11px rgba(62, 110, 232, 0.58);
}

.triton-dot {
  background: #d2bcb5;
  box-shadow: 0 0 8px rgba(210, 188, 181, 0.35);
}

.pluto-dot {
  background: #b69277;
  box-shadow: 0 0 9px rgba(182, 146, 119, 0.38);
}

.charon-dot {
  background: #77716d;
}

.overview-dot {
  border: 1px solid rgba(160, 208, 255, 0.68);
  background: rgba(160, 208, 255, 0.12);
}

.journey-hud {
  position: fixed;
  z-index: 25;
  bottom: 18px;
  left: 50%;
  width: min(530px, calc(100vw - 32px));
  padding: 13px 15px;
  border-radius: 16px;
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms ease;
}

.journey-hud.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.journey-heading,
.journey-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.journey-heading {
  font-size: 0.73rem;
  font-weight: 760;
}

.journey-heading strong {
  color: var(--blue);
}

.journey-track {
  height: 4px;
  margin: 10px 0 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.journey-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffc55f, #7d72e3, #70c8ff);
  box-shadow: 0 0 18px rgba(112, 200, 255, 0.5);
}

.journey-readout {
  color: var(--muted);
  font-size: 0.61rem;
}

.navigation-hint {
  position: fixed;
  z-index: 12;
  top: 96px;
  left: 50%;
  display: flex;
  gap: 15px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.62rem;
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
  transition: opacity 400ms ease, transform 400ms ease;
}

.navigation-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.overview-labels {
  position: fixed;
  z-index: 13;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.overview-labels.is-visible {
  opacity: 1;
}

.world-label {
  --label-scale: 1;
  --label-opacity: 1;
  position: absolute;
  padding: 5px 8px;
  border: 1px solid rgba(190, 220, 255, 0.16);
  border-radius: 999px;
  background: rgba(3, 8, 18, 0.68);
  color: var(--text);
  cursor: zoom-in;
  font-size: 0.54rem;
  font-weight: 820;
  letter-spacing: 0.1em;
  opacity: var(--label-opacity);
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.82);
  white-space: nowrap;
  transform: translate(-50%, -50%) scale(var(--label-scale));
  transform-origin: center;
  pointer-events: auto;
  transition:
    opacity 150ms ease,
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.world-label[data-tier="primary"] {
  border-color: rgba(190, 220, 255, 0.2);
}

.world-label[data-tier="secondary"] {
  color: rgba(236, 243, 255, 0.9);
}

.world-label[data-tier="local"] {
  color: rgba(214, 226, 242, 0.84);
  font-weight: 760;
}

.world-label:hover,
.world-label:focus-visible,
.world-label.is-zoom-target {
  --label-opacity: 1 !important;
  border-color: rgba(112, 200, 255, 0.62);
  background: rgba(18, 55, 91, 0.88);
  box-shadow:
    0 0 0 3px rgba(112, 200, 255, 0.08),
    0 0 22px rgba(112, 200, 255, 0.2);
  outline: none;
  transform: translate(-50%, -50%) scale(calc(var(--label-scale) * 1.1));
}

.overview-labels[data-mode="off"] .world-label {
  display: none !important;
}

canvas.smart-zoom-ready {
  cursor: zoom-in;
}

.smart-zoom-notice {
  position: fixed;
  z-index: 22;
  top: 142px;
  left: 50%;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 720;
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.smart-zoom-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.smart-zoom-notice strong {
  color: var(--text);
}

.artificial-light-notice {
  position: fixed;
  z-index: 22;
  top: 142px;
  right: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.artificial-light-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.artificial-light-notice span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffd78b;
  box-shadow: 0 0 12px rgba(255, 211, 126, 0.72);
}

.artificial-light-notice strong {
  color: #ffe7b1;
  font-size: 0.57rem;
}

.scale-marker {
  position: fixed;
  z-index: 8;
  top: 50%;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: rotate(-90deg) translateX(50%);
  transform-origin: right center;
  color: rgba(183, 201, 225, 0.62);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.scale-marker span {
  display: block;
  width: 56px;
  height: 1px;
  background: rgba(196, 222, 255, 0.35);
}

.simulation-note {
  position: fixed;
  z-index: 10;
  bottom: 24px;
  left: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.belt-legend {
  position: fixed;
  z-index: 10;
  right: 22px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.56rem;
  pointer-events: none;
}

.belt-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.belt-legend i {
  width: 16px;
  height: 3px;
  border-radius: 999px;
}

.asteroid-swatch {
  background: rgba(188, 174, 156, 0.72);
  box-shadow: 0 0 8px rgba(188, 174, 156, 0.22);
}

.kuiper-swatch {
  background: rgba(120, 162, 214, 0.7);
  box-shadow: 0 0 8px rgba(120, 162, 214, 0.22);
}

.mobile-info-button,
.panel-backdrop {
  display: none;
}

.pairing-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 2, 8, 0.7);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pairing-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pairing-modal {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  padding: 22px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 20% 20%, rgba(49, 130, 201, 0.12), transparent 36%),
    rgba(5, 10, 22, 0.94);
  transform: translateY(18px) scale(0.985);
  transition: transform 250ms ease;
}

.pairing-backdrop.is-visible .pairing-modal {
  transform: none;
}

.pairing-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.pairing-header h2 {
  margin: 6px 0 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.045em;
}

.pairing-close-button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 1.35rem;
}

.pairing-content {
  display: grid;
  grid-template-columns: minmax(230px, 0.82fr) minmax(270px, 1.18fr);
  gap: 26px;
  margin-top: 22px;
}

.pairing-visual {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 15px;
}

.pairing-qr {
  display: grid;
  width: min(260px, 100%);
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  padding: 15px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.18);
}

.pairing-qr img,
.pairing-qr canvas {
  width: 100% !important;
  height: 100% !important;
  image-rendering: pixelated;
}

.pairing-qr-placeholder {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #536071;
  font-size: 0.72rem;
  text-align: center;
}

.pairing-qr-placeholder span {
  width: 48px;
  height: 48px;
  border: 6px solid #dce3eb;
  border-top-color: #2b80be;
  border-radius: 50%;
  animation: pairingSpin 1s linear infinite;
}

.pairing-code-block {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.pairing-code-block small {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.pairing-code-block strong {
  font-size: clamp(1.25rem, 4vw, 1.85rem);
  letter-spacing: 0.12em;
}

.pairing-instructions {
  display: grid;
  align-content: start;
}

.pairing-status {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(196, 222, 255, 0.11);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.028);
}

.pairing-status > i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8290a3;
}

.pairing-status[data-status="creating"] > i,
.pairing-status[data-status="waiting"] > i {
  background: var(--blue);
  box-shadow: 0 0 12px rgba(112, 200, 255, 0.7);
  animation: pairingBlink 1.3s ease-in-out infinite;
}

.pairing-status[data-status="connected"] > i {
  background: var(--success);
  box-shadow: 0 0 12px rgba(117, 240, 176, 0.78);
}

.pairing-status[data-status="error"] > i {
  background: #ff8585;
  box-shadow: 0 0 12px rgba(255, 112, 112, 0.65);
}

.pairing-status span {
  display: grid;
  gap: 3px;
}

.pairing-status small {
  color: var(--muted);
  font-size: 0.53rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.pairing-status strong {
  font-size: 0.82rem;
}

.pairing-instructions ol {
  display: grid;
  gap: 9px;
  margin: 20px 0;
  padding-left: 22px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.controller-url {
  display: block;
  overflow: hidden;
  color: var(--blue);
  font-size: 0.72rem;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.controller-url:hover {
  text-decoration: underline;
}

.pairing-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

.pairing-actions .primary-button,
.pairing-actions .secondary-button {
  width: 100%;
}

.pairing-footnote {
  margin: 14px 0 0;
  color: rgba(171, 187, 211, 0.63);
  font-size: 0.63rem;
  line-height: 1.5;
}

.controller-identify-overlay {
  position: fixed;
  z-index: 85;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  background:
    radial-gradient(circle at center, rgba(82, 183, 255, 0.22), transparent 28%),
    rgba(0, 3, 12, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.controller-identify-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.controller-identify-orbit {
  position: relative;
  display: grid;
  width: 114px;
  height: 114px;
  place-items: center;
  border: 1px solid rgba(112, 200, 255, 0.52);
  border-radius: 50%;
  box-shadow:
    0 0 0 22px rgba(112, 200, 255, 0.045),
    0 0 70px rgba(112, 200, 255, 0.22);
  animation: controllerPulse 1.1s ease-in-out infinite;
}

.controller-identify-orbit::after {
  position: absolute;
  width: 145px;
  height: 42px;
  border: 1px solid rgba(191, 225, 255, 0.42);
  border-radius: 50%;
  content: "";
  transform: rotate(-18deg);
}

.controller-identify-orbit span {
  font-size: 2.3rem;
}

.controller-identify-overlay p {
  margin: 26px 0 6px;
  color: var(--blue);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.2em;
}

.controller-identify-overlay strong {
  font-size: clamp(1.25rem, 4vw, 2.4rem);
  letter-spacing: -0.035em;
}

@keyframes pairingSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pairingBlink {
  0%,
  100% {
    opacity: 0.45;
  }

  50% {
    opacity: 1;
  }
}

@keyframes controllerPulse {
  0%,
  100% {
    transform: scale(0.96);
  }

  50% {
    transform: scale(1.04);
  }
}

.loading-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  background:
    radial-gradient(circle at center, rgba(107, 59, 15, 0.2), transparent 32%),
    #010208;
  transition: opacity 700ms ease, visibility 700ms ease;
}

.loading-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loading-symbol {
  position: relative;
  width: 68px;
  height: 68px;
}

.loading-symbol span,
.loading-symbol i {
  position: absolute;
  border-radius: 50%;
}

.loading-symbol span {
  inset: 0;
  border: 1px solid rgba(255, 193, 85, 0.4);
  animation: pulse 1.8s ease-in-out infinite;
}

.loading-symbol i {
  inset: 14px;
  background: radial-gradient(circle at 35% 32%, #fff5b9, #ff9f31 35%, #8c2e0e 75%);
  box-shadow: 0 0 38px rgba(255, 159, 49, 0.35);
}

.loading-screen p {
  margin: 20px 0 14px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.loading-bar {
  width: 220px;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.loading-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffae3f, #8b6de6, #70c8ff);
  transition: width 300ms ease;
}

body.projector-mode .topbar,
body.projector-mode .object-panel,
body.projector-mode .destination-nav,
body.projector-mode .navigation-hint,
body.projector-mode .scale-marker,
body.projector-mode .mobile-info-button,
body.projector-mode .simulation-note,
body.projector-mode .belt-legend,
body.projector-mode .smart-zoom-notice,
body.projector-mode .artificial-light-notice {
  opacity: 0;
  pointer-events: none;
}

body.projector-mode.projector-controls-visible .topbar,
body.projector-mode.projector-controls-visible .object-panel,
body.projector-mode.projector-controls-visible .destination-nav,
body.projector-mode.projector-controls-visible .navigation-hint,
body.projector-mode.projector-controls-visible .scale-marker,
body.projector-mode.projector-controls-visible .mobile-info-button,
body.projector-mode.projector-controls-visible .simulation-note,
body.projector-mode.projector-controls-visible .belt-legend {
  opacity: 1;
  pointer-events: auto;
}

body.projector-mode canvas {
  cursor: none;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.94);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@media (max-width: 800px) {
  .topbar {
    top: max(8px, env(safe-area-inset-top));
    right: 8px;
    left: 8px;
    grid-template-columns: 1fr auto;
    min-height: 54px;
    padding: 7px 9px;
    border-radius: 16px;
  }

  .mission-badge,
  .brand small,
  .top-actions .icon-button,
  .projector-button span,
  .idle-status,
  .observation-light-copy,
  .label-mode-copy,
  .connect-phone-copy {
    display: none;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .projector-button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.64rem;
  }

  .observation-light-button,
  .label-mode-button,
  .connect-phone-button {
    min-height: 36px;
    padding: 0 7px;
  }

  .observation-light-icon,
  .label-mode-icon,
  .connect-phone-icon {
    width: 25px;
    min-width: 25px;
    height: 25px;
    font-size: 0.68rem;
  }

  .pairing-backdrop {
    padding: 8px;
  }

  .pairing-modal {
    max-height: calc(100vh - 16px);
    padding: 17px;
    border-radius: 22px;
  }

  .pairing-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pairing-qr {
    width: min(230px, 72vw);
  }

  .pairing-actions {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    top: auto;
    right: 16px;
    bottom: max(22px, calc(16px + env(safe-area-inset-bottom)));
    left: 16px;
    width: auto;
    max-height: calc(100vh - 96px);
    overflow: auto;
    transform: none;
  }

  .hero-panel.is-hidden {
    transform: translateY(24px);
  }

  .hero-panel h1 {
    margin: 10px 0 14px;
    font-size: clamp(2.65rem, 13.4vw, 4.8rem);
  }

  .hero-copy {
    font-size: 0.84rem;
    line-height: 1.55;
  }

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

  .primary-button,
  .secondary-button {
    min-height: 44px;
    padding: 0 15px;
  }

  .object-panel {
    z-index: 31;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    width: auto;
    max-height: min(69vh, 630px);
    overflow: auto;
    border-radius: 24px;
    opacity: 0;
    transform: translateY(calc(100% + 28px));
    pointer-events: none;
    overscroll-behavior: contain;
  }

  .object-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .panel-close-button {
    display: grid;
  }

  .panel-backdrop {
    position: fixed;
    z-index: 30;
    inset: 0;
    display: block;
    background: rgba(0, 3, 10, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
  }

  .panel-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-info-button {
    position: fixed;
    z-index: 19;
    right: 12px;
    bottom: max(68px, calc(68px + env(safe-area-inset-bottom)));
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px 0 9px;
    border-radius: 999px;
    background: var(--panel);
    font-size: 0.74rem;
    font-weight: 760;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
  }

  .mobile-info-button span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #168fd2, #6152d6);
    font-family: Georgia, serif;
    font-size: 0.92rem;
    font-weight: 800;
  }

  .mobile-info-button.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .destination-nav {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    max-width: none;
    transform: translateY(15px);
  }

  .destination-nav.is-visible {
    transform: translateY(0);
  }

  .journey-hud {
    bottom: max(8px, env(safe-area-inset-bottom));
  }

  .navigation-hint,
  .scale-marker,
  .simulation-note,
  .belt-legend,
  .smart-zoom-notice,
  .artificial-light-notice {
    display: none;
  }

  .world-label {
    font-size: 0.48rem;
  }

  .exit-projector-button {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.67rem;
  }
}

@media (max-width: 430px) {
  .hero-actions {
    display: grid;
  }

  .facts {
    grid-template-columns: 1fr 1fr;
  }

  .journey-readout span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
