:root {
  --bg: #07080c;
  --ink: #ebe6dc;
  --muted: #9a9388;
  --line: rgba(235, 230, 220, 0.12);
  --brass: #e0b15a;
  --brass-2: #f0d7a2;
  --panel: rgba(10, 12, 16, 0.86);
  --danger: #e07a62;
  --header: rgba(7, 8, 12, 0.94);
  --aside: #0c0e12;
  --settings: #0c0e12;
  --settings-nav: #101216;
  --wash: rgba(255, 255, 255, 0.04);
  --wash-2: rgba(255, 255, 255, 0.06);
  --glass: rgba(10, 12, 16, 0.78);
  --field: rgba(255, 255, 255, 0.03);
  --on-brass: #14110c;
  --track: rgba(235, 230, 220, 0.28);
  --thumb-edge: #1a140c;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #ffffff;
  --ink: #161616;
  --muted: #6b6e76;
  --line: rgba(18, 18, 20, 0.1);
  --brass: #161616;
  --brass-2: #000000;
  --panel: rgba(255, 255, 255, 0.94);
  --danger: #c23b2e;
  --header: rgba(255, 255, 255, 0.96);
  --aside: #ffffff;
  --settings: #ffffff;
  --settings-nav: #f5f6f8;
  --wash: rgba(18, 18, 20, 0.045);
  --wash-2: rgba(18, 18, 20, 0.08);
  --glass: rgba(255, 255, 255, 0.92);
  --field: rgba(18, 18, 20, 0.04);
  --on-brass: #ffffff;
  --track: rgba(18, 18, 20, 0.2);
  --thumb-edge: #ffffff;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; }
body {
  font-family: "Segoe UI", "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 14px;
  letter-spacing: 0.01em;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
#app {
  height: 100vh;
  max-width: 100vw;
  overflow: hidden;
  display: grid;
  grid-template-columns: 372px 1fr;
  grid-template-rows: 58px 1fr;
}
header {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  min-width: 0;
  overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-width: 0; margin-left: 4px; }
body.mode-settings .brand { cursor: pointer; }
.brand svg { width: 28px; height: 28px; flex: 0 0 auto; }
.brand strong {
  display: block;
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.1em;
  font-size: 13px;
  white-space: nowrap;
}
.brand small { color: var(--muted); letter-spacing: 0.08em; font-size: 10px; }
.toolbar-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  max-width: calc(100% - 24px);
  pointer-events: none;
}
.toolbar-center > * { pointer-events: auto; }
.toolbar-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
#modes {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 372px;
  max-width: 372px;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 2px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  overflow: hidden;
  z-index: 1;
}
#modes::before {
  content: "";
  position: absolute;
  inset: 8px 10px;
  border-radius: 10px;
  background: var(--wash);
  border: 1px solid var(--line);
  pointer-events: none;
}
.modes-thumb {
  position: absolute;
  top: 8px;
  left: 0;
  bottom: 8px;
  width: 0;
  opacity: 0;
  border-radius: 8px;
  background: var(--wash-2);
  pointer-events: none;
  z-index: 0;
  will-change: transform, width;
}
.modes-thumb.is-ready {
  transition:
    transform 0.34s cubic-bezier(0.25, 0.8, 0.25, 1),
    width 0.34s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.2s ease;
}
@media (prefers-reduced-motion: reduce) {
  .modes-thumb.is-ready { transition: none; }
}
.modes-thumb::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 0;
  height: 1.5px;
  border-radius: 1px 1px 0 0;
  background: var(--brass);
  opacity: 0.7;
}
#modes button {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-size: 10.5px;
  font-weight: 550;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.18s ease;
}
#modes button .modes-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
#modes button:hover {
  color: var(--ink);
  background: transparent;
}
#modes button.on {
  background: transparent;
  color: var(--ink);
}
#modes button.on:hover {
  background: transparent;
  color: var(--ink);
}
.toolbar-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 0 0 auto;
  background: var(--wash);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--wash);
}
#flight-controls:not([hidden]) { margin-left: 0; }
#flight-controls[hidden] + #timebar { margin-left: 0; }
.toolbar-group > button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 12px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.toolbar-group > button:hover:not(:disabled) {
  color: var(--ink);
  background: var(--wash-2);
}
.settings-gear {
  width: 32px;
  height: 32px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.settings-gear svg { width: 18px; height: 18px; display: block; }
.settings-gear:hover { color: var(--ink); background: var(--wash-2); }
.settings-gear.on { color: var(--brass-2); background: rgba(224, 177, 90, 0.16); }
#settings-page {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  min-height: 0;
  background: var(--settings);
  color: var(--ink);
}
#settings-page[hidden] { display: none !important; }
.settings-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  width: 372px;
  padding: 22px 12px;
  border-right: 1px solid var(--line);
  background: var(--settings-nav);
  overflow: auto;
}
.settings-nav-title {
  margin: 0 8px 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.settings-nav button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  font-size: 14px;
}
.settings-nav button.on { background: var(--wash-2); }
.settings-nav button + button { margin-top: 2px; }
.settings-main {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: auto;
  padding: 48px 0 72px;
}
.settings-sheet[hidden] { display: none !important; }
.settings-sheet {
  width: 680px;
  max-width: calc(100vw - 428px);
  margin-left: calc(50vw - 340px);
}
@media (max-width: 1472px) {
  .settings-sheet { margin-left: 396px; }
}
.settings-main h2 { font-size: 22px; margin: 0 0 6px; }
.settings-lead { color: var(--muted); margin: 0 0 18px; }
.settings-group { max-width: none; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 2px;
  border-top: 1px solid var(--line);
}
.settings-row:last-child { border-bottom: 1px solid var(--line); }
.settings-row b { display: block; font-weight: 560; font-size: 14px; }
.settings-row p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.settings-data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.settings-data-actions .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}
.settings-data-actions .ghost.primary {
  border: 0;
  background: var(--brass);
  color: var(--on-brass);
  font-weight: 600;
}
.settings-data-actions .ghost:disabled {
  opacity: 0.45;
  cursor: default;
}
.settings-data-check {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}
.settings-data-check input {
  margin-top: 8px;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.settings-data-msg { margin: 14px 0 0; font-size: 13px; }
.settings-howto {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash-2);
}
.settings-howto b { display: block; font-size: 14px; margin-bottom: 6px; }
.settings-howto p { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.settings-howto p:last-child { margin-bottom: 0; }
.settings-howto ol {
  margin: 0 0 12px;
  padding-left: 1.25em;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}
.settings-howto li + li { margin-top: 4px; }
.settings-howto a { color: var(--brass-2); }
.settings-howto code {
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--wash);
}
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 12px;
}
.catalog-subhead {
  margin: 18px 0 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.catalog-update-msg {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(61, 154, 98, 0.14);
  color: var(--ink);
  font-size: 13px;
}
.catalog-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 2px;
  border-top: 1px solid var(--line);
}
.catalog-list .catalog-row:last-child { border-bottom: 1px solid var(--line); }
.catalog-row-main b { display: block; font-weight: 560; font-size: 14px; }
.catalog-row-main p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.catalog-status { color: var(--ink) !important; opacity: 0.85; }
.catalog-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.catalog-row-actions .ghost,
.catalog-row-actions .catalog-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}
.catalog-row-actions .ghost:hover,
.catalog-row-actions .catalog-link:hover {
  background: var(--wash-2);
}
.catalog-row-actions .ghost:disabled {
  opacity: 0.45;
  cursor: default;
}
.catalog-row-actions .ghost.is-danger {
  color: #d98a78;
  border-color: rgba(224, 138, 122, 0.35);
}
.catalog-row-actions .ghost.is-danger:hover {
  color: #f0a594;
  background: rgba(217, 138, 120, 0.1);
}
.catalog-toolbar .ghost.primary {
  border: 0;
  background: var(--brass);
  color: var(--on-brass);
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.catalog-toolbar .ghost.primary:disabled {
  opacity: 0.45;
  cursor: default;
}
.catalog-new {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.catalog-info {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-style: italic;
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
}
.catalog-info:hover,
.catalog-info.on {
  color: var(--brass-2);
  border-color: rgba(224, 177, 90, 0.55);
  background: rgba(224, 177, 90, 0.08);
}
.catalog-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  max-width: 640px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash-2);
}
.catalog-note p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.catalog-note p:last-child { margin-bottom: 0; }
.catalog-note b { color: var(--ink); font-weight: 560; }
.catalog-note a { color: var(--brass-2); }
.catalog-note code {
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--wash);
}
.switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: #3a3f48;
  padding: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f4f1ea;
  transition: transform 0.15s ease;
}
.switch.on { background: #3d9a62; }
.switch.on::after { transform: translateX(18px); }
.switch:disabled { opacity: 0.45; cursor: default; }
.switch:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.toolbar-group > button.on {
  background: rgba(224, 177, 90, 0.16);
  color: var(--brass-2);
}
.toolbar-group > button.primary {
  background: var(--brass);
  color: var(--on-brass);
  font-weight: 600;
}
.toolbar-group > button.primary:hover:not(:disabled) {
  background: var(--brass-2);
  color: var(--on-brass);
}
.toolbar-group > button:disabled {
  opacity: 0.36;
  cursor: default;
}
.toolbar-group[hidden] { display: none !important; }
.toolbar-time {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
.clock {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55em;
  margin: 0 0 0 4px;
  padding: 0 0 0 18px;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.1;
  cursor: pointer;
  white-space: nowrap;
}
.clock::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 16px;
  transform: translateY(-50%);
  background: var(--line);
}
.clock b {
  display: block;
  width: 8ch;
  flex: 0 0 8ch;
  font: inherit;
  font-weight: 560;
  letter-spacing: 0;
  text-align: left;
}
.clock-zone {
  display: block;
  width: 6ch;
  flex: 0 0 6ch;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  text-align: left;
}
.clock:hover .clock-zone,
.clock[aria-expanded="true"] .clock-zone { color: var(--brass-2); }
aside {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--aside);
  overflow: auto;
  padding: 16px 16px 28px;
  z-index: 2;
}
main { grid-column: 2; grid-row: 2; position: relative; min-width: 0; min-height: 0; overflow: hidden; }
#globe { width: 100%; height: 100%; display: block; touch-action: none; }
.maneuver-plane {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  background: #07080c;
  z-index: 1;
}
.maneuver-plane[hidden] { display: none !important; }
body.mode-maneuvers #globe,
body.mode-maneuvers #hud,
body.mode-maneuvers #orbit-dock,
body.mode-maneuvers #view-controls { visibility: hidden; pointer-events: none; }
body.mode-maneuvers #maneuver-plane { visibility: visible; }
.view-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  max-width: calc(100% - 28px);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  pointer-events: none;
}
.view-controls[hidden] { display: none; }
.view-controls > * { pointer-events: auto; }
.proj-toggle {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.proj-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 9px;
  padding: 7px 11px 7px 9px;
  letter-spacing: 0.04em;
  transition: color 0.15s ease, background 0.15s ease;
}
.proj-toggle button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.82;
}
.proj-toggle button span {
  font-size: 11px;
  font-weight: 560;
  text-transform: uppercase;
}
.proj-toggle button:hover {
  color: var(--ink);
  background: var(--wash-2);
}
.proj-toggle button.on {
  color: var(--on-brass);
  background: var(--brass);
}
.proj-toggle button.on:hover { background: var(--brass-2); color: var(--on-brass); }
.proj-toggle button.on svg { opacity: 1; color: var(--on-brass); }
.coord-slot {
  position: relative;
  z-index: 2;
}
.coord-slot[hidden] { display: none !important; }
.coord-pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 228px;
  padding: 10px 8px 8px;
  border-radius: 16px;
  background: rgba(10, 12, 16, 0.92);
  border: 1px solid rgba(235, 230, 220, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  color: #f4f1ea;
  animation: rec-in 0.18s ease;
}
.coord-pop[hidden] { display: none !important; }
.coord-kicker {
  display: block;
  margin: 2px 8px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(235, 230, 220, 0.5);
}
.coord-choices {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.coord-choices button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #d7d1c6;
  text-align: left;
}
.coord-choices button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.coord-choices button span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.15;
}
.coord-choices button small {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(235, 230, 220, 0.48);
}
.coord-choices button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.coord-choices button.on {
  color: #f6edd8;
  background: rgba(224, 177, 90, 0.16);
  box-shadow: inset 2px 0 0 #e0b15a;
}
.coord-choices button.on small { color: rgba(246, 237, 216, 0.62); }
.coord-choices button:focus-visible {
  outline: 2px solid rgba(110, 243, 230, 0.75);
  outline-offset: 1px;
}
.map-grid-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}
.map-grid-labels.has-axes::before,
.map-grid-labels.has-axes::after {
  content: "";
  position: absolute;
  background: rgba(224, 177, 90, 0.22);
  pointer-events: none;
}
.map-grid-labels.has-axes::before {
  left: var(--axis-l, 92px);
  top: 0;
  bottom: var(--axis-b, 30px);
  width: 1px;
}
.map-grid-labels.has-axes::after {
  left: var(--axis-l, 92px);
  right: 0;
  bottom: var(--axis-b, 30px);
  height: 1px;
}
.map-grid-label {
  position: absolute;
  z-index: 1;
  transform: translate(-50%, -50%);
  font-family: "IBM Plex Mono", "SF Mono", "Consolas", "Segoe UI Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1;
  color: rgba(235, 230, 220, 0.52);
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  white-space: nowrap;
  user-select: none;
}
.map-grid-label.a-left {
  transform: translate(-100%, -50%);
  padding-right: 9px;
  text-align: right;
}
.map-grid-label.a-left::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 1px;
  margin-top: -0.5px;
  background: currentColor;
  opacity: 0.7;
}
.map-grid-label.a-bottom {
  transform: translate(-50%, 7px);
}
.map-grid-label.a-bottom::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 1px;
  height: 6px;
  background: currentColor;
  opacity: 0.7;
}
.map-grid-label.minor {
  color: rgba(235, 230, 220, 0.30);
  font-size: 10px;
  font-weight: 500;
}
.map-grid-label.axis {
  color: rgba(224, 177, 90, 0.72);
  font-weight: 600;
}
html[data-theme="light"] .map-grid-label {
  color: rgba(22, 22, 24, 0.72);
  background: none;
}
html[data-theme="light"] .map-grid-label.a-left,
html[data-theme="light"] .map-grid-label.a-bottom {
  background: none;
}
html[data-theme="light"] .map-grid-label.minor {
  color: rgba(22, 22, 24, 0.46);
}
html[data-theme="light"] .map-grid-label.axis {
  color: #8a6418;
}
.map-grid-label.cursor {
  z-index: 3;
  color: #1c1608;
  font-weight: 600;
  background: #ffe14a;
  border-radius: 2px;
}
.map-grid-label.cursor.a-left {
  padding: 2px 6px 2px 4px;
  background: #ffe14a;
}
.map-grid-label.cursor.a-left::after {
  display: none;
}
.map-grid-label.cursor.a-bottom {
  padding: 2px 4px;
  background: #ffe14a;
}
.map-grid-label.cursor.a-bottom::before {
  width: 2px;
  height: 8px;
  top: -8px;
  background: #ffe14a;
  opacity: 1;
}
html[data-theme="light"] .map-grid-label.cursor,
html[data-theme="light"] .map-grid-label.cursor.a-left,
html[data-theme="light"] .map-grid-label.cursor.a-bottom {
  color: #1c1608;
  background: #ffe14a;
}
html[data-theme="light"] .map-grid-label.cursor.a-bottom::before {
  background: #ffe14a;
}
/* Latitude fences pulled off the Mercator frame. Plates match the graticule. */
.lat-guides {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
}
.lat-guides[hidden],
.lat-veil[hidden],
.lat-band[hidden],
.lat-rail[hidden],
.lat-line-x[hidden],
.lat-line-val[hidden] { display: none !important; }
.lat-veil {
  position: absolute;
  pointer-events: none;
  background-color: rgba(7, 8, 12, 0.36);
  background-image: repeating-linear-gradient(
    -52deg,
    rgba(224, 177, 90, 0.2) 0 1px,
    transparent 1px 8px
  );
}
.lat-rail {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e8c888;
  pointer-events: auto;
  cursor: ns-resize;
  touch-action: none;
}
.lat-rail.north { align-items: flex-end; }
.lat-rail.south { align-items: flex-start; }
.lat-rail-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(224, 177, 90, 0.28);
  pointer-events: none;
}
.lat-rail.north .lat-rail-line { top: 0; }
.lat-rail.south .lat-rail-line { bottom: 0; }
.lat-rail:hover .lat-rail-line,
.lat-rail:focus-visible .lat-rail-line,
.lat-rail.is-hot .lat-rail-line { background: rgba(224, 177, 90, 0.9); }
.lat-rail:focus { outline: none; }
.lat-rail:focus-visible .lat-rail-line {
  outline: 2px solid rgba(224, 177, 90, 0.85);
  outline-offset: 2px;
}
.lat-rail.is-full { cursor: not-allowed; }
.lat-rail.north.is-hint .lat-rail-line { animation: lat-pull-n 1.6s ease-in-out 3; }
.lat-rail.south.is-hint .lat-rail-line { animation: lat-pull-s 1.6s ease-in-out 3; }
@keyframes lat-pull-n {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
@keyframes lat-pull-s {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.lat-lines {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}
.lat-line {
  position: absolute;
  height: 18px;
  pointer-events: auto;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
}
.lat-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1.5px;
  margin-top: -1px;
  background: #e0b15a;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 0 10px rgba(224, 177, 90, 0.35);
  pointer-events: none;
}
.lat-line.is-loose::before {
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(224, 177, 90, 0.75) 0 6px, transparent 6px 10px);
  box-shadow: none;
}
.lat-line.is-draft::before {
  background: repeating-linear-gradient(90deg, #e0b15a 0 7px, transparent 7px 11px);
}
.lat-line.is-clash::before,
.lat-line.is-remove::before {
  background: #e07a62;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 10px rgba(224, 122, 98, 0.45);
}
.lat-line:hover::before { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 14px rgba(224, 177, 90, 0.55); }
.lat-chip {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 2px 0 7px;
  background: #12151c;
  color: #e8c888;
  border-left: 2px solid #e0b15a;
  font-family: "IBM Plex Mono", "SF Mono", Consolas, "Segoe UI Mono", monospace;
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  cursor: ns-resize;
}
.lat-line.is-on .lat-chip { border-left-color: #f0d7a2; color: #f0d7a2; }
.lat-line.is-remove .lat-chip,
.lat-line.is-clash .lat-chip {
  color: #ffd2c8;
  border-left-color: #e07a62;
  background: #2a1412;
}
.lat-chip:focus { outline: none; }
.lat-chip:focus-visible {
  outline: 2px solid rgba(224, 177, 90, 0.85);
  outline-offset: 2px;
}
.lat-chip input {
  width: 4.8em;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  outline: none;
  cursor: text;
  user-select: text;
}
.lat-line-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin: 0 0 0 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9a9388;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.lat-line-x:hover,
.lat-line-x:focus-visible {
  background: #e07a62;
  color: #1a0c0a;
  outline: none;
}
.lat-band {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 8px 5px;
  background: #12151c;
  color: #e8c888;
  border-left: 2px solid #e0b15a;
  font-family: "IBM Plex Mono", "SF Mono", Consolas, "Segoe UI Mono", monospace;
  font-variant-numeric: tabular-nums;
}
.lat-band small {
  font-size: 9px;
  font-weight: 560;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 200, 136, 0.72);
}
.lat-band b {
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.04em;
}
.lat-band.is-clash {
  color: #ffd2c8;
  border-left-color: #e07a62;
  background: #2a1412;
}
.lat-band.is-clash small { color: rgba(255, 210, 200, 0.7); }
html[data-theme="light"] .lat-chip,
html[data-theme="light"] .lat-band {
  background: #f4f1ea;
  color: #6a4e12;
}
html[data-theme="light"] .lat-chip,
html[data-theme="light"] .lat-band { border-left-color: #8a6418; }
html[data-theme="light"] .lat-band small { color: rgba(106, 78, 18, 0.7); }
html[data-theme="light"] .lat-line.is-remove .lat-chip,
html[data-theme="light"] .lat-line.is-clash .lat-chip,
html[data-theme="light"] .lat-band.is-clash {
  background: #f8e8e4;
  color: #8a2e22;
  border-left-color: #c23b2e;
}
body.is-lat-drag #globe,
body.is-lat-drag .lat-guides,
body.is-lat-drag .lat-guides * { cursor: ns-resize !important; }
@media (prefers-reduced-motion: reduce) {
  .lat-rail.is-hint .lat-rail-line { animation: none; }
}
.zoom-slider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 42px;
  height: 296px;
  padding: 10px 0;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--muted);
  align-self: flex-end;
}
.zoom-step {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  flex: 0 0 auto;
}
.zoom-step:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}
.zoom-step:focus-visible {
  outline: 2px solid rgba(224, 177, 90, 0.7);
  outline-offset: 1px;
}
.zoom-slider svg {
  width: 15px;
  height: 15px;
  display: block;
  opacity: 0.78;
}
.zoom-step:hover svg { opacity: 1; }
.zoom-slider input[type="range"] {
  flex: 1;
  width: 18px;
  height: 100%;
  margin: 0;
  cursor: pointer;
  accent-color: #e0b15a;
  writing-mode: vertical-lr;
  direction: rtl;
  -webkit-appearance: slider-vertical;
  appearance: slider-vertical;
}
@media (max-width: 720px) {
  .view-controls { top: 10px; right: 10px; gap: 6px; }
  .proj-toggle button span { display: none; }
  .proj-toggle button { padding: 8px; }
  .zoom-slider { width: 38px; height: 240px; padding: 8px 0; gap: 6px; }
  .map-grid-label { font-size: 10px; }
}
#hud { position: absolute; inset: 0; pointer-events: none; }
.om-leaders {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  pointer-events: none;
}
.tag {
  position: absolute;
  transform: translate(-50%, -130%);
  background: rgba(8, 10, 14, 0.82);
  border: 1px solid var(--line);
  color: var(--brass-2);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  white-space: nowrap;
}
.tag.city-star {
  transform: translate(-50%, -140%);
  color: #ff4d3d;
  border-color: rgba(255, 80, 70, 0.4);
  background: rgba(10, 12, 16, 0.78);
  text-shadow: 0 0 10px rgba(255, 60, 50, 0.55);
  letter-spacing: 0.02em;
}
.mark {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.95),
    0 0 10px rgba(0, 0, 0, 0.75);
}
.mark[hidden] { display: none; }
.orbit-dock {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.orbit-dock > * { pointer-events: auto; }
.orbit-fabs {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.orbit-fab {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(235, 230, 220, 0.14);
  background: rgba(10, 12, 16, 0.78);
  color: #d7d1c6;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.orbit-fab svg { width: 22px; height: 22px; display: block; }
.orbit-fab:hover {
  color: #fff;
  border-color: rgba(110, 243, 230, 0.4);
  transform: translateY(-1px);
}
.orbit-fab:focus-visible {
  outline: 2px solid rgba(110, 243, 230, 0.75);
  outline-offset: 3px;
}
.orbit-fab.on {
  color: #f4f1ea;
  border-color: rgba(110, 243, 230, 0.55);
  background: rgba(10, 20, 22, 0.9);
  box-shadow:
    0 0 0 1px rgba(110, 243, 230, 0.16),
    0 0 22px rgba(110, 243, 230, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.38);
}
.orbit-fab.rec-on,
.orbit-fab.rec-on:hover {
  color: #fff;
  border-color: rgba(255, 90, 79, 0.75);
  background: rgba(28, 12, 12, 0.92);
}
.rec-led {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff453a;
  box-shadow: 0 0 0 1.5px rgba(10, 12, 16, 0.92);
  display: none;
  pointer-events: none;
}
.orbit-fab.rec-on .rec-led {
  display: block;
  animation: rec-breathe 1.5s ease-in-out infinite;
}
@keyframes rec-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.rec-slot { position: relative; }
.rec-pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(252px, calc(100vw - 28px));
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(10, 12, 16, 0.9);
  border: 1px solid rgba(235, 230, 220, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  color: #f4f1ea;
  animation: rec-in 0.18s ease;
}
@keyframes rec-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.rec-pop[hidden],
#rec-setup[hidden],
#rec-live[hidden],
#rec-done[hidden],
.rec-track[hidden],
.rec-file[hidden],
.rec-lengths[hidden],
.rec-fmt[hidden],
.rec-go[hidden] { display: none !important; }
.rec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.rec-kicker {
  color: #9a9388;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.rec-fmt {
  color: #e0b15a;
  font-size: 10px;
  letter-spacing: 0.14em;
  border: 1px solid rgba(224, 177, 90, 0.4);
  border-radius: 999px;
  padding: 2px 7px;
}
.rec-lead,
.rec-note {
  margin: 0;
  color: #9a9388;
  font-size: 12.5px;
  line-height: 1.45;
}
.rec-note { margin-bottom: 10px; }
.rec-note:empty { display: none; }
.rec-lengths {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin: 12px 0 10px;
  padding: 2px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}
.rec-lengths button {
  border: 0;
  background: transparent;
  color: #9a9388;
  border-radius: 8px;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.2;
}
.rec-lengths button:hover { color: #f4f1ea; }
.rec-lengths button.on {
  background: rgba(244, 241, 234, 0.14);
  color: #f4f1ea;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.rec-go,
.rec-stop {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
}
.rec-go {
  border: 0;
  background: #e0b15a;
  color: #14110c;
}
.rec-go:hover { background: #f0d7a2; }
.rec-go:disabled { opacity: 0.45; cursor: default; }
.rec-stop {
  border: 1px solid rgba(255, 90, 79, 0.4);
  background: rgba(255, 90, 79, 0.1);
  color: #ffd2cc;
}
.rec-stop:hover { background: rgba(255, 90, 79, 0.18); color: #fff; }
.rec-square {
  width: 8px;
  height: 8px;
  background: #ff5a4f;
  border-radius: 1px;
}
.rec-meter {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0 12px;
}
.rec-meter b {
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.rec-meter span { color: #9a9388; font-size: 12px; }
.rec-track {
  height: 2px;
  margin: -4px 0 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}
.rec-track i {
  display: block;
  height: 100%;
  width: 0;
  background: #ff5a4f;
  transition: width 0.2s linear;
}
.rec-file {
  display: block;
  margin: 0 0 12px;
  color: #c7c0b4;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
  word-break: break-all;
}
.rec-file:hover { color: #fff; }
.rec-pop button:focus-visible,
.rec-file:focus-visible {
  outline: 2px solid rgba(110, 243, 230, 0.75);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .rec-pop,
  .coord-pop { animation: none; }
  .orbit-fab.rec-on .rec-led { animation: none; }
  .rec-track i { transition: none; }
}
.orbit-card {
  width: 178px;
  padding: 10px 10px 9px;
  border-radius: 14px;
  background: rgba(10, 12, 16, 0.84);
  border: 1px solid rgba(235, 230, 220, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  animation: orbit-card-in 0.18s ease;
}
.orbit-card[hidden] { display: none; }
@keyframes orbit-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.orbit-card-kicker {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.orbit-card-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.orbit-card-empty[hidden] { display: none; }
#orbit-body[hidden] { display: none; }
.orbit-row {
  --om: #ebe6dc;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 26px;
  gap: 7px;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 5px 4px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background 0.18s ease, opacity 0.18s ease;
}
.orbit-row:hover {
  background: rgba(255, 255, 255, 0.045);
}
.orbit-row:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--om) 70%, white);
  outline-offset: 1px;
}
.orbit-row:not(.is-on) {
  opacity: 0.42;
}
.orbit-row-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.orbit-swatch {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  align-self: center;
  background: var(--om);
  box-shadow: 0 0 9px color-mix(in srgb, var(--om) 75%, transparent);
  transition: box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.orbit-row:not(.is-on) .orbit-swatch {
  background: rgba(235, 230, 220, 0.28);
  box-shadow: none;
}
.orbit-swatch-ring {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--om) 70%, transparent);
  box-shadow: none;
}
.orbit-row.is-on .orbit-swatch-ring {
  box-shadow: 0 0 8px color-mix(in srgb, var(--om) 35%, transparent);
}
.orbit-row:not(.is-on) .orbit-swatch-ring {
  border-color: rgba(235, 230, 220, 0.28);
}
.orbit-row small {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.2;
}
.orbit-row b {
  font-weight: 560;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: #f4f1ea;
  line-height: 1.15;
}
.orbit-row:not(.is-on) b {
  color: rgba(244, 241, 234, 0.55);
}
.orbit-switch {
  position: relative;
  width: 26px;
  height: 15px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.orbit-switch i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(235, 230, 220, 0.45);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, box-shadow 0.2s ease;
}
.orbit-row.is-on .orbit-switch {
  background: color-mix(in srgb, var(--om) 28%, rgba(255, 255, 255, 0.06));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--om) 45%, transparent),
    0 0 12px color-mix(in srgb, var(--om) 28%, transparent);
}
.orbit-row.is-on .orbit-switch i {
  transform: translateX(11px);
  background: var(--om);
  box-shadow:
    0 0 10px color-mix(in srgb, var(--om) 80%, transparent),
    0 1px 2px rgba(0, 0, 0, 0.35);
}
@media (prefers-reduced-motion: reduce) {
  .orbit-row,
  .orbit-swatch,
  .orbit-switch,
  .orbit-switch i { transition: none; }
}
.orbit-card-note {
  margin: 6px 2px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
body.flight-hud .orbit-dock { bottom: 16px; }
@media (max-width: 720px) {
  .orbit-dock { right: 10px; bottom: 10px; }
  .orbit-card { width: min(178px, calc(100vw - 88px)); }
  .orbit-fab { width: 40px; height: 40px; border-radius: 12px; }
}
.legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 420px;
}
body.flight-hud .legend { bottom: 108px; }
#flight-telem {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 28px;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 22px 12px;
  background: linear-gradient(180deg, rgba(6, 8, 12, 0.15), rgba(6, 8, 12, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  backdrop-filter: blur(6px);
  pointer-events: none;
  z-index: 3;
  font-variant-numeric: tabular-nums;
  max-width: calc(100% - 24px);
}
#flight-telem[hidden] { display: none; }
.telem-cell { min-width: 88px; text-align: center; }
.telem-stage {
  min-width: 160px;
  max-width: 220px;
  text-align: left;
  margin-right: 8px;
}
.telem-stage[hidden] { display: none !important; }
.telem-stage .telem-value { justify-content: flex-start; }
.telem-stage .telem-value b {
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: normal;
}
.telem-cyclo {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  min-width: 220px;
  max-width: 280px;
  margin: 0 10px 0 2px;
  padding: 0 14px 0 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.telem-cyclo[hidden] { display: none !important; }
.telem-cyclo .telem-label { margin-bottom: 6px; }
.cyclo-hud {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 78px;
  justify-content: center;
}
.cyclo-hud::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(224, 177, 90, 0.35) 18%,
    rgba(224, 177, 90, 0.55) 50%,
    rgba(224, 177, 90, 0.2) 82%,
    transparent
  );
  pointer-events: none;
}
.cyclo-hud-row {
  position: relative;
  display: grid;
  grid-template-columns: 12px 52px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 22px;
  padding: 3px 0 3px 0;
  color: rgba(235, 230, 220, 0.38);
  transition: color 0.2s ease, opacity 0.2s ease;
}
.cyclo-hud-mark {
  width: 9px;
  height: 9px;
  margin-left: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 10, 14, 0.9);
  box-sizing: border-box;
  z-index: 1;
}
.cyclo-hud-t {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  opacity: 0.85;
}
.cyclo-hud-l {
  font-size: 12px;
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cyclo-hud-row.done {
  color: rgba(235, 230, 220, 0.62);
}
.cyclo-hud-row.done .cyclo-hud-mark {
  background: rgba(224, 177, 90, 0.45);
  border-color: rgba(224, 177, 90, 0.55);
}
.cyclo-hud-row.next {
  color: rgba(235, 230, 220, 0.32);
}
.cyclo-hud-row.on {
  color: #f4f1ea;
}
.cyclo-hud-row.on .cyclo-hud-mark {
  width: 11px;
  height: 11px;
  margin-left: -1px;
  background: #e0b15a;
  border-color: #f0d7a2;
  box-shadow:
    0 0 0 3px rgba(224, 177, 90, 0.18),
    0 0 12px 2px rgba(224, 177, 90, 0.35);
}
.cyclo-hud-row.on .cyclo-hud-t {
  color: var(--brass-2);
  opacity: 1;
}
.cyclo-hud-row.on .cyclo-hud-l {
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0.02em;
}
.telem-label {
  display: block;
  margin-bottom: 4px;
  color: rgba(235, 230, 220, 0.62);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.telem-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  line-height: 1;
}
.telem-value b {
  font-weight: 560;
  font-size: 28px;
  letter-spacing: 0.02em;
  color: #f4f1ea;
}
.telem-unit {
  color: rgba(235, 230, 220, 0.55);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.telem-engines {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 92px;
  margin-right: 4px;
}
.telem-engines[hidden] { display: none !important; }
.engine-pack {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 2px 0 4px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(20, 24, 32, 0.35) 0 38%, transparent 39%),
    rgba(4, 6, 10, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.engine-pack[data-mode="upper"],
.engine-pack[data-mode="coast"],
.engine-pack[data-mode="tdu"] {
  background: rgba(4, 6, 10, 0.55);
}
.engine-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #2a2e36;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-sizing: border-box;
  transition: background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.engine-dot[data-group="blok_e"],
.engine-dot[data-group="tdu"] {
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
}
.engine-dot[data-group="tdu"] {
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
}
.engine-dot.on {
  background: #ff8a2a;
  border-color: #ffd28a;
  box-shadow:
    0 0 6px 2px rgba(255, 140, 40, 0.85),
    0 0 14px 4px rgba(255, 90, 20, 0.45);
  animation: engine-flicker 0.55s ease-in-out infinite alternate;
}
.engine-dot.on.hot {
  background: #ffe08a;
  border-color: #fff6d0;
}
@keyframes engine-flicker {
  from { filter: brightness(0.92); }
  to { filter: brightness(1.12); }
}
.engine-pack[data-mode="upper"] .engine-dot[data-group="straps"],
.engine-pack[data-mode="upper"] .engine-dot[data-group="core"],
.engine-pack[data-mode="coast"] .engine-dot[data-group="straps"],
.engine-pack[data-mode="coast"] .engine-dot[data-group="core"],
.engine-pack[data-mode="tdu"] .engine-dot[data-group="straps"],
.engine-pack[data-mode="tdu"] .engine-dot[data-group="core"],
.engine-pack[data-mode="tdu"] .engine-dot[data-group="blok_e"] {
  opacity: 0;
  pointer-events: none;
}
.engine-pack[data-mode="pack"] .engine-dot[data-group="blok_e"],
.engine-pack[data-mode="pack"] .engine-dot[data-group="tdu"],
.engine-pack[data-mode="upper"] .engine-dot[data-group="tdu"],
.engine-pack[data-mode="coast"] .engine-dot[data-group="tdu"],
.engine-pack[data-mode="coast"] .engine-dot[data-group="blok_e"] {
  opacity: 0;
  pointer-events: none;
}
.engine-pack-cap {
  display: block;
  max-width: 110px;
  color: rgba(244, 241, 234, 0.78);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.25;
}
@media (max-width: 900px) {
  #flight-telem { gap: 14px; padding: 8px 12px 10px; bottom: 124px; }
  .telem-cell { min-width: 64px; }
  .telem-stage { min-width: 110px; max-width: 160px; margin-right: 4px; }
  .telem-cyclo { min-width: 168px; max-width: 200px; padding: 0 8px; margin: 0 4px 0 0; }
  .cyclo-hud-l { font-size: 11px; }
  .cyclo-hud-row.on .cyclo-hud-l { font-size: 12px; }
  .telem-value b { font-size: 20px; }
  .telem-stage .telem-value b { font-size: 14px; }
  .engine-pack { width: 60px; height: 60px; }
  .engine-dot { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; }
  .engine-dot[data-group="blok_e"],
  .engine-dot[data-group="tdu"] { width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; }
  body.flight-hud .legend { bottom: 176px; }
}
.legend i {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px;
}
.chip {
  background: rgba(8, 10, 14, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--ink);
}
#tip {
  position: absolute;
  pointer-events: none;
  background: rgba(8, 10, 14, 0.9);
  border: 1px solid var(--line);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  max-width: 240px;
}
#timebar {
  flex: 1 1 220px;
  min-width: 160px;
  max-width: 420px;
}
.ghost {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
}
.ghost.on { background: rgba(224, 177, 90, 0.18); color: var(--brass-2); }
.rate-engine {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--field);
  border: 1px solid var(--line);
}
.rate-engine-cap {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  white-space: nowrap;
}
.rate-engine input[type="range"] {
  flex: 1 1 72px;
  width: auto;
  min-width: 0;
  height: 18px;
  margin: 0;
  cursor: pointer;
  background: transparent;
}
.rate-engine input[type="range"]:focus { outline: none; }
.rate-engine:focus-within .rate-engine-cap { color: var(--brass-2); }
.rate-engine input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    var(--brass) 0%,
    var(--brass) var(--pct, 0%),
    var(--track) var(--pct, 0%),
    var(--track) 100%
  );
}
.rate-engine input[type="range"]::-webkit-slider-thumb { margin-top: -6px; }
.rate-engine input[type="range"]::-moz-range-track {
  height: 2px;
  background: var(--track);
  border: 0;
  border-radius: 99px;
}
.rate-engine input[type="range"]::-moz-range-progress {
  height: 2px;
  background: var(--brass);
  border-radius: 99px;
}
.rate-engine:focus-within input[type="range"]::-webkit-slider-thumb,
.rate-engine input[type="range"]:active::-webkit-slider-thumb,
.rate-engine input[type="range"]:focus-visible::-webkit-slider-thumb {
  background: var(--brass);
  box-shadow: 0 0 0 4px rgba(224, 177, 90, 0.28);
}
.rate-engine:focus-within input[type="range"]::-moz-range-thumb,
.rate-engine input[type="range"]:active::-moz-range-thumb,
.rate-engine input[type="range"]:focus-visible::-moz-range-thumb {
  background: var(--brass);
  box-shadow: 0 0 0 4px rgba(224, 177, 90, 0.28);
}
#rate-label {
  min-width: 4.2em;
  text-align: right;
  font-size: 12px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  color: var(--brass-2);
  white-space: nowrap;
}
.jump-field { position: relative; display: flex; align-items: center; flex: 0 0 auto; }
#jump {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  padding: 6px 36px 6px 14px;
  font-size: 12px;
  width: 186px;
  min-width: 186px;
  cursor: pointer;
}
#jump::placeholder { color: var(--muted); }
#jump[aria-expanded="true"] { border-color: rgba(224, 177, 90, 0.75); }
.jump-cal-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.jump-cal-btn svg { width: 14px; height: 14px; display: block; }
.jump-cal-btn:hover,
#jump[aria-expanded="true"] + .jump-cal-btn { color: var(--brass-2); }
.tz-pop {
  position: fixed;
  z-index: 40;
  width: 312px;
  padding: 6px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  font-size: 13px;
}
.tz-pop[hidden] { display: none !important; }
.tz-pop button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.tz-pop button + button { margin-top: 2px; }
.tz-pop button:hover { background: var(--wash-2); }
.tz-pop button b {
  display: block;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.tz-pop button small,
.tz-pop button span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}
.tz-pop button.on {
  background: rgba(224, 177, 90, 0.16);
  color: var(--brass-2);
}
.tz-pop button.on small,
.tz-pop button.on span { color: var(--brass-2); }
h2 {
  font-family: Palatino, Georgia, serif;
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}
h3 {
  font-family: Palatino, Georgia, serif;
  font-weight: 500;
  font-size: 16px;
  margin: 0 0 6px;
}
#create-group {
  width: 100%;
  margin: 0 0 10px;
}
.ghost.primary, button.primary {
  background: rgba(224, 177, 90, 0.18);
  border-color: var(--brass);
  color: var(--brass-2);
}
.builder-nav .ghost.primary,
.builder-actions .ghost.primary,
.builder-plane-actions .ghost.primary {
  background: var(--brass);
  border: 1px solid transparent;
  color: var(--on-brass);
  font-weight: 600;
  padding: 7px 14px;
  transition: background 0.15s ease, color 0.15s ease;
}
.builder-nav .ghost.primary:hover,
.builder-actions .ghost.primary:hover,
.builder-plane-actions .ghost.primary:hover {
  background: var(--brass-2);
  color: var(--on-brass);
}
.ghost.danger { color: #e08a7a; border-color: rgba(224, 138, 122, 0.4); }
.builder-block {
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}
.builder-head h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.builder-head-name { color: var(--muted); font-size: 12px; font-weight: 400; }
.builder-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.builder-step {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: 999px;
  padding: 3px 9px 3px 4px;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
}
.builder-step i {
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 15px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 10px;
  font-style: normal;
}
.builder-step.is-done { color: var(--ink); }
.builder-step.is-on {
  border-color: var(--brass);
  background: rgba(224, 177, 90, 0.18);
  color: var(--brass-2);
}
.builder-step.is-on i { border-color: var(--brass); }
.builder-step-hint { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.builder-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.builder-nav .primary { margin-left: auto; }
.study-scene {
  margin: 0 0 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}
.study-group + .study-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.study-scene-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
}
.study-scene-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.study-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.study-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid transparent;
  background: var(--wash);
  border-radius: 8px;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.study-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}
