@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter-300-700.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/IBMPlexMono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/IBMPlexMono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #03050a;
  --bg-mid: #080d18;
  --navy: #111827;
  --text: #f4f5f7;
  --silver: #a7b0bf;
  --muted: #7c8698;
  --faint: #4d5868;
  --ice: #82c8f5;
  --ice-dim: rgba(130, 200, 245, 0.62);
  --teal: #78d3cb;
  --gold: #d8b985;
  --violet: #b6a5d9;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --panel: rgba(6, 10, 17, 0.87);
  --panel-deep: rgba(4, 7, 13, 0.94);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.5), 0 2px 12px rgba(0, 0, 0, 0.3);
  --ease: cubic-bezier(0.22, 0.72, 0.18, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --topbar-h: 96px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
body {
  overscroll-behavior: none;
  touch-action: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: rgba(130, 200, 245, 0.3); color: #fff; }
:focus-visible {
  outline: 1px solid var(--ice);
  outline-offset: 3px;
}
button:focus:not(:focus-visible) { outline: none; }

.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; display: block; flex: none; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.muted { color: var(--muted); }
kbd {
  font-family: var(--mono);
  font-size: 9px;
  padding: 2px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--silver);
  background: rgba(255,255,255,0.025);
}
code { font-family: var(--mono); font-size: 0.92em; color: var(--teal); }

#scene-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  cursor: grab;
  touch-action: none;
}
#scene-canvas:active { cursor: grabbing; }

.hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.hud button, .hud input, .hud select, .hud .interactive { pointer-events: auto; }

.skip-link {
  position: fixed;
  top: -50px;
  left: 20px;
  z-index: 2000;
  background: var(--bg);
  border: 1px solid var(--ice);
  padding: 10px 14px;
  font-size: 12px;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* -------------------------------------------------------------------------- */
/* Top bar                                                                    */
/* -------------------------------------------------------------------------- */
.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 480px) minmax(220px, 1fr);
  align-items: start;
  gap: 28px;
  padding: 26px 32px 0;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand-block { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.brand {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  height: 28px;
  transition: color .25s;
}
.brand:hover { color: #fff; }
.brand-mark { width: 24px; height: 24px; color: var(--ice); opacity: .92; }
.brand-word {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.42em;
  line-height: 1;
  margin-right: -0.42em;
  text-indent: 0.04em;
}
.brand-meta { margin-top: 3px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.brand-tagline {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.crumb-current { color: var(--silver); }
.crumb-sep { color: rgba(255,255,255,0.18); font-size: 9px; }
.crumb-root { color: var(--faint); }
.crumbs .interactive { cursor: pointer; background: none; border: 0; padding: 0; font-size: inherit; letter-spacing: inherit; color: inherit; }
.crumbs .interactive:hover { color: var(--ice); }

.search-wrap { position: relative; justify-self: center; width: 100%; max-width: 480px; }
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px 0 14px;
  background: linear-gradient(180deg, rgba(11,16,27,0.78), rgba(5,8,15,0.82));
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 5px;
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  box-shadow: 0 8px 24px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.025);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.search-field:focus-within {
  border-color: rgba(130,200,245,0.42);
  box-shadow: 0 0 0 1px rgba(130,200,245,0.08), 0 12px 40px rgba(0,0,0,0.35);
  background: linear-gradient(180deg, rgba(12,18,31,0.93), rgba(5,8,15,0.94));
}
.icon-search { color: var(--muted); width: 15px; height: 15px; }
#search-input {
  background: none;
  border: 0;
  outline: none;
  flex: 1;
  min-width: 0;
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--text);
}
#search-input::placeholder { color: var(--faint); }
#search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-kbd {
  font-family: var(--mono);
  color: var(--faint);
  font-size: 9px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  padding: 2px 5px;
  line-height: 1;
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(26px) saturate(115%);
  -webkit-backdrop-filter: blur(26px) saturate(115%);
  z-index: 60;
  animation: resultsIn .22s var(--ease-out);
}
@keyframes resultsIn { from { opacity: 0; transform: translateY(-5px) scale(.995); } to { opacity: 1; transform: none; } }
.search-group-label {
  font-size: 8px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 12px 14px 6px;
}
.search-result {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 9px 14px;
  color: var(--text);
  border-left: 1px solid transparent;
  transition: background .14s, border-color .14s;
}
.search-result:hover, .search-result.is-active {
  background: rgba(255,255,255,0.045);
  border-left-color: var(--ice);
}
.search-result .result-icon { color: var(--ice); opacity: .75; }
.search-result .result-name { font-size: 12.5px; font-weight: 450; letter-spacing: .01em; display: flex; align-items: center; gap: 7px; }
.search-result .result-type { color: var(--muted); font-size: 10px; margin-top: 2px; }
.search-result .result-dist { font-family: var(--mono); font-size: 9px; color: var(--faint); text-align: right; white-space: nowrap; }
.search-result .result-badge { font-size: 7.5px; letter-spacing: .12em; color: var(--gold); border: 1px solid rgba(216,185,133,.22); padding: 2px 4px; text-transform: uppercase; }
.search-empty { padding: 18px 16px 20px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.search-empty strong { color: var(--silver); font-weight: 500; }
.search-foot { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: 8.5px; }
.recent-title { padding: 12px 14px 4px; }
.recent-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 14px 12px; }
.recent-chip { background: rgba(255,255,255,0.035); border: 1px solid var(--line); color: var(--silver); padding: 4px 7px; font-size: 9px; border-radius: 2px; }
.recent-chip:hover { border-color: var(--ice-dim); color: var(--text); }

