:root {
  --weather-blue: #2563eb;
  --weather-cyan: #38bdf8;
  --weather-ink: #06111f;
  --weather-muted: rgba(6, 17, 31, 0.68);
  --weather-line: rgba(255, 255, 255, 0.48);
  --weather-glass: rgba(255, 255, 255, 0.58);
  --weather-glass-strong: rgba(255, 255, 255, 0.72);
  --weather-shadow: 0 12px 34px rgba(15, 23, 42, 0.18);
  --weather-radius-lg: 14px;
  --weather-radius-md: 8px;
  --weather-alert: #ef4444;
  --weather-watch: #f59e0b;
  --weather-good: #10b981;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.weather-page {
  background: #eef6ff;
  color: var(--weather-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.weather-app {
  --weather-app-width: min(calc(100vw - 28px), 1180px);
  position: relative;
  width: var(--weather-app-width);
  min-height: calc(100vh - 28px);
  margin-top: 14px;
  margin-right: calc((100vw - var(--weather-app-width)) / 2);
  margin-bottom: 32px;
  margin-left: calc((100vw - var(--weather-app-width)) / 2);
  isolation: isolate;
  overflow: hidden;
  padding: 0 18px 32px;
  border-radius: 30px;
  box-shadow: 0 28px 90px rgba(8, 25, 45, 0.24);
  transform-origin: center top;
  will-change: width, margin-left, margin-right, margin-top, border-radius;
  transition:
    width 620ms cubic-bezier(0.22, 1, 0.36, 1),
    margin-left 620ms cubic-bezier(0.22, 1, 0.36, 1),
    margin-right 620ms cubic-bezier(0.22, 1, 0.36, 1),
    margin-top 620ms cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 620ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 620ms cubic-bezier(0.22, 1, 0.36, 1);
  background:
    radial-gradient(780px 390px at 18% 8%, rgba(56, 189, 248, 0.34), transparent 62%),
    radial-gradient(760px 410px at 84% 0%, rgba(255, 255, 255, 0.2), transparent 56%),
    linear-gradient(145deg, #123a5d 0%, #215f91 48%, #3f86b7 100%);
  background-size: auto, auto, auto;
}

.weather-app.is-expanded {
  width: 100vw;
  min-height: 100vh;
  margin-top: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 32px;
  border-radius: 0;
  padding-left: 18px;
  padding-right: 18px;
  box-shadow: none;
}

.weather-app[data-condition="clear"] {
  color: #f8fbff;
  --weather-muted: rgba(248, 251, 255, 0.76);
}

.weather-app[data-condition="evening"] {
  color: #f8fbff;
  --weather-muted: rgba(248, 251, 255, 0.74);
  background:
    radial-gradient(720px 360px at 76% 9%, rgba(251, 191, 36, 0.28), transparent 58%),
    radial-gradient(760px 390px at 16% 8%, rgba(56, 189, 248, 0.24), transparent 62%),
    linear-gradient(150deg, #0c223a 0%, #17466d 48%, #265f86 100%);
}

.weather-app[data-condition="sunset"] {
  color: #fffaf2;
  --weather-muted: rgba(255, 250, 242, 0.76);
  background:
    radial-gradient(640px 330px at 76% 20%, rgba(251, 191, 36, 0.48), transparent 58%),
    radial-gradient(780px 420px at 44% 4%, rgba(244, 114, 182, 0.22), transparent 62%),
    linear-gradient(155deg, #172554 0%, #1d4f7a 42%, #c2644a 100%);
}

.weather-app[data-condition="cloud"],
.weather-app[data-condition="fog"] {
  color: #f8fbff;
  --weather-muted: rgba(248, 251, 255, 0.74);
  background:
    radial-gradient(780px 390px at 22% 12%, rgba(148, 163, 184, 0.34), transparent 62%),
    radial-gradient(720px 360px at 82% 8%, rgba(226, 232, 240, 0.22), transparent 58%),
    linear-gradient(145deg, #10243a 0%, #244563 48%, #526f82 100%);
}

.weather-app[data-condition="night"] {
  --weather-muted: rgba(248, 251, 255, 0.72);
  color: #f8fbff;
  background:
    radial-gradient(720px 360px at 20% 2%, rgba(56, 189, 248, 0.22), transparent 60%),
    radial-gradient(680px 360px at 82% 12%, rgba(129, 140, 248, 0.18), transparent 62%),
    linear-gradient(150deg, #07111f 0%, #14233b 54%, #203553 100%);
  background-size: auto, auto, auto;
}

.weather-app[data-condition="rain"],
.weather-app[data-condition="storm"] {
  --weather-muted: rgba(248, 251, 255, 0.72);
  color: #f8fbff;
  background:
    radial-gradient(700px 340px at 12% 8%, rgba(56, 189, 248, 0.26), transparent 62%),
    radial-gradient(720px 380px at 86% 4%, rgba(96, 165, 250, 0.18), transparent 58%),
    linear-gradient(145deg, #1b2a3f 0%, #263d5b 48%, #45637d 100%);
  background-size: auto, auto, auto;
}

.weather-app[data-condition="snow"] {
  background:
    radial-gradient(860px 420px at 14% 6%, rgba(219, 234, 254, 0.88), transparent 64%),
    radial-gradient(700px 360px at 84% 4%, rgba(125, 211, 252, 0.34), transparent 60%),
    linear-gradient(145deg, #eef8ff 0%, #dbeafe 58%, #f8fbff 100%);
}

.weather-shell {
  width: min(100%, 960px);
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.weather-canvas,
.sky-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.weather-canvas {
  z-index: 1;
}

.sky-layer {
  z-index: 0;
  overflow: hidden;
}

.sun-orb {
  position: absolute;
  width: 260px;
  height: 260px;
  right: 12vw;
  top: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.94) 0 18%, rgba(253, 224, 71, 0.58) 34%, rgba(56, 189, 248, 0) 70%);
  filter: blur(1px);
  animation: sunBreathe 8s ease-in-out infinite;
}

.weather-app[data-condition="night"] .sun-orb {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.88) 0 16%, rgba(191, 219, 254, 0.24) 38%, transparent 70%);
}

.weather-app[data-condition="evening"] .sun-orb {
  right: 8vw;
  top: 120px;
  background: radial-gradient(circle, rgba(255, 251, 235, 0.92) 0 16%, rgba(251, 191, 36, 0.46) 36%, rgba(56, 189, 248, 0) 70%);
}

.weather-app[data-condition="sunset"] .sun-orb {
  right: 5vw;
  top: 210px;
  background: radial-gradient(circle, rgba(255, 247, 237, 0.95) 0 15%, rgba(251, 146, 60, 0.58) 35%, rgba(244, 114, 182, 0) 72%);
}

.weather-app[data-condition="cloud"] .sun-orb,
.weather-app[data-condition="fog"] .sun-orb {
  opacity: 0.2;
}

.weather-app[data-condition="rain"] .sun-orb,
.weather-app[data-condition="storm"] .sun-orb {
  opacity: 0.08;
}

.cloud {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.38;
  background: rgba(255, 255, 255, 0.66);
  animation: cloudDrift 22s ease-in-out infinite alternate;
}

.cloud-a {
  width: 440px;
  height: 120px;
  left: 5vw;
  top: 94px;
}

.cloud-b {
  width: 520px;
  height: 150px;
  right: -5vw;
  top: 210px;
  animation-duration: 28s;
}

.weather-app[data-condition="storm"] .cloud,
.weather-app[data-condition="rain"] .cloud,
.weather-app[data-condition="cloud"] .cloud,
.weather-app[data-condition="fog"] .cloud {
  background: rgba(148, 163, 184, 0.54);
  opacity: 0.7;
}

.weather-app[data-condition="sunset"] .cloud {
  background: rgba(255, 214, 165, 0.48);
  opacity: 0.46;
}

.weather-app[data-condition="evening"] .cloud {
  background: rgba(191, 219, 254, 0.48);
  opacity: 0.5;
}

.weather-app[data-condition="fog"] .cloud {
  filter: blur(32px);
  opacity: 0.82;
}

.lightning-bolt {
  position: fixed;
  inset: 0;
  opacity: 0;
  background:
    linear-gradient(115deg, transparent 0 54%, rgba(255, 255, 255, 0.92) 55%, transparent 56%),
    radial-gradient(900px 500px at 64% 18%, rgba(255, 255, 255, 0.72), transparent 58%);
  mix-blend-mode: screen;
}

.weather-app[data-condition="storm"] .lightning-bolt {
  animation: lightningFlash 8.5s infinite;
}

.weather-hero {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "intro"
    "search"
    "current";
  gap: 12px;
  align-items: stretch;
  padding: 20px 0 12px;
}

.hero-copy {
  grid-area: intro;
  align-self: start;
  max-width: 780px;
  padding: 0;
}

.panel-kicker {
  margin: 0 0 6px;
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--weather-muted);
}

.weather-app[data-condition="night"] .panel-kicker,
.weather-app[data-condition="evening"] .panel-kicker,
.weather-app[data-condition="sunset"] .panel-kicker,
.weather-app[data-condition="cloud"] .panel-kicker,
.weather-app[data-condition="fog"] .panel-kicker,
.weather-app[data-condition="rain"] .panel-kicker,
.weather-app[data-condition="storm"] .panel-kicker {
  color: rgba(248, 251, 255, 0.68);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5.2vw, 4.8rem);
  line-height: 0.94;
  letter-spacing: 0;
  font-weight: 950;
}

.glass-card,
.glass-control {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--weather-line);
  border-radius: var(--weather-radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.46)),
    rgba(255, 255, 255, 0.34);
  box-shadow: var(--weather-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
}

.weather-app[data-condition="night"] .glass-card,
.weather-app[data-condition="evening"] .glass-card,
.weather-app[data-condition="sunset"] .glass-card,
.weather-app[data-condition="cloud"] .glass-card,
.weather-app[data-condition="fog"] .glass-card,
.weather-app[data-condition="rain"] .glass-card,
.weather-app[data-condition="storm"] .glass-card,
.weather-app[data-condition="night"] .glass-control,
.weather-app[data-condition="evening"] .glass-control,
.weather-app[data-condition="sunset"] .glass-control,
.weather-app[data-condition="cloud"] .glass-control,
.weather-app[data-condition="fog"] .glass-control,
.weather-app[data-condition="rain"] .glass-control,
.weather-app[data-condition="storm"] .glass-control {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.5)),
    rgba(15, 23, 42, 0.34);
  border-color: rgba(255, 255, 255, 0.3);
}

.weather-app[data-condition="clear"] .glass-card,
.weather-app[data-condition="evening"] .glass-card,
.weather-app[data-condition="sunset"] .glass-card,
.weather-app[data-condition="clear"] .glass-control,
.weather-app[data-condition="evening"] .glass-control,
.weather-app[data-condition="sunset"] .glass-control {
  background:
    linear-gradient(145deg, rgba(11, 28, 50, 0.64), rgba(31, 73, 110, 0.44)),
    rgba(20, 61, 98, 0.34);
  border-color: rgba(255, 255, 255, 0.32);
}

.glass-card::before,
.glass-control::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.42), transparent 34%),
    radial-gradient(520px 140px at 16% 0%, rgba(255, 255, 255, 0.42), transparent 62%);
  opacity: 0.72;
}

