:root {
  --bg: #030712;
  --bg-2: #0a1224;
  --panel: rgba(8, 16, 36, 0.72);
  --panel-border: rgba(0, 212, 255, 0.18);
  --text: #e8f1ff;
  --muted: #8ba3c7;
  --cyan: #00d4ff;
  --mint: #00ff9d;
  --violet: #8b5cf6;
  --amber: #fbbf24;
  --rose: #fb7185;
  --block1: #38bdf8;
  --nextgen: #00ff9d;
  --prototype: #c084fc;
  --danger: #f43f5e;
  --glass-blur: 18px;
  --radius: 16px;
  --font-ui: "Outfit", system-ui, sans-serif;
  --font-display: "Orbitron", "Outfit", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

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

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  overflow: hidden;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Crawlable / a11y copy — not visually cluttering the mission UI */
.seo-crawl {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.seo-noscript {
  max-width: 40rem;
  margin: 2rem auto;
  padding: 1.25rem;
  color: var(--text);
  font-family: var(--font-ui);
  line-height: 1.5;
}

.seo-noscript a {
  color: var(--cyan);
}

#globe-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

/* Tiny HTML satellite glyphs over globe.gl */
.sat-marker {
  will-change: transform;
}
.sat-marker svg {
  display: block;
  overflow: visible;
}

.vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(3, 7, 18, 0.55) 75%, rgba(3, 7, 18, 0.92) 100%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.55) 0%, transparent 18%, transparent 78%, rgba(3, 7, 18, 0.75) 100%);
}

.grid-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.07;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.5) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

/* Glass panels */
.glass {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Top bar */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.25rem 0.5rem;
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
}

.brand-mark .core {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, var(--cyan) 40%, var(--mint));
  box-shadow: 0 0 20px var(--cyan), 0 0 40px rgba(0, 255, 157, 0.4);
}

.brand-mark .pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(0, 212, 255, 0.5);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.7);
    opacity: 1;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.brand-text h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.1;
}

.brand-text h1 span {
  color: var(--cyan);
}

.tagline {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.nav-inline {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 500;
}

.nav-inline:hover {
  text-decoration: underline;
}

a.mnav-btn.mnav-link {
  text-decoration: none;
}

.top-stats {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.stat {
  min-width: 92px;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  background: rgba(8, 16, 36, 0.65);
  border: 1px solid rgba(0, 212, 255, 0.12);
  backdrop-filter: blur(12px);
}

.stat.live {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-color: rgba(0, 255, 157, 0.35);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
  animation: blink 1.2s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.stat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stat-value {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.stat-value.mono,
.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
}

/* Side panels */
.panel {
  position: absolute;
  z-index: 10;
  top: 88px;
  bottom: 72px;
  width: min(340px, calc(100vw - 24px));
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-left {
  left: 16px;
}

.panel-right {
  right: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 1rem 0.55rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--cyan);
}

.filters {
  display: flex;
  gap: 0.3rem;
}

.chip {
  border: 1px solid rgba(0, 212, 255, 0.2);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.15s ease;
}

.chip:hover {
  color: var(--text);
  border-color: rgba(0, 212, 255, 0.45);
}

.chip.active {
  background: rgba(0, 212, 255, 0.15);
  color: var(--cyan);
  border-color: rgba(0, 212, 255, 0.5);
}

.fleet-list {
  flex: 1;
  overflow: auto;
  padding: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.35) transparent;
}

.fleet-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.4rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: 0.15s ease;
}

.fleet-card:hover {
  background: rgba(0, 212, 255, 0.06);
  border-color: rgba(0, 212, 255, 0.2);
}

.fleet-card.selected {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.08);
}

.fleet-card .avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid currentColor;
}

.fleet-card .avatar.nextgen {
  color: var(--nextgen);
  background: rgba(0, 255, 157, 0.08);
}
.fleet-card .avatar.block1 {
  color: var(--block1);
  background: rgba(56, 189, 248, 0.08);
}
.fleet-card .avatar.prototype {
  color: var(--prototype);
  background: rgba(192, 132, 252, 0.1);
}

