:root {
  --bg: #070c14;
  --bg-2: #0a1321;
  --panel: #101c2d;
  --panel-2: #142237;
  --line: rgba(126, 166, 208, .16);
  --line-strong: rgba(126, 166, 208, .26);
  --text: #e9f2fd;
  --muted: #8296ad;
  --dim: #566b84;
  --cyan: #3ee6c4;
  --cyan-soft: rgba(62, 230, 196, .13);
  --red: #ff5d6c;
  --red-soft: rgba(255, 93, 108, .12);
  --amber: #ffb340;
  --amber-soft: rgba(255, 179, 64, .12);
  --green: #55d6a8;
  --green-soft: rgba(85, 214, 168, .12);
  --blue: #4ba3ff;
  --radius: 20px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(900px 600px at 18% 8%, rgba(30, 76, 108, .22), transparent 60%),
    radial-gradient(800px 700px at 88% 92%, rgba(24, 86, 84, .16), transparent 60%),
    #04070d;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
}

button { font: inherit; color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.icon--xs { width: 14px; height: 14px; }
.icon--chevron { width: 16px; height: 16px; color: var(--dim); }

.device {
  width: min(100vw, 430px);
  height: min(100dvh, 900px);
  position: relative;
}

.app {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(420px 320px at 88% -4%, rgba(62, 230, 196, .10), transparent 70%),
    radial-gradient(360px 280px at 4% 104%, rgba(75, 163, 255, .09), transparent 70%),
    var(--bg);
}

/* ---------- status bar ---------- */
.statusbar {
  height: calc(38px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  color: #cfe0f3;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
}
.statusbar__icons { display: flex; align-items: center; gap: 6px; opacity: .9; }
.statusbar__icons svg { height: 11px; width: auto; fill: currentColor; }
.statusbar__icons svg:first-child { width: 16px; }

/* ---------- views ---------- */
#views { position: relative; flex: 1; min-height: 0; }

.view {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  min-height: 0;
}
.view.is-active { display: flex; }

.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px 22px;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }

/* ---------- page heads ---------- */
.page-head {
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 8px 20px 14px;
}
.eyebrow {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  letter-spacing: .8px;
  color: var(--muted);
  text-transform: uppercase;
}
.page-head h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: -.4px;
  font-weight: 700;
}
.page-head .badge { margin-bottom: 3px; }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
  background: var(--muted);
}
.dot--cyan { background: var(--cyan); box-shadow: 0 0 8px rgba(62, 230, 196, .8); }
.dot--red { background: var(--red); box-shadow: 0 0 8px rgba(255, 93, 108, .8); }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  margin-bottom: 2px;
  border: 1px solid rgba(62, 230, 196, .32);
  border-radius: 999px;
  background: rgba(62, 230, 196, .07);
  color: var(--cyan);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .8px;
  white-space: nowrap;
}
.live-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  animation: blink 1.8s ease-in-out infinite;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .3px;
}
.badge--red { background: var(--red-soft); border: 1px solid rgba(255, 93, 108, .34); color: #ff8b96; }

/* ---------- KPI ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.kpi {
  padding: 10px 12px 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(150deg, rgba(21, 37, 58, .92), rgba(13, 24, 39, .92));
  position: relative;
  overflow: hidden;
}
.kpi::after {
  content: "";
  position: absolute;
  top: -18px;
  right: -14px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(62, 230, 196, .06);
}
.kpi small { display: block; font-size: 10px; color: var(--muted); letter-spacing: .3px; }
.kpi b { font-size: 22px; line-height: 1.15; font-weight: 700; letter-spacing: -.5px; }
.kpi em { font-style: normal; font-size: 9px; color: var(--dim); margin-left: 2px; }
.text-red { color: #ff7e8a; }
.text-cyan { color: var(--cyan); }

/* ---------- map ---------- */
.map-card {
  position: relative;
  height: 276px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #0a1522;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .28);
}
.map__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.amap {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  background: #0a1522;
  transition: opacity .25s ease;
}
.map-card.is-live > .amap,
.mini-map.is-live > .amap,
.nav-map.is-live > .amap { opacity: 1; pointer-events: auto; }

.map-card.is-live > .map__canvas,
.map-card.is-live > .radar,
.map-card.is-live > .marker,
.mini-map.is-live > .map__canvas,
.mini-map.is-live > .marker,
.mini-map.is-live > .mini-map__scale,
.nav-map.is-live > .map__canvas,
.nav-map.is-live > .nav-markers { display: none; }

.radar {
  position: absolute;
  width: 232px;
  height: 232px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  left: 62%;
  top: 43%;
}
.radar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(62, 230, 196, .16);
  background:
    repeating-radial-gradient(circle, transparent 0 36px, rgba(62, 230, 196, .12) 37px, transparent 38px 72px),
    radial-gradient(circle, rgba(62, 230, 196, .10), transparent 68%);
}
.radar__sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(62, 230, 196, .34), rgba(62, 230, 196, .06) 42deg, transparent 68deg, transparent 360deg);
  -webkit-mask: radial-gradient(circle, #000 0 68%, transparent 71%);
  mask: radial-gradient(circle, #000 0 68%, transparent 71%);
  animation: sweep 6s linear infinite;
}

.map-card__top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}
.map-card__tags { display: flex; gap: 6px; }
.glass-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(7, 14, 24, .72);
  border: 1px solid rgba(126, 166, 208, .2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #b9cee3;
  font-size: 9.5px;
  letter-spacing: .3px;
}
.glass-chip--live { color: var(--red); border-color: rgba(255, 93, 108, .32); }
.glass-chip--map { color: #9db4cc; }
.glass-chip--map.is-live { color: var(--cyan); border-color: rgba(62, 230, 196, .3); }
.glass-chip--map.is-error { color: var(--red); border-color: rgba(255, 93, 108, .3); }
.glass-chip--live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1.6s ease-in-out infinite;
}

