:root {
  color-scheme: dark;
  font: 15px/1.45 "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: #e9e4d9;
  background: #070b12;
  --cream: #e9e4d9;
  --muted: #b9c5ce;
  --accent: #e2bd88;
  --chrome: #0b121b;
  --panel: #101923ed;
  --panel-border: #a4b6c52c;
  --line: rgba(218, 224, 222, .13);
  --inset: clamp(12px, 2vw, 28px);
  --header-height: 60px;
  --toolbar-height: 58px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; overflow: hidden; }
.startup-screen {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 44%, #1b2839 0%, #0c1420 32%, #070b12 69%);
}
.startup-brand {
  padding: 20px;
  text-align: center;
  animation: startup-arrival 650ms cubic-bezier(.2, .72, .22, 1) both;
}
.startup-brand img {
  display: block;
  width: clamp(82px, 18vmin, 144px);
  height: auto;
  margin: 0 auto 20px;
  filter: drop-shadow(0 4px 22px #af926c34);
}
.startup-title {
  margin: 0;
  color: #f6ebd9;
  font-size: clamp(24px, 4.8vmin, 44px);
  font-weight: 600;
  letter-spacing: .10em;
}
.startup-english {
  margin: 9px 0 0;
  color: var(--accent);
  font: 500 clamp(10px, 1.65vmin, 14px)/1.5 "Segoe UI", sans-serif;
  letter-spacing: .25em;
}
.startup-subtitle {
  margin: 24px 0 0;
  color: #b9c5ce;
  font-size: clamp(12px, 2vmin, 16px);
  font-weight: 400;
  letter-spacing: .18em;
}
.author-email { user-select: text; overflow-wrap: anywhere; }
@keyframes startup-arrival {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .startup-brand { animation: none; }
}
button, input { font: inherit; }
button {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #111b25;
  color: #e7e8e3;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
button:hover { border-color: #d4ae7b80; background: #1e2935; }
button[aria-pressed="true"], button[aria-current="true"], button[aria-expanded="true"] {
  border-color: #bd9e6b91;
  color: #f0cf9d;
  background: #e2bd881a;
}
button:focus-visible, summary:focus-visible, input:focus-visible, #viewport:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#viewport {
  position: fixed;
  inset: var(--header-height) 0 var(--toolbar-height);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
#viewport:active { cursor: grabbing; }
#viewport.is-panning { cursor: move; }
#viewport canvas { display: block; width: 100%; height: 100%; }

.app-header, .bottom {
  position: fixed;
  inset-inline: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  padding-inline: var(--inset);
  background: var(--chrome);
}
.app-header {
  top: 0;
  height: var(--header-height);
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.brand, .view-location, .header-actions { display: flex; align-items: center; min-width: 0; }
.brand { flex: 0 0 auto; gap: 9px; }
.brand-mark { display: block; flex: none; }
.brand h1 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: .035em; }
.brand h1 span { display: block; line-height: 1.35; }
.brand h1 .brand-english { margin-top: 2px; font-size: 10px; font-weight: 400; letter-spacing: .08em; color: var(--accent); }
.view-location {
  flex: 1;
  gap: 12px;
  margin-inline: 12px auto;
  font-size: 14px;
  color: #ccd6e0;
}
#map-caption { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#map-back, #catalog-toggle {
  padding: 7px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--accent);
}
#map-back:hover, #catalog-toggle:hover { border-color: #bd9e6b; }
.header-actions { flex: 0 0 auto; gap: 7px; margin-left: auto; }
.header-actions .hud-toggle, .circle {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #ffffff36;
  border-radius: 99px;
  background: transparent;
  color: #e0e5e1;
  font-size: 13px;
}
.header-actions .hud-toggle:hover, .circle:hover { border-color: #d8b27e; background: #263242; }
.circle { width: 34px; padding-inline: 0; }
.exit-label { margin-left: 6px; }

.panel { border: 1px solid var(--panel-border); border-radius: 10px; background: var(--panel); }
.catalog-dock, .details { position: fixed; top: calc(var(--header-height) + 14px); z-index: 2; }
.catalog-dock { left: var(--inset); width: clamp(176px, 17vw, 228px); pointer-events: none; }
.catalog-dock > * { pointer-events: auto; }
#catalog-toggle { display: flex; align-items: center; gap: 14px; }
#catalog-toggle::after, #catalog-items button::after {
  content: "";
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border: solid #a7b5c0;
  border-width: 1px 1px 0 0;
  transform: rotate(45deg);
}
#catalog-toggle[aria-expanded="true"]::after { transform: rotate(135deg); }
#catalog {
  position: relative;
  margin-top: 8px;
  padding: 10px 12px;
  max-height: calc(100dvh - var(--header-height) - var(--toolbar-height) - 68px);
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
#catalog-title {
  margin: 0 0 4px;
  padding: 2px 3px 9px;
  border-bottom: 1px solid var(--panel-border);
  color: var(--accent);
  font-size: 13px;
}
#catalog-items { display: grid; grid-template-columns: minmax(0, 1fr); }
#catalog-items button span { min-width: 0; overflow-wrap: anywhere; }
#catalog-items button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 3px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  border-radius: 0;
  background: transparent;
  color: #d3d9d7;
  font-size: 16px;
  text-align: left;
  white-space: normal;
}
#catalog-items button::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #c4aa88; }
#catalog-items button::after { margin-left: auto; margin-right: 4px; }
#catalog-items button:hover, #catalog-items button[aria-current="true"],
#catalog-items button[aria-expanded="true"] { color: #f3eadc; background: #e2bd881a; }
#catalog-items button[aria-current="true"]::before, #catalog-items button[aria-expanded="true"]::before {
  background: var(--accent);
  box-shadow: 0 0 8px #e2bd8880;
}
#catalog-items small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
#catalog-items .catalog-region-btn {
  font-weight: 600;
  color: #e2e8f0;
}
#catalog-items .catalog-region-btn[aria-expanded="true"] { color: var(--accent); }
#catalog-items .catalog-region-btn[aria-expanded="true"]::after { transform: rotate(135deg); }
.catalog-submenu {
  margin: 1px 0 5px 12px;
  border-left: 1px solid var(--panel-border);
}
#catalog-items .catalog-star-btn {
  padding-left: 10px;
  font-size: 13px;
  color: #a6b5c5;
  min-height: 32px;
}
#catalog-items .catalog-star-btn::before {
  width: 4px;
  height: 4px;
  background: #7a8fa6;
}
#catalog-items .catalog-star-btn:hover {
  color: #ffffff;
}