.fleet-card .meta .name {
  font-weight: 600;
  font-size: 0.92rem;
}

.fleet-card .meta .sub {
  color: var(--muted);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  margin-top: 0.1rem;
}

.fleet-card .side {
  text-align: right;
}

.fleet-card .alt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
}

.fleet-card .gen {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Detail */
.detail-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.orbit-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px dashed rgba(0, 212, 255, 0.35);
  position: relative;
}

.orbit-icon::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px var(--mint);
  top: 6px;
  left: 40px;
  animation: orbit 4s linear infinite;
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
    transform-origin: -8px 22px;
  }
}

#detail-body {
  flex: 1;
  overflow: auto;
  padding: 0.85rem 1rem 1rem;
}

.sat-hero {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1rem;
}

.sat-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--bg);
  background: linear-gradient(135deg, var(--cyan), var(--mint));
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.35);
}

.sat-name {
  font-size: 1.15rem;
  font-weight: 700;
}

.sat-sub {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.metric {
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(0, 212, 255, 0.08);
}

.metric-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.metric-value {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.metric-value.small {
  font-size: 0.78rem;
  word-break: break-all;
}

.metric-unit {
  margin-left: 0.2rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.chart-block {
  margin-top: 1rem;
  padding: 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.chart-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.4rem;
}

.chart-head h3 {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  font-family: var(--font-display);
}

.chart-head .hint {
  font-size: 0.68rem;
  color: var(--muted);
}

#bstar-chart {
  width: 100%;
  height: 120px;
  display: block;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.btn {
  border: 1px solid rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.08);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.15s ease;
}

.btn:hover {
  border-color: var(--cyan);
  background: rgba(0, 212, 255, 0.16);
}

.btn.primary {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.9), rgba(0, 255, 157, 0.75));
  color: #031018;
  border: none;
  font-weight: 600;
}

.btn.ghost {
  background: transparent;
}

.btn.sm {
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
}

.icon-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
}

/* Bottom bar */
.bottombar {
  position: absolute;
  z-index: 10;
  left: 16px;
  right: 16px;
  bottom: 12px;
  border-radius: 14px;
  padding: 0.55rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Micro-disclaimer painted over the bar — no extra row / height */
.bottombar .site-disclaimer {
  position: absolute;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
  max-width: calc(100% - 1.5rem);
  font-size: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--muted);
  opacity: 0.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  user-select: none;
}

/* Discreet author credit (intentionally low-visibility) */
.site-author {
  margin: 0;
  padding: 0;
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--muted);
  opacity: 0.32;
  text-align: center;
}

