:root {
  color-scheme: light;
  --ink: #192f28;
  --muted: #476359;
  --line: #d7e1d8;
  --page: #fafbf8;
  --map: #edf2eb;
  font: 16px/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, p { margin: 0; }
main { width: min(1760px, 100%); margin: auto; padding: clamp(12px, 2.4vw, 38px); }
header { margin-bottom: clamp(12px, 2vw, 24px); }
h1 { font-size: clamp(1.85rem, 3.3vw, 3.2rem); font-weight: 750; line-height: 1.05; letter-spacing: -.055em; }
header p { color: var(--muted); margin-top: .28rem; }
.map-stage { position: relative; overflow: hidden; border-radius: 16px; background: var(--map); border: 1px solid var(--line); }
svg { display: block; width: 100%; height: clamp(440px, calc(100dvh - 178px), 1120px); cursor: grab; touch-action: none; }
svg.dragging { cursor: grabbing; }
.land { fill: #e7eae1; }
.state-line { fill: none; stroke: #647d6d; opacity: .66; stroke-width: .7; vector-effect: non-scaling-stroke; pointer-events: none; }
.heat-image { pointer-events: none; }
.places { pointer-events: none; }
.place-label { fill: #132b22; stroke: #fafbf8; stroke-linejoin: round; paint-order: stroke; dominant-baseline: central; font-weight: 650; }
.place-dot { fill: #234436; stroke: #fafbf8; stroke-width: .7; vector-effect: non-scaling-stroke; }
#map-status { position: absolute; top: 46%; width: 100%; text-align: center; color: var(--muted); pointer-events: none; }
.zoom-controls { position: absolute; top: 14px; right: 14px; display: flex; border: 1px solid #c3d1c5; border-radius: 10px; background: #fafbf8; box-shadow: 0 3px 10px #24453212; }
button { padding: .3rem .65rem; background: transparent; border: none; border-radius: 8px; min-width: 42px; min-height: 44px; color: var(--ink); font: inherit; cursor: pointer; }
button:hover { background: #e6efe4; }
button:disabled { opacity: .42; cursor: default; }
button:focus-visible, svg:focus-visible { outline: 2px solid #146747; outline-offset: -3px; }
#in, #out { font-size: 1.2rem; line-height: 1; }
#reset { font-size: .84rem; }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .7rem; margin-top: .65rem; font-size: .875rem; }
.legend-label { font-weight: 650; }
.heat-scale { width: 110px; height: 12px; border-radius: 3px; background: linear-gradient(to right,#f0fcb1,#9ec55b,#358842,#085335); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 700px) {
  .map-stage { border-radius: 12px; }
  svg { height: min(550px, max(340px, calc(100dvh - 190px))); }
}
@media (max-width: 390px) {
  .zoom-controls { right: 8px; top: 8px; }
  button { min-width: 38px; }
}
