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

:root {
  --bg:    #020510;
  --sb:    #070d1a;
  --card:  #0d1425;
  --hover: #121c2e;
  --ac:    #4fc3f7;
  --acb:   #00b4ff;
  --acdim: rgba(79,195,247,.12);
  --gn:    #39d353;
  --yw:    #e3b341;
  --rd:    #f85149;
  --pu:    #a371f7;
  --t1:    #e2ebf5;
  --t2:    #7d8fa3;
  --t3:    #3d4d5e;
  --bd:    #182030;
  --bd2:   #243040;
  --H:     58px;
  --font-space: 'Orbitron', system-ui, sans-serif;
  --font-mono:  'Share Tech Mono', monospace;
}

html, body {
  height: 100%; overflow: hidden;
  overflow-x: hidden;
  background: var(--bg); color: var(--t1);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px; line-height: 1.5;
}

.noscript-banner {
  position: fixed; top: var(--H); left: 0; right: 0; z-index: 4500;
  padding: 10px 16px; text-align: center;
  background: rgba(248,81,73,.14); color: #ffd7d5;
  border-bottom: 1px solid rgba(248,81,73,.28);
  font-size: 12px; line-height: 1.5;
}

/* ── HEADER ──────────────────────────────────────────── */
.hdr {
  height: var(--H); background: var(--sb);
  border-bottom: 1px solid rgba(79,195,247,.18);
  box-shadow: 0 1px 20px rgba(0,180,255,.08);
  display: flex; align-items: center; padding: 0 20px; gap: 14px;
  position: relative; z-index: 2000; flex-shrink: 0;
}
.hdr::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: linear-gradient(90deg, transparent, rgba(79,195,247,.4) 30%, rgba(163,113,247,.3) 60%, transparent);
  pointer-events: none;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; flex-shrink: 0; text-decoration: none; color: inherit;
}
.logo svg { width: 36px; height: 36px; }
.logo-text {
  font-family: var(--font-space); font-size: 16px; font-weight: 700;
  letter-spacing: .14em; color: var(--ac);
  text-shadow: 0 0 12px rgba(79,195,247,.5);
}
.logo-sub  { font-size: 10px; color: var(--t2); margin-top: 3px; letter-spacing: .06em; text-transform: uppercase; }

.nav { display: flex; gap: 6px; }
.nbtn {
  border: 1px solid var(--bd2); background: transparent;
  color: var(--t2); border-radius: 6px; padding: 5px 13px;
  font-size: 11px; font-weight: 500; cursor: pointer; letter-spacing: .04em;
  font-family: var(--font-space);
  transition: all .18s; display: flex; align-items: center; gap: 6px;
  justify-content: center; white-space: nowrap; text-decoration: none;
}
.nbtn:hover {
  background: rgba(79,195,247,.08); color: var(--ac);
  border-color: rgba(79,195,247,.4); box-shadow: 0 0 10px rgba(79,195,247,.1);
}
.nbtn.on {
  background: var(--acdim); color: var(--ac);
  border-color: rgba(79,195,247,.4); box-shadow: 0 0 10px rgba(79,195,247,.15);
}

.hst {
  margin-left: auto; display: flex; align-items: center;
  gap: 18px; font-size: 11px; color: var(--t2); flex-shrink: 0;
}
.hst-item { display: flex; align-items: center; gap: 5px; }
.hst-item strong { color: var(--ac); font-weight: 600; }

.dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gn); box-shadow: 0 0 8px var(--gn), 0 0 16px rgba(57,211,83,.3);
  animation: blink 2s ease-in-out infinite; display: inline-block;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ── VIEWS ───────────────────────────────────────────── */
.view { display: none; flex: 1; overflow: hidden; min-width: 0; min-height: 0; }
.view.on { display: flex; }
.app { display: flex; flex-direction: column; height: 100vh; width: 100%; overflow-x: hidden; }