.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  color: var(--silver);
  border-radius: 3px;
  transition: color .2s, background .2s, border-color .2s;
}
.icon-button:hover { color: var(--text); background: rgba(255,255,255,0.05); border-color: var(--line); }
.icon-button .icon { width: 15px; height: 15px; }
.top-action { width: 34px; height: 34px; border-color: rgba(255,255,255,0.07); background: rgba(5,8,15,0.38); backdrop-filter: blur(10px); }
.mode-menu-wrap { position: relative; }
.mode-button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px 0 11px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(5,8,15,0.4);
  color: var(--silver);
  border-radius: 3px;
  font-size: 10px;
  letter-spacing: .09em;
  backdrop-filter: blur(10px);
  transition: border-color .2s, color .2s;
}
.mode-button:hover { color: var(--text); border-color: var(--line-strong); }
.mode-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px rgba(120,211,203,.6); }
.mode-button .icon-chevron { width: 12px; height: 12px; color: var(--faint); margin-left: 2px; }
.menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 224px;
  background: var(--panel-deep);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 4px;
  padding: 5px;
  z-index: 70;
  animation: resultsIn .18s var(--ease-out);
}
.mode-menu button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--silver);
  padding: 8px 10px;
  text-align: left;
  border-radius: 2px;
  transition: background .15s;
}
.mode-menu button:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.mode-menu button[aria-checked="true"] { background: rgba(130,200,245,0.07); color: var(--text); }
.mode-menu button[aria-checked="true"]::after { content: ''; position: absolute; right: 16px; margin-top: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--ice); }
.mode-menu button span { font-size: 11px; letter-spacing: .01em; }
.mode-menu button small { font-size: 9px; color: var(--faint); letter-spacing: .02em; }

/* -------------------------------------------------------------------------- */
/* Scale rail                                                                 */
/* -------------------------------------------------------------------------- */
.scale-rail {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 178px;
  z-index: 14;
  transition: width .4s var(--ease), opacity .3s;
}
.scale-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.scale-head .eyebrow { font-size: 8px; letter-spacing: .24em; color: var(--silver); }
.scale-collapse { width: 22px; height: 22px; color: var(--faint); }
.scale-collapse .icon { width: 12px; height: 12px; }
.scale-body { display: flex; flex-direction: column; gap: 14px; transition: opacity .3s; }
.scale-track-wrap { position: relative; height: 300px; margin-left: 4px; }
.scale-track {
  position: absolute;
  left: 3px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.02), rgba(255,255,255,0.18) 12%, rgba(255,255,255,0.18) 88%, rgba(255,255,255,0.02));
}
.scale-progress {
  position: absolute;
  left: 3px;
  top: 0;
  width: 1px;
  background: linear-gradient(to bottom, rgba(130,200,245,0), rgba(130,200,245,0.8));
  pointer-events: none;
}
.scale-thumb {
  position: absolute;
  left: 0;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--ice);
  box-shadow: 0 0 0 3px rgba(130,200,245,0.12), 0 0 14px rgba(130,200,245,0.7);
  pointer-events: none;
  transition: top .3s var(--ease);
}
.scale-stops { position: relative; height: 100%; }
.scale-stop {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .055em;
  height: 18px;
  transform: translateY(-50%);
  text-align: left;
  white-space: nowrap;
  transition: color .2s, opacity .2s;
  opacity: .74;
}
.scale-stop::before {
  content: '';
  width: 4px; height: 4px;
  border: 1px solid currentColor;
  border-radius: 50%;
  margin-left: 1.5px;
  flex: none;
  background: var(--bg);
  box-sizing: content-box;
  transition: background .2s, box-shadow .2s, border-color .2s;
}
.scale-stop span { display: block; overflow: hidden; text-overflow: ellipsis; }
.scale-stop:hover { color: var(--text); opacity: 1; }
.scale-stop.is-active { color: var(--text); opacity: 1; }
.scale-stop.is-active::before { background: var(--ice); border-color: var(--ice); box-shadow: 0 0 9px rgba(130,200,245,.8); }
.scale-range {
  position: absolute;
  left: -7px;
  top: 0;
  width: 22px;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ns-resize;
  writing-mode: vertical-lr;
  direction: rtl;
  -webkit-appearance: none;
  appearance: none;
  z-index: 3;
}
.scale-readout { display: flex; flex-direction: column; gap: 4px; padding-left: 0; }
.scale-readout .mono { font-size: 11px; color: var(--silver); letter-spacing: .02em; }
.scale-readout .mono sup { font-size: 7px; }
.scale-caption { font-size: 8px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.scale-rail.is-collapsed { width: 34px; }
.scale-rail.is-collapsed .scale-body { opacity: 0; pointer-events: none; }
.scale-rail.is-collapsed .scale-head .eyebrow { opacity: 0; }
.scale-open { display: none; }
.scale-rail.is-collapsed .scale-open { display: inline-flex; }
.mobile-scale-button { display: none; }

/* -------------------------------------------------------------------------- */
/* Labels                                                                     */
/* -------------------------------------------------------------------------- */
.labels { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.label-root { position: absolute; inset: 0; transition: opacity .35s; }
.sky-label {
  position: absolute;
  left: 0; top: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 5px;
  border: 0;
  background: transparent;
  color: rgba(210, 218, 230, 0.72);
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .95), 0 0 2px rgba(0,0,0,.8);
  pointer-events: auto;
  cursor: pointer;
  transition: color .18s, opacity .25s;
  will-change: transform;
}
.sky-label:hover { color: var(--text); }
.sky-label-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(200, 215, 235, .7);
  box-shadow: 0 0 0 2px rgba(0,0,0,.25);
  flex: none;
  transition: background .2s, box-shadow .2s;
}
.sky-label:hover .sky-label-dot { background: var(--ice); box-shadow: 0 0 8px rgba(130,200,245,.8); }
.sky-label-name { line-height: 1.1; }
.sky-label-sub { color: rgba(150, 162, 180, .6); font-size: 7.5px; letter-spacing: .12em; margin-left: 3px; }
.sky-label.is-selected { color: var(--text); }
.sky-label.is-selected .sky-label-dot { background: var(--ice); box-shadow: 0 0 0 2px rgba(130,200,245,.2), 0 0 10px rgba(130,200,245,.9); }
.sky-label.label-major { font-size: 9.5px; color: rgba(236, 241, 248, .9); letter-spacing: .2em; }
.sky-label.label-major .sky-label-dot { width: 5px; height: 5px; background: var(--ice); box-shadow: 0 0 8px rgba(130,200,245,.7); }
.sky-label.label-landmark { font-size: 7.5px; color: rgba(190, 202, 218, .55); letter-spacing: .1em; text-transform: none; }
.sky-label.label-landmark .sky-label-dot { width: 3px; height: 3px; background: rgba(216,185,133,.8); }
.sky-label.label-body { font-size: 9px; letter-spacing: .16em; }
.sky-label.label-body .sky-label-dot { width: 3px; height: 3px; background: var(--gold); }
.sky-label.label-galaxy .sky-label-dot { background: var(--gold); box-shadow: 0 0 7px rgba(216,185,133,.55); }
.sky-label.label-cluster .sky-label-dot { background: var(--violet); border-radius: 0; transform: rotate(45deg); }
.sky-label.label-featured { font-size: 10px; color: var(--text); letter-spacing: .13em; }
body.mode-cinematic .labels { opacity: .5; }

