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

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

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

/* ── Legend ─────────────────────────────────────────────────────────────── */
#legend {
  position: fixed;
  bottom: 100px;
  left: 12px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(4px);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  z-index: 10;
  font-size: 12px;
}

.legend-title { font-weight: 600; margin-bottom: 6px; color: #222; }
.legend-item  { display: flex; align-items: center; gap: 8px; margin: 3px 0; color: #444; }
.dot          { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Controls ───────────────────────────────────────────────────────────── */
#controls {
  position: fixed;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(4px);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

#controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  color: #333;
  user-select: none;
}

#controls input[type=checkbox] { accent-color: #1a73e8; width: 15px; height: 15px; }

/* ── Info panel ─────────────────────────────────────────────────────────── */
#info-panel {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 14px;
  padding: 14px 18px 14px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  z-index: 10;
  min-width: 260px;
  max-width: 340px;
}

#info-panel.hidden { display: none; }

#info-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none; border: none;
  font-size: 16px; cursor: pointer; color: #999;
}

#info-content h3 { font-size: 14px; margin-bottom: 5px; color: #111; }
#info-content p  { font-size: 12px; color: #555; line-height: 1.6; }
.muted { color: #888; }

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  #legend { display: none; }
  #controls { top: auto; bottom: 140px; left: 12px; }
}
