/* ═══════════════════════════════════════════════════════════
   HELIOS CONTROL — Mission supervision UI
   Density: cockpit · Accent: copper/amber · Type: IBM Plex
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #0c0e12;
  --bg-panel: rgba(14, 17, 22, 0.92);
  --bg-elevated: #12161d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #e6e8ec;
  --text-dim: #8b919c;
  --text-mute: #5c6370;
  --accent: #c4a574;
  --accent-dim: rgba(196, 165, 116, 0.14);
  --accent-line: rgba(196, 165, 116, 0.35);
  --ok: #6fbf9a;
  --ok-dim: rgba(111, 191, 154, 0.15);
  --danger: #c97a6a;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --rail-w: 272px;
  --cmd-h: 52px;
  --console-h: auto;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-dim); }
.hidden { display: none !important; }

#canvas-container {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#canvas-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Viewport chrome */
.viewport-frame {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 80px 80px -60px rgba(0, 0, 0, 0.55),
    inset 0 -100px 90px -50px rgba(0, 0, 0, 0.65);
}

.scan-grid {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.035;
  background-image:
    linear-gradient(rgba(196, 165, 116, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 165, 116, 0.5) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

/* ── Boot ── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

#loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-shell {
  width: min(360px, 90vw);
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  padding: 20px 22px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.loader-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.loader-header .tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.loader-header .tag.dim { color: var(--text-mute); }

.loader-brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.22em;
  margin-bottom: 8px;
}

.loader-text {
  font-size: 11px;
  color: var(--text-dim);
  min-height: 1.2em;
  margin-bottom: 14px;
}

.loader-bar {
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s var(--ease);
}

.loader-meta {
  display: flex;
  gap: 14px;
  margin-top: 14px;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text-mute);
}

/* ── Command bar ── */
.cmd-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--cmd-h);
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(0, 1.6fr) auto;
  align-items: stretch;
  gap: 0;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--line-strong);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

.cmd-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-line);
  background: var(--accent-dim);
  color: var(--accent);
  flex-shrink: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-text h1 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.1;
}

.brand-sub {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-top: 3px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ok);
  padding: 2px 7px;
  border: 1px solid rgba(111, 191, 154, 0.3);
  background: var(--ok-dim);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse-ok 2s ease-in-out infinite;
}

@keyframes pulse-ok {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.cmd-telemetry {
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
}

.tel-cell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0 14px;
  border-right: 1px solid var(--line);
}

.tel-cell:last-child { border-right: none; }

.tel-k {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--text-mute);
}

.tel-v {
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tel-v.live { color: var(--ok); }

.live-chip {
  background: linear-gradient(90deg, transparent, var(--ok-dim));
}

.cmd-actions {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-left: 1px solid var(--line);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s, background 0.2s, transform 0.12s;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.icon-btn:active { transform: scale(0.96); }

.icon-btn.sm {
  width: 26px;
  height: 26px;
  border-color: transparent;
  background: transparent;
}

/* ── Side rails ── */
.rail {
  position: fixed;
  z-index: 90;
  top: calc(var(--cmd-h) + 10px);
  bottom: 148px;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.rail-left { left: 10px; }

.rail-right {
  right: 10px;
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.rail-right.visible,
#panel-info.visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.rail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.rail-k {
  display: block;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 4px;
}

.rail-head h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.rail-count {
  font-size: 10px;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-dim);
  padding: 3px 7px;
  min-width: 28px;
  text-align: center;
}

.rail-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.rail-body::-webkit-scrollbar { width: 3px; }
.rail-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
}

.rail-foot {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  flex-shrink: 0;
}

/* Catalog search */
.catalog-search-wrap {
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.catalog-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.15s, background 0.15s;
}

.catalog-search:focus-within {
  border-color: var(--accent-line);
  background: rgba(196, 165, 116, 0.06);
}

.catalog-search-icon {
  flex-shrink: 0;
  color: var(--text-mute);
}

.catalog-search:focus-within .catalog-search-icon {
  color: var(--accent);
}

.catalog-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  outline: none;
  padding: 0;
}

.catalog-search-input::placeholder {
  color: var(--text-mute);
  opacity: 0.85;
}