/* -------------------------------------------------------------------------- */
/* Inspector                                                                  */
/* -------------------------------------------------------------------------- */
.inspector {
  position: absolute;
  right: 30px;
  top: 112px;
  width: 358px;
  max-height: calc(100vh - 228px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(40, 61, 92, 0.14), transparent 58%),
    linear-gradient(165deg, rgba(9, 14, 24, 0.92), rgba(4, 7, 13, 0.96));
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(112%);
  -webkit-backdrop-filter: blur(24px) saturate(112%);
  z-index: 18;
  opacity: 0;
  transform: translateX(14px);
  pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.inspector.is-open { opacity: 1; transform: none; pointer-events: auto; }
body.mode-cinematic .inspector { opacity: 0; transform: translateX(14px); pointer-events: none; }
.inspector-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px 0 22px;
  flex: none;
}
.inspector-top .eyebrow { font-size: 8px; color: var(--gold); }
.inspector-close { width: 26px; height: 26px; color: var(--muted); }
.inspector-close .icon { width: 13px; height: 13px; }
.inspector-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 22px 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}
.inspector-scroll::-webkit-scrollbar { width: 4px; }
.inspector-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.13); border-radius: 4px; }
.object-head { display: flex; align-items: flex-start; gap: 14px; }
.object-preview {
  width: 58px; height: 58px;
  border-radius: 50%;
  flex: none;
  background: radial-gradient(circle at 30% 28%, #2d4c72, #0a1220 60%, #05080e);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset -10px -10px 24px rgba(0,0,0,.65), 0 0 28px rgba(130,200,245,0.06);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.object-preview.is-star { border-radius: 50%; }
.object-preview.is-object { border-radius: 2px; background-size: cover; }
.object-heading { min-width: 0; padding-top: 2px; }
.object-title {
  margin: 0;
  font-size: 27px;
  line-height: 1.03;
  font-weight: 350;
  letter-spacing: -0.035em;
  color: var(--text);
  overflow-wrap: break-word;
}
.object-subtitle { margin-top: 7px; color: var(--muted); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.4; }
.object-description { margin: 17px 0 0; color: var(--silver); font-size: 12px; line-height: 1.65; letter-spacing: .005em; font-weight: 360; }
.viz-note {
  margin-top: 13px;
  border-left: 1px solid rgba(216,185,133,.45);
  padding: 5px 0 5px 11px;
  color: var(--gold);
  font-size: 9px;
  line-height: 1.55;
  letter-spacing: .025em;
  background: linear-gradient(90deg, rgba(216,185,133,.045), transparent 75%);
}
.section-rule { height: 1px; background: var(--line); margin: 19px 0 16px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.fact {
  padding: 9px 0 10px;
  border-top: 1px solid rgba(255,255,255,0.055);
  min-width: 0;
}
.fact:nth-child(-n+2) { border-top-color: rgba(255,255,255,0.095); }
.fact-label { display: block; color: var(--faint); font-size: 8px; line-height: 1.35; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 4px; }
.fact-value { display: block; color: var(--silver); font-family: var(--mono); font-size: 10px; line-height: 1.45; overflow-wrap: break-word; }
.atmosphere-block { margin-top: 17px; }
.atmosphere-block .eyebrow { margin-bottom: 9px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.025);
  padding: 4px 6px;
  border-radius: 2px;
  font-size: 8.5px;
  color: var(--silver);
  letter-spacing: .015em;
}
.system-block { margin-top: 18px; }
.system-block .eyebrow { margin-bottom: 9px; }
.planet-list { display: flex; flex-direction: column; gap: 1px; }
.planet-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--line);
  padding: 7px 0;
  font-size: 10px;
}
.planet-row button { text-align: left; background: none; border: 0; color: var(--silver); font-size: 10px; padding: 0; }
.planet-row button:hover { color: var(--ice); }
.planet-row small { font-family: var(--mono); font-size: 8px; color: var(--faint); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.action-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.025);
  color: var(--silver);
  border-radius: 2px;
  font-size: 8.5px;
  letter-spacing: .11em;
  text-transform: uppercase;
  transition: background .2s, border-color .2s, color .2s;
}
.action-button .icon { width: 12px; height: 12px; }
.action-button:hover { color: var(--text); border-color: rgba(130,200,245,.4); background: rgba(130,200,245,.055); }
.action-button.primary { background: rgba(130,200,245,.1); border-color: rgba(130,200,245,.35); color: var(--text); }
.provenance { margin-top: 19px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--faint); font-size: 8.5px; line-height: 1.6; }
.provenance a { color: var(--muted); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.12); }
.provenance a:hover { color: var(--ice); border-color: rgba(130,200,245,.4); }
.provenance .source-name { color: var(--muted); }

