/* Copyright (c) 2026 Neil Fluhr. All rights reserved. */

:root,
[data-theme="dark"] {
  --page: #111;
  --bg: #1c1c1e;
  --bg-elevated: #2c2c2e;
  --text: #ffffff;
  --muted: #d1d1d6;
  --blue: #0a84ff;
  --orange: #ff9f0a;
  --green: #34c759;
  --icon: #e5e5ea;
  --unit: #d1d1d6;
  --forecast-text: #e5e5ea;
  --gauge-track: #3d3d42;
  --toast-bg: #3a3a3c;
  --toast-text: #fff;
  --phone-ring: #2c2c2e;
  --phone-shadow: rgba(0, 0, 0, 0.45);
  --row: 46px;
  color-scheme: dark;
}

[data-theme="light"] {
  --page: #d8d8de;
  --bg: #f2f2f7;
  --bg-elevated: #ffffff;
  --text: #1c1c1e;
  --muted: #6e6e73;
  --blue: #007aff;
  --orange: #ff9500;
  --green: #34c759;
  --icon: #636366;
  --unit: #8e8e93;
  --forecast-text: #3a3a3c;
  --gauge-track: #d1d1d6;
  --toast-bg: #3a3a3c;
  --toast-text: #fff;
  --phone-ring: #c7c7cc;
  --phone-shadow: rgba(60, 60, 67, 0.22);
  color-scheme: light;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

html,
body {
  min-height: 100%;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
}

.phone {
  width: min(430px, 100%);
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-x: clip;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  padding: calc(10px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  margin-bottom: 10px;
}

.top-place {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.2px;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  cursor: pointer;
}

.top-place svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.alert-banner {
  margin: -10px 0 18px;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.35;
}

.alert-banner[hidden] {
  display: none;
}

.alert-banner strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.alert-banner small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.88;
}

[data-theme="light"][data-alert="watch"] {
  --page: #e8dfb0;
  --bg: #fff8d6;
}

[data-theme="light"][data-alert="warning"] {
  --page: #ebcfd1;
  --bg: #fde8e9;
}

[data-theme="dark"][data-alert="watch"] {
  --page: #161208;
  --bg: #2a2412;
}

[data-theme="dark"][data-alert="warning"] {
  --page: #16090a;
  --bg: #2a1416;
}

[data-alert="watch"] .alert-banner {
  background: #f5c400;
  color: #1c1200;
}

[data-alert="warning"] .alert-banner {
  background: #c5111a;
  color: #fff;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 2px;
}

.top-bar h1 {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.2px;
}

.icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.icon-btn svg {
  width: 24px;
  height: 24px;
}

.theme-icon-moon {
  display: none;
}

[data-theme="light"] .theme-icon-sun {
  display: none;
}

[data-theme="light"] .theme-icon-moon {
  display: block;
}

.house-switch {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 0;
}

.house-switch .icon-btn {
  color: var(--muted);
}

.house-switch .icon-btn[aria-selected="true"] {
  color: var(--blue);
}

.now {
  text-align: center;
  padding-bottom: 0;
}

.dash {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  gap: 0 6px;
  align-items: center;
}

.temp-col {
  text-align: center;
}

.temp-block {
  position: relative;
}

.temp-block svg {
  width: 100%;
  height: auto;
  display: block;
}

.temp-core {
  position: absolute;
  inset: 28% 12% 26%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.temp-core .t {
  color: var(--orange);
  font-size: 52px;
  font-weight: 300;
  letter-spacing: -2.2px;
  line-height: 0.85;
}

.temp-core .hl {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.temp-core .hl b {
  color: var(--text);
  font-weight: 650;
}

.under-gauge {
  margin-top: -58px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.under-gauge .wx {
  width: 44px;
  height: 36px;
  margin: 0 auto;
  color: var(--icon);
}

.under-gauge .wx svg {
  width: 100%;
  height: 100%;
  display: block;
}

.under-gauge .condition {
  margin: 1px 0 0;
  font-size: 20px;
  line-height: 1.15;
}

.under-gauge .feels {
  margin: 1px 0 0;
  font-size: 11px;
  letter-spacing: 1px;
}

.side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mini {
  width: 100%;
  text-align: center;
}

.mini svg {
  width: 100%;
  height: auto;
  display: block;
}

.mini .lab {
  margin-top: -4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.85px;
  text-transform: uppercase;
}

.mini .val {
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.hero {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hero-icon {
  width: 78px;
  height: 64px;
  color: var(--icon);
}

.hero-icon svg {
  width: 100%;
  height: 100%;
}

.hero-temp {
  display: flex;
  align-items: flex-start;
  color: var(--orange);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -2px;
}

.hero-temp .temp-value,
.hero-temp #temp {
  font-size: 76px;
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -2px;
}

.hero-temp .degree {
  font-size: 42px;
  font-weight: 300;
  margin-top: 6px;
  letter-spacing: 0;
  line-height: 0.9;
}

.hero-temp .unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 16px 0 0 4px;
  color: var(--unit);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}

.hero-temp .unit svg {
  width: 11px;
  height: 18px;
  margin-bottom: 2px;
}

.feels {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.condition {
  margin-top: 16px;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.4px;
}

.now .condition {
  font-weight: 400;
}

.place {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 8px auto 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.place svg {
  width: 11px;
  height: 11px;
  opacity: 0.55;
}

.sheet {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: end center;
  background: rgba(0, 0, 0, 0.32);
  z-index: 20;
}

.sheet[hidden] {
  display: none;
}

.sheet-card {
  width: min(430px, 100%);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 20px 20px 0 0;
  padding: 14px 18px calc(28px + env(safe-area-inset-bottom));
}

.sheet-handle {
  width: 36px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--text) 16%, transparent);
}

.sheet-card h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.sheet-hint {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.sheet-card label {
  display: block;
  margin: 16px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sheet-card input {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 2px;
  padding: 12px 14px;
  outline: none;
}

.sheet-error {
  margin-top: 8px;
  color: #ff3b30;
  font-size: 13px;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.sheet-actions button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
}

.btn-cancel {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text);
}

.btn-save {
  background: var(--blue);
  color: #fff;
}

.btn-save:disabled {
  opacity: 0.55;
}

.btn-locate {
  display: block;
  width: 100%;
  margin-top: 14px;
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--blue) 16%, transparent);
  color: var(--blue);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
}

.btn-locate:disabled {
  opacity: 0.55;
}

.details {
  margin-top: 18px;
}

.details .panel-switch {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.details .panel-switch button {
  padding-left: 4px;
  padding-right: 4px;
  white-space: nowrap;
}

.panel-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 2px;
  background: color-mix(in srgb, var(--text) 8%, var(--bg));
  border-radius: 9px;
}

.panel-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 7px;
}

.panel-switch button[aria-selected="true"] {
  background: var(--bg-elevated);
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .panel-switch {
  background: #2c2c2e;
}

[data-theme="dark"] .panel-switch button {
  color: #aeaeb2;
}

[data-theme="dark"] .panel-switch button[aria-selected="true"] {
  background: #4a4a4e;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.conditions-card {
  margin-top: 12px;
  background: var(--bg-elevated);
  border-radius: 16px;
  padding: 6px 14px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 6%, transparent);
}

.conditions-card .row + .row {
  border-top: 1px solid color-mix(in srgb, var(--text) 6%, transparent);
}

.conditions-card.is-radar {
  padding: 0 0 10px;
  overflow: hidden;
}

.map-frame {
  height: 400px;
  overflow: hidden;
  background: #1c1c1e;
  container-type: inline-size;
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
  background: #1c1c1e;
}

/* Windy's embed skin pins #logo to the upper left at 375px and under, and
   centers it from 376px up. There is no URL parameter for that placement.
   The desktop phone column is about 394px, so hold the iframe's layout box
   at 375px (logo stays left) and scale it to fill this 400px-tall frame.
   Narrower phones are already at or under 375px and stay unscaled. */
@container (min-width: 376px) {
  .map-frame iframe {
    width: 375px;
    /* 400px * 375 / 100cqw is unitless, so multiply back by 1px. The
       scaled height then lands on the 400px frame instead of spilling
       past the timeline. */
    height: calc(400px * 375 / 100cqw * 1px);
    transform: scale(calc(100cqw / 375px));
    transform-origin: top left;
  }
}

.radar-placeholder {
  display: grid;
  place-items: center;
  height: 400px;
  margin: 0;
  padding: 24px;
  background: #1c1c1e;
  color: #aeaeb2;
  font-size: 14px;
  text-align: center;
}

.radar-note,
.radar-credit {
  margin: 8px 14px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.radar-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.almanac-group {
  margin: 10px 0 0;
  padding: 8px 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.almanac-band + .almanac-group {
  margin-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--text) 6%, transparent);
}

.almanac-band {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  column-gap: 8px;
  padding: 4px 0 2px;
}

.almanac-end {
  min-width: 0;
}

.almanac-end.high {
  text-align: right;
}

.almanac-val {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.4px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.almanac-val.cool {
  color: #4da3ff;
}

.almanac-val.warm {
  color: #ff9f0a;
}

.almanac-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.almanac-band-title {
  margin: 0;
  padding-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
}

.almanac-band-title small {
  display: block;
  margin-top: 1px;
  font-weight: 500;
  letter-spacing: 0.15px;
  text-transform: none;
}

.almanac-capsule {
  position: relative;
  margin: 16px 2px 12px;
  height: 38px;
}

.almanac-glass {
  position: absolute;
  inset: 13px 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #4da3ff 0%, #ffd60a 48%, #ff9f0a 74%, #ff3b30 100%);
  opacity: 0.38;
}

.almanac-normals {
  position: absolute;
  top: 9px;
  bottom: 9px;
  border-radius: 99px;
  background: linear-gradient(90deg, #5eb0ff, #ffd60a 70%, #ff9f0a);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent);
}

.almanac-today {
  position: absolute;
  top: 3px;
  width: 14px;
  height: 32px;
  margin-left: -7px;
  border-radius: 99px;
  background: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.almanac-today::after {
  content: attr(data-temp);
  position: absolute;
  left: 50%;
  top: -16px;
  transform: translateX(-50%);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.sky-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin: 4px 0 2px;
}

#almanac-panel .sky-grid {
  grid-template-columns: minmax(0, 3fr) minmax(7.5rem, 1fr);
  column-gap: 8px;
}

#almanac-panel .sky-tile {
  grid-column: auto;
  justify-self: stretch;
}

#almanac-panel .sky-tile > :last-child {
  justify-self: start;
  align-items: flex-start;
  width: auto;
  max-width: 100%;
}

#almanac-panel .sky-tile .label,
#almanac-panel .sky-tile .label span,
#almanac-panel .sky-tile .value {
  text-align: left;
  justify-self: start;
  align-self: flex-start;
}

.sky-tile {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 52px;
  padding: 4px 2px;
}

.sky-tile > :last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.sky-tile + .sky-tile:nth-child(n + 3) {
  border-top: 1px solid color-mix(in srgb, var(--text) 6%, transparent);
}

.sky-tile svg,
.sky-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.sky-icon {
  width: 26px;
  height: 26px;
}

.sky-tile .label span {
  font-size: 13px;
}

.sky-tile .value {
  justify-self: start;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.moon-unlit { fill: #3a3a3c; }
.moon-lit { fill: #f2f2f7; }
.moon-rim { fill: none; stroke: #c7c7cc; stroke-width: 0.7; }
.moon-full { fill: #fff; stroke: #c7c7cc; stroke-width: 0.8; }
[data-theme="dark"] .moon-unlit { fill: #111; }
[data-theme="dark"] .moon-lit { fill: #f2f2f7; }
[data-theme="dark"] .moon-rim { stroke: #e5e5ea; }
[data-theme="dark"] .moon-full { fill: #f2f2f7; stroke: #e5e5ea; }

.almanac-foot {
  margin: 8px 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.almanac-foot + .almanac-foot {
  margin-top: 0;
  margin-bottom: 8px;
}

.row {
  min-height: var(--row);
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) max-content;
  column-gap: 10px;
  align-items: center;
  padding: 1px 0;
}

.glyph {
  width: 30px;
  height: 30px;
  color: var(--icon);
}

.glyph svg {
  width: 30px;
  height: 30px;
  display: block;
}

.label {
  font-size: 16px;
  letter-spacing: -0.2px;
}

.label.stacked {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.label small {
  color: var(--muted);
  font-size: 12px;
}

.value {
  font-size: 16px;
  font-weight: 600;
  text-align: right;
  letter-spacing: -0.2px;
  white-space: nowrap;
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.tonight {
  margin-top: 18px;
}

.tonight .forecast-switch {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.forecast-switch button,
.tonight .forecast-switch button {
  padding-left: 4px;
  padding-right: 4px;
  white-space: nowrap;
}

.tonight,
.forecast-stage,
.forecast-panel,
.tonight .forecast-card,
.hourly {
  min-width: 0;
  max-width: 100%;
}

/* One shared box. Inactive panels stay in the grid so the sections below do
   not jump between Current, Hourly, and Daily. Height matches the taller of
   Current and Hourly (or the day strip). Closed Daily stretches the day
   pills to that resting height. A selected day grows Daily only modestly;
   the rest of the write-up scrolls, and the day strip stays put. */
.forecast-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  overflow: visible;
}

.forecast-stage > .forecast-panel {
  grid-area: 1 / 1;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.forecast-panel:not(.is-active) {
  visibility: hidden;
  pointer-events: none;
}

#forecast-current-panel,
#forecast-hourly-panel,
#forecast-daily-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

#forecast-current-panel .forecast-card,
#forecast-hourly-panel .hourly,
#forecast-daily-panel .day-detail {
  flex: 1 1 auto;
}

#forecast-daily-panel .day-detail {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

#forecast-daily-panel .day-strip {
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  /* Leaves the 1px card ring visible inside the panel's overflow clip.
     syncForecastBox subtracts this when it stretches the strip. */
  margin-bottom: 2px;
  grid-template-rows: minmax(0, 1fr);
}

#forecast-daily-panel .day-card {
  align-self: stretch;
  height: 100%;
  min-height: 226px;
}

#forecast-daily-panel .day-detail .forecast-card {
  margin-top: 0;
  min-height: 0;
}

.tonight .forecast-card {
  margin-top: 12px;
}

.tonight .day-strip {
  margin-top: 12px;
}

.forecast-card {
  margin-top: 14px;
  background: var(--bg-elevated);
  border-radius: 16px;
  padding: 16px 16px 18px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 6%, transparent);
}

.forecast-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.forecast-name {
  font-size: 15px;
  font-weight: 600;
}

.forecast-short {
  margin-top: 3px;
  color: var(--muted);
  font-size: 15px;
}

.forecast-temp {
  color: var(--orange);
  font-size: 34px;
  font-weight: 300;
  letter-spacing: -1px;
  line-height: 1;
}

.forecast-temp span {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.forecast-detail {
  margin-top: 12px;
  color: var(--forecast-text);
  font-size: 15px;
  line-height: 1.45;
}

.hourly {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}

#forecast-hourly-panel .hourly {
  margin-top: 12px;
  padding: 18px 0 14px;
  border-top: 0;
  background: var(--bg-elevated);
  border-radius: 16px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 6%, transparent);
}

#forecast-hourly-panel .hourly-kicker {
  padding: 0 16px;
}

#forecast-hourly-panel .hourly-wrap {
  margin-top: 12px;
  padding: 0 8px 2px;
}

.hourly-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.hourly-wrap {
  position: relative;
  contain: inline-size;
  overflow-x: hidden;
  overflow-x: clip;
  overflow-y: hidden;
  min-width: 0;
  max-width: 100%;
  margin-top: 8px;
}

.hourly-scroll {
  overflow-x: scroll;
  overflow-y: hidden;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  transform: translateZ(0);
}

.hourly-day-pin {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  height: 18px;
  padding: 0 10px 0 6px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.35px;
  line-height: 18px;
  white-space: nowrap;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 0%,
    var(--bg-elevated) 65%,
    color-mix(in srgb, var(--bg-elevated) 0%, transparent) 100%
  );
}

.hourly-day-pin.today {
  color: var(--orange);
}

.hourly-track {
  width: max-content;
  min-width: max-content;
}

.hourly-days,
.hourly-temps,
.hourly-pops,
.hourly-hours {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 40px;
  width: max-content;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.hourly-days {
  height: 18px;
  margin-bottom: 6px;
  align-items: center;
}

.hourly-days span {
  display: flex;
  align-items: center;
  height: 18px;
  padding: 0 8px 0 6px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.35px;
  line-height: 18px;
  text-align: left;
  white-space: nowrap;
}

.hourly-days .today {
  color: var(--orange);
}

.hourly-days span.is-current {
  color: transparent;
}

/* 90px is 28px shorter than the previous chart. Hourly is usually the
   tallest resting panel, so the shared stage drops with this chart while
   a longer Current narrative can still grow past it. */
.hourly-chart {
  display: block;
  height: 90px;
}

.hourly-temps {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
}

.hourly-pops {
  margin-top: 1px;
  color: #4da3ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.hourly-pops .dry {
  color: var(--muted);
  font-weight: 500;
}

.hourly-pops .past {
  color: color-mix(in srgb, #4da3ff 50%, var(--muted));
  font-weight: 500;
}

.hourly-pops .past.dry {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

.hourly-hours {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.hourly-hours .midnight,
.hourly-hours .noon {
  font-weight: 600;
  color: var(--text);
}

.hourly-temps .now,
.hourly-hours .now {
  color: var(--orange);
  font-weight: 700;
}

.hourly-temps .past,
.hourly-hours .past {
  color: color-mix(in srgb, var(--orange) 45%, var(--muted));
  font-weight: 500;
}

.day-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  gap: 5px;
  margin-top: 12px;
}

.day-card {
  appearance: none;
  border: 0;
  font: inherit;
  color: inherit;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 226px;
  padding: 0;
  cursor: pointer;
  display: flex;
  text-align: center;
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  -webkit-tap-highlight-color: transparent;
  background: transparent;
  border-radius: 16px;
}

.day-card:focus {
  outline: none;
}

/* Afternoon over evening. Rows match the 226px mockup (92 / 42 / 92) and
   grow together when the strip is stretched to a taller stage. */
.dn-face {
  display: grid;
  grid-template-rows: 92fr 42fr 92fr;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 226px;
  border-radius: inherit;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(
      180deg,
      #f4f8fc 0%,
      #e7f2fb 22%,
      #dceaf8 38%,
      #d0e2f4 42%,
      #6d86a6 48%,
      #2a3f5c 55%,
      #1a2940 72%,
      #121a28 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 0 0 1px rgba(16, 24, 40, 0.28);
}

.day-card.is-selected .dn-face,
.day-card:focus-visible .dn-face {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 0 0 2px var(--blue);
}

[data-theme="light"] .dn-face {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(16, 24, 40, 0.38);
}

[data-theme="light"] .day-card.is-selected .dn-face,
[data-theme="light"] .day-card:focus-visible .dn-face {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 2px var(--blue);
}

.dn-day,
.dn-seam,
.dn-night {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dn-day {
  justify-content: flex-start;
  padding: 8px 1px 0;
}

.dn-label {
  color: #1b2433;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: nowrap;
}

.dn-day .wx {
  margin-top: auto;
}

.dn-hi {
  margin-top: 3px;
  margin-bottom: 1px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dn-seam {
  justify-content: flex-end;
  gap: 1px;
  padding-bottom: 1px;
}

.dn-pop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  height: 14px;
  color: #9fd4ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dn-pop svg {
  width: 8px;
  height: 11px;
  display: block;
  flex: 0 0 auto;
}

.dn-amt {
  height: 12px;
  color: #d5e8f8;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 12px;
  font-variant-numeric: tabular-nums;
}

.dn-night {
  justify-content: flex-start;
  gap: 2px;
  /* At the 226px pill this is the mockup's 29px bottom rest: the icon and
     low stay paired about 20px up from the foot of the night half, just
     under the seam. Anchoring to the seam keeps that lift when the strip
     stretches with a taller stage. */
  padding: 11px 1px 0;
}

.dn-lo {
  color: #d7e1ee;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dn-face .wx {
  width: 36px;
  height: 32px;
  display: grid;
  place-items: center;
}

.dn-face .wx svg {
  width: 36px;
  height: 32px;
  display: block;
}

@container (max-width: 52px) {
  .dn-label {
    font-size: 9px;
    letter-spacing: -0.04em;
  }

  .dn-hi {
    font-size: 17px;
  }

  .dn-lo {
    font-size: 16px;
  }

  .dn-pop {
    font-size: 11px;
  }
}

.day-detail {
  margin-top: 10px;
}

.night-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}




.updated {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.credits {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.credits p + p {
  margin-top: 4px;
}

.credits a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.credits a:hover,
.credits a:focus-visible,
.almanac-foot a:hover,
.almanac-foot a:focus-visible,
.radar-credit a:hover,
.radar-credit a:focus-visible {
  color: var(--text);
}

.almanac-foot a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.copyright {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--toast-bg);
  color: var(--toast-text);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  z-index: 10;
}

.is-loading .value,
.is-loading .condition,
.is-loading #temp {
  opacity: 0.45;
}

@media (min-width: 520px) {
  body {
    padding: 24px 0;
    background: var(--page);
  }

  .phone {
    min-height: calc(100vh - 48px);
    border-radius: 28px;
    box-shadow: 0 0 0 1px var(--phone-ring), 0 30px 80px var(--phone-shadow);
  }
}