.study-chip:hover {
  color: var(--ink);
  background: var(--wash-2);
}
.study-chip.is-on {
  border-color: rgba(224, 177, 90, 0.28);
  color: var(--ink);
  background: rgba(224, 177, 90, 0.1);
}
.study-chip-x {
  margin-left: 2px;
  opacity: 0.55;
  font-size: 14px;
  line-height: 1;
  padding: 0 1px;
}
.study-chip-x:hover { opacity: 1; color: var(--danger); }
.study-chip-add {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(224, 177, 90, 0.34);
  background: var(--wash);
  color: var(--ink);
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.study-chip-add:hover,
.study-chip-add.on {
  color: var(--brass-2);
  background: rgba(224, 177, 90, 0.1);
  border-color: rgba(224, 177, 90, 0.55);
}
.study-add-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash);
}
.study-add-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
}
.study-add-menu button:hover {
  background: var(--wash-2);
  color: var(--brass-2);
}
.study-scene-subtitle {
  margin: 0;
  font-size: 14px;
  font-weight: 550;
  color: var(--ink);
  letter-spacing: 0.015em;
  line-height: 1.25;
}
.study-limit {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--wash);
}
.study-st-edit {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.study-st-edit.is-picking {
  outline: 1px solid rgba(89, 199, 255, 0.35);
  outline-offset: 4px;
  border-radius: 8px;
}
.study-st-zones { margin-top: 8px; border-bottom: 0; }
.study-st-alt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin-top: 6px;
  align-items: start;
}
.study-st-alt > label,
.study-st-alt-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  min-width: 0;
}
.study-st-alt > label input,
.study-st-alt-trigger {
  width: 100%;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 30px;
}
.study-st-alt-field { position: relative; }
.study-st-alt-field.is-open { z-index: 12; }
.study-st-alt-trigger {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  color: var(--muted);
  min-width: 0;
}
.study-st-alt-trigger::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: auto;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
  flex-shrink: 0;
}
.study-st-alt-trigger.on,
.study-st-alt-trigger.has-value {
  border-color: rgba(224, 177, 90, 0.35);
  color: var(--ink);
}
.study-st-alt-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.study-st-alt-value i,
.study-st-alt-menu button i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}
.study-st-alt-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--aside, #0c0e12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.study-st-alt-menu button {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 7px 9px;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
}
.study-st-alt-menu button:hover,
.study-st-alt-menu button.is-on {
  background: var(--wash-2);
  color: var(--brass-2);
}
html[data-theme="light"] .study-chip.is-on {
  background: rgba(18, 18, 20, 0.07);
  border-color: rgba(18, 18, 20, 0.14);
}
html[data-theme="light"] .study-chip-add {
  border-color: rgba(18, 18, 20, 0.22);
  color: var(--ink);
}
html[data-theme="light"] .study-chip-add:hover,
html[data-theme="light"] .study-chip-add.on {
  background: rgba(18, 18, 20, 0.07);
  border-color: rgba(18, 18, 20, 0.4);
  color: #000000;
}
html[data-theme="light"] .study-chip i {
  box-shadow: 0 0 0 2px rgba(18, 18, 20, 0.06);
}