/* -------------------------------------------------------------------------- */
/* Telemetry + status                                                         */
/* -------------------------------------------------------------------------- */
.telemetry {
  position: absolute;
  left: 32px;
  bottom: 27px;
  min-width: 268px;
  max-width: 340px;
  z-index: 12;
  pointer-events: none;
  padding: 0;
}
.telemetry-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.telemetry-head .eyebrow { color: var(--silver); font-size: 8px; letter-spacing: .2em; }
.telemetry-mode { font-size: 8px; color: var(--faint); letter-spacing: .06em; margin-left: 2px; }
.status-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 7px rgba(120,211,203,.8); flex: none; }
.telemetry-lines { display: flex; flex-direction: column; gap: 4px; color: var(--silver); }
.telemetry-lines > div { display: flex; align-items: center; gap: 6px; min-height: 13px; }
.telemetry-key { font-size: 8px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); min-width: 22px; }
.telemetry-lines .mono { font-size: 9.5px; color: var(--silver); letter-spacing: .01em; }
.telemetry-extra { font-size: 8px; color: var(--faint); letter-spacing: .02em; padding-top: 4px; }
.status-corner {
  position: absolute;
  right: 32px;
  bottom: 27px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  z-index: 12;
  pointer-events: none;
  text-align: right;
}
.scale-bar { display: flex; align-items: center; gap: 8px; color: var(--silver); margin-bottom: 4px; }
.scale-bar-icon {
  display: block;
  width: 56px; height: 3px;
  background:
    linear-gradient(to right, rgba(255,255,255,.32) 0 1px, transparent 1px 55px, rgba(255,255,255,.32) 55px 56px),
    linear-gradient(to right, transparent 0 20px, rgba(255,255,255,.16) 20px 21px, transparent 21px 42px, rgba(255,255,255,.16) 42px 43px, transparent 43px);
  border-bottom: 1px solid rgba(255,255,255,.25);
  position: relative;
}
.scale-bar .mono { font-size: 9px; color: var(--silver); letter-spacing: .02em; }
.status-row { display: flex; gap: 12px; align-items: center; font-size: 8px; letter-spacing: .06em; color: var(--faint); }
.status-row .mono { font-size: 8px; color: var(--faint); }
.data-chips { letter-spacing: .1em; color: var(--faint); text-transform: uppercase; }
.data-chips b { color: var(--muted); font-weight: 500; }
.status-corner .muted { color: var(--faint); }

/* -------------------------------------------------------------------------- */
/* Bottom dock                                                                */
/* -------------------------------------------------------------------------- */
.bottom-dock {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  z-index: 16;
  pointer-events: none;
}
.bottom-dock > * { pointer-events: auto; }
.camera-tools {
  display: flex;
  align-items: center;
  padding: 4px;
  background: rgba(5, 8, 15, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(0,0,0,.24);
}
.tool-button {
  width: 34px; height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, background .2s;
}
.tool-button .icon { width: 15px; height: 15px; }
.tool-button:hover { color: var(--text); background: rgba(255,255,255,0.055); }
.tool-button.active { color: var(--ice); background: rgba(130,200,245,0.08); }
.tool-sep { width: 1px; height: 16px; background: var(--line); margin: 0 3px; }
.time-dock {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1px;
  height: 34px;
  padding: 0 6px 0 2px;
  background: rgba(5, 8, 15, 0.58);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 3px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.time-dock .icon-button { width: 27px; height: 27px; color: var(--muted); }
.time-dock .icon-button .icon { width: 12px; height: 12px; }
.time-dock .time-play { color: var(--silver); }
.time-date {
  border: 0; background: none; color: var(--silver);
  height: 27px; padding: 0 8px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px; letter-spacing: .045em;
  transition: color .2s;
}
.time-date:hover { color: var(--text); }
.time-speed {
  border: 1px solid rgba(255,255,255,.075);
  background: rgba(255,255,255,.025);
  color: var(--muted);
  height: 22px; padding: 0 6px; border-radius: 2px;
  font-size: 8.5px; letter-spacing: .03em;
  transition: color .2s, border-color .2s;
}
.time-speed:hover { color: var(--silver); border-color: var(--line-strong); }
.time-popover {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  width: 270px;
  padding: 15px;
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  animation: resultsIn .2s var(--ease-out);
}
.time-readout { color: var(--silver); font-size: 9px; margin: 5px 0 13px; letter-spacing: .02em; }
.field-label { display: block; font-size: 8px; color: var(--faint); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 6px; }
.date-input {
  width: 100%;
  height: 30px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding: 0 8px;
  font-size: 10px;
  border-radius: 2px;
  color-scheme: dark;
}
.date-input:focus { outline: 1px solid rgba(130,200,245,.5); border-color: rgba(130,200,245,.4); }
.speed-label { margin-top: 14px; }
.speed-options { display: flex; gap: 4px; margin-top: 8px; }
.speed-options button {
  flex: 1;
  height: 25px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  border-radius: 2px;
}
.speed-options button:hover { color: var(--text); border-color: var(--line-strong); }
.speed-options button.active { background: rgba(130,200,245,.08); border-color: rgba(130,200,245,.3); color: var(--ice); }
.time-actions { display: flex; justify-content: space-between; margin-top: 14px; }
.text-button {
  border: 0; background: none; color: var(--silver); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.text-button:hover { color: var(--text); border-bottom-color: var(--line-strong); }
.text-button.muted { color: var(--faint); }
.text-button.muted:hover { color: var(--silver); }

.tour-card {
  width: min(460px, calc(100vw - 40px));
  background: linear-gradient(160deg, rgba(8,14,24,.96), rgba(4,7,13,.97));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 17px 19px 13px;
  border-radius: 3px;
  animation: resultsIn .3s var(--ease-out);
}
.tour-meta { display: flex; justify-content: space-between; align-items: center; }
.tour-meta .eyebrow { color: var(--gold); font-size: 8px; }
.tour-progress-text { font-size: 8.5px; color: var(--faint); }
.tour-card h3 { margin: 9px 0 6px; font-weight: 350; font-size: 21px; letter-spacing: -.025em; }
.tour-card p { margin: 0; color: var(--silver); font-size: 11px; line-height: 1.6; font-weight: 360; }
.tour-progress { height: 1px; background: rgba(255,255,255,.1); margin: 13px 0 9px; }
.tour-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ice), rgba(130,200,245,.15)); transition: width .6s var(--ease); }
.tour-actions { display: flex; gap: 18px; }