.weather-app[data-condition="rain"] .glass-card::after,
.weather-app[data-condition="storm"] .glass-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 34%),
    repeating-linear-gradient(90deg, transparent 0 74px, rgba(125, 211, 252, 0.12) 75px 77px, transparent 78px 140px);
  opacity: 0.44;
  animation: rainSheen 5.5s ease-in-out infinite;
}

.location-search {
  grid-area: search;
  grid-column: auto;
  align-self: start;
  padding: 14px;
}

.location-search label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.search-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.72);
}

.search-row button,
.source-panel button,
.panel-head a,
.methodology-link {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #06111f;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
}

.search-row .current-location-btn {
  background: rgba(255, 255, 255, 0.86) !important;
  color: #06111f !important;
  -webkit-text-fill-color: #06111f !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

.radar-panel .panel-head a,
.severe-panel .panel-head a,
.weather-app .radar-panel .panel-head a,
.weather-app .severe-panel .panel-head a,
.source-panel button,
.weather-app .source-panel button {
  background: #06111f;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

.location-search p {
  margin: 8px 0 0;
  color: var(--weather-muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.current-panel {
  grid-area: current;
  grid-column: auto;
  padding: 18px;
  align-self: start;
}

.weather-hero .current-panel {
  grid-column: auto;
  align-self: stretch;
}

.weather-hero .location-search {
  grid-column: auto;
}

.current-topline,
.current-main,
.panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.updated-line {
  margin: 0;
  color: var(--weather-muted);
  font-weight: 700;
}

.alert-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(6, 78, 59, 0.18);
  border-radius: 999px;
  max-width: 52%;
  padding: 8px 11px;
  background: #dcfce7;
  color: #064e3b;
  font-weight: 900;
  font-size: 0.78rem;
  line-height: 1.15;
  white-space: normal;
  text-align: right;
  cursor: pointer;
  touch-action: manipulation;
}

.weather-app[data-alert-level="watch"] .alert-chip {
  background: #fffbeb;
  color: #78350f;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.weather-app[data-alert-level="danger"] .alert-chip {
  background: #fef2f2;
  color: #7f1d1d;
  border: 1px solid rgba(239, 68, 68, 0.48);
}

.current-main {
  align-items: flex-end;
  margin-top: 20px;
}

.temp-block {
  min-width: 0;
}

.current-temp {
  display: block;
  font-size: clamp(4rem, 10vw, 6.2rem);
  line-height: 0.78;
  font-weight: 250;
  letter-spacing: 0;
}

.condition-name,
.feels-block span {
  display: block;
  color: var(--weather-muted);
  font-weight: 800;
}

.condition-name {
  max-width: 100%;
  margin-top: 12px;
  font-size: clamp(1.05rem, 2.4vw, 1.55rem);
  line-height: 1.12;
}

.feels-block {
  text-align: right;
  min-width: 126px;
}

.feels-block strong {
  display: block;
  font-size: clamp(2.45rem, 5vw, 3.35rem);
  line-height: 1;
}

.forecast-copy {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 650;
}

.clickable-card {
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.clickable-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.66);
}

.clickable-card:focus-visible,
.alert-chip:focus-visible,
.panel-head a:focus-visible,
.source-panel button:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.72);
  outline-offset: 3px;
}

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

