:root {
  --navy: rgba(14, 32, 78, 0.92);
  --navy-soft: rgba(16, 38, 92, 0.88);
  --gold: #ecc41c;
  --yellow: #ffe040;
  --white: #fff;
  --muted: #c8d2e4;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #081018; font-family: Arial, Helvetica, sans-serif; color: var(--white); -webkit-text-size-adjust: 100%; }
#splash {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 10, 22, 0.72);
  backdrop-filter: blur(6px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}
body.splashed #splash { pointer-events: auto; }
body:not(.splashed) #splash {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-card { text-align: center; }
.splash-logo {
  width: min(180px, 28vw); height: auto;
  margin: 0 auto 18px;
  filter: drop-shadow(0 2px 0 #000);
}
.splash-kicker { letter-spacing: 0.22em; font-weight: 800; color: var(--gold); margin-bottom: 12px; }
.splash-title {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic; font-size: clamp(42px, 7vw, 88px);
  color: var(--yellow); text-shadow: 3px 3px 0 #000;
  margin-bottom: 28px;
}
#enter {
  cursor: pointer; border: 3px solid var(--gold);
  background: rgba(14, 32, 78, 0.9); color: var(--yellow);
  font: 800 22px Arial, sans-serif; letter-spacing: 0.12em;
  padding: 16px 36px; text-transform: uppercase;
}
#enter:hover { background: var(--gold); color: #081018; }
.splash-note { margin-top: 16px; color: var(--muted); font-size: 14px; }
.bg-tape {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  object-fit: cover;
  object-position: center center;
  filter: contrast(1.1) saturate(0.9) sepia(0.1) brightness(1.02);
  opacity: 0;
  transition: opacity 2s ease;
  z-index: 0;
  pointer-events: none;
}
.bg-tape.on { opacity: 1; }
html.broadcast,
html.broadcast body,
body.broadcast {
  background: transparent !important;
  background-color: rgba(0, 0, 0, 0) !important;
  cursor: none !important;
}
html.broadcast #bg,
html.broadcast #grain,
html.broadcast #vignette,
html.broadcast #splash,
html.broadcast #radio,
html.broadcast #clock,
html.broadcast #nowplaying,
body.broadcast #bg,
body.broadcast #grain,
body.broadcast #vignette,
body.broadcast #splash,
body.broadcast #radio,
body.broadcast #clock,
body.broadcast #nowplaying {
  display: none !important;
}
/* Slight lake-through on TV cards. Keep blend normal so CEF does not punch holes. */
html.broadcast .card,
html.broadcast .card.open,
html.broadcast .sheet-graph,
html.broadcast .sheet-card {
  background: rgba(14, 32, 78, 0.88) !important;
  backdrop-filter: none !important;
  mix-blend-mode: normal !important;
}
html.broadcast .hour,
html.broadcast .obs-cell,
html.broadcast .day {
  background: rgba(10, 26, 64, 0.82) !important;
}
html.broadcast .thanks {
  background: rgba(10, 22, 54, 0.86) !important;
  backdrop-filter: none !important;
}
html.broadcast .map-meta {
  background: rgba(8, 18, 48, 0.86) !important;
}
html.broadcast #news-ticker,
html.broadcast #news-ticker.mode-tape,
html.broadcast #news-ticker.mode-stocks,
html.broadcast #news-ticker.mode-news {
  background: linear-gradient(rgba(12, 24, 48, 0.92), rgba(18, 36, 72, 0.92)) !important;
}
html.broadcast .news-kicker { background: rgba(12, 24, 56, 0.94) !important; }
html.broadcast * { mix-blend-mode: normal !important; }
/* Native 1080p capture: sizes ≈ 10% smaller than the old 1528→1920 stretch. */
html.broadcast .wordmark { font-size: 47px; }
html.broadcast .place { font-size: 23px; }
html.broadcast .ident { padding: 20px 40px 16px; }
html.broadcast .ident-logo { height: 72px; }
html.broadcast .kicker { font-size: 16px; }
html.broadcast .city { font-size: 63px; }
html.broadcast .city.section-title { font-size: 40px; }
html.broadcast .temp { font-size: 133px; }
html.broadcast .blurb { font-size: 23px; }
html.broadcast .deg { font-size: 60px; }
html.broadcast .cond { font-size: 51px; }
html.broadcast .meta { font-size: 32px; }
html.broadcast .card { padding: 32px 40px; }
html.broadcast .hourly.compact .hour {
  min-height: 47px;
  grid-template-columns: 120px 99px 1fr 90px;
}
html.broadcast .hourly.compact .h { font-size: 21px; }
html.broadcast .hourly.compact .t { font-size: 27px; }
html.broadcast .hourly.compact .c { font-size: 21px; }
html.broadcast .hour .h { font-size: 36px; }
html.broadcast .hour .t { font-size: 50px; }
html.broadcast .hour .c { font-size: 34px; }
html.broadcast .hour .p { font-size: 32px; }
html.broadcast .news-kicker { font-size: 19px; }
html.broadcast #news-text { font-size: 21px; }
html.broadcast .map-meta { font-size: 18px; }
html.broadcast .map-labels .map-town { font-size: 16px; }
html.broadcast .map-labels .map-city { font-size: 18px; }
html.broadcast .map-labels .map-temp { font-size: 22px; }
html.broadcast .map-labels .map-scale { font-size: 14px; }
html.broadcast .thanks { font-size: 21px; padding: 14px 40px; }
html.broadcast #news-ticker { height: 36px; }
#grain, #vignette { position: fixed; inset: 0; pointer-events: none; z-index: 8; }
#grain {
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
  animation: grain 0.35s steps(2) infinite;
  mix-blend-mode: overlay;
}
#vignette {
  background: radial-gradient(ellipse at center, transparent 45%, rgba(20,10,0,0.45) 100%);
}
@keyframes grain { 0% { transform: translate(0,0); } 100% { transform: translate(-2%, 1%); } }