/* -------------------------------------------------------------------------- */
/* Panels                                                                     */
/* -------------------------------------------------------------------------- */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(1, 3, 7, 0.38);
  backdrop-filter: blur(1.5px);
  z-index: 28;
  pointer-events: auto;
  animation: fadeIn .25s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.panel {
  position: absolute;
  top: 96px;
  right: 30px;
  width: 392px;
  max-height: calc(100vh - 148px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(44, 66, 100, 0.16), transparent 60%),
    linear-gradient(168deg, rgba(8, 13, 23, 0.97), rgba(4, 7, 13, 0.985));
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(114%);
  -webkit-backdrop-filter: blur(28px) saturate(114%);
  z-index: 30;
  animation: panelIn .28s var(--ease-out);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
.panel[hidden] { display: none; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 20px 20px 15px 22px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.panel-head h2 { margin: 6px 0 0; font-weight: 350; font-size: 20px; letter-spacing: -.025em; color: var(--text); }
.panel-head .eyebrow { color: var(--gold); }
.panel-close { width: 26px; height: 26px; color: var(--muted); }
.panel-close .icon { width: 13px; height: 13px; }
.panel-scroll {
  padding: 18px 22px 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}
.panel-scroll::-webkit-scrollbar { width: 4px; }
.panel-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); }
.panel-intro { color: var(--muted); font-size: 10.5px; line-height: 1.65; margin: 0 0 18px; }
.panel-note { color: var(--faint); font-size: 9px; line-height: 1.6; margin-top: 18px; }
.setting-group { padding: 16px 0; border-top: 1px solid var(--line); }
.setting-group:first-child { padding-top: 0; border-top: 0; }
.setting-group > .eyebrow { margin-bottom: 10px; }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 31px;
  color: var(--silver);
  font-size: 10.5px;
}
.setting-row span { line-height: 1.4; }
.switch-row { cursor: pointer; }
.switch {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  position: relative;
  flex: none;
  transition: background .2s, border-color .2s;
  cursor: pointer;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .2s var(--ease), background .2s;
}
.switch:checked { background: rgba(130,200,245,.16); border-color: rgba(130,200,245,.35); }
.switch:checked::after { transform: translateX(13px); background: var(--ice); }
.select-control {
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  color: var(--silver);
  height: 26px;
  font-size: 9.5px;
  padding: 0 5px;
  border-radius: 2px;
  min-width: 118px;
}
.select-control:focus { outline: 1px solid rgba(130,200,245,.5); }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  accent-color: var(--ice);
}
#bloom-range { width: 120px; height: 16px; accent-color: var(--ice); }
.key-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; color: var(--faint); font-size: 8.5px; }
.key-grid kbd { margin-right: 5px; }
.attribution p { color: var(--faint); font-size: 8.5px; line-height: 1.65; margin: 0 0 10px; }
.attribution .text-button { font-size: 8px; color: var(--ice-dim); }

.layer-list { display: flex; flex-direction: column; }
.layer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.layer-row:first-child { border-top: 0; }
.layer-row > div { display: flex; flex-direction: column; gap: 3px; }
.layer-row strong { color: var(--silver); font-size: 10.5px; font-weight: 450; letter-spacing: .01em; }
.layer-row small { color: var(--faint); font-size: 8.5px; line-height: 1.4; }
.legend { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8.5px; }
.legend > div { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.legend-dot.observed { background: #ffd9a0; box-shadow: 0 0 6px rgba(255,217,160,.6); }
.legend-dot.modeled { background: var(--ice); box-shadow: 0 0 6px rgba(130,200,245,.5); }
.legend-dot.illustrative { background: var(--gold); box-shadow: 0 0 6px rgba(216,185,133,.45); }
.coverage-note { margin-top: 18px; padding: 12px; border: 1px solid rgba(130,200,245,.13); background: rgba(130,200,245,.03); border-radius: 2px; }
.coverage-note .eyebrow { font-size: 8px; }
.coverage-note p { margin: 6px 0 0; font-size: 9px; color: var(--muted); line-height: 1.6; }
.tour-list { display: flex; flex-direction: column; gap: 1px; }
.tour-option {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid transparent;
  background: none;
  color: var(--silver);
  text-align: left;
  transition: background .2s, padding-left .2s;
}
.tour-option:first-child { border-top: 0; }
.tour-option:hover { background: rgba(255,255,255,.025); padding-left: 8px; border-left-color: var(--ice); }
.tour-num { font-family: var(--mono); font-size: 9px; color: var(--gold); letter-spacing: .08em; }
.tour-option strong { display: block; font-size: 12px; font-weight: 400; color: var(--text); letter-spacing: -.005em; }
.tour-option small { display: block; color: var(--faint); font-size: 9px; line-height: 1.45; margin-top: 3px; }
.tour-option .icon { width: 13px; height: 13px; color: var(--faint); }
.source-list { display: flex; flex-direction: column; }
.source-list > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.source-list > div:first-child { border-top: 0; padding-top: 0; }
.source-list strong { font-size: 10.5px; font-weight: 450; color: var(--silver); }
.source-list span { font-size: 9px; color: var(--faint); line-height: 1.6; }
.source-list a { font-size: 8.5px; font-family: var(--mono); color: var(--ice-dim); text-decoration: none; overflow-wrap: anywhere; }
.source-list a:hover { color: var(--ice); }
.science-note ul { margin: 8px 0 0; padding-left: 16px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.science-note li { margin-bottom: 5px; }
.compare-empty { color: var(--muted); font-size: 10.5px; line-height: 1.65; }
.compare-empty strong { color: var(--silver); }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare-card { border: 1px solid var(--line); padding: 12px; }
.compare-card h3 { font-weight: 350; font-size: 16px; margin: 0 0 2px; }
.compare-card p { font-size: 8px; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 10px; line-height: 1.5; }
.compare-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 8.5px; }
.compare-row span:first-child { color: var(--faint); }
.compare-row .mono { color: var(--silver); text-align: right; }

/* -------------------------------------------------------------------------- */
/* Toasts, context                                                           */
/* -------------------------------------------------------------------------- */
.toast {
  position: absolute;
  left: 50%;
  bottom: 106px;
  transform: translateX(-50%);
  background: rgba(8, 13, 23, .95);
  border: 1px solid var(--line-strong);
  color: var(--silver);
  font-size: 10px;
  padding: 9px 13px;
  border-radius: 3px;
  z-index: 80;
  box-shadow: 0 12px 34px rgba(0,0,0,.45);
  max-width: 440px;
  text-align: center;
  animation: resultsIn .2s var(--ease-out);
}
.toast.warn { border-color: rgba(216,185,133,.35); color: var(--gold); }
.toast.error { border-color: rgba(210,120,110,.4); color: #e0a59c; }
.context-note {
  position: absolute;
  left: 32px;
  bottom: 112px;
  max-width: 310px;
  z-index: 13;
  padding: 12px 14px;
  border-left: 1px solid rgba(130,200,245,.4);
  background: linear-gradient(90deg, rgba(5,10,18,.88), rgba(5,10,18,0));
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.65;
}
.context-note strong { color: var(--silver); font-weight: 450; }

/* -------------------------------------------------------------------------- */
/* Loading + transition                                                       */
/* -------------------------------------------------------------------------- */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #03050a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .8s var(--ease), visibility .8s;
}
.loading-screen.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 58%, rgba(22, 42, 67, 0.34), transparent 46%),
    radial-gradient(ellipse at 30% 20%, rgba(30, 50, 78, 0.14), transparent 44%),
    #03050a;
}
.loading-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.6) 0 0.5px, transparent 0.7px);
  background-size: 137px 113px;
  opacity: .16;
  mask-image: radial-gradient(ellipse at 50% 55%, #000 0%, transparent 68%);
}
.loading-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(360px, calc(100vw - 60px));
}
.loading-logo { position: relative; color: var(--ice); display: flex; flex-direction: column; align-items: center; }
.loading-logo svg { width: 94px; height: 94px; animation: spin 42s linear infinite; opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wordmark {
  font-size: 33px;
  font-weight: 450;
  letter-spacing: .5em;
  margin-right: -.5em;
  color: var(--text);
  margin-top: -12px;
}
.loading-tagline {
  font-size: 9px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 30px;
}
.loading-progress { width: 100%; height: 1px; background: rgba(255,255,255,.1); overflow: hidden; }
.loading-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, rgba(130,200,245,.25), var(--ice)); transition: width .5s var(--ease); }
.loading-meta { width: 100%; display: flex; justify-content: space-between; gap: 20px; margin-top: 9px; color: var(--faint); font-size: 9px; letter-spacing: .04em; }
.loading-meta .mono { font-size: 8.5px; }
.loading-attribution { margin-top: 44px; font-family: var(--mono); font-size: 7.5px; color: rgba(120,130,146,.45); letter-spacing: .14em; }
.loading-error {
  position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%);
  color: var(--gold); font-size: 11px; line-height: 1.6; max-width: 520px; text-align: center;
}
.noscript { position: fixed; inset: 0; display: grid; place-items: center; color: var(--text); font-size: 14px; z-index: 2000; }