.marker {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.marker__dot {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  background: rgba(8, 16, 28, .92);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .5);
}
.marker__dot .icon { width: 17px; height: 17px; }
.marker__label {
  font-size: 9px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 5px;
  white-space: nowrap;
  color: #dcecff;
  background: rgba(6, 12, 20, .84);
  border: 1px solid rgba(126, 166, 208, .18);
}
.marker--sm .marker__dot { width: 26px; height: 26px; }
.marker--sm .marker__dot .icon { width: 14px; height: 14px; }

.marker--danger .marker__dot { color: #ff8b96; border-color: rgba(255, 93, 108, .72); background: rgba(52, 10, 18, .9); }
.marker--danger .marker__dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(255, 93, 108, .5);
  animation: pulse 2.2s ease-out infinite;
}
.marker--cyan .marker__dot,
.marker__dot--cyan { color: var(--cyan); border-color: rgba(62, 230, 196, .68); background: rgba(5, 36, 32, .9); }
.marker--amber .marker__dot { color: var(--amber); border-color: rgba(255, 179, 64, .6); background: rgba(46, 30, 6, .9); }
.marker.amap-marker {
  position: relative;
  z-index: auto;
  transform: none;
  flex-direction: column-reverse;
  pointer-events: auto;
  cursor: pointer;
}
.marker--self .marker__dot { width: 24px; height: 24px; border-color: rgba(75, 163, 255, .7); }
.self-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(75, 163, 255, .18), 0 0 14px rgba(75, 163, 255, .9);
}