.ident {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 36px 14px;
  background: linear-gradient(#d4a01e, #c48a12);
  border-bottom: 4px solid var(--gold);
}
.wordmark-row { display: flex; align-items: center; gap: 14px; }
.ident-logo { height: 52px; width: auto; filter: drop-shadow(0 1px 0 #000); }
.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic; font-weight: 800; font-size: 34px;
  color: var(--yellow); text-shadow: 2px 2px 0 #000;
  letter-spacing: 1px;
}
.place { font-weight: 700; letter-spacing: 0.12em; font-size: 16px; }

#wx-ticker {
  position: fixed; left: 0; right: 0; top: 86px; z-index: 7;
  display: none;
  height: 36px;
  background: linear-gradient(#b42218, #8c140e);
  border-bottom: 3px solid #ffcc33;
  overflow: hidden;
  align-items: center;
}
body.has-alerts #wx-ticker { display: flex; }
body.has-alerts #stage { top: 146px; }
/* TV overlay: ident is taller (72px logo). Keep cards fully below it. */
html.broadcast #stage { inset: 140px 25px 127px; }
html.broadcast #wx-ticker { top: 116px; }
html.broadcast body.has-alerts #wx-ticker,
html.broadcast.has-alerts #wx-ticker { top: 116px; display: flex; }
html.broadcast body.has-alerts #stage,
html.broadcast.has-alerts #stage { top: 172px; }
.ticker-kicker {
  flex: 0 0 auto;
  padding: 0 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #ffe040;
  background: #6a0c08;
  height: 100%;
  display: flex; align-items: center;
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
#ticker-text {
  display: inline-flex;
  align-items: center;
  padding-left: 0;
  animation: none !important;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
  will-change: transform;
}
.mq-copy {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  padding-right: 3.5em;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

#nowplaying {
  position: fixed; left: 0; right: 0; bottom: 78px; z-index: 6;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #E8DDC8;
  text-shadow: 0 1px 0 #000, 0 0 10px #000;
  padding: 10px 24px;
  pointer-events: none;
}
#news-ticker,
#news-ticker.mode-tape,
#news-ticker.mode-stocks,
#news-ticker.mode-news {
  position: fixed; left: 0; right: 0; bottom: 46px; z-index: 6;
  height: 32px;
  display: flex; align-items: center;
  background: linear-gradient(#0c1830, #122448);
  border-top: 2px solid var(--gold);
  overflow: hidden;
}
.news-kicker {
  flex: 0 0 auto;
  height: 100%;
  display: flex; align-items: center;
  padding: 0 14px;
  background: #0c1838;
  color: var(--yellow);
  border-right: 2px solid var(--gold);
  font-weight: 900;
  letter-spacing: 0.16em;
  font-size: 13px;
}
.news-track { flex: 1; overflow: hidden; white-space: nowrap; }
#news-text {
  display: inline-flex;
  align-items: center;
  padding-left: 0;
  animation: none !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #d8f0d8;
  text-shadow: 1px 1px 0 #000;
  will-change: transform;
  white-space: nowrap;
}
.tick-item {
  display: inline-block;
  margin-right: 5.5em;
  white-space: nowrap;
}
.tick-item.up { color: #3ee07a; }
.tick-item.down { color: #ff5c4d; }
.tick-item.flat { color: #e8e0c8; }
.tick-item.news { color: #ffe9c8; }
.thanks {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 36px;
  background: rgba(10, 22, 54, 0.72);
  font-size: 15px; color: var(--muted);
}
#clock { color: var(--yellow); font-weight: 700; }
.audio-credit, .camp-credit {
  color: var(--yellow); font-weight: 800; text-decoration: none;
  letter-spacing: 0.04em;
}
.audio-credit:hover, .camp-credit:hover { text-decoration: underline; }

#stage {
  position: fixed; inset: 110px 40px 128px; z-index: 4;
}
.modal {
  position: absolute; inset: 0;
  display: flex; gap: 28px; align-items: stretch;
  width: min(1680px, 100%); height: 100%;
  margin: 0 auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}
.modal.on {
  opacity: 1;
  pointer-events: auto;
}
.modal.out {
  opacity: 0;
  pointer-events: none;
  /* Keep the same box as .on — no transform, or it looks like a resize. */
  transform: none;
}

.card {
  background: var(--navy);
  border: 3px solid var(--gold);
  border-radius: 16px;
  box-shadow: 8px 12px 0 rgba(0,0,0,0.35);
  padding: 28px 36px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.crawl-clip {
  flex: 1 1 0;
  min-height: 0;
  margin-top: 12px;
  overflow: hidden;
}
.crawl-clip.has-crawl {
  min-height: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#0000, #000 14px, #000 calc(100% - 14px), #0000);
  mask-image: linear-gradient(#0000, #000 14px, #000 calc(100% - 14px), #0000);
}
.crawl-inner {
  will-change: transform;
}
.crawl-inner .hourly { margin-top: 0; }
.crawl-inner .hourly.compact { margin-top: 0; }
.card::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: 14px;
  height: 5px; background: var(--gold); border-radius: 2px;
}
.card.main { flex: 1.35; min-width: 0; }
.card.side { flex: 0.85; min-width: 380px; }
.kicker { color: var(--gold); font-size: 14px; font-weight: 800; letter-spacing: 0.16em; margin-top: 8px; }
.city { font-size: 56px; font-weight: 900; letter-spacing: 0.02em; text-shadow: 2px 2px 0 #000; }
.st { color: var(--muted); font-weight: 700; margin-top: 4px; }
.row { display: flex; align-items: flex-start; gap: 24px; margin-top: 12px; }
.temp { font-size: 118px; line-height: 0.85; color: var(--yellow); font-weight: 900; text-shadow: 4px 4px 0 #000; }
.blurb {
  margin-top: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 20px;
  line-height: 1.4;
  color: #E8DDC8;
  max-width: 34em;
}
.hourly.compact { margin-top: 14px; gap: 4px; }
.hourly.compact .hour {
  min-height: 34px;
  padding: 4px 12px;
  grid-template-columns: 88px 72px 1fr 64px;
}
.hourly.compact .h { font-size: 15px; }
.hourly.compact .t { font-size: 20px; }
.hourly.compact .c { font-size: 15px; }
.hourly.compact .p { font-size: 14px; }
.deg { font-size: 42px; color: var(--yellow); margin-top: 18px; font-weight: 800; }
.cond { font-size: 36px; font-weight: 900; margin-top: 8px; }
.meta { margin-top: 18px; font-size: 22px; font-weight: 700; line-height: 1.45; }
.meta b { color: var(--yellow); }

.hourly {
  display: flex; flex-direction: column; gap: 6px; margin-top: 18px;
  flex-shrink: 0;
}
.hour {
  display: grid;
  grid-template-columns: 160px 140px 1fr 220px;
  align-items: center;
  background: rgba(8, 20, 56, 0.55);
  border-radius: 8px;
  padding: 10px 22px;
  min-height: 58px;
  flex-shrink: 0;
}
.hour .h { color: var(--gold); font-size: 26px; font-weight: 800; }
.hour .t { font-size: 36px; font-weight: 900; color: var(--yellow); }
.hour .c { font-size: 24px; font-weight: 800; letter-spacing: 0.04em; }
.hour .p { font-size: 22px; color: var(--muted); font-weight: 700; text-align: right; }
#radarCanvas, #radarImg { width: 100%; height: min(72vh, 780px); object-fit: contain; background: #123a80; border-radius: 8px; }

.mapwrap {
  position: relative;
  flex: 1;
  min-height: 420px;
  min-width: 0;
  background: #103480;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: size;
}
.mapwrap svg, .mapwrap canvas { display: block; }
.map-fallback {
  position: absolute; inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-stack {
  position: relative;
  flex: none;
  width: 100%;
  height: 100%;
  width: min(100cqw, calc(100cqh * 640 / 740));
  height: min(100cqh, calc(100cqw * 740 / 640));
  aspect-ratio: 640 / 740;
  max-width: 100%;
  max-height: 100%;
}
.map-stack .map-base,
.map-stack .map-labels,
.map-stack .radarlayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.map-stack { isolation: isolate; }
.map-stack .map-base { z-index: 1; }
.map-stack .radarlayer {
  z-index: 2;
  opacity: 0.94;
  background: transparent !important;
}
.map-stack .map-labels { z-index: 3; }
.map-labels text {
  paint-order: stroke fill;
  font-family: Arial, Helvetica, sans-serif;
}
.map-labels .map-town { font-size: 16px; font-weight: 800; }
.map-labels .map-city { font-size: 18px; font-weight: 800; }
.map-labels .map-temp { font-size: 22px; font-weight: 900; }
.map-labels .map-scale { font-size: 14px; font-weight: 800; }
.map-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 10px;
}
.map-meta {
  flex: 0 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 12px;
  background: rgba(8, 18, 48, 0.78);
  border: 1px solid rgba(232, 176, 32, 0.45);
  border-radius: 6px;
  color: var(--yellow);
  font-size: 16px; font-weight: 800; letter-spacing: 0.08em;
  text-shadow: 1px 1px 0 #000;
}
.map-meta .focus { color: var(--white); }
.map-meta .radar-time { color: var(--yellow); letter-spacing: 0.1em; }
.modal > .card:only-child .mapwrap { min-height: 0; }
.mapwrap.tall { min-height: min(62vh, 720px); }
#radarCanvas { width: 100%; height: 100%; background: #123a80; border-radius: 8px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-top: 20px; }
.day {
  background: rgba(8, 20, 56, 0.7); border-radius: 10px; padding: 16px 8px; text-align: center;
}
.day .n { font-weight: 900; font-size: 20px; }
.day .d { color: var(--gold); font-size: 12px; font-weight: 800; margin: 4px 0 16px; }
.day .hi { color: var(--yellow); font-size: 36px; font-weight: 900; }
.day .lo { margin-top: 6px; font-weight: 700; }
.day .p { color: var(--gold); font-size: 12px; margin-top: 10px; font-weight: 800; }

.dot {
  fill: var(--yellow); stroke: #000; stroke-width: 2;
}

.card.open {
  width: min(1180px, 100%);
  height: auto;
  margin: auto;
  align-self: center;
  text-align: center;
  padding: 36px 44px 32px;
  gap: 6px;
}
.card.open .open-temp {
  justify-content: center;
  margin-top: 6px;
  margin-bottom: 2px;
}
.card.open .cond { margin-top: 2px; }
.card.open .meta { margin-top: 22px; }
.obs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 14px;
  margin-top: 22px;
  text-align: center;
}
.obs-cell {
  background: rgba(8, 20, 56, 0.55);
  border: 1px solid rgba(232, 176, 32, 0.28);
  border-radius: 10px;
  padding: 12px 10px 14px;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.obs-k {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.obs-v {
  color: #F3E7C8;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 1px 1px 0 #000;
  line-height: 1.15;
}
.obs-cell.probe .obs-v { color: var(--yellow); }
.obs-palmyra {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(232, 176, 32, 0.45);
}
.obs-palmyra .obs-kicker {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin-bottom: 12px;
}
.obs-grid.pal { margin-top: 0; }
.sheet-card { text-align: left; max-width: min(1180px, 100%); }
.sheet-card .city, .sheet-card .st, .sheet-card .kicker { text-align: center; }
.sheet-asof { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0 12px; letter-spacing: 0.08em; }
.sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  margin-top: 8px;
}
.sheet-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 4px;
  border-bottom: 1px solid rgba(232, 176, 32, 0.22);
  font-size: 16px;
  font-weight: 700;
}
.sheet-row b { color: var(--yellow); font-size: 18px; white-space: nowrap; }
.sheet-row em { color: #9ad0ff; font-style: normal; font-size: 14px; margin-left: 8px; }
.sheet-graphs { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-top: 18px; }
.sheet-graph { background: rgba(8, 20, 56, 0.55); border: 1px solid rgba(232, 176, 32, 0.28); border-radius: 10px; padding: 10px 12px 12px; }
.sheet-spark { width: 100%; height: 72px; display: block; }
.sheet-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.sheet-bars div { position: relative; background: rgba(0,0,0,0.25); border-radius: 6px; height: 28px; overflow: hidden; }
.sheet-bars i { display: block; height: 100%; background: linear-gradient(90deg, #1b4a9a, var(--gold)); }
.sheet-bars b { position: absolute; left: 10px; top: 5px; font-size: 13px; letter-spacing: 0.06em; }
@media (max-width: 760px) {
  .sheet-grid, .sheet-graphs { grid-template-columns: 1fr; }
}
.obs-grid.pal .obs-v { color: var(--gold); font-size: 20px; }
.card.main .obs-grid.station {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
}
.card.main .obs-grid.station .obs-cell { min-height: 68px; padding: 10px 8px 12px; }
.card.main .obs-grid.station .obs-v { font-size: 20px; }
.city.section-title {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  color: var(--yellow);
  font-size: 36px;
  font-weight: 800;
}
.ne-temps {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ne-temps .hour { grid-template-columns: 1fr auto auto; min-height: 36px; padding: 6px 14px; }
.ne-temps .h { font-size: 16px; }
.ne-temps .t { font-size: 22px; }
.hour.alert-row {
  grid-template-columns: 160px 1fr;
  align-items: start;
}
.hour.alert-row .c { white-space: normal; font-size: 16px; line-height: 1.35; }

@media (prefers-reduced-motion: reduce) {
  html:not(.broadcast) #grain,
  html:not(.broadcast) #splash { transition: none !important; }
}

@media (max-width: 1100px) {
  .ident {
    padding: 12px 18px 10px;
    padding-top: max(12px, env(safe-area-inset-top));
  }
  .ident-logo { height: 42px; }
  .wordmark { font-size: 26px; }
  .place { font-size: 13px; }
  #wx-ticker { top: 74px; }
  #stage { inset: 96px 16px 92px; }
  body.has-alerts #wx-ticker { top: 74px; }
  body.has-alerts #stage { top: 112px; }
  .modal { gap: 16px; }
  .card { padding: 20px 18px 16px; }
  .card.side { min-width: 280px; }
  .city { font-size: 42px; }
  .temp { font-size: 84px; }
  .cond { font-size: 26px; }
  .meta { font-size: 16px; }
  .hour { grid-template-columns: 88px 72px 1fr 72px; padding: 8px 12px; min-height: 44px; }
  .hour .h { font-size: 16px; }
  .hour .t { font-size: 22px; }
  .hour .c { font-size: 15px; }
  .hour .p { font-size: 14px; }
  .mapwrap { min-height: 320px; }
  .thanks { padding: 8px 16px; font-size: 13px; gap: 8px; flex-wrap: wrap; }
  #nowplaying { font-size: 16px; bottom: 74px; }
  #news-ticker { bottom: 42px; }
}

@media (max-width: 760px) {
  html, body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100dvh;
    -webkit-overflow-scrolling: touch;
  }
  .bg-tape, #grain, #vignette {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
  }
  .ident {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 12px 8px;
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .wordmark-row { gap: 8px; }
  .ident-logo { height: 32px; }
  .wordmark { font-size: 22px; }
  .place { font-size: 11px; letter-spacing: 0.1em; }
  #wx-ticker {
    position: fixed;
    top: 62px;
    height: 32px;
  }
  body.has-alerts #wx-ticker { display: flex; }
  .ticker-kicker { font-size: 11px; padding: 0 8px; letter-spacing: 0.08em; }
  #ticker-text { font-size: 13px; }

  #stage {
    position: relative;
    inset: auto;
    width: 100%;
    padding: 12px 10px 180px;
    min-height: calc(100dvh - 140px);
  }
  body { padding-top: 68px; }
  body.has-alerts { padding-top: 100px; }
  body.has-alerts #stage { top: auto; }

  .modal {
    position: relative;
    inset: auto;
    flex-direction: column;
    width: 100%;
    height: auto;
    gap: 12px;
  }
  .modal.out {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    transform: none;
  }
  .card, .card.main, .card.side {
    flex: none;
    width: 100%;
    min-width: 0;
    height: auto;
  }
  .card.open { padding: 24px 14px 20px; width: 100%; }
  .obs-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
  .obs-cell { min-height: 64px; padding: 10px 8px; }
  .obs-v { font-size: 18px; }
  .obs-palmyra { margin-top: 16px; padding-top: 14px; }
  .card.open .meta { margin-top: 16px; }
  .city { font-size: clamp(28px, 9vw, 40px); }
  .city.section-title { font-size: 26px; }
  .temp { font-size: clamp(56px, 18vw, 84px); }
  .deg { font-size: 28px; margin-top: 10px; }
  .cond { font-size: 22px; }
  .meta { font-size: 15px; margin-top: 10px; white-space: normal; overflow-wrap: anywhere; }
  .blurb { font-size: 16px; }
  .row { gap: 12px; }
  .hourly { margin-top: 12px; }
  .hour, .hourly.compact .hour {
    grid-template-columns: 3.2rem 2.6rem minmax(0, 1fr) 2.4rem;
    padding: 8px 10px;
    min-height: 40px;
  }
  .hourly.compact .h, .hour .h { font-size: 13px; }
  .hourly.compact .t, .hour .t { font-size: 18px; }
  .hourly.compact .c, .hour .c { font-size: 13px; }
  .hourly.compact .p, .hour .p { font-size: 12px; }
  .hour.alert-row { grid-template-columns: 1fr; gap: 4px; }
  .days {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .day .hi { font-size: 28px; }
  .map-col {
    flex: none;
    width: 100%;
    min-height: 0;
  }
  .mapwrap, .modal > .card:only-child .mapwrap, .mapwrap.tall {
    flex: none;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 640 / 740;
    max-height: none;
  }
  .map-stack {
    width: 100%;
    height: 100%;
  }
  .crawl-clip,
  .crawl-clip.has-crawl {
    flex: none;
    min-height: 0;
    max-height: none !important;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .map-meta {
    flex-wrap: wrap;
    font-size: 11px;
    letter-spacing: 0.04em;
    gap: 6px;
    padding: 6px 8px;
  }
  #nowplaying {
    position: fixed;
    bottom: calc(96px + env(safe-area-inset-bottom));
    font-size: 12px;
    padding: 4px 10px;
  }
  #news-ticker {
    bottom: calc(64px + env(safe-area-inset-bottom));
    height: 28px;
  }
  .news-kicker { font-size: 11px; padding: 0 8px; }
  .thanks {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 10px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    font-size: 11px;
  }
  .thanks span, .thanks a { white-space: nowrap; }
  .splash-card { padding: 24px 16px; max-width: 100%; }
  .splash-logo { width: min(120px, 36vw); }
  .splash-kicker { font-size: 12px; letter-spacing: 0.12em; }
  .splash-title { font-size: clamp(32px, 11vw, 52px); margin-bottom: 20px; }
  #enter { width: min(100%, 320px); padding: 14px 18px; font-size: 18px; }
  #grain { opacity: 0.12; animation-duration: 0.8s; }
}

@media (max-width: 420px) {
  .days { grid-template-columns: repeat(2, 1fr); }
  .wordmark { font-size: 18px; }
  .ident-logo { height: 28px; }
}