.builder-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.builder-chip {
  display: flex;
  align-items: baseline;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.builder-chip small { font-size: 10.5px; opacity: 0.75; }
.builder-chip.is-on { border-color: var(--brass); color: var(--brass-2); }
.builder-review-row {
  display: block;
  width: 100%;
  margin: 0 0 6px;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: 10px;
  padding: 7px 9px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.builder-review-row span { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.builder-review-row:hover { border-color: var(--brass); }
.builder-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.builder-field input,
.builder-field select,
.builder-station input[type="text"],
.builder-grid3 input,
.builder-grid2 input,
.builder-sat input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--ink);
}
.builder-field select {
  appearance: auto;
}
.builder-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}
.builder-grid2 > label,
.builder-grid3 label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  min-width: 0;
}
.builder-grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.builder-plane-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 4px;
}
.builder-plane-fields .builder-field {
  margin: 0;
}
.builder-station {
  margin: 0 0 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.builder-station-head {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.builder-station-head input { flex: 1; }
.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}
.builder-plane {
  margin: 0 0 10px;
  padding: 8px 0 4px;
  border-top: 1px solid var(--line);
}
.builder-plane-head {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
}
.builder-plane-head .section-fold { margin-top: 2px; flex-shrink: 0; }
.builder-plane-head h3 { margin: 2px 0 0; flex: 1; font-size: 14px; }
.builder-plane-title {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  padding-top: 2px;
}
.builder-plane-title b { color: var(--ink); font-weight: 600; }
.builder-sat-list { margin: 8px 0 4px; }
.builder-sat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px auto;
  gap: 6px 8px;
  align-items: end;
  margin: 0 0 8px;
}
.builder-sat label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  min-width: 0;
}
.builder-sat .ghost {
  margin-bottom: 1px;
  padding: 4px 8px;
}
.builder-plane-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 2px;
}
.builder-walker-form { margin-top: 4px; }
.builder-pick-hint {
  margin: 0 0 8px;
  padding: 6px 8px;
  border: 1px dashed var(--brass);
  border-radius: 8px;
  color: var(--brass-2);
  font-size: 12px;
}
.builder-station.is-picking {
  outline: 1px solid rgba(200, 170, 100, 0.45);
  outline-offset: 4px;
  border-radius: 8px;
}
body.builder-picking #globe {
  cursor: crosshair;
}
.section-fold[aria-expanded="true"]::before {
  transform: translate(-50%, -40%) rotate(90deg);
}
/* Saved constellations: each one is a card, so the list reads as a shelf
   of objects the student owns rather than another catalog row. */