.catalog-search-input::-webkit-search-cancel-button {
  display: none;
}

.catalog-search-kbd {
  flex-shrink: 0;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  border: 1px solid var(--line);
  padding: 1px 5px;
  line-height: 1.4;
  opacity: 0.7;
}

.catalog-search:focus-within .catalog-search-kbd {
  display: none;
}

.catalog-search-clear {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  color: var(--text-mute);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
}

.catalog-search-clear:hover { color: var(--text); }
.catalog-search-clear.hidden { display: none; }

/* Catalog tabs — 7 entries: 3+3+1 */
.catalog-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.catalog-tab {
  appearance: none;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-mute);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 4px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.catalog-tab:hover {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
}

.catalog-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--accent-dim);
}

.catalog-tab:active { transform: scale(0.98); }

.catalog-tab-fav {
  grid-column: 1 / -1;
  letter-spacing: 0.12em;
}

.catalog-tab-fav.active {
  color: var(--ok);
  border-bottom-color: var(--ok);
  background: rgba(90, 180, 140, 0.08);
}

.catalog-tab-fav .fav-count {
  margin-left: 4px;
  opacity: 0.75;
  font-size: 8px;
}

/* Body list items */
.body-list { padding: 4px 0; }

.body-list-empty {
  padding: 20px 14px;
  text-align: center;
  color: var(--text-mute);
  font-size: 11px;
  line-height: 1.5;
}

.body-list-empty .mono {
  display: block;
  font-size: 9px;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  color: var(--text-dim);
}

.body-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 8px 8px 10px;
  margin: 0;
  border: none;
  border-left: 2px solid transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition: background 0.12s, border-color 0.12s;
}

.body-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.body-item:active { transform: scale(0.995); }

.body-item.is-favorite {
  border-left-color: rgba(90, 180, 140, 0.35);
}

.body-item .body-meta {
  flex: 1 1 auto;
  min-width: 0;
}

.body-item .body-name {
  display: flex;
  align-items: center;
  gap: 5px;
}

.body-cat-tag {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  border: 1px solid var(--line);
  padding: 1px 4px;
  margin-left: 4px;
}

.body-pin {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-mute);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.45;
  border-radius: 0;
  transition: opacity 0.12s, color 0.12s, border-color 0.12s, background 0.12s;
  display: grid;
  place-items: center;
  padding: 0;
}

.body-item:hover .body-pin {
  opacity: 0.85;
}

.body-pin:hover {
  color: var(--ok);
  border-color: rgba(90, 180, 140, 0.35);
  background: rgba(90, 180, 140, 0.08);
}

.body-pin.is-on {
  opacity: 1;
  color: var(--ok);
}

.body-pin:focus-visible {
  outline: 1px solid var(--accent-line);
  outline-offset: 1px;
}

.body-item.active {
  background: var(--accent-dim);
  border-left-color: var(--accent);
}

.body-item:focus-visible {
  outline: 1px solid var(--accent-line);
  outline-offset: -1px;
}

.body-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.body-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.body-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.body-type {
  font-size: 10px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.body-dist {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
}

/* Telemetry empty + info content */
.empty-telemetry {
  padding: 20px 14px;
  text-align: left;
}

.empty-telemetry .mono {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-mute);
  margin-bottom: 8px;
}

.empty-telemetry p {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 28ch;
}

.info-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 14px;
  border-bottom: 1px solid var(--line);
}

.info-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
}