/* ── HOME ─────────────────────────────────────────────── */
#v-home {
  flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg); position: relative; overflow: hidden;
}
#stars-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.home-grid-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background-image:
    linear-gradient(rgba(79,195,247,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,195,247,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.home-glow-1 {
  position: absolute; top: -10%; left: -10%; width: 50%; height: 50%;
  background: radial-gradient(ellipse, rgba(79,195,247,.06) 0%, transparent 65%);
  pointer-events: none; z-index: 1;
}
.home-glow-2 {
  position: absolute; bottom: -10%; right: -5%; width: 55%; height: 55%;
  background: radial-gradient(ellipse, rgba(163,113,247,.05) 0%, transparent 65%);
  pointer-events: none; z-index: 1;
}
.home-glow-3 {
  position: absolute; bottom: 20%; left: 20%; width: 40%; height: 40%;
  background: radial-gradient(ellipse, rgba(57,211,83,.03) 0%, transparent 65%);
  pointer-events: none; z-index: 1;
}
.home-wrap { text-align: center; max-width: 520px; width: 100%; padding: 24px; position: relative; z-index: 2; }
.home-icon { margin-bottom: 26px; position: relative; display: inline-block; }

/* Orbital rings animation around the home icon */
.home-icon-wrap {
  position: relative; display: inline-flex;
  align-items: center; justify-content: center;
  width: 120px; height: 120px;
}
.home-icon-earth {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.orbit-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(79,195,247,.25);
  animation: orbit-spin linear infinite;
}
.orbit-ring-1 {
  width: 86px; height: 86px;
  animation-duration: 8s;
  border-color: rgba(79,195,247,.3);
}
.orbit-ring-2 {
  width: 110px; height: 110px;
  animation-duration: 14s; animation-direction: reverse;
  border-color: rgba(163,113,247,.2);
}
.orbit-ring-3 {
  width: 68px; height: 34px; top: 43px;
  border-color: rgba(79,195,247,.18);
  animation-duration: 6s;
  transform-origin: center center;
  border-radius: 50%;
  transform: rotateX(72deg);
}
.orbit-sat {
  position: absolute; width: 7px; height: 7px;
  background: var(--ac); border-radius: 50%;
  box-shadow: 0 0 8px var(--ac), 0 0 16px rgba(79,195,247,.5);
  animation: orbit-sat1 8s linear infinite;
  top: calc(50% - 43px); left: calc(50% - 3.5px);
  transform-origin: 3.5px 43px;
}
.orbit-sat-2 {
  position: absolute; width: 5px; height: 5px;
  background: var(--pu); border-radius: 50%;
  box-shadow: 0 0 8px var(--pu);
  animation: orbit-sat2 14s linear infinite reverse;
  top: calc(50% - 55px); left: calc(50% - 2.5px);
  transform-origin: 2.5px 55px;
}
@keyframes orbit-spin  { to { transform: rotate(360deg); } }
@keyframes orbit-sat1  { to { transform: rotate(360deg); } }
@keyframes orbit-sat2  { to { transform: rotate(360deg); } }

.home-title {
  font-family: var(--font-mono);
  font-size: 28px; font-weight: 900; letter-spacing: .02em;
  line-height: 1.15; margin-bottom: 12px;
  text-transform: uppercase;
}
.home-title em { color: var(--ac); font-style: normal; text-shadow: 0 0 20px rgba(79,195,247,.4); }
.home-sub { font-size: 14px; color: var(--t2); margin-bottom: 34px; line-height: 1.6; }

/* HUD corner decorations */
.hud-corner {
  position: absolute; width: 22px; height: 22px;
  pointer-events: none; opacity: .4;
}
.hud-corner-tl { top: 8px; left: 8px; border-top: 1.5px solid var(--ac); border-left: 1.5px solid var(--ac); }
.hud-corner-tr { top: 8px; right: 8px; border-top: 1.5px solid var(--ac); border-right: 1.5px solid var(--ac); }
.hud-corner-bl { bottom: 8px; left: 8px; border-bottom: 1.5px solid var(--ac); border-left: 1.5px solid var(--ac); }
.hud-corner-br { bottom: 8px; right: 8px; border-bottom: 1.5px solid var(--ac); border-right: 1.5px solid var(--ac); }

.home-row { display: flex; gap: 8px; margin-bottom: 10px; }
.home-input {
  flex: 1; background: rgba(13,20,37,.8);
  border: 1px solid var(--bd2); border-radius: 8px;
  color: var(--t1); font-size: 14px; padding: 12px 16px;
  outline: none; transition: border-color .2s, box-shadow .2s;
  font-family: var(--font-mono);
}
.home-input::placeholder { color: var(--t3); }
.home-input:focus {
  border-color: var(--ac);
  box-shadow: 0 0 0 2px rgba(79,195,247,.12), 0 0 12px rgba(79,195,247,.1);
}

.btn-find {
  background: linear-gradient(135deg, var(--acb), #0080cc);
  color: #fff; border: none; border-radius: 8px; padding: 12px 20px;
  font-size: 13px; font-weight: 600; cursor: pointer; letter-spacing: .05em;
  font-family: var(--font-space);
  transition: all .18s; display: flex; align-items: center; gap: 7px;
  white-space: nowrap; text-transform: uppercase;
  box-shadow: 0 0 16px rgba(0,180,255,.25);
}
.btn-find:not(:disabled):hover {
  background: linear-gradient(135deg, #38d0ff, #0099dd);
  box-shadow: 0 0 24px rgba(0,180,255,.4);
  transform: translateY(-1px);
}
.btn-find:disabled { opacity: .45; cursor: not-allowed; }

.btn-gps {
  width: 100%; background: transparent;
  border: 1px dashed rgba(79,195,247,.25); border-radius: 8px;
  color: var(--t2); padding: 10px; font-size: 12px;
  cursor: pointer; transition: all .18s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: .04em;
}
.btn-gps:hover {
  border-color: var(--ac); color: var(--ac);
  background: var(--acdim); box-shadow: 0 0 10px rgba(79,195,247,.1);
}

.home-hint { margin-top: 16px; font-size: 11px; color: var(--t3); line-height: 1.7; }
.home-hint b { color: var(--t2); font-weight: 500; }

.home-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0 14px; color: var(--t3); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
}
.home-divider::before, .home-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--bd2), transparent);
}

