:root {
  --bg: #07111a;
  --panel: rgba(12, 20, 31, 0.94);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #edf5ff;
  --muted: #9db4cb;
  --accent: #7fc2ff;
  --accent-soft: rgba(127, 194, 255, 0.14);
  --selected: rgba(127, 194, 255, 0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: radial-gradient(circle at top, #11253b 0%, #07111a 45%, #040911 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body { overflow: hidden; }
button, input { font: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.1rem; }
h2 { font-size: 1rem; }
h3 { font-size: 0.95rem; }
button {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
button:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-1px); }
button:active { transform: translateY(0); }
.primary-btn { background: var(--accent-soft); border-color: rgba(127, 194, 255, 0.24); }
input[type="search"], input[type="text"], select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
input:focus {
  outline: 2px solid rgba(127, 194, 255, 0.35);
  border-color: rgba(127, 194, 255, 0.35);
}
.app-shell {
  position: relative;
  height: 100vh;
}
.globe-stage {
  position: relative;
  height: 100vh;
  min-width: 0;
}
#globeCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}
#globeCanvas.dragging { cursor: grabbing; }
.side-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(92vw, 420px);
  max-width: 92vw;
  padding: 14px;
  background: var(--panel);
  overflow: auto;
  z-index: 22;
  box-shadow: var(--shadow);
  border: 0;
  overscroll-behaviour: contain;
}
.left-panel { left: 0; transform: translateX(-105%); transition: transform 0.22s ease; }
.right-panel { right: 0; transform: translateX(105%); transition: transform 0.22s ease; }
.left-panel.open, .right-panel.open { transform: translateX(0); }
.panel-close-btn {
  display: inline-flex;
  margin-bottom: 12px;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(127, 194, 255, 0.12);
  color: var(--accent);
  font-size: 24px;
}
.brand-row p, .stat-label, .subtle-label, #detailIntro, #listHint, .small-note p, #shareStatus { color: var(--muted); }
.panel-block {
  margin-bottom: 12px;
  padding: 13px;
  border-radius: var(--radius);
  background: var(--panel-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
label, .subtle-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
}
.compact-grid { display: grid; gap: 10px; }
.three-up { grid-template-columns: repeat(3, 1fr); }
.stat-box {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}
.stat-box strong { display: block; margin-top: 6px; font-size: 1.05rem; }
#selectedLabel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.92rem;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip, .preset-chip {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.filter-chip.active, .preset-chip.active {
  background: var(--selected);
  border-color: rgba(127, 194, 255, 0.3);
}
.list-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}
.share-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.satellite-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: none;
  padding-bottom: 90px;
}
.satellite-item {
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}
.satellite-item:hover, .satellite-item.selected {
  background: var(--selected);
  border-color: rgba(127, 194, 255, 0.3);
}
.satellite-item strong { display: block; margin-bottom: 3px; }
.satellite-item span {
  display: block;
  color: var(--muted);
  font-size: 0.87rem;
}
.map-topbar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 18;
  pointer-events: none;
}
.badge, .mobile-map-btn {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(8, 17, 29, 0.78);
  border: 1px solid var(--border);
  color: var(--muted);
  backdrop-filter: blur(8px);
}
.mobile-map-actions {
  position: absolute;
  right: 12px;
  bottom: 76px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 23;
}
.desktop-zoom-actions { display: none; }
.mobile-map-btn {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.floating-note, .status-banner {
  position: absolute;
  left: 12px;
  right: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(8, 17, 29, 0.8);
  border: 1px solid var(--border);
  color: var(--muted);
  backdrop-filter: blur(8px);
}
.floating-note {
  bottom: 12px;
  max-width: calc(100vw - 120px);
}
.status-banner {
  top: auto;
  bottom: 12px;
  text-align: center;
  max-width: 360px;
  margin: 0 auto;
}
.hover-card {
  position: fixed;
  z-index: 30;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(7, 17, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  pointer-events: none;
  color: var(--text);
  line-height: 1.35;
}
.hidden { display: none; }
.detail-card {
  margin: 0 0 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  min-height: 180px;
}
.detail-card h3 { margin-bottom: 8px; }
.detail-card p { color: var(--muted); line-height: 1.45; margin-bottom: 12px; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.detail-pill {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.detail-pill span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 5px;
}
.empty-state {
  display: grid;
  place-items: center;
  text-align: center;
}
.empty-symbol {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  margin-bottom: 12px;
  font-size: 22px;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}
.panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.42);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.panel-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}
@media (min-width: 901px) {
  .app-shell {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr) 340px;
  }
  .side-panel {
    position: relative;
    inset: auto;
    width: auto;
    max-width: none;
    transform: none !important;
    border-right: 1px solid var(--border);
    padding: 16px;
  }
  .right-panel {
    border-right: 0;
    border-left: 1px solid var(--border);
  }
  .panel-close-btn,
  .mobile-map-actions,
  .panel-backdrop {
    display: none;
  }
  .desktop-zoom-actions {
    position: absolute;
    right: 16px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 18;
  }
  .map-topbar {
    left: 16px;
    right: 16px;
  }
  .status-banner {
    top: 16px;
    right: 16px;
    left: auto;
    bottom: auto;
    max-width: none;
    margin: 0;
    text-align: left;
  }
  .floating-note {
    left: 16px;
    right: auto;
    bottom: 16px;
    max-width: 460px;
  }
  .satellite-list {
    max-height: calc(100vh - 510px);
    padding-bottom: 0;
  }
}