.details {
  right: var(--inset);
  width: clamp(180px, 16vw, 224px);
  max-height: calc(100dvh - var(--header-height) - var(--toolbar-height) - 24px);
  padding: 10px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  background: rgba(14, 21, 31, 0.90);
  backdrop-filter: blur(8px);
}
.details h2 {
  margin: 5px 0 3px;
  font: 500 clamp(18px, 1.6vw, 24px)/1.2 "Microsoft YaHei UI", sans-serif;
}
.details .english { color: var(--accent); font: 500 11px/1.35 "Segoe UI", sans-serif; letter-spacing: .10em; }
.details details { border-top: 1px solid var(--panel-border); margin-top: 10px; }
.details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 0 4px;
  color: #e0e7eb;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}
.details summary::-webkit-details-marker { display: none; }
.details summary:hover { color: var(--accent); }
.expand-hint {
  font-size: 11px;
  color: var(--accent);
  background: rgba(226, 189, 136, 0.12);
  border: 1px solid rgba(226, 189, 136, 0.28);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.details details[open] .expand-hint {
  color: #a0b2c6;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}
.details summary:hover .expand-hint {
  background: rgba(226, 189, 136, 0.22);
  border-color: var(--accent);
  color: #fff;
}
#target-summary { margin: 7px 0 3px; color: var(--muted); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.details.has-dossier { width: clamp(210px, 19vw, 268px); }
#target-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px; font-size: 12px; }
#target-facts dt { color: var(--muted); }
#target-facts dd { margin: 0; color: #eee5d7; }
#target-dossier figure, #observation-dialog figure { margin: 10px 0 0; }
#enlarge-observation, #enlarge-region { display: block; width: 100%; padding: 0; overflow: hidden; background: #05070b; }
#target-photo, #region-illustration { display: block; width: 100%; max-height: 180px; object-fit: contain; }
#target-credit, #region-diagram-caption, #observation-credit { margin-top: 5px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
#target-dossier h3 { margin: 10px 0 4px; color: var(--accent); font-size: 13px; }
#target-dossier p { margin: 0; font-size: 12.5px; line-height: 1.55; }
#target-dossier .model-note { margin-top: 6px; color: var(--muted); font-size: 11.5px; }
#observation-dialog { max-width: 94vw; max-height: 92vh; padding: 14px; border: 1px solid var(--panel-border); border-radius: 10px; background: var(--chrome); color: var(--cream); }
#observation-dialog::backdrop { background: #01030aeb; }
#observation-dialog form { display: flex; justify-content: flex-end; }
#observation-photo { display: block; max-width: min(83vw, 1200px); max-height: 73vh; margin: auto; object-fit: contain; }

.bottom { bottom: 0; height: var(--toolbar-height); gap: 14px; border-top: 1px solid var(--line); }
.view-tools, .map-tools, .quality-tools { display: flex; align-items: center; gap: 6px; }
.view-tools {
  padding: 0;
  gap: 0;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #0b1119;
}
.view-tools button { padding-inline: 13px; border: 0; border-radius: 0; background: transparent; }
.view-tools button:first-child { border-radius: 5px 0 0 5px; }
.view-tools button:last-child { border-radius: 0 5px 5px 0; }
.view-tools button + button { border-left: 1px solid var(--panel-border); }
.view-tools button:hover, .view-tools button[aria-pressed="true"] { background: #e2bd881a; }
.atlas-scale {
  display: grid;
  flex: none;
  width: 150px;
  justify-items: center;
  gap: 2px;
  margin-inline-start: auto;
  border-inline-start: 1px solid var(--line);
  color: #e0e8f4;
  font-size: 11px;
  line-height: 1.16;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#scale-rule { height: 5px; border: 1px solid #d4ddef; border-top: 0; }
#scale-cm { color: #aabbcf; font-size: 10px; }
.quality-tools { margin-left: auto; gap: 12px; white-space: nowrap; }
.atlas-scale:not([hidden]) + .quality-tools { margin-left: 0; }
.quality-tools output { color: var(--muted); font: 13px "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
#open-solar.solar-accent-btn {
  color: #fff4db;
  background: linear-gradient(135deg, rgba(235, 168, 48, 0.45), rgba(184, 102, 22, 0.6));
  border: 1px solid #ffc266;
  box-shadow: 0 0 14px rgba(255, 194, 102, 0.35);
  font-weight: 500;
  letter-spacing: 0.04em;
  animation: pulse-solar-btn 2.6s infinite ease-in-out;
}
#open-solar.solar-accent-btn:hover {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 184, 60, 0.7), rgba(215, 120, 30, 0.8));
  border-color: #ffe6aa;
  box-shadow: 0 0 20px rgba(255, 200, 110, 0.65);
}
@keyframes pulse-solar-btn {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 194, 102, 0.25); }
  50% { box-shadow: 0 0 18px rgba(255, 194, 102, 0.55); }
}

.solar-entry-box {
  margin: 10px 0 14px;
}
.solar-entry-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(46, 30, 14, 0.88), rgba(24, 16, 9, 0.95));
  border: 1px solid #d49a42;
  border-radius: 6px;
  color: #fff6e8;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 200, 100, 0.15);
  transition: all 0.22s ease;
}
.solar-entry-btn:hover {
  background: linear-gradient(135deg, rgba(68, 44, 20, 0.92), rgba(42, 26, 12, 0.98));
  border-color: #ffc266;
  box-shadow: 0 0 16px rgba(255, 194, 102, 0.4), 0 4px 18px rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}
