:root {
  --bg: #080b10;
  --surface: #121820;
  --panel: #18222c;
  --fg: #e7eef5;
  --muted: #8b98a8;
  --primary: #2ee6c5;
  --accent: #e8a838;
  --border: #243140;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100dvh; margin: 0; background: var(--bg); color: var(--fg); }
button { font: inherit; cursor: pointer; }
.hidden { display: none; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.muted { color: var(--muted); }

#app { display: flex; flex-direction: column; min-height: 100dvh; }
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
}
.brand { display: flex; gap: 10px; align-items: center; }
.mark {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 8px; background: var(--panel); box-shadow: var(--shadow);
  color: var(--primary); font-size: 18px;
}
h1 { font-size: 14px; margin: 0; }
.sub, .lede { margin: 0; font-size: 11px; color: var(--muted); }
.lede { max-width: 420px; }
.actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.btn, .follow, .chip {
  min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px;
  background: var(--panel); color: var(--fg); box-shadow: var(--shadow); font-size: 12px;
}
.btn.primary, .chip.on { background: var(--primary); color: var(--bg); box-shadow: none; }
.error { padding: 8px 20px; background: rgba(232,168,56,0.12); color: var(--accent); font-size: 12px; }

.stage { flex: 1; display: grid; grid-template-columns: 1fr; min-height: 280px; }
@media (min-width: 1024px) { .stage { grid-template-columns: 1.05fr 1fr; } }
.pane { position: relative; min-height: 280px; background: var(--bg); border-bottom: 1px solid var(--border); }
@media (min-width: 1024px) {
  .pane { border-bottom: 0; }
  .pane + .pane { border-left: 1px solid var(--border); }
}
.view-canvas, .map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.live-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; background: #080b10;
  pointer-events: none; z-index: 0;
}
.live-video.is-off { opacity: 0; visibility: hidden; }
.view-canvas { z-index: 1; }
.overlays { position: absolute; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; z-index: 2; }
.top-left { top: 12px; left: 12px; }
.bot-left { bottom: 12px; left: 12px; }
.badge {
  width: fit-content; padding: 4px 8px; border-radius: 6px;
  background: rgba(8,11,16,0.7); box-shadow: var(--shadow); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
}
.badge.mono { text-transform: none; letter-spacing: 0; color: var(--fg); }
.follow { position: absolute; top: 12px; right: 12px; min-height: 36px; }

.lower {
  display: grid; gap: 0; border-top: 1px solid var(--border);
}
@media (min-width: 1024px) { .lower { grid-template-columns: 1.1fr 0.9fr; } }
.col { padding: 16px 20px; }
.col + .col { border-top: 1px solid var(--border); }
@media (min-width: 1024px) { .col + .col { border-top: 0; border-left: 1px solid var(--border); } }
.kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { min-height: 36px; border-radius: 999px; }
.query-card { background: var(--panel); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); }
.query-text { margin: 0; font-family: "IBM Plex Mono", monospace; color: var(--primary); font-size: 14px; }
.objects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 160px; overflow: auto; }
.objects li { background: var(--panel); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: var(--shadow); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 99px; margin-right: 6px; }

footer { padding: 12px 20px 20px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
footer p { max-width: 760px; line-height: 1.55; }
.scale { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.scale input { accent-color: var(--primary); }
.status { font-family: "IBM Plex Mono", monospace; font-size: 10px; }