.badge { color: var(--text); }
.floating-note { max-width: min(460px, calc(100vw - 112px)); color: var(--text); }
.satellite-item { border: 1px solid rgba(255,255,255,0.06); }
.satellite-item::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; background: var(--dot, #8cc8ff); box-shadow: 0 0 0 2px rgba(255,255,255,0.08); }
.satellite-item strong { display: inline; }
.satellite-item .item-head { display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.satellite-item .type-dot { width:10px; height:10px; border-radius:50%; flex:0 0 auto; box-shadow:0 0 0 2px rgba(255,255,255,0.08); }
.detail-card .detail-meta-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.detail-card .detail-meta-grid .data-pill { margin:0; }
@media (min-width: 960px) { .floating-note { left: 18px; right: auto; bottom: 18px; } }


/* v3 overrides */
.app-shell {
  width: 100vw;
  overflow: hidden;
}
.globe-stage {
  width: 100vw;
}
.side-panel {
  width: min(92vw, 400px);
  max-width: 92vw;
}
.mobile-map-actions {
  top: 12px;
  right: 12px;
  bottom: auto;
}
.map-topbar {
  left: 12px;
  right: 88px;
}
.badge {
  color: var(--text);
}
.status-banner {
  left: 12px;
  right: auto;
  bottom: 12px;
  max-width: 320px;
  margin: 0;
  text-align: left;
}
.floating-note {
  display: none !important;
}
.satellite-list {
  max-height: none !important;
  padding-bottom: 40px;
}
.panel-backdrop {
  display: block !important;
}
@media (min-width: 901px) {
  .app-shell {
    display: block;
    grid-template-columns: none;
  }
  .side-panel {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(420px, 36vw);
    max-width: 420px;
    transform: translateX(-105%);
    border-right: 0;
    padding: 14px;
  }
  .right-panel {
    inset: 0 0 0 auto;
    transform: translateX(105%);
    border-left: 0;
  }
  .left-panel.open,
  .right-panel.open {
    transform: translateX(0) !important;
  }
  .panel-close-btn,
  .panel-backdrop,
  .mobile-map-actions {
    display: initial;
  }
  .mobile-map-actions {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: 16px;
    right: 16px;
    gap: 8px;
    z-index: 23;
  }
  .desktop-zoom-actions {
    display: none;
  }
  .status-banner {
    top: auto;
    right: auto;
    bottom: 16px;
    left: 16px;
  }
}