.custom-section {
  margin: 4px 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.custom-section-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.custom-section-text { min-width: 0; flex: 1 1 auto; }
.custom-section-text b {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 560;
  letter-spacing: 0.02em;
}
.custom-section-text b em {
  font-style: normal;
  font-size: 11px;
  font-weight: 560;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(224, 177, 90, 0.16);
  color: var(--brass-2);
  font-variant-numeric: tabular-nums;
}
.custom-section-text p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
/* Import / export of constellation files always look the same. */
.file-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.file-pill svg { width: 15px; height: 15px; flex: 0 0 auto; }
.file-pill:hover {
  color: var(--brass-2);
  border-color: rgba(224, 177, 90, 0.45);
  background: rgba(224, 177, 90, 0.08);
}
.custom-list { display: flex; flex-direction: column; gap: 8px; }
.custom-card {
  position: relative;
  overflow: hidden;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.15s ease, background 0.15s ease;
}
/* Constellation colour, carried in on the --g custom property. */
.custom-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--g, var(--brass));
  opacity: 0.32;
  transition: opacity 0.15s ease;
}
.custom-card:hover { border-color: rgba(235, 230, 220, 0.2); }
.custom-card.is-editing,
.custom-card.is-editing:hover {
  border-color: rgba(224, 177, 90, 0.4);
}
.custom-card.is-on {
  border-color: rgba(224, 177, 90, 0.3);
  background: rgba(224, 177, 90, 0.055);
}
.custom-card.is-on::before { opacity: 1; }
.custom-card-top {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.custom-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--g, var(--brass));
  opacity: 0.5;
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}
.custom-card.is-on .custom-dot {
  opacity: 1;
  box-shadow: 0 0 7px var(--g, var(--brass));
}
.custom-card-main { min-width: 0; flex: 1 1 auto; }
.custom-card-titleline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.custom-card-titleline b {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.custom-card-main > p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.custom-card-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.custom-edit-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(224, 177, 90, 0.45);
  border-radius: 7px;
  background: rgba(224, 177, 90, 0.16);
  color: var(--brass);
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
html[data-theme="light"] .custom-edit-badge {
  color: var(--ink);
  background: rgba(18, 18, 20, 0.08);
  border-color: rgba(18, 18, 20, 0.18);
}
.custom-transport {
  display: flex;
  align-items: center;
  gap: 2px;
}
.custom-transport-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.custom-transport-btn svg { width: 12px; height: 12px; display: block; }
.custom-transport-btn:hover {
  color: var(--ink);
  background: var(--wash);
}
.custom-transport-btn.is-on {
  color: var(--brass);
  background: rgba(224, 177, 90, 0.16);
  border-color: rgba(224, 177, 90, 0.45);
}
html[data-theme="light"] .custom-transport-btn.is-on {
  color: var(--ink);
  background: rgba(18, 18, 20, 0.08);
  border-color: rgba(18, 18, 20, 0.18);
}
.custom-transport-btn:focus-visible {
  outline: 2px solid rgba(224, 177, 90, 0.7);
  outline-offset: 1px;
}
.custom-card-tools .custom-power { margin-top: 0; }
.custom-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 0;
  padding-left: 18px;
}
.custom-chip {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}
.custom-chip.is-wait { border-color: rgba(224, 177, 90, 0.35); color: var(--brass-2); }
.custom-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(235, 230, 220, 0.07);
}
.custom-act {
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.custom-act:hover {
  border-color: rgba(224, 177, 90, 0.45);
  color: var(--brass-2);
  background: rgba(224, 177, 90, 0.1);
}
.custom-act.is-danger {
  margin-left: auto;
  color: #d98a78;
  border-color: rgba(224, 138, 122, 0.26);
}
.custom-act.is-danger:hover {
  color: #f0a594;
  border-color: rgba(224, 138, 122, 0.55);
  background: rgba(224, 122, 98, 0.12);
}
/* One toggle shape for the whole panel: visibility switches, not tick boxes. */
aside input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 18px;
  margin: 2px 0 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--wash);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