.transition-veil {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(130, 200, 245, 0.09) 0%, rgba(3, 5, 10, 0.7) 28%, rgba(3,5,10,.97) 62%, #03050a 100%);
  transition: opacity .5s var(--ease);
}
.transition-veil.is-active { opacity: 1; }
.transition-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  opacity: 0; transform: scale(.985);
  transition: opacity .35s .12s var(--ease), transform .6s var(--ease);
}
.transition-veil.is-active .transition-inner { opacity: 1; transform: none; }
.transition-mark { font-size: 11px; letter-spacing: .5em; color: var(--muted); margin-right: -.5em; }
.transition-line { width: 78px; height: 1px; background: linear-gradient(90deg, transparent, rgba(130,200,245,.6), transparent); }
.transition-label { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--silver); }

/* -------------------------------------------------------------------------- */
/* Utility / mode states                                                      */
/* -------------------------------------------------------------------------- */
body.mode-cinematic .topbar,
body.mode-cinematic .scale-rail,
body.mode-cinematic .telemetry,
body.mode-cinematic .status-corner,
body.mode-cinematic .mobile-scale-button { opacity: 0; pointer-events: none; }
body.mode-cinematic .bottom-dock { opacity: .25; transition: opacity .35s; }
body.mode-cinematic .bottom-dock:hover { opacity: 1; }
body.is-dragging { user-select: none; }
body.modal-open .hud { pointer-events: none; }
body.modal-open .panel, body.modal-open .drawer-backdrop { pointer-events: auto; }
body.search-open .search-results { display: block; }

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

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .topbar { grid-template-columns: minmax(170px, .8fr) minmax(280px, 420px) minmax(170px, .8fr); gap: 16px; padding: 20px 24px 0; }
  .brand-tagline { display: none; }
  .brand-word { font-size: 18px; }
  .brand-mark { width: 21px; height: 21px; }
  .inspector { width: 330px; right: 24px; top: 96px; }
  .panel { width: 360px; right: 24px; top: 88px; }
  .scale-rail { left: 24px; width: 160px; }
  .telemetry { left: 24px; bottom: 22px; }
  .status-corner { right: 24px; bottom: 22px; }
  .mode-menu-wrap .mode-button { padding: 0 8px; }
  .top-action { width: 32px; height: 32px; }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas: 'brand actions' 'search search';
    gap: 12px;
    padding: 16px 18px 0;
  }
  .brand-block { grid-area: brand; align-items: center; }
  .search-wrap { grid-area: search; max-width: none; width: 100%; }
  .top-actions { grid-area: actions; align-self: center; }
  .brand-meta { gap: 4px; }
  .brand-tagline { display: none; }
  .crumbs { font-size: 8.5px; gap: 5px; }
  .search-field { height: 38px; }
  .search-kbd { display: none; }
  .mode-button span:not(.mode-dot) { display: none; }
  .mode-button { padding: 0 8px; }
  .mode-button .icon-chevron { display: none; }
  .top-action { display: none; }
  #layers-button { display: inline-flex; }
  #settings-button { display: inline-flex; }
  #fullscreen-button { display: inline-flex; }
  .scale-rail { display: none; }
  .inspector {
    left: 0; right: 0; bottom: 0; top: auto;
    width: 100%;
    max-height: 68vh;
    border-left: 0; border-right: 0; border-bottom: 0;
    border-radius: 9px 9px 0 0;
    transform: translateY(102%);
    opacity: 1;
    box-shadow: 0 -22px 80px rgba(0,0,0,.55);
  }
  .inspector.is-open { transform: none; }
  .inspector-scroll { padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); }
  .inspector-top { padding: 14px 16px 0 20px; }
  .object-title { font-size: 24px; }
  .object-description { font-size: 12px; }
  .status-corner { display: none; }
  .telemetry { left: 18px; bottom: 88px; min-width: 0; max-width: calc(100vw - 36px); }
  .telemetry-extra { display: none; }
  .telemetry-head { margin-bottom: 6px; }
  .bottom-dock { bottom: max(14px, env(safe-area-inset-bottom)); gap: 6px; }
  .camera-tools .tool-button[data-camera="free"],
  .camera-tools .tool-button[data-camera="follow"] { display: none; }
  .time-dock { height: 32px; }
  .mobile-scale-button {
    display: inline-flex;
    position: absolute;
    left: 18px;
    bottom: 52px;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 9px;
    border: 1px solid var(--line);
    background: rgba(5,8,15,.55);
    color: var(--muted);
    border-radius: 2px;
    font-size: 8px;
    letter-spacing: .12em;
    text-transform: uppercase;
    z-index: 14;
    backdrop-filter: blur(12px);
  }
  .mobile-scale-button .icon { width: 12px; height: 12px; }
  .tour-card { margin-bottom: 2px; }
  .panel {
    left: 14px; right: 14px; top: 82px; width: auto;
    max-height: calc(100vh - 160px);
  }
  .toast { bottom: 150px; }
  .context-note { bottom: 128px; left: 18px; max-width: calc(100vw - 36px); }
}