.solar-entry-icon {
  font-size: 22px;
  line-height: 1;
}
.solar-entry-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.solar-entry-text strong {
  font-size: 14px;
  color: #ffe6b8;
  letter-spacing: 0.04em;
}
.solar-entry-text small {
  font-size: 11px;
  color: #cbb494;
}
.solar-entry-arrow {
  font-size: 16px;
  color: #ffc266;
  transition: transform 0.2s ease;
}
.solar-entry-btn:hover .solar-entry-arrow {
  transform: translateX(3px);
}
.quality-tools button { padding-inline: 12px; background: transparent; }
.quality-tools button:hover, .quality-tools button[aria-expanded="true"] { background: #e2bd881a; }

.settings-popover {
  position: fixed;
  right: var(--inset);
  bottom: calc(var(--toolbar-height) + 8px);
  z-index: 4;
  width: min(296px, calc(100vw - 2 * var(--inset)));
  max-height: calc(100dvh - var(--toolbar-height) - var(--header-height) - 22px);
  padding: 15px;
  overflow: auto;
  overscroll-behavior: contain;
}
.settings-heading, .settings-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.settings-heading { padding-bottom: 9px; border-bottom: 1px solid var(--panel-border); }
.settings-heading h2 { margin: 0; font-size: 16px; font-weight: 600; }
.settings-heading button { width: 32px; min-height: 32px; padding: 0; background: transparent; color: var(--muted); }
.settings-row { margin-top: 12px; font-size: 14px; }
.settings-row output { color: var(--accent); font-variant-numeric: tabular-nums; }
.settings-popover input { accent-color: var(--accent); }
.settings-popover input[type="range"] { display: block; width: 100%; margin: 6px 0 0; }
#picture-reset { margin-top: 12px; }
.audio-panel { width: min(352px, calc(100vw - 2 * var(--inset))); }
.audio-caption, .audio-note { margin: 11px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.audio-caption { color: var(--accent); }
.audio-source-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }

.hud-hidden #viewport { inset: 0; }
.hud-hidden .app-header, .hud-hidden .catalog-dock, .hud-hidden .details, .hud-hidden .bottom { display: none; }
#hud-restore { position: fixed; top: 12px; left: var(--inset); z-index: 3; background: var(--panel); }

.leader-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.hud-hidden .leader-lines,
.hud-hidden .planet-labels-layer { display: none; }
.leader-line {
  stroke: #ead0a5;
  stroke-width: 1.2;
  stroke-dasharray: none;
  opacity: 0.78;
  transition: stroke 0.18s, opacity 0.18s, stroke-width 0.18s;
}
.leader-line.highlight {
  stroke: #ffe4b5;
  stroke-width: 1.8;
  opacity: 1;
  filter: drop-shadow(0 0 3px rgba(255, 228, 181, 0.8));
}
.leader-dot {
  fill: #f6d5a5;
  r: 3;
  opacity: 0.95;
  filter: drop-shadow(0 0 4px rgba(246, 213, 165, 0.85));
  transition: fill 0.18s, r 0.18s, opacity 0.18s;
  pointer-events: auto;
  cursor: pointer;
}
.leader-dot.highlight {
  fill: #fff2d6;
  r: 4.5;
  opacity: 1;
  filter: drop-shadow(0 0 7px rgba(255, 242, 214, 1));
}

.leader-line.celestial-line {
  stroke: rgba(110, 231, 183, 0.7);
  fill: none;
  stroke-linejoin: round;
}
.leader-line.celestial-line.highlight {
  stroke: #a7f3d0;
  stroke-width: 1.6;
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(110, 231, 183, 0.9));
}
.leader-dot.celestial-dot {
  fill: #6ee7b7;
  r: 2.6;
  opacity: 0.95;
  filter: drop-shadow(0 0 4px rgba(110, 231, 183, 0.85));
}
.leader-dot.celestial-dot.highlight {
  fill: #d1fae5;
  r: 3.8;
  filter: drop-shadow(0 0 6px rgba(167, 243, 208, 1));
}

