:root {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #17211d;
  background: #d9e1dc;
}

* { box-sizing: border-box; }

html, body, main, #map {
  width: 100%;
  height: 100%;
  margin: 0;
}

body { overflow: hidden; }
button { color: inherit; font: inherit; }

.panel {
  position: absolute;
  z-index: 1000;
  top: 1rem;
  left: 1rem;
  display: grid;
  width: min(22rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  gap: 1rem;
  padding: 1rem;
  overflow: auto;
  background: rgb(250 251 247 / 96%);
  border: 1px solid #dce2dc;
  border-radius: 1rem;
  box-shadow: 0 1.2rem 2.8rem rgb(24 38 31 / 16%);
  backdrop-filter: blur(0.55rem);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.label {
  margin: 0;
  color: #637269;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 2.35rem;
  line-height: 1;
  letter-spacing: -0.055em;
}

.start-card {
  display: grid;
  gap: 0.8rem;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid #dfe5de;
  border-radius: 0.8rem;
}

#start-coordinates {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.92rem;
  font-weight: 680;
}

.legend { display: grid; gap: 0.55rem; }

h2 {
  margin: 0;
  font-size: 0.77rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-heading span {
  color: #65736b;
  font-size: 0.72rem;
}

.legend-gradient {
  height: 0.9rem;
  background: linear-gradient(90deg, #440154 0% 16.667%, #414487 16.667% 33.333%, #2a788e 33.333% 50%, #22a884 50% 66.667%, #5ec962 66.667% 83.333%, #aadc32 83.333% 100%);
  border: 1px solid rgb(23 33 29 / 18%);
  border-radius: 999px;
}

.legend-ticks {
  display: flex;
  justify-content: space-between;
  color: #56645c;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.field-readout {
  display: grid;
  gap: 0.3rem;
  padding: 0.75rem 0.85rem;
  background: #eaf2ed;
  border-radius: 0.75rem;
}

.field-readout output { font-size: 0.88rem; font-weight: 680; }

.map-hint {
  position: absolute;
  z-index: 800;
  margin: 0;
  background: rgb(255 255 255 / 92%);
  border: 1px solid rgb(35 49 42 / 12%);
  box-shadow: 0 0.25rem 1rem rgb(30 48 39 / 12%);
  pointer-events: none;
}

.map-hint {
  bottom: 1.25rem;
  left: 50%;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 680;
}

.leaflet-container { font-family: inherit; cursor: crosshair; }
.greyscale-tiles { filter: grayscale(1); }
.heat-overlay { mix-blend-mode: multiply; }

@media (max-width: 470px) {
  .panel { top: 0.5rem; left: 0.5rem; width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); }
  .field-readout { display: none; }
  h1 { font-size: 2rem; }
}