.feature-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.saved-locations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.saved-locations button {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  padding: 5px 10px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.saved-locations button.is-active {
  background: rgba(56, 189, 248, 0.24);
  border-color: rgba(125, 211, 252, 0.55);
}

.saved-locations button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-locations button b {
  border-radius: 999px;
  background: rgba(6, 17, 31, 0.26);
  color: rgba(248, 251, 255, 0.92);
  padding: 2px 6px;
  font-size: 0.66rem;
  line-height: 1.1;
}

.feature-module {
  position: relative;
  z-index: 1;
  min-height: 104px;
  padding: 12px 10px;
  color: inherit;
  text-align: center;
  appearance: none;
  border: 1px solid var(--weather-line);
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 5px;
}

.feature-module span {
  display: block;
  color: var(--weather-muted);
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-module .module-icon,
.metric-card .metric-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(248, 251, 255, 0.94);
  font-size: 1.1rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.metric-card .metric-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.rain-icon {
  position: relative;
}

.rain-icon i {
  display: none;
}

.rain-icon::before {
  content: "";
  width: 13px;
  height: 17px;
  border-radius: 70% 70% 70% 0;
  background: currentColor;
  transform: rotate(-45deg);
  box-shadow: inset -2px 2px 0 rgba(255, 255, 255, 0.22);
}

.rain-icon::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  transform: rotate(26deg);
  translate: 2px -3px;
}

.feature-module strong {
  display: block;
  margin-top: 2px;
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  line-height: 1.02;
  font-weight: 950;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.feature-module p {
  margin: 0;
  color: var(--weather-muted);
  font-size: 0.7rem;
  line-height: 1.16;
  font-weight: 720;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 12px;
}

.insight-grid.is-nowcast-hidden {
  grid-template-columns: 1fr;
}

.insight-grid.is-nowcast-hidden .tech-panel {
  width: 100%;
}

.metric-card {
  padding: 14px;
  min-height: 132px;
}

.metric-card span,
.risk-card span,
.feature-module span {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--weather-muted);
  font-weight: 850;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1;
  font-weight: 900;
}

.metric-card p {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  color: var(--weather-muted);
  font-weight: 650;
}

.weather-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  grid-auto-flow: row;
}

