:root {
  --bg: #0b0d10;
  --panel: #14181e;
  --ink: #f4f1ea;
  --muted: #9aa3ad;
  --red: #e82127;
  --line: #2a313a;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

.top {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mark {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: var(--red);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 25%, transparent);
}

h1 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.tag {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.stats {
  display: flex;
  gap: 16px;
  align-items: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.stat .n {
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
  font-weight: 650;
}

.stat .l {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.ghost:hover {
  border-color: var(--ink);
}

#map {
  position: absolute;
  inset: 0;
}

.banner {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: #3a1515;
  color: #ffd9d9;
  border: 1px solid #6a2a2a;
  padding: 10px 14px;
  border-radius: 10px;
  max-width: min(520px, calc(100% - 24px));
}

.empty {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 16px;
  width: min(380px, calc(100% - 24px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.empty h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

code {
  color: #f2c9a3;
  font-size: 0.85em;
}

.hidden {
  display: none;
}

.maplibregl-popup-content {
  background: var(--panel);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: var(--panel);
}

@media (max-width: 720px) {
  .top {
    flex-direction: column;
    align-items: stretch;
  }

  .stats {
    justify-content: space-between;
  }

  .stat {
    align-items: flex-start;
  }
}