.site-author a {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

.site-author a:hover {
  opacity: 1;
  color: var(--cyan);
  text-decoration: underline;
}

.bottombar .site-author {
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  white-space: nowrap;
  max-width: 95vw;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.bottombar .site-author a {
  pointer-events: auto;
}

.seo-crawl .site-author {
  opacity: 0.85;
  font-size: 0.85rem;
  margin-top: 1rem;
}

.legend {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--muted);
}

.lg {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot.nextgen {
  background: var(--nextgen);
  box-shadow: 0 0 8px var(--nextgen);
}
.dot.block1 {
  background: var(--block1);
  box-shadow: 0 0 8px var(--block1);
}
.dot.prototype {
  background: var(--prototype);
  box-shadow: 0 0 8px var(--prototype);
}
.dot.track {
  background: transparent;
  border: 1.5px solid rgba(0, 212, 255, 0.7);
  border-radius: 2px;
  width: 12px;
  height: 3px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.toggle input {
  accent-color: var(--cyan);
}

.source {
  font-size: 0.68rem;
  color: var(--muted);
}

/* New-sat toast */
.toast-host {
  position: absolute;
  z-index: 40;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(6, 24, 20, 0.92);
  border: 1px solid rgba(0, 255, 157, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 30px rgba(0, 255, 157, 0.12);
  backdrop-filter: blur(16px);
  animation: toast-in 0.35s ease;
}

.toast.out {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(0, 255, 157, 0.15);
  color: var(--mint);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--mint);
  text-transform: uppercase;
}

.toast-msg {
  margin-top: 0.2rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.toast-sub {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.toast-close {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.15rem;
}

.fleet-card.is-new {
  border-color: rgba(0, 255, 157, 0.45);
  background: rgba(0, 255, 157, 0.06);
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.08);
}

.badge-new {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  vertical-align: middle;
  color: #031018;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  animation: blink 1.4s ease-in-out infinite;
}

.watch-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.watch-pill .dot-scan {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: blink 2s ease-in-out infinite;
}

/* Loader */
.loader {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  background: radial-gradient(circle at center, rgba(10, 18, 36, 0.9), rgba(3, 7, 18, 0.97));
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.loader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(0, 212, 255, 0.15);
  border-top-color: var(--cyan);
  border-right-color: var(--mint);
  animation: spin 0.9s linear infinite;
}

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

.loader p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* Mobile chrome (hidden on desktop) */
.mobile-only {
  display: none !important;
}

.mobile-status {
  display: none;
}

.mobile-nav {
  display: none;
}

.sheet-scrim {
  display: none;
}

.sheet-handle {
  display: none;
}

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .panel {
    top: 80px;
    bottom: 80px;
    width: min(300px, calc(50vw - 18px));
  }

  .top-stats .stat.desktop-only {
    display: none;
  }

  .brand-text h1 {
    font-size: 0.95rem;
  }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  .mobile-only {
    display: inline-flex !important;
  }

  .desktop-only {
    display: none !important;
  }

  html,
  body,
  #app {
    height: 100%;
    height: 100dvh;
    overscroll-behavior: none;
  }

  /* Touch-friendly base */
  .chip,
  .btn,
  .mnav-btn,
  .fleet-card,
  .icon-btn,
  .toggle {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .topbar {
    padding: max(0.55rem, env(safe-area-inset-top)) 0.7rem 0.35rem;
    gap: 0.5rem;
  }

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

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-mark .core {
    inset: 10px;
  }

  .brand-text h1 {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
  }

  .brand-text .tagline {
    display: none;
  }

  .top-stats {
    gap: 0.4rem;
  }

  .top-stats .stat {
    min-width: auto;
    padding: 0.3rem 0.5rem;
  }

  .top-stats .stat:not(.live) {
    display: none;
  }

  .stat.live {
    padding: 0.3rem 0.55rem;
  }

  .stat-value.mono,
  .stat.live .stat-value {
    font-size: 0.72rem;
  }

  /* Compact chips under header */
  .mobile-status {
    display: flex;
    position: absolute;
    z-index: 10;
    top: calc(52px + env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    gap: 0.4rem;
    flex-wrap: wrap;
    pointer-events: none;
  }

  .mchip {
    pointer-events: none;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    color: var(--muted);
    background: rgba(8, 16, 36, 0.72);
    border: 1px solid rgba(0, 212, 255, 0.14);
    backdrop-filter: blur(12px);
  }

  .mchip strong {
    color: var(--text);
    font-weight: 600;
  }

  .mchip.mono {
    font-family: var(--font-mono);
    font-size: 0.62rem;
  }

  /* Scrim behind sheets */
  .sheet-scrim {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 24;
    background: rgba(2, 6, 14, 0.55);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }

  .sheet-scrim.show {
    opacity: 1;
    visibility: visible;
  }

  .sheet-handle {
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    margin: 0.45rem auto 0.1rem;
    flex-shrink: 0;
  }

  /* Bottom sheets */
  .panel,
  .bottombar {
    position: absolute;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: calc(64px + env(safe-area-inset-bottom)) !important;
    width: 100% !important;
    height: min(72dvh, 560px) !important;
    max-height: calc(100dvh - 100px - env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    z-index: 25;
    transform: translateY(110%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  }

  .panel.is-open,
  .bottombar.is-open {
    transform: translateY(0);
    pointer-events: auto;
  }

  .panel-left,
  .panel-right {
    display: flex;
  }

  .panel-head {
    padding: 0.45rem 0.85rem 0.55rem;
    gap: 0.45rem;
    flex-wrap: wrap;
  }

  .panel-head .filters {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .panel-head .icon-btn {
    margin-left: auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 1.05rem;
  }

  .fleet-list {
    padding: 0.35rem 0.55rem 1rem;
    -webkit-overflow-scrolling: touch;
  }

  .fleet-card {
    padding: 0.75rem 0.7rem;
    min-height: 56px;
    margin-bottom: 0.35rem;
  }

  .fleet-card .avatar {
    width: 40px;
    height: 40px;
  }

  .fleet-card .meta .name {
    font-size: 0.95rem;
  }

  #detail-body {
    padding: 0.7rem 0.85rem calc(1rem + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  .metric-grid {
    gap: 0.4rem;
  }

  .metric {
    padding: 0.5rem 0.55rem;
  }

  .metric-value {
    font-size: 0.98rem;
  }

  .actions {
    position: sticky;
    bottom: 0;
    padding-top: 0.5rem;
    padding-bottom: 0.25rem;
    background: linear-gradient(180deg, transparent, rgba(8, 16, 36, 0.95) 30%);
  }

  .actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
    text-align: center;
  }

  /* Settings sheet (was bottom bar) */
  .bottombar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0 0.9rem 1rem;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .bottombar .settings-head {
    display: flex;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    margin: 0 -0.9rem;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .bottombar .legend {
    gap: 0.55rem 0.85rem;
  }

  .bottombar .controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .bottombar .toggle {
    justify-content: space-between;
    padding: 0.7rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    font-size: 0.88rem;
    min-height: 48px;
  }

  .bottombar .toggle input {
    width: 18px;
    height: 18px;
  }

  .bottombar .btn.sm {
    width: 100%;
    min-height: 48px;
    font-size: 0.9rem;
    padding: 0.7rem 1rem;
  }

  .bottombar .source {
    font-size: 0.62rem;
    line-height: 1.4;
    word-break: break-word;
  }

  .bottombar .site-disclaimer {
    bottom: 4px;
    opacity: 0.35;
    font-size: 0.48rem;
  }

  .bottombar .site-author {
    display: none; /* keep map chrome clean on small screens */
  }

  /* Bottom tab bar */
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.25rem 0.3rem calc(0.35rem + env(safe-area-inset-bottom));
    background: rgba(6, 12, 28, 0.94);
    border-top: 1px solid rgba(0, 212, 255, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .mnav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    min-height: 52px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    border-radius: 12px;
    transition: color 0.15s ease, background 0.15s ease;
  }

  .mnav-btn .mnav-icon {
    font-size: 1.15rem;
    line-height: 1;
  }

  .mnav-btn.active {
    color: var(--cyan);
    background: rgba(0, 212, 255, 0.1);
  }

  .mnav-btn.has-badge {
    position: relative;
  }

  .toast-host {
    top: calc(96px + env(safe-area-inset-top));
    width: calc(100vw - 20px);
  }

  .toast {
    padding: 0.75rem 0.85rem;
  }

  .toast-msg {
    font-size: 0.88rem;
  }

  /* More globe visible */
  .vignette {
    background:
      radial-gradient(ellipse at center, transparent 42%, rgba(3, 7, 18, 0.4) 78%, rgba(3, 7, 18, 0.88) 100%),
      linear-gradient(180deg, rgba(3, 7, 18, 0.5) 0%, transparent 14%, transparent 72%, rgba(3, 7, 18, 0.7) 100%);
  }

  .grid-overlay {
    opacity: 0.04;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .brand-text h1 {
    font-size: 0.72rem;
  }

  .mnav-btn {
    font-size: 0.6rem;
  }

  .panel,
  .bottombar {
    height: min(78dvh, 520px) !important;
  }
}

/* Landscape phone: keep more map, lower sheet */
@media (max-width: 900px) and (max-height: 480px) and (orientation: landscape) {
  .mobile-nav {
    display: grid;
  }

  .panel,
  .bottombar {
    height: min(85dvh, 100%) !important;
    max-height: calc(100dvh - 56px - env(safe-area-inset-bottom));
  }

  .mobile-status {
    display: none;
  }

  .topbar {
    padding-top: 0.35rem;
  }
}