.wide-panel {
  grid-column: 1;
}

.forecast-panel,
.alert-panel,
.severe-panel,
.radar-panel,
.winter-panel,
.source-panel,
.nowcast-panel,
.tech-panel {
  padding: 18px;
}

.forecast-panel:first-child {
  min-height: 0;
}

.panel-head {
  align-items: center;
  margin-bottom: 14px;
}

.compact-head {
  margin-bottom: 10px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 950;
}

.panel-head span {
  color: var(--weather-muted);
  font-weight: 800;
  font-size: 0.88rem;
}

.nowcast-panel > p {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 800;
}

.nowcast-meta,
.minute-labels {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--weather-muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.nowcast-meta {
  margin-bottom: 8px;
}

.nowcast-meta span {
  min-width: 0;
}

.minute-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(34px, 1fr);
  gap: 5px;
  align-items: end;
  min-height: 58px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 4px;
}

.minute-labels {
  margin-top: 6px;
}

.nowcast-timeline-wrap {
  position: relative;
  z-index: 1;
  margin: 8px 0 10px;
}

.nowcast-timeline {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.18);
  overflow: hidden;
}

.nowcast-timeline span {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #facc15);
}

.nowcast-timeline i {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 3px solid #f8fbff;
  border-radius: 999px;
  background: #2563eb;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 12px rgba(6, 17, 31, 0.28);
}