.home-coords-row { display: flex; gap: 8px; margin-bottom: 8px; }
.home-coords-row .home-input { font-size: 14px; }
.home-coords-row .home-input::-webkit-inner-spin-button,
.home-coords-row .home-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.coord-label {
  display: block; font-size: 10px; font-weight: 600; letter-spacing: .1em;
  color: var(--t3); text-transform: uppercase; margin-bottom: 4px;
  font-family: var(--font-space);
}
.coord-field { flex: 1; display: flex; flex-direction: column; }

.btn-coords {
  width: 100%; background: rgba(13,20,37,.7);
  border: 1px solid var(--bd2); border-radius: 8px;
  color: var(--t2); padding: 10px; font-size: 12px;
  cursor: pointer; transition: all .18s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: .04em; font-family: var(--font-space);
}
.btn-coords:hover {
  border-color: var(--ac); color: var(--ac);
  background: var(--acdim); box-shadow: 0 0 10px rgba(79,195,247,.1);
}

.home-tle-status {
  display: none; margin-top: 20px; padding: 10px 14px;
  background: var(--card); border: 1px solid var(--bd2);
  border-radius: 8px; font-size: 12px; color: var(--t2);
  display: flex; align-items: center; gap: 8px;
}

/* ── PASSES ─────────────────────────────────────────── */
#v-passes { flex-direction: row; }

.p-map-wrap { flex: 1; position: relative; min-width: 0; }
.p-map { width: 100%; height: 100%; min-height: 0; }

.p-side {
  width: 360px; flex-shrink: 0;
  background: var(--sb); border-left: 1px solid rgba(79,195,247,.12);
  display: flex; flex-direction: column; overflow: hidden;
}

.p-loc {
  padding: 13px 15px 11px; border-bottom: 1px solid var(--bd); flex-shrink: 0;
}
.p-intro {
  padding: 16px 15px 14px;
  border-bottom: 1px solid var(--bd);
  background: linear-gradient(180deg, rgba(79,195,247,.08), transparent 80%);
  flex-shrink: 0;
}
.p-intro-kicker {
  font-size: 9px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ac);
  font-family: var(--font-space);
}
.p-page-title {
  margin: 6px 0 8px;
  font-size: 22px; font-weight: 800; line-height: 1.1;
  letter-spacing: -.02em; color: var(--t1);
}
.p-intro-copy {
  font-size: 12px; color: var(--t2); line-height: 1.6;
}
.p-intro-link {
  display: inline-flex; margin-top: 10px;
  color: var(--ac); text-decoration: none;
  font-size: 11px; font-weight: 600;
}
.p-intro-link:hover { text-decoration: underline; }
.p-loc-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 2px; }
.p-loc-name { font-size: 15px; font-weight: 600; }
.p-loc-back {
  font-size: 11px; color: var(--ac); cursor: pointer; background: none;
  border: none; padding: 2px 0; margin-left: 8px; flex-shrink: 0;
}
.p-loc-back:hover { text-decoration: underline; }
.p-loc-coords { font-size: 11px; color: var(--t2); font-family: monospace; }
.p-loc-meta { margin-top: 5px; font-size: 11px; color: var(--t3); line-height: 1.45; }
.p-loc-meta strong { color: var(--t2); font-weight: 600; }

.p-hdr {
  padding: 9px 15px 7px; border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0; background: var(--sb); z-index: 10;
}
.p-hdr-title { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--t3); font-family: var(--font-space); line-height: 1.2; }
.p-hdr-count { font-size: 12px; color: var(--t2); }
.p-hdr-count strong { color: var(--ac); }