aside input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.18s ease, background 0.18s ease;
}
aside input[type="checkbox"]:hover { border-color: rgba(235, 230, 220, 0.26); }
aside input[type="checkbox"]:checked {
  background: rgba(224, 177, 90, 0.2);
  border-color: rgba(224, 177, 90, 0.7);
}
aside input[type="checkbox"]:checked::before {
  transform: translateX(13px);
  background: var(--brass);
  box-shadow: 0 0 6px rgba(224, 177, 90, 0.5);
}
/* Section half-on: knob parks in the middle. */
aside input[type="checkbox"][data-partial="1"]::before {
  transform: translateX(6.5px);
  background: var(--brass);
  opacity: 0.6;
}
aside input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(224, 177, 90, 0.7);
  outline-offset: 2px;
}
.custom-power { margin-top: 3px; }
.lead { color: var(--ink); line-height: 1.45; margin: 0 0 8px; }
.quiet { color: var(--muted); line-height: 1.45; margin: 0 0 12px; }
#study-preset { width: 100%; }
.row, .cities { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.cities button, .row button, .toggle {
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--ink);
}
.row button.on, .toggle.on { border-color: var(--brass); color: var(--brass-2); }
.row button:disabled { opacity: 0.35; cursor: default; }
label.slider { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin: 8px 0; align-items: center; }
label.slider > span:first-child { color: var(--muted); font-size: 12px; transition: color 0.15s ease; }
label.slider b { font-weight: 560; font-variant-numeric: tabular-nums; transition: color 0.15s ease; }
label.slider .slider-val {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  justify-self: end;
}
label.slider .slider-num {
  width: 5.6em;
  max-width: 38vw;
  margin: 0;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  text-align: right;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  -moz-appearance: textfield;
  appearance: textfield;
}
label.slider .slider-num::-webkit-outer-spin-button,
label.slider .slider-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
label.slider .slider-num:hover:not([readonly]):not(:disabled) {
  border-color: var(--line);
}
label.slider .slider-num:focus {
  outline: none;
  border-color: var(--brass);
  background: rgba(224, 177, 90, 0.08);
}
label.slider .slider-num[readonly],
label.slider .slider-num[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
  color: var(--muted);
}
label.slider .slider-unit {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  transition: color 0.15s ease;
}
label.slider input[type="range"] { grid-column: 1 / -1; width: 100%; }
label.slider input[type="range"]:focus { outline: none; }
label.slider input[type="range"]:disabled { opacity: 0.35; }
label.slider input.is-locked { cursor: default; }
label.slider:focus-within > span:first-child,
label.slider:focus-within b,
label.slider:focus-within .slider-unit { color: var(--brass-2); }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: var(--track);
  border-radius: 99px;
  cursor: pointer;
  accent-color: var(--brass);
}
label.slider input[type="range"] {
  background: linear-gradient(
    to right,
    var(--brass) 0%,
    var(--brass) var(--pct, 0%),
    var(--track) var(--pct, 0%),
    var(--track) 100%
  );
}
label.slider input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: transparent;
  border-radius: 99px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(235, 230, 220, 0.72);
  border: 2px solid var(--thumb-edge);
  box-shadow: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