@media (max-width: 620px) {
  .topbar { padding: 14px 14px 0; }
  .brand-word { font-size: 17px; letter-spacing: .34em; }
  .brand-mark { width: 20px; height: 20px; }
  .crumbs { font-size: 8px; gap: 4px; }
  .crumb-root, .crumbs .crumb-sep:nth-of-type(2) { display: none; }
  .search-field { height: 36px; padding-left: 12px; }
  #search-input { font-size: 11px; }
  .top-actions { gap: 2px; }
  .mode-button { height: 30px; }
  .top-action { width: 30px; height: 30px; }
  .object-head { gap: 12px; }
  .object-preview { width: 48px; height: 48px; }
  .object-title { font-size: 22px; }
  .object-description { font-size: 11.5px; }
  .facts { gap: 0 12px; }
  .fact-value { font-size: 9px; }
  .camera-tools .tool-button[data-camera="orbit"] { display: none; }
  .camera-tools { padding: 3px; }
  .tool-button { width: 32px; }
  .telemetry { bottom: 92px; }
  .mobile-scale-button { bottom: 54px; }
  .tour-card { padding: 14px 15px 10px; }
  .tour-card h3 { font-size: 18px; }
  .tour-card p { font-size: 10px; }
  .tour-actions { gap: 14px; }
  .toast { bottom: 148px; width: calc(100vw - 32px); }
  .loading-wordmark { font-size: 27px; }
  .loading-logo svg { width: 78px; height: 78px; }
  .search-wrap.is-mobile-open {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(3,5,10,.97);
    max-width: none;
    padding: 16px;
    backdrop-filter: blur(26px);
  }
  .search-wrap.is-mobile-open .search-field { height: 44px; }
  .search-mobile-close { display: inline-flex !important; }
  .search-wrap.is-mobile-open .search-results { top: 72px; left: 16px; right: 16px; }
  .search-field .search-kbd { display: none; }
}

/* Pointer access for panels and floating surfaces. */
.hud .panel,
.hud .inspector,
.hud .time-popover,
.hud .search-wrap,
.hud .tour-card,
.hud .context-note,
.hud .drawer-backdrop { pointer-events: auto; }