.map-marker {
  position: absolute;
  z-index: 2;
  min-height: 28px;
  padding: 4px 11px;
  border: 1px solid #c9b08466;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(16, 27, 38, 0.92), rgba(8, 14, 22, 0.95));
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(255, 220, 160, 0.1);
  color: #f0e6d6;
  font-size: 13px;
  letter-spacing: .06em;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s, border-color .2s, background .2s, box-shadow .2s;
}
.map-marker:hover, .map-marker:focus-visible, .map-marker.leader-hover {
  color: #fff6e5;
  border-color: #ffd285;
  box-shadow: 0 0 16px rgba(255, 210, 133, 0.42), 0 4px 20px rgba(0, 0, 0, 0.7);
}
.celestial-green-marker {
  font-size: 11px;
  color: #6ee7b7;
  border: none;
  background: none;
  backdrop-filter: none;
  box-shadow: none;
  padding: 2px 7px;
  min-height: 22px;
  line-height: 1.4;
  letter-spacing: .04em;
  text-shadow: 0 1px 3px #030b09, 0 0 5px #071a13;
}
.celestial-green-marker:hover, .celestial-green-marker:focus-visible, .celestial-green-marker.leader-hover {
  color: #d1fae5;
  border: none;
  background: none;
  box-shadow: none;
  text-shadow: 0 0 10px rgba(167, 243, 208, 0.8);
}
.galaxy-marker {
  padding-inline: 13px;
  color: #f5d9b2;
  border-color: #bf9a68a0;
  letter-spacing: .08em;
}
.object-marker {
  border-left: 3px solid var(--object-color, #c9b084);
}
.label-fading { pointer-events: none; }

#help {
  width: min(445px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 16px;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
}
#help::backdrop { background: #060a1199; }
.help-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.help-heading h2 { margin: 0; font-size: 18px; }
#help dl { margin: 14px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14px; line-height: 1.6; }
#help dt { color: var(--accent); }
#help dd { margin: 0; color: var(--muted); }
.status {
  position: fixed;
  top: 45%;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  width: min(86vw, 450px);
  padding: 12px;
  border-radius: 6px;
  background: var(--panel);
  text-align: center;
  color: #e6d8c2;
}
#solar-explorer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  color: inherit;
  overflow: hidden;
  z-index: 1000;
}
#solar-explorer[open] { display: block; }
.solar-bar { display: none; }
#solar-explorer iframe { width: 100%; height: 100%; border: 0; display: block; }
#solar-load-error { margin: auto; padding: 20px; text-align: center; color: #ffd299; }

