/* Space in Motion — design tokens follow design_mockups/.../space_in_motion/DESIGN.md */
:root {
  --void: #030712;
  --surface: #0e131f;
  --surface-low: #161c28;
  --surface-high: #242a36;
  --on-surface: #dde2f3;
  --muted: #8a99a8;
  --dim: #64748b;
  --cyan: #00f2fe;
  --cyan-soft: rgba(0, 242, 254, 0.15);
  --sky: #38bdf8;
  --violet: #818cf8;
  --ok: #10b981;
  --warn: #f59e0b;
  --crit: #f43f5e;
  --glass: rgba(8, 14, 30, 0.66);
  --glass-strong: rgba(13, 20, 38, 0.88);
  --line: rgba(0, 242, 254, 0.14);
  --line-strong: rgba(0, 242, 254, 0.42);
  --radius: 4px;
  --radius-lg: 8px;
  --margin: 20px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --topbar-h: 60px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--void); color: var(--on-surface); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); }
.eyebrow { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: var(--radius); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; outline: none; }
.fade { position: fixed; inset: 0; background: var(--void); opacity: 0; pointer-events: none; transition: opacity .35s ease; z-index: 5; }
.fade.on { opacity: 1; }

/* Glass surfaces */
.glass { background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.glass-strong { background: var(--glass-strong); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: 0 0 28px -8px rgba(0, 242, 254, .25), inset 0 1px 0 rgba(255,255,255,.06); }

/* Buttons */
.icon-btn { position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--radius); color: var(--on-surface); border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s; }
.icon-btn:hover { background: rgba(56, 189, 248, .12); border-color: rgba(56,189,248,.3); color: var(--cyan); }
.icon-btn.small { width: 30px; height: 30px; }
.icon-btn .badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--cyan); color: var(--void); font: 600 10px/16px var(--mono); }
.primary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 16px; border-radius: var(--radius); background: var(--cyan); color: #031418; font: 600 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; transition: box-shadow .2s; }
.primary-btn:hover { box-shadow: 0 0 18px rgba(0, 242, 254, .55); }
.primary-btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.ghost-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 7px 14px; border-radius: var(--radius); background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.3); font: 500 12px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; transition: background .15s, border-color .15s; }
.ghost-btn:hover { background: rgba(56,189,248,.2); border-color: var(--sky); }
.ghost-btn.small { min-height: 30px; padding: 5px 10px; font-size: 11px; }
.ghost-btn.danger { border-color: rgba(244,63,94,.4); background: rgba(244,63,94,.08); }
.ghost-btn.danger:hover { background: rgba(244,63,94,.2); border-color: var(--crit); }

/* Top bar */
.topbar { position: fixed; top: 12px; left: 12px; right: 12px; height: var(--topbar-h); z-index: 20; display: flex; align-items: center; gap: 18px; padding: 0 10px 0 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-align: left; flex: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle, var(--cyan) 0 3px, transparent 4px), radial-gradient(circle, transparent 0 9px, rgba(0,242,254,.6) 9.5px 10.5px, transparent 11px), radial-gradient(circle, rgba(0,242,254,.18), transparent 70%); box-shadow: 0 0 16px rgba(0,242,254,.3); }
.brand-title { display: block; font: 600 13px/1.15 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.brand-sub { display: block; font: 500 10px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.trail { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow: hidden; font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; border-left: 1px solid var(--line); padding-left: 16px; height: 34px; }
.trail button { color: var(--dim); white-space: nowrap; padding: 6px 4px; border-radius: var(--radius); }
.trail button:hover { color: var(--on-surface); }
.trail .sep { color: var(--dim); opacity: .6; }
.trail .current { color: var(--cyan); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trail .current::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); flex: none; }
.topbar-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.search-trigger { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px 0 12px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(2,5,12,.5); color: var(--muted); font: 500 11.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; min-width: 210px; }
.search-trigger:hover { border-color: var(--line-strong); color: var(--on-surface); }
.search-trigger-text { flex: 1; text-align: left; }
kbd { font: 600 10px var(--mono); padding: 2px 6px; border-radius: 3px; background: var(--surface-high); color: var(--on-surface); }
.lang { display: flex; padding: 3px; gap: 2px; border-radius: 20px; background: rgba(2,5,12,.6); border: 1px solid var(--line); margin: 0 4px; }
.lang button { font: 600 11px/1 var(--mono); letter-spacing: .08em; padding: 6px 10px; border-radius: 16px; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--sky); color: var(--void); }