.nowcast-timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--weather-muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.minute-cell {
  display: grid;
  align-items: end;
  gap: 5px;
  min-width: 0;
}

.minute-cell i {
  display: block;
  min-height: 5px;
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.minute-cell span {
  color: var(--weather-muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-align: center;
  min-height: 0.82rem;
}

.technical-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.technical-grid div {
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--weather-radius-md);
  background: rgba(255, 255, 255, 0.34);
  padding: 10px;
}

.technical-grid span {
  display: block;
  color: var(--weather-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.technical-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1.1rem;
  line-height: 1.05;
  font-weight: 950;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.hourly-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(118px, 1fr);
  gap: 10px;
  overflow-x: auto;
  min-height: 196px;
  padding: 2px 0 8px;
  scrollbar-width: thin;
}

.hourly-chart {
  position: relative;
  z-index: 1;
  min-height: 178px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--weather-radius-md);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.14), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.hourly-chart svg {
  display: block;
  width: 100%;
  height: 178px;
}

.chart-grid {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1;
}

.chart-temp-line {
  fill: none;
  stroke: #f8fbff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(6, 17, 31, 0.28));
}

.chart-variable-line {
  fill: none;
  stroke: #7dd3fc;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(6, 17, 31, 0.28));
}

.chart-pop-bar {
  fill: rgba(56, 189, 248, 0.62);
}

.chart-dot {
  fill: #fff;
  stroke: rgba(37, 99, 235, 0.88);
  stroke-width: 2;
}

.chart-label,
.chart-time {
  fill: currentColor;
  opacity: 0.78;
  font-size: 11px;
  font-weight: 850;
}

.hour-card,
.day-card,
.alert-item,
.risk-card,
.source-grid div,
.source-grid button {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--weather-radius-md);
  background: rgba(255, 255, 255, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hour-card {
  min-height: 188px;
  padding: 14px 10px;
  text-align: center;
  display: grid;
  align-content: center;
  gap: 8px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.hour-card.is-now-card {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(56, 189, 248, 0.18);
}

.hour-card time,
.day-card time {
  display: block;
  color: var(--weather-muted);
  font-weight: 900;
  font-size: 0.78rem;
}

.weather-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
  font-size: 1.25rem;
}

.hour-card strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 950;
}

.hour-card p {
  margin: 6px 0 0;
  color: var(--weather-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.daily-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.day-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.day-card .day-summary {
  display: grid;
  gap: 4px;
}

.day-card .day-temps {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 950;
}

.day-card .day-temps strong {
  font-size: 1.36rem;
}

.day-card .day-temps span {
  color: var(--weather-muted);
  font-weight: 850;
}

.day-card.is-selected,
.alert-item.is-selected {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  background: rgba(255, 255, 255, 0.58);
}

.weather-app[data-condition="night"] .day-card.is-selected,
.weather-app[data-condition="rain"] .day-card.is-selected,
.weather-app[data-condition="storm"] .day-card.is-selected,
.weather-app[data-condition="night"] .alert-item.is-selected,
.weather-app[data-condition="rain"] .alert-item.is-selected,
.weather-app[data-condition="storm"] .alert-item.is-selected {
  background: rgba(255, 255, 255, 0.16);
}

.day-card strong {
  font-size: 1.22rem;
}

.day-card p {
  margin: 3px 0 0;
  color: var(--weather-muted);
  font-weight: 650;
  line-height: 1.35;
}

.status-banner {
  position: relative;
  z-index: 1;
  border-radius: var(--weather-radius-md);
  padding: 14px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(255, 255, 255, 0.28));
}

.status-banner.watch {
  border-color: rgba(245, 158, 11, 0.34);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(255, 255, 255, 0.28));
}

.status-banner.danger {
  border-color: rgba(239, 68, 68, 0.36);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(255, 255, 255, 0.28));
}