.info-hero-text h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.info-hero-text p {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 2px;
  font-family: var(--mono);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.info-stat {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.info-stat:nth-child(2n) { border-right: none; }

.info-stat .label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 4px;
}

.info-stat .value {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.info-desc {
  padding: 12px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* Mission / NASA 3D credits */
.mission-credits {
  margin: 0 12px 12px;
  padding: 10px 10px 12px;
  border: 1px solid var(--line);
  border-top: 1px solid var(--accent-line);
  background: rgba(196, 165, 116, 0.04);
}

.mission-credits-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.mission-credits-k {
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0;
}

.nasa-badge {
  font-size: 8px;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border: 1px solid var(--accent-line);
  color: var(--accent);
  background: var(--accent-dim);
  white-space: nowrap;
}

.nasa-badge.live-hd,
.nasa-badge:not(.muted) {
  border-color: rgba(90, 180, 140, 0.45);
  color: var(--ok);
  background: rgba(90, 180, 140, 0.12);
}

.nasa-badge.muted {
  color: var(--text-mute);
  border-color: var(--line);
  background: transparent;
}

.mission-credits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.mission-credits-grid .mck {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--text-mute);
}

.mission-credits-grid .mcv {
  font-size: 10px;
  color: var(--text);
}

.mission-credit-line {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.45;
  margin-bottom: 4px;
}

.mission-license {
  font-size: 9px;
  color: var(--text-mute);
  margin-bottom: 8px;
}

.mission-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mission-link {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent-line);
  padding: 4px 8px;
  background: var(--accent-dim);
  transition: background 0.15s, color 0.15s;
}

.mission-link:hover {
  color: #e8d4b0;
  background: rgba(196, 165, 116, 0.22);
}

.mission-link:active {
  transform: scale(0.98);
}

/* ── Bottom console ── */
.console {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: calc(100vw - 40px);
  border: 1px solid var(--line-strong);
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.console-block {
  padding: 10px 14px 12px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.console-block:last-child { border-right: none; }

.console-label {
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--text-mute);
  margin-bottom: 10px;
}

.time-controls {
  min-width: 280px;
  max-width: 340px;
}

.view-controls {
  min-width: 220px;
  flex: 1 1 auto;
}

.camera-controls {
  min-width: 148px;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.time-controls.is-live .control-row { margin-bottom: 10px; }
.time-controls.is-live #time-scale-group { display: none; }

.ctrl-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.ctrl-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.ctrl-btn:active { transform: scale(0.96); }

.ctrl-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}

.ctrl-btn.primary {
  width: 40px;
  height: 40px;
  background: var(--accent-dim);
  border-color: var(--accent-line);
  color: var(--accent);
}

.ctrl-btn.primary:hover {
  background: rgba(196, 165, 116, 0.22);
  color: #e8d4b0;
}

.ctrl-btn.live-btn {
  width: auto;
  min-width: 52px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.ctrl-btn.live-btn .live-btn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-mute);
}

.ctrl-btn.live-btn.active {
  color: #0c1210;
  background: var(--ok);
  border-color: transparent;
}

.ctrl-btn.live-btn.active .live-btn-dot {
  background: #0c1210;
  animation: pulse-ok 1.4s ease-in-out infinite;
}

/* Ephemeris mode: Kepler fast vs Horizons accuracy */
.ephem-mode {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.ephem-toggle {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.ephem-toggle .chip-btn {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 6px 8px;
  text-align: center;
  white-space: nowrap;
}

.ephem-toggle .chip-btn.active {
  color: #0c1210;
  background: var(--accent);
  border-color: transparent;
  font-weight: 600;
}

#btn-ephem-horizons.active {
  background: var(--ok);
  color: #0c1210;
}

.ephem-status {
  margin: 8px 0 0;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--text-mute);
  line-height: 1.35;
  max-width: 100%;
}

.ephem-status[data-tone="ok"] { color: var(--ok); }
.ephem-status[data-tone="loading"] { color: var(--accent); }
.ephem-status[data-tone="partial"] { color: #d4a574; }
.ephem-status[data-tone="error"] { color: #e07070; }
.ephem-status[data-tone="kepler"] { color: var(--text-mute); }

.tel-cell.ephem-chip .tel-v {
  color: var(--ok);
  font-size: 11px;
}

/* Sliders */
.slider-group { width: 100%; }

.slider-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.slider-group.compact { margin-top: 0; min-width: 0; }

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-mute);
}

.slider-labels .mono {
  color: var(--accent);
  letter-spacing: 0;
  font-size: 10px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 0;
  background: var(--accent);
  border: 1px solid #1a1610;
  cursor: grab;
}

input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 0;
  background: var(--accent);
  border: 1px solid #1a1610;
  cursor: grab;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 8px;
  color: var(--text-mute);
  opacity: 0.8;
}

