:root {
  --bg: #0b0f14;
  --panel: #111823;
  --panel-2: #0e141d;
  --line: #1e2a3a;
  --text: #d6e2f0;
  --dim: #6b7f96;
  --accent: #ffd166;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 18px 24px 12px;
  border-bottom: 1px solid var(--line);
}

h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.tagline { color: var(--dim); font-size: 13px; margin-top: 2px; }

.status { display: flex; gap: 8px; flex-wrap: wrap; }

.pill {
  font-family: Consolas, monospace;
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  background: var(--panel-2);
  white-space: nowrap;
}

.pill.live { color: #80ed99; border-color: #2a4a35; }
.pill.backfilling { color: var(--accent); border-color: #4a3f1e; }

main {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  padding: 16px 24px 32px;
  align-items: start;
}

h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 10px;
}

h2 .sub {
  text-transform: none;
  letter-spacing: 0;
  color: var(--dim);
  font-weight: 400;
  font-size: 11px;
  margin-left: 6px;
}

.board { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }

.group-card {
  display: grid;
  grid-template-columns: 74px 1fr 64px;
  gap: 10px;
  align-items: center;
  padding: 7px 6px;
  border-bottom: 1px solid var(--panel-2);
}
.group-card:last-child { border-bottom: none; }

.group-name {
  font-family: Consolas, monospace;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.swatch { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

.group-card canvas { width: 100%; height: 34px; display: block; }

.anomaly {
  font-family: Consolas, monospace;
  font-size: 13px;
  text-align: right;
}
.anomaly .ratio { display: block; }
.anomaly .n { display: block; font-size: 10px; color: var(--dim); }
.ratio.hot { color: #ff6b6b; font-weight: 700; }
.ratio.warm { color: var(--accent); }
.ratio.cool { color: #4ea8de; }
.ratio.flat { color: var(--dim); }

.right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.map-wrap, .ticker-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

#map { height: clamp(480px, 66vh, 800px); border-radius: 6px; background: #060a0f; }

#ticker {
  list-style: none;
  max-height: 420px;
  overflow-y: auto;
}

#ticker li {
  display: grid;
  grid-template-columns: 52px 88px 1fr;
  gap: 10px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--panel-2);
  font-size: 13px;
  align-items: baseline;
}

#ticker .when { color: var(--dim); font-family: Consolas, monospace; font-size: 11px; }

#ticker .chips { display: flex; flex-direction: column; gap: 3px; }

.chip {
  font-family: Consolas, monospace;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  color: #0b0f14;
  width: fit-content;
}

.chip.place { background: transparent; color: var(--dim); border: 1px solid var(--line); }

#ticker .text { color: var(--text); overflow-wrap: anywhere; }

.leaflet-container { font: inherit; }

.radar-canvas { pointer-events: none; }

.wmark { background: none; border: none; }

.wicon {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 7px currentColor);
  cursor: pointer;
}

.leaflet-popup-content-wrapper {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}
.leaflet-popup-tip { background: var(--panel); }
.leaflet-popup-close-button { color: var(--dim); }

.popup-chips { margin: 6px 0 4px; display: flex; flex-wrap: wrap; gap: 4px; }

.quote {
  color: var(--dim);
  border-left: 2px solid var(--line);
  padding-left: 7px;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  main { grid-template-columns: 1fr; }
}