.status-banner strong {
  display: block;
  font-size: 1.05rem;
}

.status-banner p {
  margin: 6px 0 0;
  color: var(--weather-muted);
  font-weight: 650;
}

.alert-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin-top: 0;
}

.alert-item {
  padding: 12px;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.alert-item.is-primary-alert {
  border-color: rgba(245, 158, 11, 0.52);
  background: rgba(255, 255, 255, 0.56);
}

.severe-panel .panel-head a {
  border: 0;
  box-shadow: 0 8px 18px rgba(6, 17, 31, 0.18);
}

.alert-item strong {
  display: block;
}

.alert-item p {
  margin: 4px 0 0;
  color: var(--weather-muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.spc-overall,
.winter-meter {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-radius: var(--weather-radius-md);
  padding: 12px;
  background: rgba(37, 99, 235, 0.12);
}

.spc-overall span,
.winter-meter span {
  color: var(--weather-muted);
  font-weight: 850;
}

.spc-overall strong,
.winter-meter strong {
  font-size: 1.45rem;
  font-weight: 950;
}

.risk-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.risk-card {
  padding: 10px;
}

.risk-card strong {
  display: block;
  margin: 8px 0;
  font-weight: 950;
}

.risk-card small {
  color: var(--weather-muted);
  font-weight: 750;
}

.risk-bar,
.metric-bar {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.1);
}

.risk-bar i,
.metric-bar i {
  display: block;
  width: 5%;
  height: 100%;
  border-radius: inherit;
  background: var(--weather-blue);
  transition: width 360ms ease, background 360ms ease;
}

.severe-panel > p,
.winter-panel > p {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  color: var(--weather-muted);
  font-weight: 650;
  line-height: 1.45;
}

.radar-frame-wrap {
  position: relative;
  z-index: 1;
  border-radius: var(--weather-radius-md);
  overflow: hidden;
  background: #dbeafe;
  min-height: 420px;
}

.radar-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}

.source-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.source-grid div,
.source-grid button {
  padding: 12px;
  background: rgba(255, 255, 255, 0.44) !important;
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.source-grid strong,
.source-grid span,
.source-grid button strong {
  display: block;
}

.weather-modal[hidden] {
  display: none;
}

.weather-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 0;
  background: rgba(3, 10, 24, 0.72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal-sheet {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(232, 242, 255, 0.9)),
    #fff;
  color: #06111f;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  padding: 20px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #06111f;
  color: #fff;
  font-weight: 900;
}

.modal-sheet h2 {
  margin: 0 44px 12px 0;
  font-weight: 950;
}

.modal-body {
  display: grid;
  gap: 12px;
  font-weight: 550;
  line-height: 1.45;
}

.modal-body p {
  margin: 0;
}

.modal-note {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  padding: 12px;
  background: rgba(37, 99, 235, 0.06);
  color: rgba(6, 17, 31, 0.68);
  font-weight: 750;
}

.modal-section-title {
  color: rgba(6, 17, 31, 0.62);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px !important;
}

.daily-discussion {
  display: grid;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(37, 99, 235, 0.07);
  padding: 12px;
}

.daily-alert-list {
  display: grid;
  gap: 8px;
}

.daily-smart-summary {
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.1);
  padding: 12px;
  font-weight: 850 !important;
}

.station-compare-list {
  display: grid;
  gap: 8px;
}

.station-compare-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: center;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.07);
  padding: 10px;
}

