html,
body {
  height: 100%;
  margin: 0;
}

body {
  color: #18202a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #dfe6e2;
}

.shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  background: #c7d0ca;
}

.leaflet-tile-pane {
  filter: grayscale(1) invert(1) contrast(0.92) brightness(0.9);
}

.weather-grid-canvas {
  pointer-events: none;
}

.panel {
  position: absolute;
  z-index: 1200;
  top: 16px;
  left: 16px;
  width: min(340px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid rgba(24, 32, 42, 0.2);
  border-radius: 8px;
  background: rgba(250, 252, 249, 0.94);
  box-shadow: 0 16px 36px rgba(22, 32, 38, 0.22);
  pointer-events: auto;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0;
}

button,
select,
input {
  font: inherit;
}

button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #245269;
  border-radius: 7px;
  color: #ffffff;
  background: #245269;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

label {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  color: #334252;
  font-size: 12px;
  font-weight: 700;
}

select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #b9c3c0;
  border-radius: 7px;
  color: #18202a;
  background: #ffffff;
}

.layer-help {
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #d1d9d5;
  border-radius: 7px;
  color: #334252;
  background: #ffffff;
  font-size: 12px;
  line-height: 1.35;
}

.layer-help strong {
  display: block;
  margin-bottom: 3px;
  color: #18202a;
  font-size: 13px;
}

input[type="range"] {
  width: 100%;
}

.meta,
.status,
.readout {
  color: #415263;
  font-size: 12px;
  line-height: 1.35;
}

.time-control {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #d1d9d5;
  border-radius: 7px;
  background: #ffffff;
}

.time-label {
  min-height: 36px;
  color: #18202a;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
}

.time-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.time-buttons button {
  min-width: 0;
}

.time-scale {
  display: flex;
  justify-content: space-between;
  color: #667583;
  font-size: 11px;
  font-weight: 700;
}

.readout {
  min-height: 52px;
  margin-top: 12px;
  padding: 9px;
  border: 1px solid #d1d9d5;
  border-radius: 7px;
  background: #ffffff;
}

.status {
  margin-top: 10px;
  color: #6e3b2f;
}

.legend {
  height: 12px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #274260, #2c8c99, #82bd72, #f1d36b, #c65d45);
}

@media (max-width: 640px) {
  .panel {
    top: 10px;
    left: 10px;
    width: calc(100vw - 20px);
    padding: 12px;
  }
}
