:root {
  --bg: #08090b;
  --surface: #12141a;
  --surface-2: #181b22;
  --fg: #eceef2;
  --muted: #8b909a;
  --faint: #6a6f79;
  --accent: #c5cdd8;
  --accent-fg: #08090b;
  --danger: #c45b5b;
  --warn: #d4a017;
  --font-sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --glass: rgb(8 9 11 / 0.72);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; color-scheme: dark; }
html[data-kind="clear"][data-tod="day"] { --accent: #e4c98a; }
html[data-kind="clear"][data-tod="dawn"],
html[data-kind="clear"][data-tod="dusk"] { --accent: #e7b089; }
html[data-kind="clear"][data-tod="night"] { --accent: #c9d4ea; }
html[data-kind="cloud"] { --accent: #c5cdd8; }
html[data-kind="rain"] { --accent: #a9c7e4; }
html[data-kind="storm"] { --accent: #e3b0b6; }
html[data-kind="snow"] { --accent: #d5e6f2; }
html[data-kind="fog"] { --accent: #c9cac4; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
}
button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }
button, [role="button"], .chip { touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; }
input { font: inherit; }
:focus-visible { outline: 2px solid rgb(197 205 216 / 0.55); outline-offset: 2px; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  padding: 0.5rem 0.8rem;
  background: var(--surface);
  border-radius: 8px;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(76rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  pointer-events: none;
  transition: background 800ms var(--ease);
}
.sky::before,
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sky::after {
  transition: background 800ms var(--ease);
  background: linear-gradient(180deg, color-mix(in oklab, var(--fg) 5%, transparent), transparent 42%);
}
.sky[data-kind="clear"][data-tod="day"]::after {
  background:
    radial-gradient(110% 72% at 78% -18%, rgb(228 201 138 / 0.24), transparent 46%),
    linear-gradient(180deg, rgb(62 104 168 / 0.32), transparent 58%);
}
.sky[data-kind="clear"][data-tod="dawn"]::after,
.sky[data-kind="clear"][data-tod="dusk"]::after {
  background:
    radial-gradient(90% 58% at 50% -12%, rgb(231 150 96 / 0.28), transparent 48%),
    linear-gradient(180deg, rgb(92 58 72 / 0.34), transparent 58%);
}
.sky[data-kind="clear"][data-tod="night"]::after {
  background:
    radial-gradient(80% 48% at 80% -8%, rgb(90 116 186 / 0.28), transparent 50%),
    linear-gradient(180deg, rgb(16 24 48 / 0.72), transparent 62%);
}
.sky[data-kind="cloud"]::after {
  background: linear-gradient(180deg, rgb(96 106 122 / 0.28), transparent 56%);
}
.sky[data-kind="rain"]::after {
  background:
    radial-gradient(80% 50% at 20% -10%, rgb(70 110 160 / 0.28), transparent 48%),
    linear-gradient(180deg, rgb(28 44 68 / 0.55), transparent 60%);
}
.sky[data-kind="storm"]::after {
  background:
    radial-gradient(80% 50% at 18% -8%, rgb(140 60 78 / 0.28), transparent 46%),
    linear-gradient(180deg, rgb(42 28 40 / 0.62), transparent 60%);
}
.sky[data-kind="snow"]::after {
  background: linear-gradient(180deg, rgb(150 178 206 / 0.22), transparent 56%);
}
.sky[data-kind="fog"]::after {
  background: linear-gradient(180deg, rgb(150 150 156 / 0.24), transparent 52%);
}
.sky[data-kind="clear"][data-tod="night"]::before,
.sky[data-kind="cloud"][data-tod="night"]::before {
  background-image:
    radial-gradient(1px 1px at 8% 18%, rgb(255 255 255 / 0.75) 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 22% 8%, rgb(255 255 255 / 0.55) 50%, transparent 52%),
    radial-gradient(1px 1px at 41% 24%, rgb(255 255 255 / 0.4) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 63% 12%, rgb(255 255 255 / 0.65) 50%, transparent 52%),
    radial-gradient(1px 1px at 78% 28%, rgb(255 255 255 / 0.35) 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 91% 10%, rgb(255 255 255 / 0.5) 50%, transparent 52%),
    radial-gradient(1px 1px at 15% 42%, rgb(255 255 255 / 0.28) 50%, transparent 52%),
    radial-gradient(1px 1px at 54% 36%, rgb(255 255 255 / 0.32) 50%, transparent 52%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 62%);
}
.sky[data-kind="rain"]::before,
.sky[data-kind="storm"]::before {
  background-image: repeating-linear-gradient(
    108deg,
    transparent 0 16px,
    rgb(186 214 236 / 0.28) 16px 17px
  );
  animation: rain-fall 0.85s linear infinite;
  mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
}
.sky[data-kind="snow"]::before {
  background-image: radial-gradient(circle, rgb(255 255 255 / 0.75) 1px, transparent 1.6px);
  background-size: 34px 34px;
  animation: snow-fall 12s linear infinite;
  opacity: 0.45;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
@keyframes rain-fall {
  from { background-position: 0 -40px; }
  to { background-position: -28px 80px; }
}
@keyframes snow-fall {
  from { background-position: 0 -40px; }
  to { background-position: 12px 180px; }
}

.brand-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.brand-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  margin: 0.15rem 0 0;
}
.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  align-items: center;
}

.dock { display: flex; flex: 1 1 22rem; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.search-box { position: relative; flex: 1; min-width: 12rem; }
.search-box input {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 0.9rem 0 2.4rem;
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow);
  outline: none;
}
.search-box input:focus { box-shadow: 0 0 0 2px rgb(197 205 216 / 0.4); }
.search-box svg {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--faint);
  pointer-events: none;
}
.hits {
  position: absolute;
  z-index: 20;
  left: 0; right: 0;
  margin-top: 0.4rem;
  background: var(--surface-2);
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.14);
  overflow: hidden;
}
.hits button {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.85rem;
}
.hits button:hover, .hits button:focus-visible, .hits button.on { background: rgb(236 238 242 / 0.06); }
.hits small { color: var(--muted); font-size: 12px; }

.icon-btn, .chip, .seg button {
  height: 44px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.8rem;
}
.icon-btn { width: 44px; padding: 0; }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.busy { opacity: 0.55; }
.seg {
  display: flex;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.seg.seg-wrap { flex-wrap: wrap; max-width: 100%; }
.seg button {
  height: 36px;
  box-shadow: none;
  padding: 0 0.75rem;
  font-size: 12px;
  font-weight: 500;
}
.seg button.on, .chip.on { background: var(--surface-2); color: var(--fg); }
.chip {
  height: 36px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.saved { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.panel {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem;
}
.kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.row-split { display: flex; justify-content: space-between; align-items: baseline; }

.place {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0.35rem 0 0;
  overflow-wrap: anywhere;
}
.detail { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.95rem; }
.temp {
  font-family: var(--font-display);
  font-size: clamp(4.6rem, 12vw, 6.4rem);
  line-height: 0.85;
  letter-spacing: -0.045em;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.mono { font-family: var(--font-mono); font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.pollutants { margin: 0.55rem 0 0; }

.stat { font-family: var(--font-display); font-size: 1.85rem; margin: 0.5rem 0 0; font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 99px; background: rgb(236 238 242 / 0.08); margin-top: 0.85rem; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.meter.uv-low > span { background: #3d9a6a; }
.meter.uv-mod > span { background: #c4b000; }
.meter.uv-high > span { background: #e08a2a; }
.meter.uv-vhigh > span, .meter.uv-ext > span { background: #c45b5b; }
.meter.aqi-good > span { background: #3d9a6a; }
.meter.aqi-mod > span { background: #c4b000; }
.meter.aqi-usg > span { background: #e08a2a; }
.meter.aqi-unh > span, .meter.aqi-vunh > span, .meter.aqi-haz > span { background: #c45b5b; }
.meter.precip > span { background: #5b9fd6; }

.radar-park {
  position: fixed;
  left: -120vw;
  top: 0;
  width: 640px;
  height: 420px;
  opacity: 0;
  pointer-events: none;
}
.radar {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.radar-root {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  background: var(--surface);
}
.radar-map {
  flex: 1;
  min-height: 380px;
  height: 54vh;
  max-height: 640px;
  background: var(--surface-2);
}
@media (max-width: 700px) {
  .radar-map { height: 48vh; min-height: 300px; max-height: 460px; }
}
.radar-head, .radar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  flex-wrap: wrap;
}
.radar-head {
  flex-direction: column;
  align-items: stretch;
}
.radar-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.radar-head-top > div:first-child { min-width: 0; }
.radar-head-actions { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; flex: 0 0 auto; }
#radar-layers { width: max-content; max-width: 100%; }
body.studio #radar-layers {
  background: var(--glass);
  backdrop-filter: blur(16px);
}
.radar-foot { align-items: center; }
.radar input[type="range"] { flex: 1; min-width: 7rem; accent-color: var(--accent); }
.opacity-lab, .snow-lab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 12px;
}
.opacity-lab input { width: 5rem; flex: none; }
.legend {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  width: 100%;
}
.legend-stop {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
}
.legend-stop i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: block;
}
.leaflet-container { background: var(--surface-2); font-family: var(--font-sans); }
.leaflet-control-attribution { background: transparent !important; color: var(--faint) !important; font-size: 10px !important; }
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--fg) !important;
  border: none !important;
}
.leaflet-gl-layer, .leaflet-gl-layer canvas { pointer-events: none; }
.leaflet-gl-layer { max-width: none; }
.radar-overlay { transition: opacity 180ms var(--ease); }

.studio-hud {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem 0;
  flex-wrap: wrap;
}
.studio-meta { min-width: 0; flex: 1; }
.studio-hud .icon-btn { flex: 0 0 auto; }
.studio-place {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0;
  overflow-wrap: anywhere;
}
.studio-temp {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.icon-btn.glass { background: var(--glass); }

body.studio { overflow: hidden; }
body.studio .wrap, body.studio .sky { visibility: hidden; }
body.studio .radar-root {
  position: fixed;
  inset: 0;
  z-index: 50;
  min-height: 100dvh;
  height: 100dvh;
  border-radius: 0;
  background: var(--bg);
}
body.studio .radar-map {
  max-height: none;
  height: auto;
  min-height: 0;
}
body.studio .studio-hud { display: flex; }
body.studio .radar-head,
body.studio .radar-foot {
  background: var(--glass);
  backdrop-filter: blur(16px);
}

.hours { display: flex; gap: 0.15rem; overflow-x: auto; padding-bottom: 0.25rem; }
.hour { width: 3.5rem; flex: 0 0 auto; text-align: center; display: flex; flex-direction: column; gap: 0.35rem; align-items: center; }
.hour b { font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.wx-icon { color: var(--accent); flex: 0 0 auto; }

.day { display: flex; align-items: center; gap: 0.55rem; padding: 0.6rem 0; border-top: 1px solid rgb(236 238 242 / 0.08); }
.days .day:first-of-type { border-top: 1px solid rgb(236 238 242 / 0.08); }
.day-name { width: 4.75rem; flex: 0 0 auto; font-size: 0.9rem; }
.day .pop { width: 2.2rem; }
.day .amt { width: 3.4rem; color: var(--faint); }
.day .lo, .day .hi { width: 2.4rem; text-align: right; }
.day .hi { text-align: left; }
.day .windy { width: 1.8rem; text-align: right; }
.bar { flex: 1; min-width: 0; height: 6px; border-radius: 99px; background: rgb(236 238 242 / 0.08); position: relative; }
.bar > span { position: absolute; inset: 0 auto 0 auto; background: color-mix(in oklab, var(--accent) 80%, transparent); border-radius: 99px; }

.alert {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem;
}
.alert strong { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.tone-severe strong { color: var(--danger); }
.tone-moderate strong { color: var(--warn); }
.tone-minor strong { color: var(--accent); }
.alert-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  text-align: left;
  padding: 0;
  box-shadow: none;
  background: none;
  height: auto;
  min-height: 44px;
  border-radius: 0;
}
.alert-head > span:first-child { min-width: 0; }
.alert-line { margin: 0.35rem 0 0; }
.alert-body {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.chart-wrap { position: relative; }
.chart { width: 100%; height: 180px; display: block; }
.chart-tip {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  background: var(--surface-2);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
}

.sun-path { width: 100%; height: 110px; margin-top: 0.4rem; }
.sun-times { display: flex; justify-content: space-between; margin: 0.2rem 0 0; color: var(--muted); font-size: 0.9rem; }
.moon-disc { width: 72px; height: 72px; flex: 0 0 auto; }
.moon-name { font-size: 1.35rem; margin: 0; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem;
  color: var(--faint);
  font-size: 12px;
  padding-top: 1rem;
}
.error { padding: 2rem 1.25rem; }
.error .chip { margin-top: 1rem; }
.spin { animation: pulse 1.2s ease-in-out infinite; background: rgb(236 238 242 / 0.06); border-radius: 16px; }
@keyframes pulse { 50% { opacity: 0.55; } }
.hero-open { padding: 0.2rem 0 0.4rem; }
.locate-note { margin: 0 0 0.85rem; }
.hero-meta { margin: 0.45rem 0 0; }
.hero-split { display: grid; gap: 1.25rem; margin-top: 1.35rem; align-items: end; }
.hero-open .place,
.hero-open #wx-headline {
  text-shadow: 0 1px 18px rgb(8 9 11 / 0.72);
}
#wx-headline {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.9rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0;
  max-width: 18ch;
  overflow-wrap: anywhere;
}
.support {
  max-width: 38rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}
.practical {
  max-width: 36rem;
  margin: 0.9rem 0 0;
  padding-left: 0.85rem;
  border-left: 2px solid var(--accent);
  font-size: 1.02rem;
}
.hero-now { display: grid; justify-items: start; gap: 0.7rem; }
.now-meta { display: flex; align-items: center; gap: 0.7rem; }
.now-meta p { margin: 0; }
.now-meta .muted { color: var(--muted); font-size: 0.9rem; }
.hour-note { color: var(--accent); margin-top: 0.15rem; }
@media (min-width: 900px) {
  .hero-split { grid-template-columns: minmax(0, 1fr) auto; gap: 2.5rem; }
  .hero-now { justify-items: end; text-align: right; }
  .now-meta { flex-direction: row-reverse; }
}
.arc-caption { margin: 0.7rem 0 0; color: var(--muted); font-size: 1.02rem; max-width: 40rem; }
.arc-stage { position: relative; margin-top: 0.85rem; border-radius: 12px; outline: none; touch-action: pan-y; }
.arc-stage:focus-visible { outline: 2px solid rgb(197 205 216 / 0.55); outline-offset: 3px; }
.arc-svg { width: 100%; height: auto; display: block; border-radius: 12px; }
.arc-tip {
  position: absolute;
  top: 0.45rem;
  transform: translateX(-50%);
  background: rgb(8 9 11 / 0.88);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}
.grid-read { display: grid; gap: 0.75rem; }
@media (min-width: 900px) {
  .grid-read { grid-template-columns: 18rem minmax(0, 1fr); align-items: start; }
}
.wind-panel svg { color: var(--accent); }
.wind-gust, .wind-gloss { text-align: center; }
.wind-gloss { margin: 0.2rem 0 0; }
.readings { margin: 0.35rem 0 0; }
.readings > div {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr);
  gap: 0.75rem 1rem;
  padding: 0.8rem 0;
  border-top: 1px solid rgb(236 238 242 / 0.08);
}
.readings dt {
  margin: 0.45rem 0 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.readings dd { margin: 0; }
.readings .stat { margin: 0; font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.15; }
.readings .detail { margin-top: 0.15rem; }
.gloss { margin: 0.2rem 0 0; color: var(--fg); font-size: 0.95rem; }
.week-story {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
  max-width: 34rem;
  margin: 0.7rem 0 0.35rem;
}
.moon-band {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(236 238 242 / 0.08);
}
.wind-wrap { position: relative; max-width: 220px; margin: 0.75rem auto 0; }
.wind-wrap .center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-top: 1.2rem; pointer-events: none;
}
.star.on { color: var(--accent); }

.wrap > * { min-width: 0; }
.panel, .radar, .hero-open, .footer { min-width: 0; max-width: 100%; }

@media (max-width: 700px) {
  .day {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto auto;
    grid-template-areas:
      "name icon pop lo hi"
      "bar bar bar bar bar";
    align-items: center;
    column-gap: 0.45rem;
    row-gap: 0.4rem;
  }
  .day-name { grid-area: name; width: auto; }
  .day .wx-icon { grid-area: icon; }
  .day .pop { grid-area: pop; width: auto; }
  .day .lo { grid-area: lo; width: auto; text-align: right; }
  .day .hi { grid-area: hi; width: auto; text-align: right; }
  .day .bar { grid-area: bar; height: 8px; }
  .day .amt, .day .windy { display: none; }

  .readings > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }
  .readings dt { margin-top: 0; }

  .seg button, .chip { min-height: 44px; height: 44px; padding: 0 0.85rem; }
  .hits button { min-height: 44px; }
  .snow-lab { min-height: 44px; }
  .snow-lab input { width: 1.25rem; height: 1.25rem; }

  .radar-foot {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.35rem 0.55rem;
  }
  .radar-foot .legend,
  .radar-foot .opacity-lab,
  .radar-foot .snow-lab,
  .radar-foot > .seg {
    grid-column: 1 / -1;
  }
  .radar-foot > .seg { width: max-content; max-width: 100%; }
  .opacity-lab { width: 100%; }
  .opacity-lab input { flex: 1; width: auto; min-width: 0; }
  .radar input[type="range"] { height: 44px; }
  .legend-stop { font-size: 11px; }

  .footer { font-size: 13px; }
  .arc-tip {
    white-space: normal;
    max-width: calc(100% - 8px);
    text-align: center;
  }
}

@media (max-width: 560px) {
  .wrap { width: min(76rem, calc(100% - 1.25rem)); }
  .panel { padding: 1rem 0.9rem; }
  .dock {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
  }
  .search-box { grid-column: 1 / -1; min-width: 0; }
  .dock .seg { justify-self: end; }
}

@media (max-width: 800px), (pointer: coarse) {
  .seg button, .chip { min-height: 44px; height: 44px; }
  .hits button { min-height: 44px; }
  .leaflet-control-zoom a {
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
    font-size: 22px !important;
  }
  .leaflet-popup-close-button {
    width: 32px !important;
    height: 32px !important;
    font-size: 20px !important;
    padding: 0 !important;
  }
  .leaflet-control-attribution {
    max-width: 62%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-height: 520px) {
  .radar-map { min-height: 200px; height: 52vh; }
  body.studio .studio-hud { padding-top: 0.35rem; }
  body.studio .radar-head,
  body.studio .radar-foot { padding-top: 0.4rem; padding-bottom: 0.4rem; }
  body.studio .radar-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  body.studio .legend { display: none; }
  body.studio .studio-place { font-size: 1.05rem; }
}

body.studio .studio-hud,
body.studio .radar-head,
body.studio .radar-foot {
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}
body.studio .radar-foot {
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}
body.studio .leaflet-right { margin-right: env(safe-area-inset-right); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .radar-overlay { transition: none; }
}