.station-compare-item.is-primary {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.12);
}

.station-compare-item strong,
.station-compare-item span {
  min-width: 0;
}

.station-compare-item span {
  color: rgba(6, 17, 31, 0.62);
  font-size: 0.82rem;
  font-weight: 800;
}

.station-compare-item b {
  grid-row: span 2;
  font-size: 1rem;
}

.quality-score {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 10px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(37, 99, 235, 0.08);
  padding: 14px;
}

.quality-score strong {
  font-size: 3rem;
  line-height: 0.9;
}

.quality-score span {
  color: rgba(6, 17, 31, 0.62);
  font-weight: 900;
}

.quality-score p {
  margin: 0 !important;
  font-weight: 800;
}

.alert-mini-map {
  display: grid;
  gap: 8px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(37, 99, 235, 0.07);
  padding: 10px;
}

.alert-mini-map svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 210px;
}

.alert-mini-map path {
  fill: rgba(245, 158, 11, 0.24);
  stroke: rgba(245, 158, 11, 0.92);
  stroke-width: 4;
  stroke-linejoin: round;
}

.alert-mini-map circle {
  fill: #2563eb;
  stroke: #fff;
  stroke-width: 4;
}

.alert-mini-map span,
.alert-mini-map strong {
  color: rgba(6, 17, 31, 0.72);
  font-weight: 850;
}

.alert-mini-map.no-geometry {
  min-height: 92px;
  align-content: center;
}

.modal-hour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.modal-hour {
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(37, 99, 235, 0.08);
  padding: 10px;
  text-align: center;
}

.modal-hour time,
.modal-hour span {
  display: block;
  color: rgba(6, 17, 31, 0.66);
  font-size: 0.82rem;
  font-weight: 850;
}

.modal-hour .modal-condition-icon {
  margin-top: 6px;
  color: #06111f;
  font-size: 1.35rem;
  line-height: 1;
}

.modal-hour strong {
  display: block;
  margin: 4px 0;
  font-size: 1.2rem;
}

.modal-provenance {
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  padding-top: 10px;
  color: rgba(6, 17, 31, 0.62);
  font-size: 0.82rem;
  font-weight: 750;
}

.modal-provenance p {
  margin-top: 8px;
}

.modal-accuracy-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-accuracy-labels span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: rgba(6, 17, 31, 0.74);
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.15;
}

.modal-tech-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-grid span {
  margin-top: 4px;
  color: var(--weather-muted);
  font-weight: 650;
}

.methodology-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
}

.modal-sheet .technical-grid div {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(15, 23, 42, 0.1);
}

.modal-sheet .technical-grid span {
  color: rgba(6, 17, 31, 0.58);
}

.modal-chart-stack {
  display: grid;
  gap: 10px;
}

.modal-chart-stack > div {
  display: grid;
  gap: 6px;
}

