.leaflet-overlay-pane svg .state-density-label {
  font-family: system-ui, Arial;
  font-size: 10px;
  font-weight: 600;
  fill: #fff;
  stroke: rgba(0,0,0,0.5);
  stroke-width: 2;
  paint-order: stroke;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

@media (max-width:768px){
  .leaflet-overlay-pane svg .state-density-label { font-size: 8px; }
}

#usa-density-map.dark-mode { filter: brightness(0.85) contrast(1.15); }

/* Legend color blocks */
.density-color{
  display:inline-block;
  width:16px;
  height:16px;
  margin-right:8px;
  border-radius:3px;
  vertical-align:middle;
}

#density-legend.dark{
  background:#1c1c1c;
  color:#fff;
}