@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("./assets/fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("./assets/fonts/jetbrains-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #02040a;
  --text: #e9f0f7;
  --muted: #8ea2b8;
  --faint: #5d7188;
  --accent: #67e8f9;
  --accent-soft: rgba(103, 232, 249, 0.14);
  --panel: rgba(10, 16, 25, 0.66);
  --panel-strong: rgba(10, 16, 25, 0.86);
  --panel-border: rgba(255, 255, 255, 0.085);
  --panel-highlight: rgba(255, 255, 255, 0.045);
  --radius: 16px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.hidden {
  display: none !important;
}

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

#globe-wrap {
  position: absolute;
  inset: 0;
}

#globe {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}

.glass {
  background: linear-gradient(180deg, rgba(16, 23, 34, 0.72), var(--panel));
  border: 1px solid var(--panel-border);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 var(--panel-highlight);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
}

.topbar {
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 14px;
  right: 14px;
  height: 62px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 128px;
}

.brand-mark {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.18em;
}

.brand-sub {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.clocks {
  display: flex;
  gap: 20px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.clock {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.clock-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.clock .mono {
  font-size: 13px;
  letter-spacing: 0.03em;
  color: #dbe7f3;
}

.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.data-pill,
.count-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.count-pill .mono {
  color: var(--text);
  font-size: 11px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.data-pill.offline .status-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  width: 248px;
  padding: 0 8px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.search-box:focus-within {
  border-color: rgba(103, 232, 249, 0.5);
  background: rgba(0, 0, 0, 0.34);
}

.search-box svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--faint);
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 19px;
  padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 4px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
}

.search-box kbd {
  flex: 0 0 auto;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 55;
  display: none;
  width: min(360px, 82vw);
  max-height: 58vh;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--panel-border);
  border-radius: 11px;
  background: var(--panel-strong);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(22px) saturate(1.25);
}

.search-results.open {
  display: block;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.icon-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.icon-btn.active {
  color: var(--accent);
  border-color: rgba(103, 232, 249, 0.4);
  background: var(--accent-soft);
}

.icon-btn.small {
  width: 28px;
  height: 28px;
  border-color: transparent;
  background: transparent;
  font-size: 18px;
}

.help-btn {
  font-family: var(--mono);
  font-size: 14px;
}

.sheet {
  display: contents;
}

.sheet-grab,
.sheet-tabs {
  display: none;
}

.panel {
  position: fixed;
  z-index: 30;
  top: 90px;
  bottom: 112px;
  width: 300px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.26s var(--ease), opacity 0.26s var(--ease);
}

.panel-left {
  left: 14px;
}

.panel-right {
  right: 14px;
  width: 340px;
}

.panel-left.collapsed {
  transform: translateX(calc(-100% - 16px));
  opacity: 0;
  pointer-events: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  flex: 0 0 auto;
}

.panel-head h2,
.modal h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 16px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.panel-body::-webkit-scrollbar {
  width: 5px;
}

.panel-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

.eyebrow {
  margin: 12px 0 8px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hr {
  height: 1px;
  margin: 14px 0;
  background: rgba(255, 255, 255, 0.07);
}

.group-row,
.toggle-row {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 7px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.18s var(--ease);
}

.group-row:hover,
.toggle-row:hover {
  background: rgba(255, 255, 255, 0.045);
}

.group-row input,
.toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.swatch {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 3px;
  box-shadow: 0 0 9px color-mix(in srgb, var(--swatch) 70%, transparent);
  background: var(--swatch);
}

.group-name {
  flex: 1 1 auto;
  font-size: 12px;
  color: var(--text);
  transition: opacity 0.18s var(--ease);
}

.group-count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.group-row input:not(:checked) ~ .group-name,
.group-row input:not(:checked) ~ .group-count {
  opacity: 0.36;
}

.group-row input:not(:checked) ~ .swatch {
  opacity: 0.3;
  box-shadow: none;
}

.switch {
  position: relative;
  width: 32px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #91a3b7;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

input:checked + .switch {
  background: rgba(103, 232, 249, 0.18);
  border-color: rgba(103, 232, 249, 0.34);
}

input:checked + .switch::after {
  transform: translateX(14px);
  background: var(--accent);
  box-shadow: 0 0 8px rgba(103, 232, 249, 0.6);
}

.toggle-row {
  justify-content: space-between;
  font-size: 11px;
  padding: 0 4px;
}

.toggle-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
}

.band-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.band-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  user-select: none;
  text-align: center;
}

.band-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.band-chip span:last-child {
  display: none;
}

.band-chip.on {
  border-color: rgba(103, 232, 249, 0.26);
  color: var(--text);
  background: rgba(103, 232, 249, 0.055);
}

.layer-foot {
  margin-top: 16px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  line-height: 1.7;
}

.left-open {
  position: fixed;
  left: 14px;
  top: 50%;
  z-index: 29;
  width: 26px;
  height: 58px;
  border-radius: 0 10px 10px 0;
  color: var(--muted);
  font-size: 20px;
  padding: 0;
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
}

.link-btn:hover {
  text-decoration: underline;
}

.location-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.location-line strong {
  color: var(--text);
  font-weight: 500;
}

.location-line .mono {
  color: var(--faint);
  font-size: 9px;
}

.iss-next {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 7px;
  background: rgba(103, 232, 249, 0.045);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  text-align: left;
}

.iss-next:hover {
  background: rgba(103, 232, 249, 0.1);
}

.iss-next:disabled {
  color: var(--muted);
  cursor: default;
}

.next-pass {
  margin-top: 10px;
  padding: 15px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 13px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(103, 232, 249, 0.14), transparent 55%),
    rgba(7, 14, 22, 0.66);
}

.next-pass.empty {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.np-eyebrow {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.np-name {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.np-sat-meta {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.np-countdown {
  margin-top: 12px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 27px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.np-countdown span {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.13em;
  margin-left: 5px;
}

.np-countdown .np-cd-value {
  margin-left: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: inherit;
  font-weight: 500;
  letter-spacing: inherit;
}

.np-countdown .np-cd-label {
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.13em;
  margin-left: 5px;
}

.np-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 12px;
  margin-top: 14px;
}

.np-stat .k,
.stat .k {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.np-stat .v,
.stat .v {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.np-open {
  width: 100%;
  height: 34px;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 8px;
  background: rgba(103, 232, 249, 0.09);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.np-open:hover {
  background: rgba(103, 232, 249, 0.15);
}

.np-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-top: 14px;
}

.np-ics {
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}

.np-ics:hover {
  border-color: rgba(103, 232, 249, 0.3);
  color: var(--accent);
}

.empty-state {
  padding: 18px 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.pass-list {
  margin-top: 4px;
}

.day-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.day-head::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
}

.pass-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 3px 10px;
  width: 100%;
  padding: 8px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  transition: background 0.18s var(--ease);
}

.pass-item:hover {
  background: rgba(255, 255, 255, 0.045);
}

.pass-item .time {
  grid-row: span 2;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}

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

.pass-item .meta {
  grid-column: 2;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.ics-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 15px;
  margin-left: 4px;
  padding: 0 4px;
  border: 1px solid rgba(103, 232, 249, 0.25);
  border-radius: 3px;
  color: var(--accent);
  font-size: 7px;
  letter-spacing: 0.06em;
  vertical-align: 1px;
  cursor: pointer;
}

.ics-mini:hover {
  background: rgba(103, 232, 249, 0.12);
}

.pass-item .elev {
  grid-row: span 2;
  align-self: center;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
}

.sat-card {
  position: fixed;
  left: 14px;
  bottom: 112px;
  z-index: 32;
  width: 300px;
  max-height: 230px;
  overflow-y: auto;
  padding: 14px 16px;
  border-radius: var(--radius);
}

body.has-selection #left-panel {
  bottom: calc(112px + 230px + 10px);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sat-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.group-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: var(--sans);
  font-size: 9px;
}

.sat-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 10px;
  margin: 12px 0;
}

.stat .v {
  font-size: 12px;
}

.sat-next {
  display: block;
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  text-align: left;
}

.sat-next:hover {
  color: #b7f7ff;
}

.sat-next:disabled {
  color: var(--faint);
  cursor: default;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 8px;
  background: rgba(103, 232, 249, 0.13);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:hover {
  background: rgba(103, 232, 249, 0.2);
}

.btn.secondary {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-weight: 500;
}

.btn.secondary:hover,
.btn.secondary.active {
  border-color: rgba(103, 232, 249, 0.34);
  background: rgba(103, 232, 249, 0.1);
  color: var(--accent);
}

.btn.ghost {
  border-color: rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}

.timeline {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 35;
  height: 86px;
  padding: 10px 16px 12px;
  border-radius: var(--radius);
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
}

#btn-play {
  width: 38px;
  height: 32px;
}

.speed-group {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
}

.speed-group button {
  min-width: 38px;
  height: 24px;
  padding: 0 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.speed-group button.active {
  background: rgba(103, 232, 249, 0.14);
  color: var(--accent);
}

.timeline-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

#sim-clock {
  font-size: 13px;
  letter-spacing: 0.02em;
}

.mode-pill,
.badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(103, 232, 249, 0.3);
  border-radius: 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mode-pill.sim {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.timeline-track {
  position: relative;
  height: 22px;
  margin-top: 5px;
  display: flex;
  align-items: center;
}

#time-range {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 4px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent) var(--pct, 0%),
    rgba(255, 255, 255, 0.12) var(--pct, 0%),
    rgba(255, 255, 255, 0.12) 100%
  );
  cursor: pointer;
}

#time-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border: 2px solid #071018;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(103, 232, 249, 0.8);
}

#time-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #071018;
  border-radius: 50%;
  background: var(--accent);
}

.pass-markers {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.pass-marker {
  position: absolute;
  top: 7px;
  width: 2px;
  height: 9px;
  border-radius: 1px;
  transform: translateX(-1px);
  opacity: 0.85;
}

.pass-marker.iss {
  height: 13px;
  top: 5px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  z-index: 90;
  transform: translate(-50%, 8px);
  padding: 9px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 9px;
  background: var(--panel-strong);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 12, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-backdrop.open {
  display: grid;
  animation: fade-in 0.22s var(--ease);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  width: min(92vw, 520px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(18, 26, 38, 0.96), rgba(8, 13, 20, 0.97));
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
}

.modal h1 {
  margin: 8px 0 10px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.modal-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.modal-copy.small {
  margin: 18px 0 0;
  font-size: 11px;
  line-height: 1.6;
}

.welcome-card {
  width: min(92vw, 500px);
}

.city-input-wrap,
.palette-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
}

.city-input-wrap:focus-within,
.palette-input-wrap:focus-within {
  border-color: rgba(103, 232, 249, 0.45);
}

.city-input-wrap input,
.palette-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.city-input-wrap input::placeholder,
.palette-input-wrap input::placeholder {
  color: var(--faint);
}

.city-results {
  margin-top: 6px;
  max-height: 190px;
  overflow-y: auto;
}

.city-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.city-result:hover,
.city-result.active {
  background: rgba(103, 232, 249, 0.09);
}

.city-result span:last-child {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}

.welcome-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

.form-status {
  min-height: 16px;
  margin-top: 10px;
  color: #fbbf24;
  font-size: 11px;
}

.palette-backdrop {
  align-items: start;
  padding-top: 12vh;
}

.palette {
  width: min(92vw, 640px);
  max-height: 68vh;
  padding: 1px;
  overflow: hidden;
  border-radius: 16px;
}

.palette-input-wrap {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px 16px 0 0;
  height: 54px;
  background: rgba(0, 0, 0, 0.15);
}

.palette-results {
  max-height: 48vh;
  overflow-y: auto;
  padding: 6px;
}

.palette-section {
  padding: 9px 10px 4px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.result:hover,
.result.active {
  background: rgba(103, 232, 249, 0.09);
}

.result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.result-main {
  flex: 1;
  min-width: 0;
}

.result-title {
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-sub {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.result-type {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.palette-foot {
  display: flex;
  gap: 16px;
  padding: 9px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin-top: 18px;
}

.shortcut-grid > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 11px;
}

.shortcut-grid kbd {
  min-width: 34px;
  color: var(--text);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.2);
}

.segmented button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}

.segmented button.active {
  background: rgba(103, 232, 249, 0.14);
  color: var(--accent);
}

.sky-modal {
  background: rgba(1, 3, 7, 0.76);
}

.sky-card {
  display: flex;
  flex-direction: column;
  width: min(94vw, 780px);
  max-height: 94vh;
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: rgba(6, 11, 18, 0.94);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8);
}

.sky-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sky-title {
  font-size: 17px;
  font-weight: 600;
}

.sky-sub {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.sky-canvas-wrap {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 12px 0;
}

#sky-canvas {
  display: block;
  max-width: 100%;
  max-height: 68vh;
}

.sky-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: radial-gradient(60% 60% at 50% 45%, #07111c, #02040a 70%);
  transition: opacity 0.4s var(--ease);
}

.loading-screen.ready {
  opacity: 0;
  pointer-events: none;
}

.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.loader-ring {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.loading-title {
  font-size: 13px;
  letter-spacing: 0.04em;
}

.loading-sub {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.hover-label {
  position: fixed;
  z-index: 20;
  transform: translate(12px, -50%);
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(4, 9, 15, 0.86);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
  color: var(--text);
  pointer-events: none;
  font-size: 10px;
  white-space: nowrap;
}

.hover-label .mono {
  margin-left: 6px;
  color: var(--muted);
  font-size: 9px;
}

.sat-label {
  position: absolute;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(2, 6, 12, 0.55);
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}

.sat-label.selected {
  border: 1px solid rgba(103, 232, 249, 0.4);
  color: var(--accent);
}

body.night-vision {
  --text: #ffc4c4;
  --muted: #c97676;
  --faint: #8e4b4b;
  --accent: #ff6262;
  --accent-soft: rgba(255, 98, 98, 0.14);
  --panel: rgba(24, 4, 4, 0.78);
  --panel-strong: rgba(24, 4, 4, 0.9);
  --panel-border: rgba(255, 90, 90, 0.16);
}

body.night-vision #globe-wrap {
  filter: sepia(0.55) saturate(2.4) hue-rotate(-42deg) brightness(0.6) contrast(1.1);
}

body.night-vision .swatch,
body.night-vision .pass-marker {
  filter: grayscale(1) sepia(1) hue-rotate(-45deg) saturate(4) brightness(0.75);
}

body.night-vision #sky-canvas {
  filter: sepia(0.5) hue-rotate(-45deg) saturate(3) brightness(0.78);
}

body.night-vision .glass {
  background: linear-gradient(180deg, rgba(30, 5, 5, 0.8), rgba(18, 3, 3, 0.78));
}

body.night-vision .modal,
body.night-vision .sky-card {
  background: linear-gradient(180deg, rgba(32, 5, 5, 0.97), rgba(16, 2, 2, 0.98));
}

body.night-vision #app::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(120, 0, 0, 0.07);
  pointer-events: none;
}

body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

@media (max-width: 1240px) {
  .search-box {
    width: 200px;
  }
  .brand-sub {
    display: none;
  }
  .panel {
    width: 276px;
  }
  .panel-right {
    width: 310px;
  }
  .sat-card {
    width: 276px;
  }
}

@media (max-width: 1040px) {
  .count-pill span:last-child {
    display: none;
  }
  .search-box {
    width: 170px;
  }
  .clock .mono {
    font-size: 12px;
  }
}

@media (max-width: 860px) {
  .topbar {
    gap: 12px;
    padding: 0 12px;
  }
  .clocks {
    gap: 12px;
    padding-left: 12px;
  }
  .search-box {
    width: 150px;
  }
  .panel {
    width: 250px;
  }
  .panel-right {
    width: 286px;
  }
  .sat-card {
    width: 250px;
  }
}

@media (max-width: 760px) {
  .topbar {
    top: calc(8px + env(safe-area-inset-top));
    left: 8px;
    right: 8px;
    height: auto;
    min-height: 58px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 9px 10px;
  }

  .brand {
    min-width: 0;
    gap: 0;
  }

  .brand-mark {
    font-size: 15px;
    letter-spacing: 0.16em;
  }

  .clocks {
    gap: 10px;
    padding-left: 10px;
  }

  .clock .mono {
    font-size: 11px;
  }

  .top-right {
    gap: 4px;
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .count-pill {
    height: 26px;
    padding: 0 7px;
    font-size: 10px;
  }

  .data-pill {
    height: 26px;
    padding: 0 7px;
    font-size: 10px;
  }

  .search-box {
    order: 10;
    width: 100%;
    height: 38px;
  }

  .search-results {
    left: 0;
    right: auto;
    width: 100%;
    max-height: 48vh;
  }

  .search-box kbd {
    display: none;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  .panel {
    position: static;
    width: 50%;
    height: 100%;
    top: auto;
    bottom: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    opacity: 1;
    transform: none;
  }

  .panel-left.collapsed {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .panel-left .panel-head .icon-btn {
    display: none;
  }

  .panel-body {
    padding: 0 18px 24px;
  }

  .sheet {
    position: fixed;
    z-index: 45;
    left: 0;
    right: 0;
    bottom: calc(82px + env(safe-area-inset-bottom));
    height: calc(100vh - 240px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px 20px 0 0;
    background: linear-gradient(180deg, rgba(14, 21, 31, 0.97), rgba(7, 11, 18, 0.99));
    box-shadow: 0 -20px 80px rgba(0, 0, 0, 0.65);
    transform: translateY(calc(100% - 72px));
    transition: transform 0.28s var(--ease);
  }

  .sheet.open {
    transform: translateY(0);
  }

  .sheet-grab {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    flex: 0 0 auto;
  }

  .sheet-grab span {
    width: 38px;
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.2);
  }

  .sheet-tabs {
    display: flex;
    gap: 4px;
    padding: 0 16px 8px;
    flex: 0 0 auto;
  }

  .sheet-tabs button {
    flex: 1;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
  }

  .sheet-tabs button.active {
    background: rgba(103, 232, 249, 0.1);
    color: var(--accent);
  }

  .sheet-panels {
    display: flex;
    width: 200%;
    flex: 1 1 auto;
    min-height: 0;
    transition: transform 0.26s var(--ease);
  }

  .sheet[data-tab="right"] .sheet-panels {
    transform: translateX(-50%);
  }

  .timeline {
    z-index: 46;
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    height: 74px;
    padding: 8px 12px 9px;
  }

  .timeline-row {
    height: 32px;
    gap: 8px;
  }

  #btn-play {
    width: 38px;
    height: 32px;
  }

  .speed-group button {
    min-width: 32px;
    height: 24px;
    padding: 0 5px;
    font-size: 9px;
  }

  #sim-clock {
    font-size: 11px;
  }

  .timeline-clock .mode-pill {
    display: none;
  }

  #btn-now {
    min-height: 30px;
    padding: 0 10px;
  }

  .timeline-track {
    margin-top: 2px;
  }

  .sat-card {
    left: 8px;
    right: 8px;
    bottom: calc(186px + env(safe-area-inset-bottom));
    width: auto;
    max-height: 32vh;
    z-index: 44;
    padding: 11px 12px;
  }

  body.has-selection #left-panel {
    bottom: auto;
  }

  .sat-name {
    font-size: 15px;
  }

  .sat-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 7px 10px;
    margin: 10px 0;
  }

  .sat-stats .stat .k {
    font-size: 7px;
  }

  .sat-stats .stat .v {
    font-size: 11px;
  }

  .sat-next {
    padding: 7px 0;
    font-size: 9px;
  }

  .card-actions {
    margin-top: 8px;
  }

  .card-actions .btn {
    min-height: 40px;
  }

  .left-open {
    display: none;
  }

  .modal {
    width: min(100%, 520px);
    max-height: 88vh;
    padding: 20px;
    border-radius: 16px;
  }

  .modal h1 {
    font-size: 23px;
  }

  .palette-backdrop {
    padding-top: 8vh;
    padding-left: 8px;
    padding-right: 8px;
  }

  .palette {
    width: 100%;
  }

  .sky-card {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    padding: calc(14px + env(safe-area-inset-top)) 14px 14px;
    justify-content: center;
  }

  .sky-modal {
    padding: 0;
  }

  #sky-canvas {
    max-height: 72vh;
  }

  .toast {
    bottom: 200px;
    max-width: calc(100vw - 32px);
    text-align: center;
  }

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

@media (max-width: 430px) {
  .brand {
    margin-right: auto;
  }

  .timeline {
    left: 6px;
    right: 6px;
  }

  .speed-group button {
    min-width: 28px;
  }

  .timeline-clock {
    gap: 4px;
  }
}

@media (hover: none) {
  .hover-label {
    display: none !important;
  }
}