.modal-chart-stack > div > span {
  color: rgba(6, 17, 31, 0.62);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.methodology-page {
  width: min(calc(100% - 28px), 1040px);
  margin: 18px auto 42px;
  display: grid;
  gap: 14px;
}

.methodology-hero,
.methodology-card {
  padding: 22px;
}

.methodology-hero h1 {
  margin: 0 0 12px;
  color: var(--weather-ink);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
  font-weight: 950;
}

.methodology-hero p,
.methodology-card p,
.methodology-card li {
  color: rgba(6, 17, 31, 0.72);
  font-weight: 650;
  line-height: 1.5;
}

.methodology-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.methodology-card-wide {
  grid-column: 1 / -1;
}

.methodology-card h2 {
  margin: 0 0 10px;
  color: var(--weather-ink);
  font-weight: 900;
}

.methodology-card p {
  margin: 0 0 10px;
}

.methodology-card p:last-child {
  margin-bottom: 0;
}

.methodology-card a {
  color: #0f4bb8;
  font-weight: 850;
}

.methodology-sources ul {
  margin: 0;
  padding-left: 20px;
}

.methodology-sources li + li {
  margin-top: 8px;
}

@keyframes sunBreathe {
  0%, 100% { transform: scale(1); opacity: 0.88; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes cloudDrift {
  from { transform: translate3d(-14px, 0, 0); }
  to { transform: translate3d(18px, 8px, 0); }
}

@keyframes lightningFlash {
  0%, 72%, 76%, 100% { opacity: 0; }
  73% { opacity: 0.96; }
  74% { opacity: 0.18; }
  75% { opacity: 0.72; }
}

@keyframes rainSheen {
  0%, 100% { opacity: 0.28; transform: translateY(-2px); }
  50% { opacity: 0.5; transform: translateY(2px); }
}

@media (max-width: 900px) {
  .weather-hero,
  .weather-grid {
    grid-template-columns: 1fr;
  }

  .weather-hero {
    grid-template-areas:
      "intro"
      "search"
      "current";
  }

  .location-search,
  .current-panel {
    grid-column: auto;
  }

  .weather-hero {
    min-height: auto;
    padding-top: 26px;
  }

  .metric-grid,
  .insight-grid,
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-module-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .weather-app {
    --weather-app-width: min(calc(100vw - 10px), 1180px);
    width: var(--weather-app-width);
    margin-top: 5px;
    border-radius: 20px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .weather-app.is-expanded {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 0;
    border-radius: 0;
  }

  .insight-grid,
  .risk-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .weather-hero {
    gap: 8px;
    padding-top: 14px;
  }

  .hero-copy h1 {
    font-size: clamp(2.25rem, 13vw, 3.2rem);
  }

  .glass-card,
  .glass-control {
    border-radius: 12px;
  }

  .current-panel,
  .forecast-panel,
  .alert-panel,
  .severe-panel,
  .radar-panel,
  .winter-panel,
  .source-panel,
  .nowcast-panel,
  .tech-panel {
    padding: 12px;
  }

  .metric-card {
    min-height: 108px;
    padding: 12px;
  }

  .feature-module-grid {
    gap: 8px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(112px, 36vw);
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
  }

  .feature-module {
    min-height: 96px;
    padding: 10px 8px;
  }

  .feature-module strong {
    margin-top: 2px;
    font-size: 1rem;
  }

  .feature-module p {
    font-size: 0.68rem;
  }

  .metric-card strong {
    margin-top: 10px;
    font-size: 1.35rem;
  }

  .metric-card p {
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .technical-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .current-topline,
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .current-main {
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
    margin-top: 14px;
  }

  .current-temp {
    font-size: clamp(3.9rem, 22vw, 5.6rem);
  }

  .condition-name {
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .forecast-copy,
  .nowcast-panel > p {
    font-size: 0.92rem;
    line-height: 1.32;
  }

  .alert-chip {
    max-width: 100%;
    text-align: left;
  }

  .feels-block {
    min-width: 88px;
    text-align: right;
  }

  .feels-block strong {
    font-size: 2rem;
  }

  .nowcast-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    font-size: 0.7rem;
  }

  .minute-strip {
    gap: 3px;
    min-height: 46px;
  }

  .minute-cell i {
    min-height: 4px;
  }

  .minute-cell span {
    font-size: 0.58rem;
  }

  .hourly-chart,
  .hourly-chart svg {
    min-height: 132px;
    height: 132px;
  }

  .hourly-strip {
    grid-auto-columns: minmax(88px, 1fr);
    min-height: 132px;
  }

  .hour-card {
    min-height: 124px;
    padding: 10px 8px;
    gap: 5px;
  }

  .hour-card strong {
    font-size: 1.25rem;
  }

  .hour-card p {
    font-size: 0.74rem;
    line-height: 1.18;
  }

  .day-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .radar-frame-wrap,
  .radar-frame-wrap iframe {
    min-height: 300px;
    height: 300px;
  }

  .search-row {
    flex-direction: column;
  }

  .search-row button {
    width: 100%;
  }

  .methodology-grid {
    grid-template-columns: 1fr;
  }

  .methodology-page {
    width: min(calc(100% - 10px), 1040px);
    margin-top: 5px;
  }

  .methodology-hero,
  .methodology-card {
    padding: 16px;
  }

  .modal-sheet {
    padding: 18px;
    max-height: calc(100vh - 20px);
    border-radius: 14px;
  }
}

@media (max-width: 380px) {
  .metric-grid,
  .technical-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .weather-canvas {
    display: none;
  }
}
