:root {
  --ink: #1c2430;
  --muted: #6b7280;
  --panel: rgba(255, 255, 255, 0.94);
  --line: #e5e7eb;
  --accent: #c95a2a;
}

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

html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--ink); }

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

#panel {
  position: absolute;
  top: 12px; left: 12px;
  width: 300px;
  max-width: calc(100vw - 24px);
  background: var(--panel);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(20, 30, 50, 0.18);
  padding: 14px 16px 12px;
  backdrop-filter: blur(6px);
  z-index: 1000;
}

.brand { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.logo { font-size: 26px; }
h1 { font-size: 17px; font-weight: 700; letter-spacing: -0.2px; }
.sub { font-size: 10.5px; color: var(--muted); margin-top: 1px; line-height: 1.35; }

.slider-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
#play {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 12px; color: var(--ink); flex: none;
}
#play:hover { background: #f3f4f6; }
#month { flex: 1; accent-color: var(--accent); }
#monthLabel { font-size: 12.5px; font-weight: 600; min-width: 68px; text-align: right; }

.legend { margin-bottom: 12px; }
.legend-label { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-bottom: 3px; }
#legendBar {
  height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, #fff3d6, #fde3a5, #f7c875, #efa54f, #e07e33, #c95a2a, #a63d2e, #7e2a36, #571f3f, #331a45, #12123f);
}
.legend-scale { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); margin-top: 2px; }

.driest { border-top: 1px solid var(--line); padding-top: 8px; }
.driest-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); margin-bottom: 6px; }
#driestList { list-style: none; }
#driestList li {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; padding: 2.5px 0;
}
#driestList li b { font-weight: 600; }
#driestList li .days { color: var(--muted); font-size: 11px; }
#driestList li:first-child { font-size: 13px; }
#driestList li:first-child .days { color: var(--accent); font-weight: 600; }

.foot { font-size: 9.5px; color: var(--muted); line-height: 1.4; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }

.leaflet-popup-content { font-size: 12.5px; line-height: 1.45; }
.leaflet-popup-content h3 { font-size: 14px; margin-bottom: 2px; }
.leaflet-popup-content .country { color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 34px; margin: 6px 0 4px; }
.bars div { flex: 1; background: #cbd5e1; border-radius: 1.5px 1.5px 0 0; min-height: 2px; }
.bars div.hot { background: var(--accent); }
.bars div.cur { outline: 2px solid var(--ink); outline-offset: 1px; }
.month-labels { display: flex; justify-content: space-between; font-size: 8.5px; color: var(--muted); }
.pop-stats { font-size: 11px; color: var(--muted); }

@media (max-width: 640px) {
  #panel { width: 230px; padding: 10px 12px 8px; }
  h1 { font-size: 15px; }
  .driest { display: none; }
}