label.slider input[type="range"]::-webkit-slider-thumb { margin-top: -6px; }
label.slider input[type="range"]::-moz-range-track {
  height: 2px;
  background: transparent;
  border: 0;
  border-radius: 99px;
}
label.slider input[type="range"]::-moz-range-progress {
  height: 2px;
  background: var(--brass);
  border-radius: 99px;
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(235, 230, 220, 0.72);
  border: 2px solid var(--thumb-edge);
  box-shadow: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
label.slider:focus-within input[type="range"]::-webkit-slider-thumb,
label.slider input[type="range"]:active::-webkit-slider-thumb,
label.slider input[type="range"]:focus-visible::-webkit-slider-thumb {
  background: var(--brass);
  box-shadow: 0 0 0 4px rgba(224, 177, 90, 0.28);
}
label.slider:focus-within input[type="range"]::-moz-range-thumb,
label.slider input[type="range"]:active::-moz-range-thumb,
label.slider input[type="range"]:focus-visible::-moz-range-thumb {
  background: var(--brass);
  box-shadow: 0 0 0 4px rgba(224, 177, 90, 0.28);
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 14px;
}
.stats div {
  min-width: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: var(--wash);
}
.stats small {
  display: block;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.25;
}
.stats b {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.study-orbit-meta { margin: 2px 0 6px; }
.study-orbit-crafts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0 0 10px;
}
.study-orbit-craft {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 550;
  white-space: nowrap;
}
.study-orbit-craft.is-on { color: var(--ink); }
.study-orbit-craft i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}
.catalog-section {
  margin: 4px 0 10px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
.section-head-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 4px;
  align-items: start;
}
.section-fold {
  width: 18px;
  height: 18px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  position: relative;
}
.section-fold::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent currentColor;
  transform: translate(-40%, -50%);
  transition: transform 0.15s ease;
}
.catalog-section.is-open .section-fold::before {
  transform: translate(-50%, -40%) rotate(90deg);
}
.section-fold:hover,
.section-fold:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}
.catalog-section:not(.is-open) .section-items {
  display: none;
}
.section-items {
  margin-top: 2px;
}
.examples-section {
  margin: 4px 0 10px;
}
.examples-section:not(.is-open) > .examples-items {
  display: none;
}
.examples-items {
  padding-left: 12px;
}
.examples-import {
  margin: 4px 0 8px;
}
.track-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.track-toggle input { flex: 0 0 auto; }
.view-block {
  margin: 0 0 10px;
  padding: 11px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--field);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.view-block-planes { border-left: 3px solid rgba(224, 177, 90, 0.55); }