body.solar-active .app-header,
body.solar-active .bottom,
body.solar-active .catalog-dock,
body.solar-active .details,
body.solar-active #leader-lines,
body.solar-active #planet-labels-layer,
body.solar-active #hud-restore {
  display: none !important;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.crumb {
  cursor: pointer;
  padding: 2px 7px;
  border: 0;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  color: #c7d2d0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  line-height: inherit;
  min-width: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crumb:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}
.crumb-sep {
  color: rgba(255, 255, 255, 0.28);
  font-size: 11px;
  user-select: none;
}
.crumb-active {
  color: #f7dfbe;
  font-weight: 600;
  background: rgba(226, 189, 136, 0.14);
  border: 1px solid rgba(226, 189, 136, 0.28);
  flex-shrink: .5;
}

.planet-labels-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}
.planet-badge {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(6px, -50%);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 1px 4px;
  font-size: 11px;
  line-height: 1.25;
  font-family: "Microsoft YaHei UI", sans-serif;
  color: #f5ede1;
  text-shadow: 0 1px 4px #040713;
  white-space: nowrap;
  user-select: none;
}
.planet-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--planet-color, #e2bd88);
  box-shadow: 0 0 6px var(--planet-color, #e2bd88);
}

/* About Dialog */
.about-dialog {
  padding: 0;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: var(--chrome);
  color: var(--cream);
  max-width: min(540px, 92vw);
}
.about-dialog::backdrop {
  background: #01030ad6;
  backdrop-filter: blur(5px);
}
.about-card {
  padding: 24px 28px;
}
.about-card .eyebrow {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: .15em;
  margin-bottom: 12px;
}
.about-card .close-btn {
  background: none;
  border: none;
  color: #abb6b3;
  font-size: 20px;
  cursor: pointer;
}
.about-card .close-btn:hover { color: #fff; }
.about-meta {
  font-size: 13px;
  line-height: 1.8;
  color: #cfd8d6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.about-qr-crop {
  width: 204px;
  height: 204px;
  margin: 12px auto 8px;
  border-radius: 8px;
  background: #fff url('solar/assets/author-zhilink.jpg') no-repeat -262px -746px / auto 1205px;
  box-shadow: 0 8px 25px #0008;
}
.about-caption {
  margin: 6px 0 10px;
  font-size: 12px;
  text-align: center;
}
.about-caption a {
  color: var(--accent);
  text-underline-offset: .22em;
}

.about-links a {
  color: #e2bd88;
  text-decoration: none;
}
.about-links a:hover {
  text-decoration: underline;
}

@media (max-width: 940px) {
  .details { display: none; }
  body:not(.hud-hidden) .details.has-dossier { display: block; width: min(305px, calc(100vw - 24px)); }
  .details.has-dossier h2 { font-size: 19px; }
  .catalog-dock { z-index: 3; }
  .key-hint { display: none; }
}
@media (max-width: 1200px) {
  :root { --toolbar-height: 96px; }
  .bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas: "views quality" "actions scale";
    gap: 5px 10px;
    align-content: center;
  }
  .bottom:has(.atlas-scale[hidden]) { grid-template-areas: "views quality" "actions actions"; }
  .view-tools { grid-area: views; justify-self: start; }
  .map-tools { grid-area: actions; max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
  .atlas-scale { grid-area: scale; justify-self: end; }
  .quality-tools { grid-area: quality; justify-self: end; }
  .quality-tools output { display: none; }
}
@media (max-width: 650px) {
  :root { --header-height: 84px; --inset: 10px; }
  .app-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand actions" "location location";
    align-content: center;
    gap: 4px 5px;
  }
  .brand { grid-area: brand; min-width: 0; }
  .brand-mark, .exit-label { display: none; }
  .brand h1 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-actions { grid-area: actions; gap: 4px; }
  .header-actions .hud-toggle { padding-inline: 8px; }
  .view-location { grid-area: location; min-height: 31px; margin: 0; }
  #map-back { min-height: 29px; padding-block: 3px; }
  .catalog-dock { width: min(218px, 64vw); top: calc(var(--header-height) + 8px); }
  .view-tools button { padding-inline: 8px; }
  .atlas-scale { width: 124px; }
  .quality-tools { gap: 5px; }
  .quality-tools button { padding-inline: 8px; }
  .solar-bar { gap: 8px; }
  .solar-bar span { font-size: 12px; }
  .details.has-dossier { top: auto; bottom: calc(var(--toolbar-height) + 8px); max-height: 38dvh; }
}