/* Levels */
.levels { position: fixed; top: calc(var(--topbar-h) + 22px); left: 50%; transform: translateX(-50%); z-index: 15; display: flex; padding: 4px; gap: 2px; }
.levels button { padding: 7px 14px; border-radius: var(--radius); font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.levels button:hover { color: var(--on-surface); background: rgba(56,189,248,.08); }
.levels button[aria-selected="true"] { color: var(--cyan); background: var(--cyan-soft); box-shadow: inset 0 0 0 1px rgba(0,242,254,.35); }

/* Filters */
.filters { position: fixed; top: calc(var(--topbar-h) + 22px); left: 12px; width: 236px; z-index: 15; padding: 12px; max-height: calc(100vh - var(--topbar-h) - 170px); display: flex; flex-direction: column; transition: width .2s; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.filter-list { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; scrollbar-width: thin; }
.filter-item { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: var(--radius); font-size: 13px; text-align: left; border: 1px solid transparent; }
.filter-item:hover { background: rgba(56,189,248,.08); }
.filter-item .sw { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 6px currentColor; background: currentColor; }
.filter-item .name { flex: 1; }
.filter-item .count { font: 500 11px var(--mono); color: var(--muted); }
.filter-item[aria-pressed="false"] { opacity: .42; }
.filter-item[aria-pressed="false"] .sw { box-shadow: none; background: transparent; border: 1px solid currentColor; }
.filters.collapsed { width: 54px; }
.filters.collapsed .filter-list .name, .filters.collapsed .filter-list .count, .filters.collapsed .panel-head .eyebrow { display: none; }
.filters.collapsed .collapse svg { transform: rotate(180deg); }
.filters.collapsed .filter-item { justify-content: center; padding: 8px 0; }

/* Labels / markers */
.labels { position: fixed; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.marker { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; pointer-events: auto; color: var(--on-surface); will-change: transform; white-space: nowrap; padding: 0; }
.marker .dot { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 1.5px solid currentColor; position: relative; flex: none; color: var(--mc, var(--sky)); box-shadow: 0 0 8px -1px currentColor; background: rgba(3,7,18,.4); transition: transform .15s; }
.marker .dot::after { content: ""; position: absolute; inset: 2.5px; border-radius: 50%; background: currentColor; }
.marker .txt { margin-top: -6px; font: 500 11px/1.25 var(--mono); letter-spacing: .04em; padding: 3px 7px; border-radius: 3px; background: rgba(3,7,18,.62); border: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; }
.marker .txt small { font-size: 9.5px; color: var(--muted); letter-spacing: .06em; }
.marker:hover .dot, .marker.selected .dot { transform: scale(1.35); }
.marker.selected .txt { border-color: var(--line-strong); color: var(--cyan); }
.marker.selected .dot { color: var(--cyan); }
.marker.dot-only .txt { display: none; }
.marker.region { pointer-events: none; }
.marker.region .dot { display: none; }
.marker.region .txt { background: none; border: 0; color: rgba(186, 200, 255, .5); font-style: italic; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; transform: translateX(-50%); }
.marker.ship .dot { border-radius: 2px; transform: rotate(45deg); color: var(--warn); }
.marker.ship .txt { color: #fde68a; }
.marker.shell { pointer-events: none; }
.marker.shell .dot { display: none; }
.marker.shell .txt { background: none; border: 0; color: rgba(129,140,248,.7); font-size: 10px; }
.marker.hidden { display: none; }

.marker.launch .dot { color: #fb923c; border-radius: 3px; }
.marker.launch .txt { color: #fed7aa; border-color: rgba(251,146,60,.4); }
.time-speed.live { color: var(--ok); }
.fact.live { border-color: rgba(16,185,129,.25); }
.fact.live dd { color: #a7f3d0; }

/* Info panel */
.info { position: fixed; top: calc(var(--topbar-h) + 22px); right: 12px; width: 360px; max-height: calc(100vh - var(--topbar-h) - 150px); z-index: 16; display: flex; flex-direction: column; overflow: hidden; }
.info-scroll { overflow-y: auto; padding: 16px 18px 18px; scrollbar-width: thin; }
.info-head { display: flex; align-items: flex-start; gap: 10px; }
.info-head h2 { margin: 4px 0 2px; font-size: 22px; line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
.info-head .alt { color: var(--muted); font-size: 12.5px; }
.info-head .grow { flex: 1; min-width: 0; }
.type-chip { display: inline-flex; align-items: center; gap: 6px; font: 600 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 7px; border-radius: 3px; border: 1px solid currentColor; color: var(--sky); }
.info-visual { height: 4px; margin: 14px -18px 14px; background: linear-gradient(90deg, transparent, var(--mc, var(--cyan)), transparent); opacity: .5; }
.info p { margin: 0 0 12px; color: #c7d0e2; font-size: 13.5px; line-height: 1.6; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; }
.data-tag { font: 600 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 3px 6px; border-radius: 3px; }
.data-tag.measured { color: var(--ok); background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.35); }
.data-tag.illustrative { color: var(--warn); background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.35); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; }
.fact { background: rgba(2,5,12,.55); border: 1px solid rgba(255,255,255,.05); border-radius: var(--radius); padding: 8px 10px; min-width: 0; }
.fact dt { font: 500 10px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 3px 0 0; font: 500 13px/1.35 var(--mono); color: var(--on-surface); overflow-wrap: anywhere; }
.fact.wide { grid-column: 1 / -1; }
.info-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.info-actions .primary-btn { flex: 1 1 100%; }
.info-actions .ghost-btn { flex: 1 1 auto; }
.motion-box { border-left: 2px solid var(--violet); padding: 2px 0 2px 12px; margin-bottom: 4px; }
.illus-note { margin-top: 12px; font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.close-x { margin: -4px -6px 0 0; }
.ctl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: rgba(2,5,12,.5); border-radius: var(--radius); margin-bottom: 6px; font-size: 13px; }
.switch { position: relative; width: 36px; height: 20px; border-radius: 10px; background: var(--surface-high); border: 1px solid rgba(255,255,255,.1); flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch[aria-checked="true"] { background: rgba(0,242,254,.25); border-color: var(--line-strong); }
.switch[aria-checked="true"]::after { transform: translateX(16px); background: var(--cyan); }

/* Scale */
.scale { position: fixed; left: 12px; bottom: 12px; z-index: 15; padding: 9px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 170px; }
.scale-bar { height: 8px; position: relative; }
.scale-bar span { position: absolute; left: 0; bottom: 0; height: 8px; border: 1.5px solid var(--cyan); border-top: 0; transition: width .2s; }
.scale-value { font-size: 12px; color: var(--cyan); }

/* Time bar */
.timebar { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 15; display: flex; align-items: center; gap: 6px; padding: 6px 8px; }
.play { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--cyan); color: var(--void); box-shadow: 0 0 14px rgba(0,242,254,.4); }
.play svg { fill: currentColor; stroke-width: 2; }
.play .ico-play { display: none; }
.play.paused .ico-play { display: block; }
.play.paused .ico-pause { display: none; }
.time-readout { display: flex; flex-direction: column; min-width: 150px; padding: 0 8px; }
.time-speed { font-size: 11.5px; color: var(--cyan); letter-spacing: .04em; }
.time-date { font-size: 11px; color: var(--muted); }

/* Notice */
.notice { position: fixed; right: 12px; bottom: 12px; z-index: 15; max-width: 340px; padding: 9px 12px; display: flex; gap: 9px; align-items: flex-start; font-size: 11.5px; line-height: 1.45; color: #c6cede; }
.notice-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-top: 5px; flex: none; box-shadow: 0 0 8px var(--warn); }

/* Mobile nav */
.mobile-nav { display: none; }

/* Modals */
.modal-root { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(1,3,9,.6); pointer-events: auto; animation: fadein .2s ease; }
.modal { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: hidden; display: flex; flex-direction: column; pointer-events: auto; background: rgba(5,9,20,.94); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: 0 0 50px -10px rgba(129,140,248,.35); animation: pop .22s ease; }
.modal.wide { width: min(940px, calc(100vw - 24px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.modal-body { padding: 16px 18px 18px; overflow-y: auto; scrollbar-width: thin; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }
@keyframes fadein { from { opacity: 0; } }

/* Search */
.search-box { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 46px; background: #02050c; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.search-box input { flex: 1; background: none; border: 0; outline: none; font: 500 15px var(--font); color: var(--on-surface); min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.chip { font: 500 11px/1 var(--mono); letter-spacing: .06em; padding: 7px 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.chip:hover { color: var(--on-surface); }
.chip[aria-pressed="true"] { color: var(--cyan); border-color: var(--line-strong); background: var(--cyan-soft); }
.results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.results button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius); text-align: left; }
.results button:hover, .results button.active { background: rgba(56,189,248,.1); }
.results .r-name { flex: 1; min-width: 0; }
.results .r-name b { font-weight: 600; display: block; }
.results .r-name span { font-size: 12px; color: var(--muted); }
.results .r-where { font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.results .sw { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; flex: none; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }

/* Hangar */
.hangar { display: grid; grid-template-columns: 210px 1fr; gap: 16px; }
.fleet-list { display: flex; flex-direction: column; gap: 6px; }
.fleet-item { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.07); background: rgba(2,5,12,.5); text-align: left; }
.fleet-item b { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.fleet-item span { font-size: 11.5px; color: var(--muted); }
.fleet-item[aria-pressed="true"] { border-color: var(--line-strong); background: var(--cyan-soft); }
.swatch-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.preview { position: relative; height: 260px; border-radius: var(--radius-lg); overflow: hidden; background: radial-gradient(ellipse at 50% 60%, rgba(56,189,248,.12), transparent 60%), radial-gradient(ellipse at 30% 20%, rgba(129,140,248,.14), transparent 50%), #02050c; border: 1px solid var(--line); }
.preview canvas { width: 100%; height: 100%; display: block; }
.preview .grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(0,242,254,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0,242,254,.05) 1px, transparent 1px); background-size: 24px 24px; }
.form { display: grid; gap: 12px; margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .eyebrow { font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.text-input { height: 38px; padding: 0 12px; background: #02050c; border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); outline: none; }
.text-input:focus { border-color: var(--cyan); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { flex: 1 1 0; min-width: 80px; padding: 8px 6px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.1); font: 500 11px var(--mono); letter-spacing: .04em; color: var(--muted); }
.seg button[aria-pressed="true"] { color: var(--cyan); border-color: var(--line-strong); background: var(--cyan-soft); }
.seg button small { display: block; font-size: 9.5px; opacity: .8; margin-top: 2px; }
.colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.color-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.color-row button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.color-row button[aria-pressed="true"] { border-color: var(--on-surface); }
.color-row input[type=color] { width: 26px; height: 26px; border: 0; padding: 0; background: none; cursor: pointer; }

/* Flights */
.flight { padding: 12px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.07); background: rgba(2,5,12,.5); margin-bottom: 8px; }
.flight-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.flight-top b { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.flight-route { font-size: 12.5px; color: #c7d0e2; margin: 4px 0 8px; }
.progress { height: 4px; border-radius: 2px; background: var(--surface-high); overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--cyan)); box-shadow: 0 0 8px var(--cyan); }
.flight-meta { display: flex; justify-content: space-between; margin-top: 6px; font: 500 11px var(--mono); color: var(--muted); gap: 8px; flex-wrap: wrap; }
.events { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.events li { position: relative; padding: 0 0 12px 16px; font-size: 13px; }
.events li::before { content: ""; position: absolute; left: -4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--sky); }
.events li.arrive::before { background: var(--ok); }
.events li.built::before { background: var(--violet); }
.events time { display: block; font: 500 10.5px var(--mono); color: var(--muted); }
.launch-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0; }
.hint { font-size: 12px; color: var(--muted); }

/* Onboarding */
.onboard { text-align: left; }
.onboard-visual { height: 130px; display: grid; place-items: center; border-radius: var(--radius-lg); background: radial-gradient(circle at 50% 50%, rgba(0,242,254,.12), transparent 60%), #02050c; border: 1px solid var(--line); margin-bottom: 14px; }
.onboard-visual svg { width: 64px; height: 64px; stroke: var(--cyan); stroke-width: 1.2; }
.onboard h3 { margin: 0 0 6px; font-size: 18px; }
.onboard p { margin: 0; color: #c7d0e2; }
.dots { display: flex; gap: 6px; margin-right: auto; align-items: center; }
.dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-high); }
.dots span.on { background: var(--cyan); }

/* Settings */
.settings-pop { position: fixed; top: calc(var(--topbar-h) + 18px); right: 12px; width: 290px; z-index: 30; padding: 12px; }

/* Toasts */
.toasts { position: fixed; top: calc(var(--topbar-h) + 70px); left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: min(420px, calc(100vw - 24px)); }
.toast { pointer-events: auto; padding: 11px 14px; display: flex; gap: 10px; align-items: center; font-size: 13px; animation: toastin .3s ease; }
.toast .notice-dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); margin: 0; }
.toast.depart .notice-dot { background: var(--sky); box-shadow: 0 0 8px var(--sky); }
.toast button { margin-left: auto; }
@keyframes toastin { from { opacity: 0; transform: translateY(-8px); } }

/* Tablet */
@media (max-width: 1199px) {
  .search-trigger { min-width: 0; }
  .search-trigger-text, .search-trigger kbd { display: none; }
  .brand-sub { display: none; }
  .filters { width: 54px; }
  .filters .filter-list .name, .filters .filter-list .count, .filters .panel-head .eyebrow { display: none; }
  .filters .filter-item { justify-content: center; padding: 8px 0; }
  .filters .collapse { display: none; }
  .notice { max-width: 260px; }
  .info { width: 330px; }
}

/* Mobile */
@media (max-width: 767px) {
  :root { --topbar-h: 50px; }
  .topbar { top: 0; left: 0; right: 0; border-radius: 0; border-width: 0 0 1px; gap: 8px; padding: 0 6px 0 10px; padding-top: env(safe-area-inset-top); height: calc(var(--topbar-h) + env(safe-area-inset-top)); }
  .brand-text { display: none; }
  .brand-mark { width: 24px; height: 24px; }
  .trail { border: 0; padding-left: 0; font-size: 10.5px; }
  .trail > :not(:last-child) { display: none; }
  #searchOpen, #flightsOpen, #hangarOpen { display: none; }
  .lang { margin: 0; }
  .lang button { padding: 5px 8px; }
  .levels { top: calc(var(--topbar-h) + 8px + env(safe-area-inset-top)); width: calc(100vw - 16px); justify-content: stretch; }
  .levels button { flex: 1; padding: 7px 4px; font-size: 10px; letter-spacing: .04em; white-space: normal; line-height: 1.15; }
  .filters { display: none; }
  .filters.sheet-open { display: flex; top: auto; bottom: calc(70px + env(safe-area-inset-bottom)); left: 8px; right: 8px; width: auto; max-height: 50vh; }
  .filters.sheet-open .filter-list .name, .filters.sheet-open .filter-list .count, .filters.sheet-open .panel-head .eyebrow { display: inline; }
  .filters.sheet-open .filter-item { justify-content: flex-start; padding: 9px; }
  .info { top: auto; bottom: calc(70px + env(safe-area-inset-bottom)); left: 8px; right: 8px; width: auto; max-height: 52vh; }
  .scale { left: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); padding: 6px 9px; min-width: 120px; }
  .scale .eyebrow { display: none; }
  .timebar { display: none; bottom: calc(70px + env(safe-area-inset-bottom)); width: calc(100vw - 16px); justify-content: space-between; }
  .timebar.sheet-open { display: flex; }
  .time-readout { min-width: 0; flex: 1; }
  .notice { display: none; }
  .mobile-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; border-radius: 0; border-width: 1px 0 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .mobile-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 8px; font: 500 10px var(--mono); letter-spacing: .04em; color: var(--muted); border-radius: var(--radius); min-width: 56px; }
  .mobile-nav button[aria-pressed="true"] { color: var(--cyan); }
  .mobile-nav svg { width: 20px; height: 20px; }
  .hangar { grid-template-columns: 1fr; }
  .fleet-list { flex-direction: row; overflow-x: auto; }
  .fleet-item { min-width: 140px; }
  .preview { height: 200px; }
  .colors { grid-template-columns: 1fr; }
  .modal { top: auto; bottom: 0; transform: translateX(-50%); width: 100vw; max-height: 88vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; animation: none; }
  .toasts { top: calc(var(--topbar-h) + 56px); }
  .settings-pop { left: 8px; right: 8px; width: auto; }
  .marker .txt { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body.reduced-motion *, body.reduced-motion *::before, body.reduced-motion *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
