:root {
  --bg: #03050b;
  --glass: rgba(12, 17, 30, 0.62);
  --glass-strong: rgba(12, 17, 30, 0.86);
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef2fa;
  --muted: #8b95ab;
  --accent: #ffc56b;
  --live: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
#globe { position: fixed; inset: 0; }
#globe canvas { outline: none; }
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at 50% 48%, transparent 55%, rgba(0,0,0,.55) 100%); }

/* opening: UI eases in after the fly-in */
.topbar, .stat, .legend, .controls, .credit { opacity: 0; transform: translateY(6px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.ready .topbar { opacity: 1; transform: none; transition-delay: .6s; }
.ready .stat { opacity: 1; transform: none; transition-delay: 1.4s; }
.ready .legend, .ready .controls, .ready .credit { opacity: 1; transform: none; transition-delay: 2s; }
@media (prefers-reduced-motion: reduce) { .topbar, .stat, .legend, .controls, .credit { transition: none; } }

.glass { background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }

/* ---- top bar ---- */
.topbar { position: fixed; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr minmax(260px, 520px) 1fr; align-items: center; gap: 16px; padding: 18px 22px; pointer-events: none; z-index: 5; }
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: 0.02em; }
.brand-mark { width: 24px; height: 24px; color: var(--accent); }

.search { position: relative; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: border-color .2s, background .2s; }
.search:focus-within { border-color: rgba(255, 197, 107, 0.5); background: var(--glass-strong); }
.search > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 15px; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.search:focus-within kbd { display: none; }

.results { position: absolute; top: 54px; left: 0; right: 0; margin: 0; padding: 6px; list-style: none; border-radius: var(--radius); background: rgba(10, 14, 25, 0.97); border: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); max-height: 60vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.results li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.results li[aria-selected="true"], .results li:hover { background: rgba(255,255,255,.07); }
.results .r-flight { font-weight: 600; }
.results .r-sub { font-size: 12.5px; color: var(--muted); }
.results .r-alt { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.results .r-head { display: flex; justify-content: space-between; padding: 10px 12px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); cursor: default; }
.results .r-head:hover { background: none; }
.results .r-head span:last-child { text-transform: none; letter-spacing: 0; font-size: 12px; }
.results .r-hint { display: block; padding: 8px 12px; font-size: 12px; color: var(--muted); cursor: default; }
.results .r-hint:hover { background: none; }
.results .r-tag { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 500; color: var(--accent); border: 1px solid rgba(255,197,107,.35); vertical-align: 1px; }
.results .r-act { color: var(--accent); font-weight: 500; font-size: 13.5px; }
.results .r-act-icon { width: 34px; text-align: center; }
.results .empty { display: block; color: var(--muted); font-size: 14px; cursor: default; line-height: 1.5; }
.results .empty:hover { background: none; }

.status { justify-self: end; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); max-width: 100%; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.status.live .dot { background: var(--live); box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: pulse 2s infinite; }
.status.sim .dot { background: var(--warn); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); } 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }

/* ---- hero stat ---- */
.stat { position: fixed; left: 26px; top: 92px; z-index: 4; pointer-events: none; }
.stat-num { font-size: clamp(40px, 6vw, 64px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 6px; color: var(--muted); font-size: 14px; }
.watching { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; pointer-events: auto; max-width: 320px; }
.watch-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 8px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 13px; font-weight: 500; }
.quick { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; pointer-events: auto; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 11px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 13px; font-weight: 500; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: border-color .2s, background .2s; }
.pill:hover { border-color: rgba(255,255,255,.22); }
.pill[aria-pressed="true"] { border-color: rgba(255,197,107,.5); color: var(--accent); }
.pill svg { width: 15px; height: 15px; flex: none; }
.pill-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: rgba(255,255,255,.1); font-size: 11px; line-height: 1; font-variant-numeric: tabular-nums; }
.pill-badge[hidden] { display: none; }
.pill-badge.urgent { background: var(--danger); color: #1a0505; font-weight: 600; }
.focus-chip { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 999px; background: rgba(255,197,107,.12); border: 1px solid rgba(255,197,107,.4); color: var(--accent); font-size: 13px; font-weight: 500; pointer-events: auto; }
.focus-chip[hidden] { display: none; }
.only-btn { margin-left: auto; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.only-btn:hover { color: var(--text); border-color: rgba(255,255,255,.22); }
.only-btn[aria-pressed="true"] { color: var(--accent); border-color: rgba(255,197,107,.45); }
.only-btn[hidden] { display: none; }
.panel-tracking { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255,197,107,.1); color: var(--accent); font-size: 12.5px; font-weight: 500; }
.panel-tracking[hidden] { display: none; }
.panel-legs { margin-top: 18px; }
.panel-legs[hidden] { display: none; }
.panel-legs h3 { margin: 0 0 8px; font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.panel-legs ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.panel-legs li { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.panel-legs li:last-child { border-bottom: 0; }
.panel-legs .leg-no { font-weight: 600; font-variant-numeric: tabular-nums; }
.panel-legs .leg-route { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-legs .leg-route.unknown { color: var(--muted); }
.panel-legs .leg-when { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.panel-legs .legs-note { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.focus-chip button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: var(--text); line-height: 1; }

/* ---- drawer: what's above me / interesting now ---- */
.drawer { position: fixed; left: 26px; top: 262px; bottom: 24px; width: 340px; z-index: 5; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--glass-strong); border: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.drawer[hidden] { display: none; }
.has-drawer .legend { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 6px 18px; }
.drawer-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.drawer-head .panel-close { position: static; }
.drawer-body { padding: 4px 8px 12px; overflow-y: auto; flex: 1; }
.d-note { padding: 4px 10px 10px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.d-note.small { font-size: 11.5px; }
.d-head { display: flex; justify-content: space-between; gap: 10px; padding: 12px 10px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.d-head span:last-child { text-transform: none; letter-spacing: 0; font-size: 11.5px; text-align: right; }
.d-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; }
.d-row:hover { background: rgba(255,255,255,.07); }
.d-row.urgent .d-sub { color: var(--danger); }
.d-title { font-weight: 600; font-size: 13.5px; }
.d-sub { font-size: 12px; color: var(--muted); line-height: 1.35; }
.d-meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-align: right; line-height: 1.4; }
.d-empty { padding: 10px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.d-actions { padding: 6px 10px; display: flex; gap: 8px; }
.d-actions .btn { flex: none; padding: 0 16px; }
.lookup { margin: 6px 4px 8px; padding: 14px; border-radius: 12px; background: rgba(255,197,107,.08); border: 1px solid rgba(255,197,107,.3); display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: center; cursor: pointer; }
.lookup:hover { background: rgba(255,197,107,.13); }
.lookup-arrow { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,197,107,.15); color: var(--accent); }
.lookup-arrow svg { width: 26px; height: 26px; transition: transform .6s; }
.lookup-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.lookup-title { margin-top: 2px; font-size: 15px; font-weight: 600; }
.lookup-sub { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.me-pin { width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #5aa9ff; border: 2.5px solid #fff; box-shadow: 0 0 0 0 rgba(90,169,255,.6); animation: me-pulse 2s infinite; pointer-events: none; }
@keyframes me-pulse { 0% { box-shadow: 0 0 0 0 rgba(90,169,255,.55); } 70% { box-shadow: 0 0 0 14px rgba(90,169,255,0); } 100% { box-shadow: 0 0 0 0 rgba(90,169,255,0); } }
@media (prefers-reduced-motion: reduce) { .me-pin { animation: none; } }

.watch-chip .d { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.watch-chip.off .d { background: var(--muted); }
.watch-chip.off { color: var(--muted); }

/* ---- legend + controls ---- */
.legend { position: fixed; left: 26px; bottom: 24px; width: 236px; z-index: 4; font-size: 11.5px; color: var(--muted); padding: 10px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.legend-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.legend-toggle { border: 0; background: none; padding: 2px 0; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.legend-toggle span { display: inline-block; transition: transform .2s; }
.legend.collapsed .legend-toggle span { transform: rotate(-90deg); }
.legend.collapsed .legend-body { display: none; }
.legend-tabs { display: flex; padding: 2px; border-radius: 999px; background: rgba(255,255,255,.05); }
.legend-tabs button { border: 0; background: none; padding: 3px 9px; border-radius: 999px; font-size: 11px; color: var(--muted); }
.legend-tabs button[aria-selected="true"] { background: rgba(255,255,255,.12); color: var(--text); }
.legend-body { margin-top: 10px; max-height: calc(100vh - 260px); overflow-y: auto; }
.legend-title { margin: 10px 0 6px; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; }
.legend-body > .legend-title:first-child { margin-top: 0; }
.legend-kinds, .legend-shapes { list-style: none; margin: 0; padding: 0; }
.legend-kinds button, .legend-shapes li { display: flex; align-items: center; gap: 8px; width: 100%; padding: 3px 4px; border: 0; border-radius: 7px; background: none; text-align: left; font-size: 12px; color: var(--text); }
.legend-kinds button:hover { background: rgba(255,255,255,.06); }
.legend-kinds button[aria-pressed="false"] { opacity: .38; }
.legend-kinds button[aria-pressed="false"] .k-label { text-decoration: line-through; }
.legend-shapes li { color: var(--muted); font-size: 11.5px; padding: 1px 4px; }
.k-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-count { font-family: var(--mono); font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend-bar { height: 5px; border-radius: 3px; background: linear-gradient(90deg, #ff7a59, #ffc56b 30%, #7fe3d0 65%, #cfe6ff); }
.legend-scale { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--mono); font-size: 10.5px; }

.controls { position: fixed; right: 22px; bottom: 24px; display: flex; gap: 8px; z-index: 4; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--glass); border: 1px solid var(--line); color: var(--muted); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: color .2s, border-color .2s; }
.icon-btn:hover, .icon-btn[aria-pressed="true"] { color: var(--text); border-color: rgba(255,255,255,.22); }
.icon-btn svg { width: 19px; height: 19px; }

.map-menu { position: absolute; right: 0; bottom: 52px; width: 200px; padding: 6px; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.map-menu-title { padding: 8px 10px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.map-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; font-size: 13.5px; text-align: left; }
.map-menu button:hover { background: rgba(255,255,255,.07); }
.map-menu button[aria-checked="true"] { color: var(--accent); }
.map-menu button[aria-checked="true"]::after { content: '✓'; margin-left: auto; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.swatch.night { background: radial-gradient(circle at 30% 40%, #ffcf87 0 2px, transparent 3px), radial-gradient(circle at 65% 60%, #ffcf87 0 1.5px, transparent 2.5px), #0b1428; }
.swatch.map { background: linear-gradient(135deg, #262626 0 50%, #1a1a1a 50%); box-shadow: inset 0 0 0 1px #3a3a3a; }
.swatch.sat { background: linear-gradient(135deg, #2f5d3a, #1d3b5c 60%, #c9b27c); }
.credit { position: fixed; right: 22px; bottom: 6px; z-index: 3; font-size: 10px; color: rgba(139,149,171,.75); pointer-events: none; }
.credit a { color: inherit; pointer-events: auto; }
.credit a:hover { color: var(--text); }
.credit #credit:empty + .credit-sep { display: none; }

/* ---- tooltip ---- */
.tooltip { position: fixed; z-index: 6; pointer-events: none; padding: 7px 10px; border-radius: 10px; background: var(--glass-strong); border: 1px solid var(--line); font-size: 12.5px; white-space: nowrap; transform: translate(14px, -50%); }
.tooltip b { font-weight: 600; }
.tooltip span { color: var(--muted); margin-left: 6px; }

/* ---- flight panel ---- */
.panel { position: fixed; top: 84px; right: 22px; width: 360px; max-height: calc(100vh - 170px); overflow: auto; z-index: 5; padding: 22px; border-radius: 20px; background: var(--glass-strong); border: 1px solid var(--line); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); box-shadow: 0 30px 70px rgba(0,0,0,.5); animation: slide .28s cubic-bezier(.2,.8,.2,1); }
@keyframes slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.panel-close { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.06); color: var(--muted); font-size: 18px; line-height: 1; }
.panel-close:hover { color: var(--text); }
.panel-close { z-index: 2; }
.panel-photo { margin: -4px 0 16px; }
.panel-photo[hidden] { display: none; }
.panel-photo > a { display: block; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.05); }
.panel-photo.loading > a { background: linear-gradient(100deg, rgba(255,255,255,.04) 30%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 70%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .panel-photo.loading > a { animation: none; } }
.panel-photo img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.panel-photo img.shown { opacity: 1; }
.panel-photo figcaption { margin-top: 6px; font-size: 11px; color: var(--muted); }
.panel-photo figcaption a { color: inherit; text-decoration: none; }
.panel-photo figcaption a:hover { color: var(--text); text-decoration: underline; }
.has-photo .panel-close { background: rgba(0,0,0,.55); color: #fff; }
.panel-airline { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; padding-right: 36px; }
.airline-chip { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: #334; letter-spacing: .02em; }
.panel-flight { margin: 12px 0 2px; font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.panel-sub { color: var(--muted); font-size: 13.5px; }

.route { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin: 22px 0 8px; }
.route-end .iata { font-size: 24px; font-weight: 600; letter-spacing: .02em; }
.route-end .city { font-size: 12px; color: var(--muted); max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-end.right { text-align: right; }
.route-line { position: relative; height: 2px; background: rgba(255,255,255,.12); border-radius: 2px; }
.route-progress { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); border-radius: 2px; transition: width 1s linear; }
.route-plane { position: absolute; top: 50%; left: 0; transform: translate(-50%, -52%); color: var(--accent); font-size: 16px; transition: left 1s linear; }
.route.unknown .route-progress, .route.unknown .route-plane { display: none; }
.route.unknown .route-line { background: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px); }
.route-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); min-height: 16px; }

.alert { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.35); color: #fecaca; font-size: 13px; }

.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 0; }
.metrics > div { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.metrics dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.metrics dd { margin: 6px 0 0; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metrics dd small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 3px; }

.facts { margin: 18px 0 0; font-size: 13px; }
.facts > div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-family: var(--mono); font-size: 12.5px; }

.panel-actions { display: flex; gap: 8px; margin-top: 18px; }
.btn { flex: 1; height: 38px; border-radius: 10px; border: 1px solid transparent; background: var(--accent); color: #1a1205; font-weight: 600; font-size: 13.5px; }
.btn[aria-pressed="true"] { background: #fff; }
.btn.ghost { background: rgba(255,255,255,.06); border-color: var(--line); color: var(--text); font-weight: 500; }
.btn.ghost[aria-pressed="true"] { color: var(--accent); border-color: rgba(255,197,107,.4); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 8; padding: 10px 16px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line); font-size: 13.5px; }

/* ---- small screens: panel becomes a bottom sheet ---- */
/* ---- replay: amber status, timeline bar along the bottom */
.status.replay { color: var(--warn); border-color: rgba(251, 191, 36, .35); }
.status.replay .dot { background: var(--warn); }
#btn-replay[aria-disabled="true"] { opacity: .4; }
.replay { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); width: clamp(320px, calc(100vw - 600px), 720px); z-index: 4; padding: 12px 14px 10px; border-radius: 16px; background: var(--glass-strong); border: 1px solid rgba(251, 191, 36, .25); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); font-size: 12.5px; }
.replay-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.replay-time { font-family: var(--mono); color: var(--warn); min-width: 120px; }
.replay-speeds { display: flex; padding: 2px; border-radius: 999px; background: rgba(255,255,255,.05); margin-left: auto; }
.replay-speeds button { border: 0; background: none; padding: 4px 9px; border-radius: 999px; font-size: 11px; color: var(--muted); }
.replay-speeds button[aria-pressed="true"] { background: rgba(255,255,255,.12); color: var(--text); }
.replay-track { position: relative; margin-top: 10px; height: 18px; }
.replay-gaps { position: absolute; left: 0; right: 0; top: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; pointer-events: none; }
.replay-gaps span { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(0,0,0,.55) 0 3px, transparent 3px 6px); }
.replay-track input { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent; accent-color: var(--warn); }
.replay-note { min-height: 16px; margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.replay-note .btn { margin-left: 8px; padding: 3px 10px; font-size: 11.5px; }
@media (max-width: 1100px) { .has-replay .legend { display: none; } }
.replay .btn { flex: none; height: 32px; padding: 0 14px; }

/* ---- city labels (positioned by the globe at the city's point: the dot sits exactly there) */
.city-label { width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.city-label.on { opacity: 1; }
.city-label.behind { visibility: hidden; }
.city-label i { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: rgba(238,242,250,.7); }
.city-label span { position: absolute; left: 7px; top: -8px; white-space: nowrap; font-size: 10px; letter-spacing: .02em; color: rgba(205,214,230,.72); text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 8px rgba(0,0,0,.7); }
.city-label.t1 span { font-size: 12px; font-weight: 600; color: rgba(238,242,250,.92); }
.city-label.t2 span { font-size: 11px; font-weight: 500; color: rgba(225,231,242,.85); }
.city-label.near i { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.city-label.near span { color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .city-label { transition: none; } }

/* ---- Skyline Pro waitlist */
.pro-pill { color: var(--accent); }
.pro-backdrop { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; padding: 16px; background: rgba(3,5,10,.55); }
.pro-backdrop[hidden] { display: none; }
.pro-card { position: relative; width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; border-radius: 20px; background: var(--glass-strong); border: 1px solid var(--line); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); box-shadow: 0 30px 70px rgba(0,0,0,.5); }
.pro-card[hidden] { display: none; }
.pro-kicker { color: var(--accent); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.pro-card h2 { margin: 4px 0 6px; font-size: 22px; }
.pro-lead { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.pro-card fieldset { border: 0; margin: 0 0 14px; padding: 0; }
.pro-card legend { padding: 0; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.pro-perks label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; margin-bottom: 6px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; font-size: 12.5px; color: var(--muted); }
.pro-perks label:has(input:checked) { border-color: rgba(255,197,107,.5); }
.pro-perks b { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; }
.pro-perks input, .pro-price input { accent-color: var(--accent); margin-top: 3px; }
.pro-price { display: flex; flex-wrap: wrap; gap: 6px; }
.pro-price legend { width: 100%; }
.pro-price label { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.pro-price label:has(input:checked) { border-color: rgba(255,197,107,.5); color: var(--accent); }
.pro-row { display: flex; gap: 8px; }
.pro-row input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text); font-size: 14px; }
.pro-row .btn { flex: none; padding: 0 16px; }
.pro-error { color: #ff8f8f; font-size: 13px; margin: 8px 0 0; }
.pro-note { color: var(--muted); font-size: 11.5px; margin: 10px 0 0; }
.pro-done .btn { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr auto; padding: 14px 16px; row-gap: 10px; }
  .search { grid-column: 1 / -1; grid-row: 2; }
  .status span#status-text { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stat { left: 16px; top: 128px; }
  .stat-num { font-size: 38px; }
  .search kbd { display: none; }
  .has-panel .stat, .has-panel .legend, .has-panel .controls { display: none; }
  .legend { left: 16px; bottom: 18px; width: min(236px, calc(100vw - 240px)); }   /* 240 = 4 × 42 px buttons + gaps + gutters */
  .replay { left: 0; right: 0; transform: none; width: auto; bottom: 0; border-radius: 18px 18px 0 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .has-replay .legend, .has-replay .controls, .has-panel .replay, .has-drawer .replay { display: none; }
  .drawer { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 62vh; border-radius: 18px 18px 0 0; }
  .has-panel .drawer { display: none; }
  .has-drawer .controls { display: none; }
  .controls { right: 16px; bottom: 18px; }
  .credit { right: 16px; bottom: 2px; font-size: 9px; }
  .panel { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 62vh; border-radius: 22px 22px 0 0; animation-name: rise; }
  @keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}