.map-controls {
  position: absolute;
  right: 10px;
  bottom: 44px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-controls button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(126, 166, 208, .2);
  background: rgba(7, 14, 24, .8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #b9cee3;
  cursor: pointer;
}
.map-controls button:active { background: rgba(62, 230, 196, .12); color: var(--cyan); }

.map-legend {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 12;
  display: flex;
  gap: 10px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(7, 14, 24, .72);
  border: 1px solid rgba(126, 166, 208, .16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 9px;
  color: #a9bfd5;
}
.map-card.is-live .map-legend { left: 74px; }
.map-legend span { display: inline-flex; align-items: center; gap: 4px; }
.lg { width: 5px; height: 5px; border-radius: 50%; }
.lg--red { background: var(--red); box-shadow: 0 0 6px rgba(255, 93, 108, .8); }
.lg--cyan { background: var(--cyan); box-shadow: 0 0 6px rgba(62, 230, 196, .8); }
.lg--blue { background: var(--blue); box-shadow: 0 0 6px rgba(75, 163, 255, .8); }

/* ---------- section / chips / targets ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 2px 10px;
}
.section-head--tight { margin: 16px 2px 8px; }
.section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.1px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.section-head .count {
  font-size: 10px;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid rgba(62, 230, 196, .25);
  padding: 1px 6px;
  border-radius: 999px;
}
.section-head > span,
.section-note { font-size: 9.5px; color: var(--dim); }
.link-btn {
  border: 0;
  background: none;
  padding: 2px;
  color: var(--cyan);
  font-size: 11px;
  cursor: pointer;
}

.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(16, 28, 45, .68);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.chip.is-active {
  color: #06110f;
  background: var(--cyan);
  border-color: var(--cyan);
  font-weight: 650;
}

.target-list { display: flex; flex-direction: column; gap: 8px; }

.target {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  text-align: left;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(20, 35, 55, .9), rgba(12, 22, 36, .92));
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.target:active { transform: scale(.985); border-color: rgba(62, 230, 196, .3); }
.target__icon {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 13px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
}
.target__icon .icon { width: 19px; height: 19px; }
.target__icon--red { color: #ff8b96; background: var(--red-soft); border-color: rgba(255, 93, 108, .2); }
.target__icon--amber { color: var(--amber); background: var(--amber-soft); border-color: rgba(255, 179, 64, .18); }
.target__icon--cyan { color: var(--cyan); background: var(--cyan-soft); border-color: rgba(62, 230, 196, .2); }
.target__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.target__top { display: flex; align-items: center; gap: 7px; }
.target__top strong { font-size: 13px; font-weight: 650; letter-spacing: -.1px; }
.target__meta { font-size: 10px; color: var(--muted); }
.target__pilot { font-size: 9.5px; color: var(--cyan); display: flex; align-items: center; gap: 5px; }
.target__pilot .dot { width: 4px; height: 4px; }
.target__pilot--muted { color: var(--dim); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-style: normal;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .2px;
  white-space: nowrap;
}
.tag--red { color: #ff97a1; background: var(--red-soft); border: 1px solid rgba(255, 93, 108, .26); }
.tag--amber { color: #ffc36b; background: var(--amber-soft); border: 1px solid rgba(255, 179, 64, .24); }
.tag--cyan { color: var(--cyan); background: var(--cyan-soft); border: 1px solid rgba(62, 230, 196, .26); }
.tag--green { color: var(--green); background: var(--green-soft); border: 1px solid rgba(85, 214, 168, .24); }

[hidden] { display: none !important; }

/* ---------- alerts ---------- */
.alert-list { display: flex; flex-direction: column; gap: 9px; }
.alert-card {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 14px 12px 17px;
  text-align: left;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(20, 35, 55, .88), rgba(12, 22, 36, .94));
  overflow: hidden;
  cursor: pointer;
}
.alert-card__stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--red);
}
.alert-card__stripe--amber { background: var(--amber); }
.alert-card__stripe--green { background: var(--green); }
.alert-card__top { display: flex; align-items: center; justify-content: space-between; }
.alert-card__top time { font-size: 9.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.alert-card > strong { font-size: 13.5px; font-weight: 650; letter-spacing: -.1px; }
.alert-card__desc { font-size: 10.5px; color: var(--muted); }
.alert-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 3px; }
.state { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; }
.state i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.state--red { color: #ff8b96; }
.state--amber { color: var(--amber); }
.state--green { color: var(--green); }
.link { display: inline-flex; align-items: center; gap: 2px; font-size: 9.5px; color: var(--cyan); }

/* ---------- records ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.stat {
  padding: 12px 11px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(20, 35, 55, .88), rgba(12, 22, 36, .92));
}
.stat b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.4px; color: var(--cyan); }
.stat b em { font-size: 8.5px; font-style: normal; color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.stat small { display: block; margin-top: 3px; font-size: 9.5px; color: var(--muted); }

.timeline__day {
  margin: 0 0 10px 2px;
  font-size: 10px;
  letter-spacing: .5px;
  color: var(--dim);
}
.timeline__day:not(:first-child) { margin-top: 20px; }

.record {
  display: grid;
  grid-template-columns: 40px 10px 1fr;
  gap: 8px;
  padding-bottom: 14px;
}
.record__time {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.record__rail { position: relative; display: flex; justify-content: center; }
.record__rail::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: -18px;
  width: 1px;
  background: var(--line);
}
.record:last-child .record__rail::before { display: none; }
.record__rail i {
  position: relative;
  z-index: 1;
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(62, 230, 196, .1);
}
.record__rail i.is-amber { background: var(--amber); box-shadow: 0 0 0 4px rgba(255, 179, 64, .1); }
.record__rail i.is-red { background: var(--red); box-shadow: 0 0 0 4px rgba(255, 93, 108, .1); }
.record__body {
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(19, 33, 52, .82), rgba(11, 21, 35, .9));
}
.record__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.record__top strong { font-size: 12px; font-weight: 650; }
.record__body p { margin: 5px 0 0; font-size: 10px; color: var(--muted); }
.record__body p.muted { display: flex; align-items: center; gap: 4px; color: var(--dim); font-size: 9px; }
.record__body p.muted .icon { width: 11px; height: 11px; }

/* ---------- sub pages ---------- */
.sub-head {
  flex: none;
  height: 52px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  font-size: 14px;
  font-weight: 650;
  text-align: center;
}
.sub-head > span { letter-spacing: .2px; }
.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: #b9cee3;
  cursor: pointer;
}
.icon-btn:active { background: rgba(126, 166, 208, .1); }
.icon-btn--plain { justify-self: end; }
.sub-head .icon-btn:last-child { justify-self: end; }