.view-block-track { border-left: 3px solid rgba(224, 177, 90, 0.55); }
.view-block-foot { border-left: 3px solid rgba(255, 200, 115, 0.6); }
.view-block-radio { border-left: 3px solid rgba(114, 198, 255, 0.55); }
.view-block-swath { border-left: 3px solid rgba(232, 168, 72, 0.7); }
.view-block-params { border-left: 3px solid rgba(235, 230, 220, 0.28); }
.view-block-params .view-block-head { cursor: default; }
.view-block-params #study-dir { margin: 2px 0 10px; }
.orbit-class {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 0 10px 0 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow:
    inset 3px 0 0 rgba(224, 177, 90, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--field);
  cursor: pointer;
}
.orbit-class-label {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
}
.orbit-class #study-preset {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 22px 0 8px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%239a9388' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round' d='M1 1.25L5 4.75 9 1.25'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 10px 6px;
  box-shadow: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  text-align-last: right;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.orbit-class #study-preset:focus {
  outline: none;
  color: var(--ink);
}
.orbit-class:focus-within {
  border-color: rgba(235, 230, 220, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 48%),
    var(--wash);
}
html[data-theme="light"] .orbit-class {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 247, 249, 0.95));
  box-shadow:
    inset 3px 0 0 rgba(22, 22, 22, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 0 0 1px rgba(18, 18, 20, 0.02);
}
html[data-theme="light"] .orbit-class #study-preset {
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%236b6e76' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round' d='M1 1.25L5 4.75 9 1.25'/%3E%3C/svg%3E");
  color: var(--muted);
}
.view-block.is-open {
  border-color: rgba(235, 230, 220, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 48%),
    var(--wash);
}
html[data-theme="light"] .view-block {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 247, 249, 0.95));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 0 0 1px rgba(18, 18, 20, 0.02);
}
html[data-theme="light"] .view-block.is-open {
  background: linear-gradient(180deg, #fff, #f3f5f8);
}
.view-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
}
.view-block-head b {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.view-block-head input { flex: 0 0 auto; margin: 0; }
.view-block-note {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.view-block-body {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.view-block-body[hidden] { display: none !important; }
.view-block-body .slider {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}
.view-block-body .slider:last-of-type { margin-bottom: 2px; }
.view-meta {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
}
html[data-theme="light"] .view-meta {
  background: rgba(18, 18, 20, 0.04);
}
.view-meta b {
  color: var(--ink);
  font-weight: 600;
}
.group {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.catalog-section .group { border-bottom-color: rgba(255,255,255,0.04); }
.section-items .group:last-child { border-bottom: 0; }
.group.section-head {
  grid-template-columns: 1fr auto;
  padding-bottom: 4px;
  border-bottom: 0;
  min-width: 0;
}
.group.section-head b { font-size: 15px; letter-spacing: 0.02em; }
.group.nested {
  padding-left: 10px;
  margin-left: 4px;
  border-left: 2px solid rgba(224, 177, 90, 0.22);
}
.group p { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.group-meta { grid-column: 2 / 4; color: var(--muted); }
.swatch { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; }
.search, .num, select {
  width: 100%;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 6px 0;
}
.list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow: auto; }
.list button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 6px 4px;
  border-radius: 6px;
  color: var(--ink);
}
.list button.on, .list button:hover { background: rgba(224, 177, 90, 0.1); }
.shell { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; margin: 4px 0; font-variant-numeric: tabular-nums; font-size: 12px; }
.shell i { display: block; height: 6px; border-radius: 99px; background: var(--brass); opacity: 0.85; }
.warn { color: var(--danger); }
.foot { margin-top: 16px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.missions { margin: 8px 0 14px; }
.missions select {
  margin-top: 4px;
  margin-bottom: 8px;
  border-color: rgba(224, 177, 90, 0.35);
  background: rgba(224, 177, 90, 0.08);
}
.mission-about {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.launch-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.launch-actions button.primary {
  border: 0;
  background: var(--brass);
  color: var(--on-brass);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  transition: background 0.15s ease;
}
.launch-actions button.primary:hover:not(:disabled) {
  background: var(--brass-2);
}
.launch-actions button.ghost {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--ink);
}
.launch-actions button:disabled {
  opacity: 0.38;
  cursor: default;
}
.phase {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--brass-2);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.cyclogram {
  margin: 10px 0 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.14);
  max-height: 220px;
  overflow: auto;
  font-variant-numeric: tabular-nums;
}
.cyclogram[hidden] { display: none !important; }
.cyclo-head {
  margin: 0 0 6px;
  color: rgba(235, 230, 220, 0.62);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cyclo-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
  padding: 3px 4px;
  border-radius: 4px;
  color: rgba(235, 230, 220, 0.55);
  font-size: 12px;
  line-height: 1.35;
}
.cyclo-row.done { color: rgba(235, 230, 220, 0.78); }
.cyclo-row.on {
  color: #f4f1ea;
  background: rgba(255, 170, 70, 0.14);
  box-shadow: inset 2px 0 0 #e8a045;
}
.cyclo-t {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  opacity: 0.9;
}
.cyclo-l { letter-spacing: 0.01em; }
@media (max-width: 1280px) {
  .rate-engine { width: auto; max-width: 100%; }
  .rate-engine input[type="range"] { min-width: 0; }
  #modes { padding: 7px 8px; gap: 1px; }
  #modes::before { inset: 7px 8px; border-radius: 10px; }
  .modes-thumb { top: 7px; bottom: 7px; border-radius: 8px; }
  #modes button { padding: 0 3px; letter-spacing: 0.05em; font-size: 9.5px; }
  .toolbar-group > button { padding: 6px 8px; }
}
@media (max-width: 1100px) {
  .brand small { display: none; }
  .rate-engine-cap { display: none; }
  .rate-engine { width: auto; }
}
@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; grid-template-rows: auto minmax(300px, 46vh) minmax(0, 1fr); }
  main { grid-column: 1; grid-row: 2; }
  aside { grid-column: 1; grid-row: 3; border-right: 0; border-top: 1px solid var(--line); }
  header {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
    height: auto;
  }
  #modes {
    position: static;
    width: 100%;
    max-width: none;
    order: 2;
    border-top: 1px solid var(--line);
    padding: 8px 0 0;
  }
  #modes::before { inset: 8px 0 0; }
  .modes-thumb { top: 8px; bottom: 0; }
  .toolbar-center {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    order: 3;
    width: 100%;
    max-width: none;
  }
  .toolbar-transport {
    width: 100%;
    flex-wrap: wrap;
  }
  #timebar { flex: 1 1 180px; max-width: none; }
  .toolbar-time { margin-left: 0; order: 4; width: 100%; justify-content: center; }
  .brand { order: 5; margin-left: 0; }
}
.jump-pop {
  position: fixed;
  z-index: 40;
  width: 336px;
  padding: 12px 12px 10px;
  background: #fff;
  color: #202124;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
  font-size: 13px;
}
.jump-pop[hidden] { display: none !important; }
.jump-pop-main { display: flex; align-items: flex-start; }
.jump-cal { flex: 1; min-width: 0; }
.jump-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.jump-cal-title {
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 13px;
  color: #202124;
}
.jump-cal-head button,
.jump-col > button {
  border: 0;
  background: transparent;
  color: #5f6368;
  width: 28px;
  height: 24px;
  border-radius: 4px;
  padding: 0;
  line-height: 1;
}
.jump-cal-head button:hover,
.jump-col > button:hover { background: #f1f3f4; }
.jump-week,
.jump-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}
.jump-week span {
  color: #70757a;
  font-size: 11px;
  padding: 4px 0;
}
.jump-week span.we { color: #d93025; }
.jump-grid button {
  border: 0;
  background: transparent;
  color: #202124;
  width: 28px;
  height: 28px;
  margin: 1px auto;
  padding: 0;
  border-radius: 50%;
  font-size: 12px;
  display: block;
}
.jump-grid button.we { color: #d93025; }
.jump-grid button.out { color: #bdc1c6; }
.jump-grid button.out.we { color: #f0b4ae; }
.jump-grid button.today { background: #e8eaed; }
.jump-grid button.on { background: #1a73e8; color: #fff; }
.jump-time {
  display: flex;
  align-items: center;
  margin-left: 8px;
}
.jump-colon {
  color: #202124;
  font-weight: 600;
  padding: 0 2px 16px;
}
.jump-col { text-align: center; }
.jump-col-list {
  height: 148px;
  width: 48px;
  overflow: auto;
  margin: 2px 0;
}
.jump-col-list button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #202124;
  border-radius: 4px;
  padding: 4px 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.jump-col-list button.on { background: #1a73e8; color: #fff; }
.jump-apply {
  margin-top: 8px;
  border: 1px solid #dadce0;
  background: #fff;
  color: #1a73e8;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 13px;
}
.jump-apply:hover { background: #e8f0fe; }

/* Orbital maneuver trainer */
.mn-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(110, 243, 230, 0.28);
  background: rgba(110, 243, 230, 0.08);
  color: #9de8e0;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.mn-brief {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.mn-tip {
  margin: 0 0 14px;
  padding: 8px 10px;
  border-left: 2px solid var(--brass);
  background: rgba(224, 177, 90, 0.07);
  color: var(--brass-2);
  font-size: 12px;
  line-height: 1.4;
}
.mn-goal,
.mn-now {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}
.mn-goal div,
.mn-now div {
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.mn-goal small,
.mn-now small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.mn-goal b,
.mn-now b {
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.mn-progress {
  margin: 0 0 12px;
}
.mn-progress-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.mn-progress-bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #6ef3e6, #e0b15a);
  transition: width 0.25s ease;
}
.mn-progress-cap {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.mn-dirs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0 12px;
}
.mn-dirs button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.mn-dirs button small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.mn-dirs button.on {
  border-color: rgba(110, 243, 230, 0.55);
  background: rgba(110, 243, 230, 0.1);
  color: #c8fff8;
}
.mn-dirs button.on small { color: rgba(200, 255, 248, 0.7); }
.mn-burn-row {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 4px 0 10px;
}
.mn-burn-row .slider {
  flex: 1;
  margin: 0;
}
.mn-fire {
  flex: 0 0 auto;
  border: 0;
  background: var(--brass);
  color: var(--on-brass);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.mn-fire:hover:not(:disabled) { background: var(--brass-2); }
.mn-fire:disabled { opacity: 0.4; cursor: default; }
.mn-status {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.4;
}
.mn-status.ok {
  border-color: rgba(110, 243, 230, 0.4);
  background: rgba(110, 243, 230, 0.1);
  color: #c8fff8;
}
.mn-status.warn {
  border-color: rgba(224, 122, 98, 0.4);
  background: rgba(224, 122, 98, 0.1);
  color: #f0b4a8;
}
.mn-status.info {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}
.mn-stars {
  letter-spacing: 0.12em;
  color: var(--brass);
  font-size: 16px;
}
.mn-log {
  margin: 12px 0 0;
  max-height: 140px;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.mn-log-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 8px;
  padding: 3px 0;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mn-log-row b { color: var(--ink); font-weight: 500; }
.maneuver-banner {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  z-index: 6;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(110, 243, 230, 0.4);
  background: rgba(10, 16, 18, 0.88);
  color: #c8fff8;
  font-size: 13px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  animation: mn-banner-in 0.25s ease;
}
.maneuver-banner[hidden] { display: none; }
@keyframes mn-banner-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Daylight chrome is white paper and graphite. Brass stays on the night globe. */
html[data-theme="light"] #modes::before {
  background: var(--wash);
}
html[data-theme="light"] .modes-thumb {
  background: var(--wash-2);
}
html[data-theme="light"] .modes-thumb::after {
  background: var(--ink);
  opacity: 0.55;
}
html[data-theme="light"] #modes button.on {
  color: var(--ink);
  background: transparent;
}
html[data-theme="light"] #study-preset,
html[data-theme="light"] .missions select,
html[data-theme="light"] .search,
html[data-theme="light"] .num,
html[data-theme="light"] select {
  background: #ffffff;
  border-color: rgba(18, 18, 20, 0.14);
  color: #161616;
}
html[data-theme="light"] .settings-gear.on,
html[data-theme="light"] .toolbar-group > button.on,
html[data-theme="light"] .ghost.on,
html[data-theme="light"] .tz-pop button.on,
html[data-theme="light"] .builder-step.is-on,
html[data-theme="light"] .custom-section-text b em,
html[data-theme="light"] .custom-card.is-on,
html[data-theme="light"] .custom-act:hover,
html[data-theme="light"] .file-pill:hover,
html[data-theme="light"] .list button.on,
html[data-theme="light"] .list button:hover,
html[data-theme="light"] .mn-tip {
  background: rgba(18, 18, 20, 0.06);
}
html[data-theme="light"] .custom-chip.is-wait,
html[data-theme="light"] .custom-act:hover,
html[data-theme="light"] .file-pill:hover,
html[data-theme="light"] #jump[aria-expanded="true"],
html[data-theme="light"] .builder-step.is-on,
html[data-theme="light"] .group.nested {
  border-color: rgba(18, 18, 20, 0.16);
}
html[data-theme="light"] .builder-nav .ghost.primary,
html[data-theme="light"] .builder-actions .ghost.primary,
html[data-theme="light"] .builder-plane-actions .ghost.primary {
  background: #161616;
  color: #ffffff;
  border-color: transparent;
}
html[data-theme="light"] .builder-nav .ghost.primary:hover,
html[data-theme="light"] .builder-actions .ghost.primary:hover,
html[data-theme="light"] .builder-plane-actions .ghost.primary:hover {
  background: #000000;
  color: #ffffff;
}
html[data-theme="light"] aside input[type="checkbox"]:checked {
  background: #161616;
  border-color: #161616;
}
html[data-theme="light"] aside input[type="checkbox"]:checked::before {
  background: #ffffff;
  box-shadow: none;
}
html[data-theme="light"] input[type="range"]::-webkit-slider-thumb,
html[data-theme="light"] input[type="range"]::-moz-range-thumb {
  background: #ffffff;
  border-color: #161616;
}
html[data-theme="light"] label.slider:focus-within input[type="range"]::-webkit-slider-thumb,
html[data-theme="light"] label.slider input[type="range"]:active::-webkit-slider-thumb,
html[data-theme="light"] label.slider input[type="range"]:focus-visible::-webkit-slider-thumb,
html[data-theme="light"] .rate-engine:focus-within input[type="range"]::-webkit-slider-thumb,
html[data-theme="light"] .rate-engine input[type="range"]:active::-webkit-slider-thumb,
html[data-theme="light"] .rate-engine input[type="range"]:focus-visible::-webkit-slider-thumb,
html[data-theme="light"] .rate-engine:focus-within input[type="range"]::-moz-range-thumb,
html[data-theme="light"] .rate-engine input[type="range"]:active::-moz-range-thumb,
html[data-theme="light"] .rate-engine input[type="range"]:focus-visible::-moz-range-thumb {
  background: #161616;
  box-shadow: 0 0 0 4px rgba(18, 18, 20, 0.12);
}
html[data-theme="light"] label.slider .slider-num:focus {
  border-color: #161616;
  background: rgba(18, 18, 20, 0.06);
}