.p-legend {
  display: none; position: absolute; left: 16px; bottom: 24px; z-index: 800;
  flex-direction: column; gap: 0; min-width: 220px; max-width: 280px;
  background: rgba(10,14,24,.9); border: 1px solid var(--bd2);
  border-radius: 8px; padding: 10px 14px; font-size: 11px; color: var(--t2);
  backdrop-filter: blur(6px); pointer-events: none;
}
.p-legend.on { display: flex; }
.leg { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--t2); line-height: 1.9; }
.leg-d { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.p-list { flex: 1; overflow-y: auto; min-height: 0; }
.p-list::-webkit-scrollbar { width: 4px; }
.p-list::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 2px; }
.p-filter {
  border-top: 1px solid var(--bd);
  padding: 12px 15px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  background: var(--sb);
}
.p-filter-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.p-filter-copy strong {
  font-size: 12px;
  color: var(--t1);
  font-weight: 600;
}
.p-filter-copy small {
  font-size: 11px;
  color: var(--t2);
  line-height: 1.45;
}
.p-filter-note {
  font-size: 11px;
  color: var(--ac);
  min-height: 16px;
}
.p-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.p-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.p-toggle-ui {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--bd2);
  background: #111826;
  position: relative;
  flex-shrink: 0;
  transition: background .18s, border-color .18s;
}
.p-toggle-ui::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--t1);
  transition: transform .18s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.p-toggle input:checked + .p-toggle-ui {
  background: rgba(88,166,255,.22);
  border-color: rgba(88,166,255,.45);
}
.p-toggle input:checked + .p-toggle-ui::after {
  transform: translateX(18px);
}
.p-featured {
  padding: 12px 15px 14px;
  border-bottom: 1px solid var(--bd);
  background: rgba(63,185,80,.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.p-featured[hidden] { display: none !important; }
.pf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pf-title {
  font-size: 11px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: #d8ffe0;
}
.pf-sub { font-size: 11px; color: var(--t2); }
.pf-list { display: flex; flex-direction: column; gap: 8px; }
.pf-card {
  border: 1px solid rgba(63,185,80,.22);
  background: rgba(6,10,20,.28);
  border-radius: 10px;
  padding: 10px 11px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.pf-card:hover {
  background: rgba(6,10,20,.42);
  border-color: rgba(63,185,80,.35);
}
.pf-r1, .pf-r2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pf-r1 { margin-bottom: 6px; }
.pf-time { font-size: 18px; font-weight: 800; color: var(--t1); letter-spacing: -.02em; }
.pf-peak { font-size: 12px; font-weight: 700; color: var(--gn); white-space: nowrap; }
.pf-r2 { font-size: 11px; color: var(--t2); }
.pf-sat { color: var(--t1); font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* state placeholder */
.p-state {
  padding: 40px 20px; display: flex; flex-direction: column;
  align-items: center; gap: 14px; text-align: center;
}
.p-state svg { opacity: .2; color: var(--t2); }
.p-state p { font-size: 13px; color: var(--t2); line-height: 1.6; }
.p-state small { font-size: 11px; color: var(--t3); }

.spinner {
  width: 30px; height: 30px; border: 3px solid var(--bd2);
  border-top-color: var(--ac); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* date group */
.dg-hdr {
  padding: 9px 15px 4px; font-size: 9px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--t3);
  background: var(--sb); font-family: var(--font-space);
}
.dg-hdr.live {
  color: #b8f5c2;
  background: rgba(63,185,80,.10);
  border-top: 1px solid rgba(63,185,80,.24);
  border-bottom: 1px solid rgba(63,185,80,.16);
  box-shadow: inset 0 1px 0 rgba(99,214,117,.08);
}

/* pass card */
.pc {
  padding: 11px 14px 10px; border-bottom: 1px solid var(--bd);
  display: flex; align-items: stretch; gap: 10px;
  position: relative; transition: background .15s; cursor: pointer;
}
.pc:hover { background: var(--hover); }
.pc:hover .pc-track-hint { opacity: 1; }
.pc.next  { background: rgba(88,166,255,.06); border-left: 3px solid var(--ac);  padding-left: 11px; }
.pc.now-p { background: rgba(63,185,80,.05);  border-left: 3px solid var(--gn);  padding-left: 11px; }
.pc.past  { opacity: .38; }

.el-bar {
  width: 8px; height: 8px; border-radius: 999px;
  flex-shrink: 0; align-self: flex-start; min-height: 0;
  margin-top: 8px;
}
.el-bar.great { background: var(--gn); box-shadow: 0 0 7px rgba(63,185,80,.4); }
.el-bar.good  { background: var(--ac); }
.el-bar.ok    { background: var(--yw); }
.el-bar.low   { background: var(--t3); }

.pc-b { flex: 1; min-width: 0; }
.pc-r1 { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0; }
.pc-time { font-size: 20px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.pc-date { font-size: 11px; color: var(--t2); }
.pc-r1b { display: flex; align-items: center; gap: 6px; margin: 2px 0 4px; min-height: 18px; }
.pc-r2  { margin-bottom: 3px; font-size: 13px; color: var(--t1); font-weight: 600; }
.pc-r2 .lbl { color: var(--t2); font-weight: 400; font-size: 11px; }
.pc-r3  { margin-bottom: 5px; font-size: 11px; color: var(--t1); line-height: 1.35; }
.pc-r3 .abbr { color: var(--t3); font-size: 10px; display: block; }
.pc-r4  { display: flex; align-items: center; gap: 0; }
.pc-sat-wrap { display: flex; flex-direction: column; min-width: 0; }
.pc-sat { font-size: 10px; color: var(--t3); font-family: monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.pc-train { font-size: 9px; color: var(--ac); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.pc-track-hint { font-size: 9px; color: var(--ac); opacity: 0; transition: opacity .15s; flex: 1; margin-left: 5px; }
.pc-el { font-size: 12px; font-weight: 700; margin-left: auto; white-space: nowrap; }
.pc-el.great { color: var(--gn); }
.pc-el.good  { color: var(--ac); }
.pc-el.ok    { color: var(--yw); }
.pc-el.low   { color: var(--t2); }
.pc-badge {
  font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 10px;
}
.pc-badge.cd   { color: var(--ac); background: var(--acdim); }
.pc-badge.now  { color: var(--gn); background: rgba(63,185,80,.12); letter-spacing: .04em; }
.pc-badge.next { color: var(--ac); background: var(--acdim);
  border: 1px solid rgba(88,166,255,.3); letter-spacing: .06em; font-size: 9px;
}
.p-hdr-desc { padding: 5px 15px 7px; font-size: 11px; color: var(--t2); line-height: 1.4; border-bottom: 1px solid var(--bd); flex-shrink: 0; }

/* ── LIVE ───────────────────────────────────────────── */
#v-live { flex-direction: column; position: relative; }
#live-map { flex: 1; position: relative; min-height: 0; }
.live-gl {
  position: absolute; inset: 0; z-index: 450;
  width: 100%; height: 100%; pointer-events: none;
}

.live-ov {
  position: absolute; bottom: 24px; left: 16px; z-index: 800;
  display: flex; flex-direction: column; gap: 7px; pointer-events: none;
}
.live-intro {
  position: absolute; top: 12px; right: 16px; z-index: 850;
  width: min(360px, calc(100vw - 32px));
  background: rgba(10,14,24,.9); border: 1px solid var(--bd2);
  border-radius: 12px; padding: 14px 16px;
  backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0,0,0,.35);
  pointer-events: auto;
}
.live-intro-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.live-intro-kicker {
  margin: 0;
  font-size: 9px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ac);
  font-family: var(--font-space);
}
.live-intro-close {
  background: none; border: none; color: var(--t2); font-size: 18px;
  cursor: pointer; line-height: 1; padding: 0; margin: -2px 0 0;
  transition: color .15s; flex-shrink: 0;
}
.live-intro-close:hover { color: var(--t1); }
.live-intro-title {
  margin: 6px 0 8px;
  font-size: 24px; font-weight: 900; line-height: 1.06;
  font-family: var(--font-mono); text-transform: uppercase;
  color: var(--t1);
}
.live-intro-copy {
  font-size: 12px; color: var(--t2); line-height: 1.6;
}
.live-intro-link {
  display: inline-flex; margin-top: 10px;
  color: var(--ac); text-decoration: none;
  font-size: 11px; font-weight: 600;
}
.live-intro-link:hover { text-decoration: underline; }
.live-badge {
  background: rgba(10,14,24,.9); border: 1px solid var(--bd2);
  border-radius: 8px; padding: 8px 14px; font-size: 12px; color: var(--t2);
  backdrop-filter: blur(6px); display: flex; align-items: center; gap: 7px;
}
.live-badge strong { color: var(--t1); font-size: 14px; }
.live-legend {
  background: rgba(10,14,24,.9); border: 1px solid var(--bd2);
  border-radius: 8px; padding: 10px 14px; font-size: 11px; color: var(--t2);
  backdrop-filter: blur(6px); line-height: 1.9;
}
.ll { display: flex; align-items: center; gap: 7px; }
.ll-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ll-line { width: 18px; height: 2px; border-radius: 1px; flex-shrink: 0; }

.live-zoom-hint {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 800; background: rgba(10,14,24,.85); border: 1px solid var(--bd2);
  border-radius: 20px; padding: 6px 14px; font-size: 12px; color: var(--t2);
  pointer-events: none; backdrop-filter: blur(4px);
  transition: opacity .3s;
}

/* ── SAT PANEL (selected satellite info) ───────────── */
.sat-panel {
  position: absolute; top: 12px; right: 16px; z-index: 900;
  background: rgba(10,14,24,.94); border: 1px solid rgba(88,166,255,.55);
  border-radius: 10px; padding: 13px 16px; min-width: 220px;
  max-width: min(320px, calc(100vw - 32px)); max-height: calc(100vh - 24px);
  backdrop-filter: blur(8px); font-size: 12px; color: var(--t2);
  display: none; pointer-events: all; overflow: auto;
}
.live-sat-panel {
  top: clamp(150px, 22vh, 210px);
  right: 16px;
  max-height: calc(100vh - clamp(150px, 22vh, 210px) - 16px);
}
.sat-panel.on { display: block; }
.sat-panel-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.sat-panel-name { font-size: 13px; font-weight: 700; color: var(--ac); font-family: monospace; line-height: 1.3; }
.sat-panel-close {
  cursor: pointer; color: var(--t2); background: none; border: none;
  font-size: 16px; line-height: 1; padding: 0; margin-left: 8px; flex-shrink: 0;
}
.sat-panel-close:hover { color: var(--t1); }
.sat-panel-row { margin-bottom: 5px; display: flex; justify-content: space-between; }
.sat-panel-row span:last-child { color: var(--t1); font-weight: 600; }
.sat-panel-legend { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--bd); font-size: 11px; }
.sat-panel-legend div { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.sat-panel-legend .ln { width: 20px; height: 2px; border-radius: 1px; flex-shrink: 0; }

/* satellite name labels on map */
.sat-lbl-wrap {
  background: transparent !important; border: none !important; box-shadow: none !important;
}
.sat-lbl {
  display: block;
  background: transparent !important; border: none !important;
  box-shadow: none !important; color: rgba(184,225,255,.92) !important;
  font-size: 11px !important; font-family: monospace !important; font-weight: 600 !important;
  white-space: nowrap !important; padding: 0 2px !important;
  pointer-events: auto; cursor: pointer; user-select: none;
  text-shadow: 0 0 6px rgba(0,0,0,.95), 0 0 2px rgba(0,0,0,1);
}

/* ── PASS/LIVE MAP BACKGROUNDS ─────────────────────── */
.leaflet-container { background: #020712 !important; }

/* ── SHARED MAP STYLING ─────────────────────────────── */
.leaflet-tooltip {
  background: rgba(10,14,24,.92) !important; border: 1px solid var(--bd2) !important;
  color: var(--t1) !important; font-size: 12px !important; padding: 4px 9px !important;
  border-radius: 5px !important; font-family: monospace !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.5) !important; white-space: nowrap !important;
}
.leaflet-tooltip::before { display: none !important; }
.leaflet-popup-content-wrapper {
  background: var(--card) !important; color: var(--t1) !important;
  border: 1px solid var(--bd2) !important; border-radius: 8px !important;
  box-shadow: 0 6px 28px rgba(0,0,0,.7) !important;
}
.leaflet-popup-tip { background: var(--card) !important; }
.leaflet-popup-content { font-size: 13px !important; line-height: 1.6 !important; margin: 10px 14px !important; }
.leaflet-popup-close-button { color: var(--t2) !important; }
.leaflet-control-attribution { background: rgba(4,8,15,.75) !important; color: var(--t3) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--t3) !important; }

.obs-dot {
  width: 16px; height: 16px; background: var(--rd);
  border: 2.5px solid #fff; border-radius: 50%;
  box-shadow: 0 0 12px rgba(248,81,73,.65);
}

/* ── TOAST ──────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--card); border: 1px solid var(--rd);
  color: var(--t1); padding: 11px 16px; border-radius: 8px;
  font-size: 13px; z-index: 9999; max-width: 300px;
  opacity: 0; transform: translateY(8px); transition: all .25s; pointer-events: none;
}
.toast.on { opacity: 1; transform: translateY(0); }

/* ── INFO BUTTON ─────────────────────────────────────── */
.btn-info {
  position: fixed; bottom: 24px; right: 24px; z-index: 3000;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(13,20,37,.85); border: 1px solid rgba(79,195,247,.3);
  color: var(--ac); font-size: 16px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); transition: all .18s;
  box-shadow: 0 0 12px rgba(79,195,247,.1);
}
.btn-info:hover {
  background: var(--acdim); border-color: var(--ac);
  box-shadow: 0 0 18px rgba(79,195,247,.25);
}

/* ── INFO MODAL ──────────────────────────────────────── */
.info-backdrop {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(2,5,16,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.info-backdrop.on { opacity: 1; pointer-events: all; }

.info-modal {
  background: var(--card); border: 1px solid rgba(79,195,247,.2);
  border-radius: 14px; width: min(600px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.7), 0 0 40px rgba(79,195,247,.06);
  transform: translateY(12px); transition: transform .2s;
}
.info-backdrop.on .info-modal { transform: translateY(0); }

.info-modal-head {
  padding: 18px 20px 14px; border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.info-modal-title {
  font-family: var(--font-space); font-size: 13px; font-weight: 700;
  letter-spacing: .1em; color: var(--ac); text-transform: uppercase;
}
.info-modal-close {
  background: none; border: none; color: var(--t2); font-size: 20px;
  cursor: pointer; line-height: 1; padding: 2px 4px; transition: color .15s;
}
.info-modal-close:hover { color: var(--t1); }

.info-modal-body {
  padding: 20px 22px; overflow-y: auto; font-size: 13px;
  color: var(--t2); line-height: 1.7;
}
.info-modal-body::-webkit-scrollbar { width: 4px; }
.info-modal-body::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 2px; }

.info-section { margin-bottom: 22px; }
.info-section:last-child { margin-bottom: 0; }
.info-section p { margin-bottom: 10px; }
.info-section p:last-child { margin-bottom: 0; }
.info-section strong { color: var(--t1); }
.info-section a { color: var(--ac); text-decoration: none; }
.info-section a:hover { text-decoration: underline; }

.info-faq { margin-top: 20px; border-top: 1px solid var(--bd); padding-top: 18px; }
.info-faq-item { margin-bottom: 18px; }
.info-faq-item:last-child { margin-bottom: 0; }
.info-faq-q {
  font-size: 12px; font-weight: 700; color: var(--t1);
  margin-bottom: 5px; display: flex; align-items: flex-start; gap: 7px;
}
.info-faq-q::before {
  content: 'Q'; font-family: var(--font-space); font-size: 10px;
  color: var(--ac); background: var(--acdim); border: 1px solid rgba(79,195,247,.3);
  border-radius: 4px; padding: 1px 5px; flex-shrink: 0; margin-top: 1px;
}
.info-faq-a { font-size: 12px; color: var(--t2); padding-left: 26px; }

@supports (height: 100dvh) {
  .app {
    min-height: 100dvh;
    height: 100dvh;
  }

  .sat-panel {
    max-height: calc(100dvh - 24px);
  }

  .info-modal {
    max-height: calc(100dvh - 48px);
  }

  .live-sat-panel {
    max-height: calc(100dvh - clamp(150px, 22vh, 210px) - 16px);
  }
}

@media (max-width: 1100px) {
  .p-side {
    width: 332px;
  }

  .live-intro {
    width: min(330px, calc(100vw - 28px));
  }
}

@media (max-width: 900px) {
  #v-passes {
    flex-direction: column;
  }

  .p-map-wrap {
    flex: 0 0 auto;
    height: clamp(300px, 46vh, 460px);
  }

  .p-side {
    width: 100%;
    min-height: 0;
    border-left: none;
    border-top: 1px solid rgba(79,195,247,.12);
  }

  .p-list {
    min-height: 240px;
  }

  .p-legend {
    left: 12px;
    bottom: 12px;
    max-width: min(250px, calc(100vw - 24px));
  }

  .live-intro {
    width: min(340px, calc(100vw - 24px));
  }

  .sat-panel {
    right: 12px;
    max-width: min(320px, calc(100vw - 24px));
  }

  .live-sat-panel {
    right: 12px;
  }
}

@media (max-width: 760px) {
  #v-passes {
    overflow: hidden;
    min-height: 0;
  }

  .hdr {
    height: auto;
    min-height: var(--H);
    padding: 10px 14px 12px;
    gap: 10px 12px;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .logo {
    width: 100%;
  }

  .logo-sub {
    display: none;
  }

  .logo-text {
    font-size: 14px;
    letter-spacing: .12em;
  }

  .nav {
    order: 2;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nbtn {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 10px;
  }

  .hst {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 8px 14px;
    flex-wrap: wrap;
  }

  #hst-datetime {
    margin-left: auto;
  }

  #v-home {
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 0 24px;
  }

  .home-wrap {
    max-width: 620px;
    padding: 20px 16px 96px;
  }

  .home-icon {
    margin-bottom: 20px;
  }

  .home-icon-wrap {
    width: 100px;
    height: 100px;
  }

  .orbit-ring-1 {
    width: 76px;
    height: 76px;
  }

  .orbit-ring-2 {
    width: 96px;
    height: 96px;
  }

  .orbit-ring-3 {
    width: 60px;
    height: 30px;
    top: 35px;
  }

  .orbit-sat {
    top: calc(50% - 38px);
    transform-origin: 3.5px 38px;
  }

  .orbit-sat-2 {
    top: calc(50% - 48px);
    transform-origin: 2.5px 48px;
  }

  .home-title {
    font-size: 24px;
  }

  .home-sub {
    margin-bottom: 26px;
  }

  .home-row,
  .home-coords-row {
    flex-direction: column;
  }

  .home-input,
  .btn-find,
  .btn-gps,
  .btn-coords {
    width: 100%;
  }

  .p-side {
    order: 2;
    flex: 1 1 auto;
    min-height: 0;
    display: block;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    border-top: none;
    border-bottom: 1px solid rgba(79,195,247,.12);
  }

  .p-map-wrap {
    order: 1;
    flex: 0 0 auto;
    height: clamp(280px, calc(100vh - 332px), 480px);
    height: clamp(280px, calc(100dvh - 332px), 480px);
  }

  .p-list {
    overflow: visible;
    min-height: auto;
  }

  .p-loc,
  .p-intro,
  .p-hdr,
  .p-hdr-desc,
  .p-featured,
  .p-filter {
    padding-left: 13px;
    padding-right: 13px;
  }

  .p-toggle {
    align-items: flex-start;
  }

  .p-loc {
    padding-top: 11px;
    padding-bottom: 9px;
  }

  .p-loc-name {
    font-size: 14px;
  }

  .p-loc-meta {
    margin-top: 4px;
    font-size: 10px;
  }

  .p-hdr {
    padding-top: 8px;
    padding-bottom: 6px;
  }

  .p-hdr-desc {
    padding-top: 4px;
    padding-bottom: 6px;
    font-size: 10px;
  }

  .p-featured {
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 8px;
  }

  .pf-head {
    gap: 8px;
  }

  .pf-title,
  .pf-sub {
    font-size: 10px;
  }

  .pf-r1 {
    margin-bottom: 4px;
  }

  .pf-time {
    font-size: 16px;
  }

  .pf-peak {
    font-size: 11px;
  }

  .pf-r2 {
    font-size: 10px;
  }

  .p-filter-copy strong {
    line-height: 1.35;
  }

  .pc {
    padding: 12px 12px 11px;
    gap: 8px;
  }

  .pc-r1 {
    gap: 10px;
    align-items: flex-start;
  }

  .pc-time {
    font-size: 18px;
  }

  .pc-r4 {
    align-items: flex-start;
    gap: 8px;
  }

  .pc-sat,
  .pc-train {
    max-width: none;
  }

  .pc-train {
    white-space: normal;
  }

  .pc-track-hint {
    display: none;
  }

  #pass-sat-panel {
    display: none !important;
  }

  .live-intro {
    top: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    padding: 12px 13px;
    border-radius: 10px;
  }

  .live-intro-title {
    font-size: 20px;
  }

  .live-intro-copy {
    font-size: 11px;
  }

  .live-ov {
    left: 10px;
    right: 10px;
    bottom: 12px;
  }

  .live-badge {
    width: fit-content;
    max-width: calc(100vw - 20px);
  }

  .live-legend {
    display: none;
  }

  .live-zoom-hint {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 76px;
    transform: none;
    width: auto;
    padding: 6px 10px;
    font-size: 11px;
    text-align: center;
    white-space: normal;
  }

  #passes-zoom-hint {
    left: auto;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: 148px;
    padding: 4px 8px;
    font-size: 10px;
    line-height: 1.25;
    text-align: right;
    border-radius: 12px;
  }

  .sat-panel {
    top: auto;
    right: 10px;
    left: 10px;
    bottom: 10px;
    min-width: 0;
    max-width: none;
    max-height: min(48vh, 360px);
    padding: 12px 13px;
    border-radius: 12px;
  }

  .live-sat-panel {
    top: auto;
    right: 10px;
    left: 10px;
    bottom: 10px;
    max-height: min(48vh, 360px);
  }

  .sat-panel-row {
    gap: 12px;
  }

  .sat-panel-row span:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  .sat-panel-row span:last-child {
    flex: 0 0 auto;
    text-align: right;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 72px;
    max-width: none;
  }

  .btn-info {
    right: 14px;
    bottom: 16px;
  }

  .info-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 12px;
  }

  .info-modal-head {
    padding: 15px 16px 12px;
  }

  .info-modal-body {
    padding: 16px;
  }

  .info-faq-a {
    padding-left: 0;
  }
}