/* ---------- detail ---------- */
.detail-hero {
  margin: 6px 0 12px;
  padding: 15px;
  border-radius: 20px;
  border: 1px solid rgba(255, 93, 108, .28);
  background:
    radial-gradient(240px 160px at 100% 0, rgba(255, 93, 108, .18), transparent 70%),
    linear-gradient(150deg, rgba(58, 17, 28, .82), rgba(15, 25, 41, .94));
  transition: background .2s, border-color .2s;
}
.detail-hero.is-cyan {
  border-color: rgba(62, 230, 196, .3);
  background:
    radial-gradient(240px 160px at 100% 0, rgba(62, 230, 196, .16), transparent 70%),
    linear-gradient(150deg, rgba(12, 46, 42, .72), rgba(15, 25, 41, .94));
}
.detail-hero__top { display: flex; align-items: center; justify-content: space-between; }
.mono {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 9.5px;
  color: var(--dim);
  letter-spacing: .6px;
}
.detail-hero__main { display: flex; align-items: center; gap: 13px; margin: 14px 0 15px; }
.detail-hero__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex: none;
  color: #ff9aa4;
  border: 1px solid rgba(255, 93, 108, .28);
  background: rgba(255, 93, 108, .1);
}
.is-cyan .detail-hero__icon { color: var(--cyan); border-color: rgba(62, 230, 196, .3); background: rgba(62, 230, 196, .1); }
.detail-hero__icon .icon { width: 27px; height: 27px; }
.detail-hero__main h2 { margin: 0 0 5px; font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.detail-hero__main p { margin: 0; font-size: 10px; color: var(--muted); }

.signal { display: flex; align-items: center; gap: 9px; font-size: 9.5px; color: var(--muted); }
.meter {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: rgba(126, 166, 208, .14);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb340, #ff5d6c);
}
.signal b { font-size: 9.5px; font-weight: 600; color: #dcecff; font-variant-numeric: tabular-nums; }

.telemetry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--line);
}
.telemetry > div { background: #0e1a2b; padding: 11px 11px 10px; }
.telemetry small { display: block; font-size: 9px; color: var(--muted); margin-bottom: 4px; }
.telemetry b { font-size: 17px; font-weight: 650; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.telemetry b em { font-style: normal; font-size: 8.5px; color: var(--dim); margin-left: 2px; letter-spacing: 0; }

.mini-map {
  position: relative;
  height: 156px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a1522;
}
.mini-map .marker__dot { width: 24px; height: 24px; }
.mini-map .marker__dot .icon { width: 13px; height: 13px; }
.mini-map__scale {
  position: absolute;
  right: 10px;
  bottom: 9px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(7, 14, 24, .7);
  font-size: 8px;
  color: var(--dim);
}

.panel {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(20, 35, 55, .85), rgba(11, 21, 35, .92));
}
.panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel__head h3 { margin: 0; font-size: 13px; font-weight: 650; }
.pilot-row { display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: radial-gradient(circle at 35% 25%, rgba(62, 230, 196, .22), rgba(62, 230, 196, .05));
  border: 1px solid rgba(62, 230, 196, .27);
}
.avatar .icon { width: 21px; height: 21px; }
.pilot-row__main { flex: 1; min-width: 0; }
.pilot-row__main strong { display: block; font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.pilot-row__main p { margin: 0; font-size: 9px; color: var(--dim); }
.confidence { text-align: right; }
.confidence b { font-size: 18px; font-weight: 700; color: var(--cyan); letter-spacing: -.4px; }
.confidence b em { font-size: 9px; font-style: normal; }
.confidence small { display: block; font-size: 8px; color: var(--dim); }

.pilot-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.pilot-metrics small { display: block; font-size: 8.5px; color: var(--muted); margin-bottom: 3px; }
.pilot-metrics b { font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; }

.hint-card {
  display: flex;
  gap: 7px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 179, 64, .22);
  background: rgba(255, 179, 64, .05);
  color: #c9a86d;
  font-size: 9.5px;
  line-height: 1.55;
}
.hint-card .icon { margin-top: 1px; color: var(--amber); }

.actionbar {
  flex: none;
  display: flex;
  gap: 9px;
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 32%, rgba(7, 12, 20, .82) 70%, transparent);
}
.actionbar .btn--ghost { flex: 1; }
.actionbar .btn--primary { flex: 2; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .2px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn--primary {
  color: #03110e;
  background: linear-gradient(135deg, #4ff0cf, #2fcdb0);
  box-shadow: 0 8px 22px rgba(62, 230, 196, .2);
}
.btn--primary:active { filter: brightness(.94); }
.btn--ghost {
  color: #c6d8e9;
  background: rgba(20, 34, 53, .8);
  border-color: var(--line-strong);
}
.btn--ghost:active { background: rgba(30, 48, 70, .9); }

/* ---------- navigation ---------- */
.view--nav { overflow: hidden; }
.nav-map { position: absolute; inset: 0; }
.nav-markers { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

.nav-top {
  position: absolute;
  top: 8px;
  left: 12px;
  right: 12px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.nav-top .icon-btn {
  background: rgba(7, 14, 24, .68);
  border-color: rgba(126, 166, 208, .18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 650;
  padding: 8px 12px;
  border-radius: 11px;
  background: rgba(7, 14, 24, .66);
  border: 1px solid rgba(126, 166, 208, .16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-top .live-pill { margin: 0; background: rgba(7, 14, 24, .7); backdrop-filter: blur(10px); }

.nav-instruction {
  position: absolute;
  top: 62px;
  left: 14px;
  right: 14px;
  z-index: 11;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 18px;
  border: 1px solid rgba(62, 230, 196, .28);
  background: linear-gradient(140deg, rgba(10, 35, 36, .94), rgba(8, 18, 30, .92));
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-instruction__arrow {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #041512;
  background: linear-gradient(135deg, #4ff0cf, #2fcdb0);
  box-shadow: 0 6px 16px rgba(62, 230, 196, .24);
}
.nav-instruction__arrow .icon { width: 22px; height: 22px; transform: rotate(-45deg); stroke-width: 2; }
.nav-instruction strong { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.2px; margin-bottom: 3px; }
.nav-instruction p { margin: 0; font-size: 9.5px; color: var(--muted); }

.nav-compass {
  position: absolute;
  right: 15px;
  bottom: 48%;
  z-index: 10;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(126, 166, 208, .22);
  background: rgba(7, 14, 24, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #b9cee3;
  cursor: pointer;
}
.nav-compass .icon { width: 22px; height: 22px; }

.nav-sheet {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 9px;
  z-index: 20;
  max-height: 47%;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 7px 15px calc(13px + env(safe-area-inset-bottom));
  border-radius: 24px;
  border: 1px solid rgba(126, 166, 208, .2);
  background: linear-gradient(to bottom, rgba(13, 24, 39, .97), rgba(8, 15, 25, .98));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-sheet::-webkit-scrollbar { display: none; }
.sheet__handle {
  width: 34px;
  height: 3px;
  margin: 2px auto 11px;
  border-radius: 99px;
  background: rgba(126, 166, 208, .28);
}
.nav-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.nav-summary > div { text-align: center; }
.nav-summary b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.7px; color: var(--cyan); line-height: 1.1; }
.nav-summary b em { font-size: 10px; font-style: normal; color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.nav-summary small { display: block; margin-top: 3px; font-size: 8.5px; color: var(--dim); }

.steps { padding: 10px 0 4px; }
.step { display: flex; gap: 10px; padding: 5px 0; align-items: flex-start; }
.step > span {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}
.step.is-done > span { color: #041512; background: var(--cyan); border-color: var(--cyan); }
.step.is-done > span .icon { width: 11px; height: 11px; stroke-width: 2.4; }
.step.is-active > span { color: var(--cyan); border-color: rgba(62, 230, 196, .5); background: rgba(62, 230, 196, .1); }
.step strong { display: block; font-size: 11px; font-weight: 600; margin-bottom: 2px; }
.step p { margin: 0; font-size: 9px; color: var(--dim); }
.step.is-active strong { color: var(--cyan); }

.nav-actions {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 8px;
  padding-top: 8px;
}
.nav-actions .btn { min-height: 42px; }

/* ---------- tab bar ---------- */
.tabbar {
  flex: none;
  height: calc(58px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  border-top: 1px solid rgba(126, 166, 208, .12);
  background: rgba(8, 14, 24, .94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.app[data-mode="sub"] .tabbar { display: none; }

.tab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: none;
  color: var(--dim);
  cursor: pointer;
}
.tab .icon { width: 21px; height: 21px; }
.tab span { font-size: 9px; letter-spacing: .2px; }
.tab.is-active { color: var(--cyan); }
.tab.is-active .icon { filter: drop-shadow(0 0 6px rgba(62, 230, 196, .35)); }
.tab__badge {
  position: absolute;
  top: 6px;
  left: calc(50% + 6px);
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-style: normal;
  font-size: 8px;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
  box-shadow: 0 0 0 2px #08101c;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  max-width: 78vw;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(126, 166, 208, .22);
  background: rgba(16, 28, 45, .96);
  color: #dcecff;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 50;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- desktop frame ---------- */
@media (min-width: 520px) {
  .device {
    border-radius: 42px;
    border: 1px solid rgba(126, 166, 208, .2);
    box-shadow:
      0 0 0 8px rgba(8, 14, 24, .9),
      0 30px 80px rgba(0, 0, 0, .65),
      inset 0 0 0 1px rgba(255, 255, 255, .03);
    overflow: hidden;
  }
}

@media (max-width: 519px) {
  body { display: block; background: var(--bg); }
  .device { width: 100vw; height: 100dvh; }
}

@media (max-height: 760px) {
  .map-card { height: 244px; }
  .nav-instruction { top: 58px; }
}

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

@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes pulse {
  0% { transform: scale(.82); opacity: .85; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
