html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0e0e0e; /* mismo tono que CARTO Dark Matter: sin destello blanco al cargar */
  color: #ddd;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

#map {
  position: fixed;
  inset: 0;
  background: #0e0e0e;
}

/* Capa de lluvia: píxeles nítidos (cada uno es ~1 km), sin el suavizado del navegador */
.leaflet-image-layer.radar {
  image-rendering: pixelated;
}

/* Leyenda de la lluvia (arriba a la derecha) */
.leyenda {
  background: rgba(20, 20, 20, 0.85);
  color: #ddd;
  padding: 6px 8px 5px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.25;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  max-width: calc(100vw - 80px);
}

.leyenda-titulo {
  font-weight: 600;
  margin-bottom: 4px;
}

.leyenda-titulo span {
  font-weight: normal;
  color: #999;
}

.leyenda-escala {
  display: grid;
  grid-template-columns: repeat(var(--niveles), minmax(20px, 26px));
  text-align: center;
}

.leyenda-grupo {
  border-bottom: 1px solid #555;
  margin: 0 1px 2px;
  padding-bottom: 1px;
  white-space: nowrap;
  font-size: 10px;
  color: #bbb;
}

/* Misma opacidad que la capa de lluvia, sobre fondo oscuro como el mapa: los colores cuadran */
.leyenda-color {
  height: 12px;
  opacity: var(--opacidad);
}

.leyenda-valor {
  font-size: 10px;
  color: #999;
  font-variant-numeric: tabular-nums;
}

.leyenda-estado {
  margin-top: 4px;
  color: #bbb;
}

.leyenda-estado.aviso {
  color: #ffb74d;
  max-width: 260px;
}

/* Atribución legible sobre el fondo oscuro */
.leaflet-container .leaflet-control-attribution {
  background: rgba(20, 20, 20, 0.75);
  color: #bbb;
}

.leaflet-container .leaflet-control-attribution a {
  color: #8ab4f8;
}