@media (max-width: 560px) {
  .hdr {
    padding: 10px 12px 12px;
  }

  .hst {
    font-size: 10px;
  }

  .home-wrap {
    padding: 18px 12px 96px;
  }

  .home-title {
    font-size: 20px;
  }

  .home-sub {
    font-size: 13px;
  }

  .home-input {
    padding: 11px 13px;
  }

  .btn-find {
    padding: 12px 14px;
    font-size: 12px;
    justify-content: center;
  }

  .p-map-wrap {
    height: clamp(240px, calc(100vh - 300px), 420px);
    height: clamp(240px, calc(100dvh - 300px), 420px);
  }

  .p-legend {
    display: none !important;
  }

  .p-loc-top,
  .pf-head,
  .pf-r1,
  .pf-r2,
  .pc-r1,
  .pc-r4 {
    flex-wrap: wrap;
  }

  .p-loc-top {
    gap: 6px;
  }

  .p-loc-back {
    margin-left: 0;
  }

  .pf-time {
    font-size: 15px;
  }

  .pf-title,
  .pf-sub {
    font-size: 9px;
  }

  .pc-r1b {
    flex-wrap: wrap;
  }

  .pc-r2 {
    font-size: 12px;
  }

  .pc-r3 {
    font-size: 10.5px;
  }

  .pc-el {
    margin-left: 0;
  }

  .live-intro-title {
    font-size: 17px;
  }

  .live-intro-copy {
    font-size: 10.5px;
  }

  .live-badge {
    width: 100%;
  }

  .live-zoom-hint {
    bottom: 64px;
    font-size: 10px;
  }

  #passes-zoom-hint {
    right: 8px;
    bottom: 8px;
    max-width: 128px;
    padding: 3px 7px;
    font-size: 9px;
  }

  .sat-panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-height: 54vh;
  }

  .live-sat-panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-height: 54vh;
  }

  .sat-panel-legend div {
    flex-wrap: wrap;
  }

  .btn-info {
    width: 34px;
    height: 34px;
  }

  .info-backdrop {
    padding: 10px;
    align-items: flex-end;
  }

  .info-modal {
    width: 100%;
    max-height: calc(100vh - 10px);
    border-radius: 12px 12px 0 0;
  }
}

@media (max-width: 380px) {
  .logo-text {
    font-size: 13px;
  }

  .nbtn {
    font-size: 9px;
    padding: 7px 8px;
  }

  .pc-time {
    font-size: 16px;
  }
}

@media (max-height: 780px) {
  #v-home {
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 0;
  }

  .home-wrap {
    padding-top: 20px;
    padding-bottom: 40px;
  }
}

@media (max-height: 820px) and (min-width: 761px) {
  .live-intro {
    padding: 12px 14px;
  }

  .live-intro-title {
    font-size: 20px;
  }

  .sat-panel {
    max-height: calc(100vh - 120px);
  }

  .live-sat-panel {
    top: clamp(138px, 20vh, 188px);
    max-height: calc(100vh - clamp(138px, 20vh, 188px) - 16px);
  }
}

@media (max-height: 720px) {
  .live-legend,
  .p-legend {
    display: none !important;
  }

  .info-modal {
    max-height: calc(100vh - 16px);
  }
}
