* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; }
#map { position: absolute; top: 0; left: 320px; right: 0; bottom: 0; }
#panel { position: absolute; top: 0; left: 0; width: 320px; bottom: 0;
  padding: 16px; overflow-y: auto; background: #f7f7f7;
  border-right: 1px solid #ddd; }
#panel h1 { font-size: 18px; }
#panel label { display: block; margin: 12px 0; font-size: 14px; }
#panel input[type=range] { width: 100%; }
.caveat { font-size: 12px; color: #a33; margin-top: 16px; }
#status { font-size: 12px; color: #555; }
#restrictions { margin: 12px 0; border: 1px solid #ddd; padding: 8px; }
#restrictions legend { font-size: 12px; color: #555; }
#panel label.restriction { margin: 4px 0; font-size: 13px; }
.swatch { display: inline-block; width: 12px; height: 12px; vertical-align: -1px;
  border: 1px solid #999; }
.restriction-desc { margin: 2px 0 8px 20px; font-size: 12px; color: #555;
  line-height: 1.4; }
.restriction-desc mark { background: #fff3a0; color: inherit; font-weight: 600;
  padding: 0 1px; }
#restrictionStatus { font-size: 12px; color: #555; margin: 6px 0 0; }
/* Loading spinner shown while zones / density hotspots are being computed.
   Sits over the map, top-center, above Leaflet panes but out of the way. */
.spinner { position: absolute; top: 50%; left: 50%;
  z-index: 1000; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; border: 6px solid rgba(31, 158, 143, 0.25);
  border-top-color: #1f9e8f; animation: spin 0.8s linear infinite;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); background: rgba(255, 255, 255, 0.85); }
.spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.density-legend { background: rgba(255, 255, 255, 0.9); padding: 6px 8px;
  border-radius: 4px; font-size: 11px; color: #333; line-height: 1.3;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.density-legend .dl-title { font-weight: 600; margin-bottom: 3px; }
.density-legend .dl-bar { display: flex; }
.density-legend .dl-bar span { display: block; width: 22px; height: 10px; }
.density-legend .dl-ends { display: flex; justify-content: space-between;
  margin-top: 2px; color: #666; }
