html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

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

#panel {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  width: 240px;
  font-size: 13px;
}

#time-label {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

#controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

#play {
  cursor: pointer;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 5px;
  padding: 4px 8px;
  white-space: nowrap;
}

#slider {
  flex: 1;
}

#legend {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 18px;
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

#legend-title {
  font-weight: 600;
  margin-bottom: 2px;
}

#status {
  margin-top: 8px;
  color: #666;
  font-size: 11px;
}

/* Render the precip overlay with hard pixel edges (no bilinear smoothing)
   so coarse cells look crisp like the official JMA viewer when zoomed in. */
.precip-overlay {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