/* Procedural object previews (no invented imagery). */
.object-preview.galaxy-spiral {
  border-radius: 50%;
  background:
    radial-gradient(ellipse 15% 12% at 50% 50%, #fffdf4 0%, #ffe9c4 28%, rgba(255,210,150,0) 72%),
    radial-gradient(ellipse 72% 26% at 50% 50%, rgba(255,230,200,.5) 0%, rgba(130,170,225,.24) 32%, rgba(80,110,160,0) 70%),
    radial-gradient(ellipse 25% 70% at 62% 50%, rgba(160,195,240,.2) 0%, rgba(60,90,140,0) 65%),
    radial-gradient(circle at 32% 38%, rgba(200,220,255,.18) 0 4%, transparent 5%),
    radial-gradient(circle at 68% 62%, rgba(255,225,195,.2) 0 3%, transparent 4%),
    radial-gradient(circle at 50% 50%, #151821 0%, #070a12 68%, #04060c 100%);
}
.object-preview.galaxy-elliptical {
  border-radius: 50%;
  background:
    radial-gradient(ellipse 40% 34% at 50% 50%, #fff9e9 0%, #f0d9b7 16%, rgba(210,185,150,.46) 42%, rgba(120,130,150,0) 76%),
    radial-gradient(circle at 50% 50%, #171820, #060910 70%);
}
.object-preview.galaxy-edgeon {
  border-radius: 50%;
  background:
    radial-gradient(ellipse 88% 10% at 50% 55%, rgba(255,249,231,.9) 0%, rgba(255,224,178,.52) 24%, rgba(255,200,150,0) 72%),
    radial-gradient(ellipse 24% 22% at 50% 52%, #fffdf1 0%, #f7dfb9 24%, rgba(255,220,170,0) 70%),
    radial-gradient(circle at 50% 50%, #151722, #05080e 70%);
}
.object-preview.galaxy-irregular {
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 44%, rgba(230,236,255,.4) 0%, rgba(150,175,220,.15) 20%, transparent 32%),
    radial-gradient(circle at 62% 58%, rgba(210,220,245,.32) 0%, rgba(120,150,200,.12) 18%, transparent 30%),
    radial-gradient(circle at 54% 38%, rgba(255,223,190,.22) 0%, transparent 24%),
    radial-gradient(circle at 50% 50%, #11141c, #05070d 70%);
}
.object-preview.is-cluster {
  border-radius: 3px;
  background:
    radial-gradient(circle at 30% 35%, rgba(216,185,133,.62) 0 2%, transparent 3%),
    radial-gradient(circle at 62% 32%, rgba(180,200,245,.55) 0 1.6%, transparent 2.6%),
    radial-gradient(circle at 48% 58%, rgba(216,185,133,.5) 0 2.2%, transparent 3.2%),
    radial-gradient(circle at 72% 66%, rgba(180,200,245,.45) 0 1.4%, transparent 2.4%),
    radial-gradient(circle at 26% 68%, rgba(216,185,133,.4) 0 1.2%, transparent 2.2%),
    radial-gradient(ellipse at 50% 50%, #1a1c2a, #06080f 72%);
}
.object-preview.is-nebula {
  border-radius: 3px;
  background:
    radial-gradient(ellipse 42% 35% at 44% 42%, var(--nebula, #7aa4c8) 0%, transparent 64%),
    radial-gradient(ellipse 35% 48% at 64% 60%, color-mix(in srgb, var(--nebula, #7aa4c8) 65%, transparent) 0%, transparent 62%),
    radial-gradient(circle at 50% 50%, #0a0e17, #04060c 75%);
  opacity: .9;
}
.time-reverse.is-reversed { color: var(--gold) !important; }
.time-reverse.is-reversed .icon { filter: drop-shadow(0 0 5px rgba(216,185,133,.4)); }
.compare-panel { width: 620px; }
.compare-card.compare-more { display: flex; flex-direction: column; justify-content: center; border-style: dashed; color: var(--faint); }
.compare-card.compare-more h3 { color: var(--muted); font-size: 13px; }
#object-preview.is-object { background-color: #0a1220; }
.object-preview.is-object::after { content: ''; display: none; }

@media (max-width: 1180px) { .compare-panel { width: 520px; } }
@media (max-width: 900px) { .compare-panel { width: auto; } }

/* Slight optical refinements */
.brand:hover .brand-mark { opacity: 1; }
.brand-mark { transition: opacity .25s; }
::placeholder { opacity: 1; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.65); opacity: .7; }

/* Multi-scale hint line under the wordmark */
.brand-meta::after {
  content: '';
  display: block;
  width: 0; height: 0;
}

[hidden] { display: none !important; }
.object-preview.is-object { border-radius: 50%; box-shadow: inset -10px -8px 22px rgba(0,0,0,.6), 0 0 24px rgba(130,200,245,.05); }
.scale-readout { margin-top: 4px; }
@media (min-width: 901px) {
  .scale-track-wrap { height: 316px; }
}
.sky-label.label-moon { font-size: 7.5px; letter-spacing: .12em; color: rgba(188, 203, 220, .62); }
.sky-label.label-moon .sky-label-dot { width: 3px; height: 3px; background: rgba(190, 205, 225, .7); }
.sky-label.label-model { font-size: 7px; letter-spacing: .14em; color: rgba(142, 159, 180, .48); }
.sky-label.label-model .sky-label-sub { color: rgba(120, 135, 155, .38); }
.sky-label.label-body { font-size: 9.5px; letter-spacing: .15em; }
.sky-label.label-body .sky-label-sub { font-size: 7px; color: rgba(145,158,178,.5); }
@media (max-width: 1180px) {
  .crumbs { max-width: 100%; }
  .crumb-root, .crumbs .crumb-sep:last-of-type { display: none; }
  .brand-block { min-width: 0; }
}
.exo-return {
  position: absolute;
  left: 32px;
  top: 82px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 9px;
  background: rgba(5,8,15,.55);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 2px;
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  transition: color .2s, border-color .2s;
}
.exo-return .icon { width: 12px; height: 12px; }
.exo-return:hover { color: var(--text); border-color: rgba(130,200,245,.35); }
@media (max-width: 900px) { .exo-return { left: 16px; top: 108px; } }
@media (max-width: 620px) { .exo-return { top: 100px; } }
@media (max-width: 1280px) {
  .crumb-root, .crumbs .crumb-sep:last-of-type { display: none; }
}
body.domain-exo .scale-rail { opacity: .55; }
body.domain-exo .scale-rail:hover { opacity: 1; }
.tour-card .tour-actions button:disabled { cursor: default; }
@media (max-width: 900px) {
  .scale-rail.is-mobile-open {
    display: block;
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    top: auto;
    transform: none;
    width: auto;
    padding: 15px 18px 14px;
    background: var(--panel-deep);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow);
    z-index: 42;
    opacity: 1;
  }
  .scale-rail.is-mobile-open .scale-head { margin-bottom: 10px; }
  .scale-rail.is-mobile-open .scale-track-wrap { height: 230px; }
  .scale-rail.is-mobile-open .scale-body { display: flex; opacity: 1; }
  .scale-rail.is-mobile-open .scale-stop { font-size: 10px; }
  .scale-rail.is-mobile-open .scale-range { display: block; }
}
@media (max-width: 900px) {
  .scale-rail.is-mobile-open { max-height: none; overflow: visible; }
  .scale-rail.is-mobile-open .scale-body { display: block; opacity: 1; }
  .scale-rail.is-mobile-open .scale-track-wrap { height: auto; margin-left: 0; }
  .scale-rail.is-mobile-open .scale-track,
  .scale-rail.is-mobile-open .scale-progress,
  .scale-rail.is-mobile-open .scale-thumb,
  .scale-rail.is-mobile-open .scale-ruler,
  .scale-rail.is-mobile-open .scale-range { display: none; }
  .scale-rail.is-mobile-open .scale-stops {
    position: static;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .scale-rail.is-mobile-open .scale-stop {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    display: flex;
    align-items: center;
    min-height: 31px;
    padding: 7px 0 7px 16px;
    font-size: 10px;
    border-bottom: 1px solid rgba(130,150,180,.10);
  }
  .scale-rail.is-mobile-open .scale-stop::before {
    top: 50%;
    transform: translateY(-50%);
  }
  .scale-rail.is-mobile-open .scale-stop span { white-space: normal; }
  .scale-rail.is-mobile-open .scale-readout {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
  }
  .scale-sheet-open .hint { display: none !important; }
}
body.scale-sheet-open .toast { display: none !important; }
body.domain-exo .scale-rail,
body.domain-exo .mobile-scale-button,
body.domain-exo .scale-open { display: none !important; }
