:root {
  color-scheme: only light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17313b;
  background: #c5e5ef;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { margin: 0; touch-action: pan-y; }
#map, #particles { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; }
#particles { pointer-events: none; }
.page {
  position: relative;
  width: min(980px, calc(100% - 48px));
  max-height: calc(100dvh - 80px);
  margin: 24px auto 0;
  overflow: auto;
  pointer-events: none;
  scrollbar-width: thin;
  touch-action: pan-y;
}
.heading, .card {
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(23, 49, 59, .16);
  border-radius: 6px;
  pointer-events: auto;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  margin-bottom: 10px;
}
h1 { font-size: 22px; margin: 0; letter-spacing: 0; }
p { margin: 4px 0 0; font-size: 13px; color: #617984; }
.updated { font-size: 12px; color: #617984; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 10px; }
.card { align-self: start; height: fit-content; padding: 0 16px; min-width: 0; }
.card-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.card-toggle strong { flex: 1; font-size: 15px; }
.card-toggle i {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin: -4px 2px 0 2px;
}
.card-toggle[aria-expanded="true"] i { transform: rotate(225deg); margin-top: 4px; }
.card-toggle:focus-visible { outline: 2px solid #168b83; outline-offset: 3px; }
.card-body[hidden] { display: none; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 4px; background: #dff3e8; color: #17603b; }
.badge.error { background: #fee2e2; color: #991b1b; }
.badge.downloading, .badge.checking { background: #fff2cc; color: #7a4b00; }
.badge.waiting, .badge.idle { background: #e8ecee; color: #536b75; }
.card-body { padding-bottom: 14px; }
.model-table-wrap { overflow-x: auto; scrollbar-width: thin; }
.model-table { display: grid; grid-template-columns: 175px repeat(var(--model-count), minmax(185px, 1fr)); min-width: 760px; border-top: 1px solid #d8e1e4; border-left: 1px solid #e2e8ea; }
.model-cell { min-width: 0; padding: 8px 10px; border-right: 1px solid #e2e8ea; border-bottom: 1px solid #e2e8ea; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.model-label { color: #617984; font-weight: 500; background: rgba(241, 246, 247, .78); }
.model-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 45px; color: #17313b; background: rgba(247, 250, 250, .9); }
.model-heading strong { font-size: 13px; }
.model-progress-label, .model-progress-cell { min-height: 54px; }
.model-progress-cell { padding-top: 7px; }
.model-progress-cell small { display: block; margin-top: 4px; color: #617984; font-size: 10px; }
.progress { height: 4px; background: #e2e8ea; margin: 6px 0 0; }
.progress i { display: block; height: 100%; background: #168b83; }
.forecast-progress { display: flex; gap: 1px; height: 7px; overflow: hidden; }
.forecast-dot { flex: 1; min-width: 1px; max-width: 5px; height: 5px; border-radius: 50%; background: #cbd5d9; }
.forecast-dot.ready { background: #168b83; }
.forecast-dot.active { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, .22); }
.wind-status { position: fixed; right: 12px; bottom: 34px; max-width: calc(100% - 24px); padding: 6px 10px; background: rgba(255, 255, 255, .96); border-radius: 4px; font-size: 12px; color: #17313b; pointer-events: none; }
.wind-status.error { color: #991b1b; }
.maplibregl-ctrl-attrib { font-size: 10px; }
@media (max-width: 700px) {
  .page { width: calc(100% - 24px); margin-top: 12px; }
  .heading { display: block; padding: 12px 14px; }
  h1 { font-size: 20px; }
  .heading .updated { margin-top: 7px; }
  .grid { gap: 7px; }
  .card { padding: 0 14px; }
  .card-toggle { min-height: 47px; }
  .model-table { grid-template-columns: 135px repeat(var(--model-count), 170px); min-width: max-content; }
  .model-cell { padding: 7px 8px; }
}