.arm-marker[aria-pressed="true"] { color: #fff0c9; border-color: #edb76c; background: #2b2216e8; }
.leader-line.selected-arm { stroke: #ffbd6d; stroke-width: 1.8; }
.leader-dot.selected-arm { fill: #ffd196; }
.celestial-green-marker[aria-pressed="true"] {
  color: #ff6e70;
  text-shadow: 0 1px 3px #180707, 0 0 6px #511821;
}
.leader-line.celestial-line.selected-object { stroke: #ff6266; stroke-width: 1.65; }
.leader-dot.celestial-dot.selected-object { fill: #ff6266; filter: drop-shadow(0 0 4px #ff6266); }
#atlas-grid-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#atlas-grid-labels span {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #bacbe7;
  font-size: 10px;
  letter-spacing: .025em;
  text-shadow: 0 1px 3px #080c17;
  white-space: nowrap;
}
#orbit-speed {
  min-width: 66px;
  min-height: 29px;
  color: var(--cream);
  background: var(--chrome);
  border: 1px solid var(--panel-border);
  border-radius: 5px;
  font: inherit;
  font-size: 12px;
  padding-inline: 6px;
}
#orbit-speed:focus-visible { outline: 2px solid var(--accent); }
.celestial-green-marker.distant-marker:not([aria-pressed="true"]) {
  color: #f0e6d6;
  text-shadow: 0 1px 3px #100c06, 0 0 5px #100c06;
}
.celestial-green-marker.distant-marker:not([aria-pressed="true"]):is(:hover, :focus-visible, .leader-hover) {
  color: #fff6e5;
  text-shadow: 0 0 10px #e2bd8870, 0 1px 3px #100c06;
}
.leader-line.celestial-line.distant-line:not(.selected-object) { stroke: #ead0a5; }
.leader-line.celestial-line.distant-line.highlight:not(.selected-object) {
  stroke: #ffe4b5;
  filter: drop-shadow(0 0 3px #ffe4b5cc);
}
.leader-dot.celestial-dot.distant-dot:not(.selected-object) {
  fill: #f6d5a5;
  filter: drop-shadow(0 0 4px #f6d5a5d9);
}
.leader-dot.celestial-dot.distant-dot.highlight:not(.selected-object) {
  fill: #fff2d6;
  filter: drop-shadow(0 0 7px #fff2d6);
}
.recommended-music-action { display: flex; align-items: center; gap: 6px; width: 100%; }
.recommended-music-action #musicRecommended { flex: 1; min-width: 0; white-space: normal; }
.recommended-music-action .music-info-button {
  flex: 0 0 27px;
  width: 27px;
  min-height: 27px;
  padding: 0;
  border-radius: 50%;
  color: var(--accent);
  font-weight: 700;
}
.music-info-dialog {
  width: min(780px, calc(100vw - 28px));
  max-width: min(780px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.music-info-dialog h2 { margin: 0; font-size: 23px; }
.music-info-original { color: var(--accent); margin: 4px 0 20px; font-size: 13px; }
.music-info-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; }
.music-info-portrait { margin: 0; }
.music-info-portrait img { display: block; width: 100%; height: auto; border-radius: 8px; }
.music-info-portrait figcaption { margin-top: 9px; color: #aeb8c3; font-size: 11px; line-height: 1.7; }
.music-info-copy p { font-size: 14px; line-height: 1.9; margin: 0 0 14px; }
.music-info-copy .eyebrow { font-size: 11px; color: var(--accent); }
.music-info-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 14px; font-size: 12px; line-height: 1.7; }
.music-info-facts dt { color: #aeb8c3; }
.music-info-facts dd { margin: 0; }
.music-info-copy .music-info-note { color: #aeb8c3; font-size: 11px; margin-bottom: 0; }
.music-info-sources { border-top: 1px solid var(--panel-border); margin-top: 20px; padding-top: 12px; font-size: 11px; color: #aeb8c3; line-height: 1.8; }
.music-info-sources summary { cursor: pointer; color: var(--accent); }
.music-info-sources p { margin-bottom: 0; overflow-wrap: anywhere; user-select: text; }
@media (max-width: 600px) {
  .music-info-dialog .about-card { padding: 18px; }
  .music-info-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .music-info-portrait { width: min(190px, 70%); margin-inline: auto; }
  .music-info-dialog h2 { font-size: 20px; }
}