/* Live strip */
.live-status {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(111, 191, 154, 0.25);
  background: var(--ok-dim);
}

.live-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.live-status-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #0c1210;
  background: var(--ok);
  padding: 2px 7px;
}

.live-status-row .mono {
  font-size: 11px;
  color: var(--ok);
}

.live-status-desc {
  font-size: 9px;
  color: var(--text-dim);
  line-height: 1.35;
}

/* Toggles */
.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: relative;
  width: 26px;
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  transition: background 0.15s;
  flex-shrink: 0;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 10px;
  height: 10px;
  background: var(--text-mute);
  transition: transform 0.15s var(--ease), background 0.15s;
}

.toggle input:checked + .toggle-track {
  background: var(--accent-dim);
  border-color: var(--accent-line);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(12px);
  background: var(--accent);
}

.toggle-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* Camera modes */
.cam-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.chip-btn {
  padding: 7px 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.chip-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.chip-btn:active { transform: scale(0.97); }

.chip-btn.active {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-dim);
}

/* Hint + status strip */
.hint {
  position: fixed;
  bottom: 122px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  padding: 5px 12px;
  border: 1px solid var(--line);
  background: rgba(12, 14, 18, 0.85);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--text-mute);
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
  white-space: nowrap;
}

.hint.fade { opacity: 0; }

.status-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: #0a0c10;
  border-top: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text-mute);
}

.status-strip .sep { opacity: 0.35; }

.meteor-status {
  color: var(--accent);
  letter-spacing: 0.1em;
}

.meteor-status:not(.hidden) {
  animation: pulse-ok 2.4s ease-in-out infinite;
}

/* 3D labels */
.label-3d {
  color: rgba(230, 232, 236, 0.95);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  background: rgba(12, 14, 18, 0.88);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
  overflow: visible;
  max-width: none;
  width: max-content;
  pointer-events: none;
  transform: translate(-50%, -140%);
  text-shadow: none;
  transition: opacity 0.15s;
  box-sizing: border-box;
}

.label-3d.sun {
  color: var(--accent);
  border-color: var(--accent-line);
}

.label-3d.moon {
  font-size: 9px;
  color: var(--text-dim);
}

.label-3d.minor {
  font-size: 9px;
  color: #c4b08a;
  border-color: rgba(196, 165, 116, 0.25);
}

.label-3d.comet {
  font-size: 9px;
  color: #9ab8c8;
  border-color: rgba(140, 170, 190, 0.3);
}

.label-3d.spacecraft {
  font-size: 9px;
  color: var(--ok);
  border-color: rgba(111, 191, 154, 0.35);
}

.label-3d.spacecraft.constellation {
  font-size: 8px;
  color: #8a9aab;
  border-color: rgba(120, 140, 160, 0.3);
  opacity: 0.9;
}

.label-3d.spacecraft.archive {
  color: #c4a574;
  border-color: rgba(196, 165, 116, 0.4);
  border-style: dashed;
}

/* Compat aliases for any residual class names */
.hud-top,
.hud-bottom,
.hud-catalog,
.control-card,
.credit-bar { /* superseded by cmd/console/rail */ }

/* Responsive */
@media (max-width: 1100px) {
  .cmd-bar {
    grid-template-columns: 1fr auto;
  }
  .cmd-telemetry { display: none; }
  .console {
    flex-wrap: wrap;
    max-width: calc(100vw - 20px);
  }
  .console-block {
    border-right: none;
    border-bottom: 1px solid var(--line);
    flex: 1 1 40%;
  }
}

@media (max-width: 900px) {
  .rail {
    width: 240px;
    bottom: 180px;
  }
  .brand-sub { display: none; }
  .hint { display: none; }
}

@media (max-width: 700px) {
  .rail-left,
  #panel-catalog { display: none; }
  .rail-right,
  #panel-info {
    width: min(260px, calc(100vw - 20px));
    top: calc(var(--cmd-h) + 8px);
    bottom: auto;
    max-height: 45dvh;
  }
  .camera-controls { display: none; }
  .console {
    bottom: 24px;
    left: 8px;
    right: 8px;
    transform: none;
    max-width: none;
  }
}
