:root {
  --bg: #ffffff;
  --panel: #f6f7f9;
  --text: #1d2228;
  --muted: #66707c;
  --line: #dde1e6;
  --accent: #2257c9;
  --ok: #2e8b57;
  --warn: #c98a12;
  --bad: #c0392b;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --panel: #1c2026;
    --text: #e6e9ed;
    --muted: #9aa4af;
    --line: #2d333b;
    --accent: #6d9bff;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: flex;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}
#panel {
  width: 360px;
  flex: none;
  overflow-y: auto;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 16px;
}
#map { flex: 1; min-width: 0; }
h1 { font-size: 18px; margin: 0; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; }
.sub, .muted { color: var(--muted); margin: 6px 0; font-size: 13px; }
section { border-top: 1px solid var(--line); padding: 14px 0; }
header { padding-bottom: 12px; }
button {
  font: inherit;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.active { outline: 2px solid var(--accent); }
label.pick { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
#layer-status { list-style: none; margin: 8px 0 0; padding: 0; }
#layer-status li { padding: 8px 0; border-bottom: 1px solid var(--line); }
#layer-status li:last-child { border-bottom: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.loading { background: var(--warn); animation: pulse 1s infinite; }
.dot.done { background: var(--ok); }
.dot.failed, .dot.none { background: var(--bad); }
@keyframes pulse { 50% { opacity: .3; } }
.layer-name { font-weight: 600; }
.count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.detail { font-size: 12px; color: var(--muted); margin: 2px 0 0 17px; }
.detail.bad { color: var(--bad); }
.small { font-size: 12px; }
code { font-size: 12px; }
@media (max-width: 720px) {
  body { flex-direction: column-reverse; }
  #panel { width: 100%; height: 50%; border-right: 0; border-top: 1px solid var(--line); }
}
