:root {
  --app-chrome: #ffffff;
  --bg-body: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --surface-strong: #101214;
  --weather-canvas: #ffffff;
  --weather-hero: #ffffff;
  --weather-orb: #f4f5f7;

  --font-family: "Google Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --text-main: #101214;
  --text-sub: #5f6864;
  --text-light: #9aa19d;

  --accent-temp: #eda63d;
  --accent-rain: #277cb7;
  --timeline-rain-drizzle: #edf2f7;
  --timeline-rain-light: #cfdfea;
  --timeline-rain: #9fbed7;
  --timeline-rain-heavy: #6fa0c7;
  --accent-snow: var(--ui-accent-pink);
  --accent-sleet: #a78bfa;
  --accent-wind: var(--ui-accent-green);
  --accent-uv: #f97316;
  --accent-humidity: #0f99b7;
  --accent-cloud: #9ca3af;
  --accent-night: var(--ui-accent-purple);
  --weather-cloud-fill: #f8fafc;
  --weather-cloud-stroke: rgba(15, 23, 42, 0.12);
  --timeline-clear-day: #f3cc78;
  --timeline-clear-night: #2b406b;
  --timeline-cloud-day: #dfe8ea;
  --timeline-mostly-cloudy: #eef2f5;
  --timeline-cloud-night: #3f4c64;

  --col-width: 38px;
  --storm-col-width: var(--col-width);
  --label-width: 30px;
  --nav-height: 84px;
  --shell-radius: 36px;
  --minutely-col-width: 12px;
  --minutely-chart-height: 110px;
  --minutely-label-height: 18px;

  --border-color: rgba(0, 0, 0, 0.04);
  --nav-bg: rgba(255, 255, 255, 0.98);
  --nav-border: var(--ui-border-dashed);
  --panel-bg: #ffffff;
  --card-bg: #ffffff;
  --row-alt: transparent;
  --sticky-bg: rgba(255, 255, 255, 0.98);
  --glow-primary: rgba(14, 165, 233, 0.08);
  --glow-secondary: rgba(245, 158, 11, 0.08);

  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.02);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.02);
  --skeleton-base: rgba(148, 163, 184, 0.2);
  --skeleton-glow: rgba(255, 255, 255, 0.6);
  --chance-text-low: var(--text-main);
  --ui-border-light: rgba(16, 18, 20, 0.06);
  --ui-border-med: rgba(16, 18, 20, 0.18);
  --ui-border-strong: rgba(16, 18, 20, 0.34);
  --ui-border-dashed: rgba(0, 0, 0, 0.05);
  
  --ui-bg-white-soft: rgba(255, 255, 255, 0.42);
  --ui-bg-white-med: rgba(255, 255, 255, 0.56);
  --ui-bg-white-strong: rgba(255, 255, 255, 0.74);
  --ui-bg-white-solid: rgba(255, 255, 255, 0.88);
  
  --ui-bg-dark-soft: rgba(16, 18, 20, 0.045);
  --ui-bg-dark-med: rgba(16, 18, 20, 0.28);
  --ui-bg-dark-strong: rgba(16, 18, 20, 0.72);
  
  --ui-shadow-dark: rgba(16, 18, 20, 0.045);
  --ui-shadow-ring: rgba(16, 18, 20, 0.14);
  
  --ui-text-dark: rgba(16, 18, 20, 0.72);
  --ui-text-white: #ffffff;
  --ui-accent-pink: #f472b6;
  --ui-accent-blue: #2563eb;
  --ui-accent-green: #10b981;
  --ui-accent-purple: #5b4b8a;
  --ui-accent-orange: #b45309;
}

body.dark-mode {
  --app-chrome: #000000;
  --bg-body: #000000;
  --surface: #1c1c1e;
  --surface-soft: #2c2c2e;
  --surface-strong: #3a3a3c;
  --text-main: #ffffff;
  --text-sub: #ebebf5;
  --text-light: #8e8e93;

  --weather-canvas: #000000;
  --weather-hero: #1c1c1e;
  --weather-orb: #2c2c2e;

  --border-color: rgba(255, 255, 255, 0.1);
  --nav-bg: rgba(0, 0, 0, 0.85);
  --nav-border: rgba(255, 255, 255, 0.1);
  --panel-bg: #1c1c1e;
  --card-bg: #1c1c1e;
  --row-alt: transparent;
  --sticky-bg: rgba(0, 0, 0, 0.95);
  --glow-primary: rgba(10, 132, 255, 0.15);
  --glow-secondary: rgba(255, 159, 10, 0.15);

  --shadow-soft: none;
  --shadow-card: none;
  --timeline-clear-day: #f3b25b;
  --timeline-clear-night: #1a2845;
  --timeline-cloud-day: #3a3a3c;
  --timeline-mostly-cloudy: #2c2c2e;
  --timeline-cloud-night: #000000;
  --weather-cloud-fill: #2c2c2e;
  --weather-cloud-stroke: rgba(255, 255, 255, 0.1);
  --chance-text-low: #ffffff;
  --accent-temp: #fcd34d;
  --accent-rain: #60a5fa;
  --accent-sleet: #c4b5fd;
  --accent-uv: #fb923c;
  --accent-humidity: #2dd4bf;
  --accent-cloud: #6b7280;

  --timeline-rain-drizzle: #1e3a8a;
  --timeline-rain-light: #1e40af;
  --timeline-rain: #1d4ed8;
  --timeline-rain-heavy: #2563eb;


  --ui-border-light: rgba(255, 255, 255, 0.08);
  --ui-border-med: rgba(255, 255, 255, 0.14);
  --ui-border-strong: rgba(255, 255, 255, 0.24);
  --ui-border-dashed: rgba(255, 255, 255, 0.1);
  
  --ui-bg-white-soft: rgba(255, 255, 255, 0.04);
  --ui-bg-white-med: rgba(255, 255, 255, 0.08);
  --ui-bg-white-strong: rgba(255, 255, 255, 0.12);
  --ui-bg-white-solid: var(--surface);
  
  --ui-bg-dark-soft: rgba(255, 255, 255, 0.04);
  --ui-bg-dark-med: rgba(255, 255, 255, 0.1);
  --ui-bg-dark-strong: rgba(255, 255, 255, 0.15);
  
  --ui-shadow-dark: rgba(0, 0, 0, 0.3);
  --ui-shadow-ring: rgba(255, 255, 255, 0.15);
  
  --ui-text-dark: var(--text-sub);
  --ui-text-white: var(--text-main);
  
  --ui-accent-pink: #fbcfe8;
  --ui-accent-blue: #60a5fa;
  --ui-accent-green: #34d399;
  --ui-accent-purple: #c4b5fd;
  --ui-accent-orange: #fcd34d;
}

/* Weather tones removed for consistent minimal styling */

body.dark-mode,
body.dark-mode html {
  background-color: var(--app-chrome);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  background-color: var(--app-chrome);
  color: var(--text-main);
  font-family: var(--font-family);
  font-weight: 500;
  line-height: 1.5;
  overflow: hidden;
  overscroll-behavior: none;
}

body::before {
  display: none;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--app-chrome);
  pointer-events: none;
  z-index: 10000;
}

button {
  font-family: inherit;
}

.app-shell {
  width: 100%;
  max-width: none;
  height: 100%;
  background: var(--app-chrome);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: none;
  z-index: 1;
}

@media (min-width: 450px) {
  .app-shell {
    height: 100vh;
    margin-top: 0;
    border-radius: 0;
    overflow: hidden;
    border: none;
  }
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: var(--nav-height);
  scrollbar-width: none;
  position: relative;
  background: var(--weather-canvas);
  transition: background-color 0.45s ease;
}

.main-content::-webkit-scrollbar {
  display: none;
}

.main-content.is-radar {
  padding-bottom: 0;
  overflow: hidden;
  height: 100%;
}

/* Pull to Refresh */
.pull-refresh {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1000;
  transform: translateY(-100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pull-refresh-content {
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-rain);
  border: 1px solid var(--border-color);
}

.pull-refresh.visible {
  opacity: 1;
}

.pull-refresh.refreshing .pull-refresh-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.view {
  display: none;
  min-height: 100%;
}

.view.active {
  display: block;
}

/* Animations */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 8px;
  background: transparent;
  animation: riseIn 0.6s ease both;
  position: relative;
}

.nav-row {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  margin-bottom: 12px;
}

.loc-btn {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  display: grid;
  grid-template-columns: 18px auto 18px;
  align-items: center;
  justify-items: center;
  gap: 7px;
  max-width: 100%;
  font-size: 0.96rem;
  font-weight: 760;
  color: var(--text-main);
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: none;
}

.loc-btn:hover {
  opacity: 0.7;
}

.loc-name {
  max-width: min(68vw, 300px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.loc-icon {
  width: 13px;
  height: 13px;
  color: rgba(39, 124, 183, 0.85);
}

.loc-caret {
  width: 18px;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-left: 0;
  text-align: center;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-main);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.icon-btn:hover {
  background: rgba(148, 163, 184, 0.25);
}

.menu-icon {
  width: 24px;
}

.current-dashboard {
  position: relative;
  isolation: isolate;
  min-height: 258px;
  max-width: 720px;
  margin: 0 auto;
  padding: 26px 18px 30px;
  border-radius: 34px;
  overflow: hidden;
  background-color: var(--weather-hero);
  text-align: center;
  box-shadow: none;
  cursor: pointer;
  perspective: 1200px;
  touch-action: manipulation;
}

.current-dashboard:focus-visible {
  outline: 3px solid rgba(39, 124, 183, 0.26);
  outline-offset: 4px;
}

.current-dashboard::before,
.current-dashboard::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
}

.current-dashboard::before {
  top: 20px;
  left: 50%;
  width: min(58vw, 230px);
  height: min(58vw, 230px);
  background: var(--weather-orb);
  opacity: 0.62;
  transform: translateX(-50%);
  animation: weatherOrbFloat 8s ease-in-out infinite;
}

.current-dashboard::after {
  left: 50%;
  bottom: -82px;
  width: min(82vw, 320px);
  height: 170px;
  background: var(--ui-bg-white-soft);
  transform: translateX(-50%);
}

@keyframes weatherOrbFloat {
  0%, 100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(6px) scale(1.025);
  }
}

@media (prefers-reduced-motion: reduce) {
  .current-dashboard::before {
    animation: none;
  }

  .current-dashboard-inner,
  .current-rain-drop,
  .storm-flash,
  .weather-sun-rays,
  .weather-cloud-shape,
  .weather-rain-streak,
  .weather-snow-dot,
  .weather-wind-line,
  .weather-fog-line,
  .weather-star,
  .weather-lightning-bolt {
    animation: none;
    transition: none;
  }
}

.current-weather-effect {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 88%, transparent 100%);
  transition: opacity 0.24s ease;
}

body.weather-tone-rain .current-weather-effect,
body.weather-tone-storm .current-weather-effect {
  opacity: 1;
}

.current-rain-drop,
.storm-flash {
  position: absolute;
  pointer-events: none;
}

.current-rain-drop {
  top: -84px;
  left: var(--x, 50%);
  width: 2px;
  height: var(--h, 56px);
  border-radius: 999px;
  background: rgba(76, 151, 179, var(--o, 0.24));
  opacity: 0;
  transform: translate3d(0, -90px, 0) rotate(12deg);
  animation: currentRainFall var(--t, 4.8s) linear infinite;
  animation-delay: var(--d, 0s);
  will-change: transform, opacity;
}

.current-rain-drop.is-soft {
  width: 1px;
  background: rgba(76, 151, 179, calc(var(--o, 0.18) * 0.82));
}

.storm-flash {
  inset: 0;
  background: radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.75), transparent 38%);
  opacity: 0;
}

body.weather-tone-storm .storm-flash {
  animation: cardStormFlash 5.8s steps(1, end) infinite;
}

@keyframes currentRainFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -90px, 0) rotate(12deg);
  }
  12% {
    opacity: var(--o, 0.24);
  }
  88% {
    opacity: var(--o, 0.24);
  }
  100% {
    opacity: 0;
    transform: translate3d(-28px, 390px, 0) rotate(12deg);
  }
}

@keyframes cardStormFlash {
  0%, 83%, 89%, 100% {
    opacity: 0;
  }
  84%, 86% {
    opacity: 0.36;
  }
  87% {
    opacity: 0.16;
  }
}

.current-dashboard-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 202px;
  display: grid;
  transform-style: preserve-3d;
  transition: transform 0.52s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.current-dashboard.is-flipped .current-dashboard-inner {
  transform: rotateY(180deg);
}

.current-dashboard-face {
  grid-area: 1 / 1;
  min-height: 202px;
  backface-visibility: hidden;
}

.current-dashboard-front {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
}

.current-dashboard-back {
  display: grid;
  align-items: stretch;
  justify-items: stretch;
  transform: rotateY(180deg);
}

.current-flip-indicator {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transform: translateX(-50%);
  pointer-events: none;
}

.current-flip-indicator span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--ui-bg-dark-med);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.current-flip-indicator span:first-child {
  width: 14px;
  background: var(--ui-bg-dark-strong);
}

.current-dashboard.is-flipped .current-flip-indicator span:first-child {
  width: 5px;
  background: var(--ui-bg-dark-med);
}

.current-dashboard.is-flipped .current-flip-indicator span:last-child {
  width: 14px;
  background: var(--ui-bg-dark-strong);
}

.temp-huge {
  position: relative;
  display: inline-grid;
  place-items: start center;
  font-size: clamp(5.4rem, 23vw, 7.5rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.86;
  color: var(--text-main);
}

.temp-value {
  grid-area: 1 / 1;
}

.temp-degree {
  position: absolute;
  top: 0.07em;
  left: calc(100% + 0.02em);
  font-size: 0.33em;
  line-height: 1;
}

.hero-icon {
  width: 106px;
  height: 96px;
  border-radius: 999px;
  background: var(--ui-bg-white-soft);
  display: grid;
  place-items: center;
  color: var(--accent-temp);
  box-shadow: none;
  overflow: hidden;
  transform: translateX(-1px);
}

.current-weather-visual {
  width: 92px;
  height: 92px;
  overflow: visible;
  filter: drop-shadow(0 10px 18px rgba(76, 151, 179, 0.08));
}

.weather-sun-rays {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherSunPulse 5.8s ease-in-out infinite;
}

.weather-cloud-shape {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherCloudFloat 6.4s ease-in-out infinite;
}

.weather-rain-streak {
  stroke-dasharray: 18;
  stroke-dashoffset: 0;
  animation: weatherRainFall 1.15s linear infinite;
}

.weather-rain-streak:nth-of-type(2) {
  animation-delay: -0.32s;
}

.weather-rain-streak:nth-of-type(3) {
  animation-delay: -0.64s;
}

.weather-snow-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherSnowDrift 2.9s ease-in-out infinite;
}

.weather-snow-dot:nth-of-type(2) {
  animation-delay: -0.9s;
}

.weather-snow-dot:nth-of-type(3) {
  animation-delay: -1.7s;
}

.weather-wind-line,
.weather-fog-line {
  stroke-dasharray: 70;
  animation: weatherLineDrift 2.8s ease-in-out infinite;
}

.weather-wind-line:nth-child(2),
.weather-fog-line:nth-child(2) {
  animation-delay: -1.1s;
}

.weather-star {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherStarBlink 3.4s ease-in-out infinite;
}

.weather-star:nth-of-type(2) {
  animation-delay: -1.5s;
}

.weather-lightning-bolt {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherLightningFlash 3.8s ease-in-out infinite;
}

@keyframes weatherSunPulse {
  0%, 100% {
    opacity: 0.5;
    transform: rotate(0deg) scale(1);
  }
  50% {
    opacity: 0.76;
    transform: rotate(6deg) scale(1.04);
  }
}

@keyframes weatherCloudFloat {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(3px);
  }
}

@keyframes weatherRainFall {
  0% {
    opacity: 0.28;
    stroke-dashoffset: 18;
    transform: translateY(-3px);
  }
  50% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.28;
    stroke-dashoffset: -18;
    transform: translateY(5px);
  }
}

@keyframes weatherSnowDrift {
  0%, 100% {
    opacity: 0.58;
    transform: translate(0, -2px) scale(0.96);
  }
  50% {
    opacity: 0.94;
    transform: translate(3px, 3px) scale(1.04);
  }
}

@keyframes weatherLineDrift {
  0%, 100% {
    opacity: 0.42;
    stroke-dashoffset: 18;
    transform: translateX(-3px);
  }
  50% {
    opacity: 0.82;
    stroke-dashoffset: -18;
    transform: translateX(4px);
  }
}

@keyframes weatherStarBlink {
  0%, 100% {
    opacity: 0.42;
    transform: scale(0.82);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.08);
  }
}

@keyframes weatherLightningFlash {
  0%, 86%, 100% {
    opacity: 0.46;
    transform: scale(0.98);
  }
  88%, 93% {
    opacity: 1;
    transform: scale(1.04);
  }
}

.hero-icon.is-loading {
  background: var(--skeleton-base);
  box-shadow: none;
}

.hero-icon.is-loading .current-weather-visual {
  opacity: 0;
}

.hero-icon.is-rain {
  background: var(--ui-bg-white-soft);
  color: var(--accent-rain);
  box-shadow: none;
}

.hero-icon.is-storm {
  background: var(--ui-bg-white-soft);
  color: var(--accent-rain);
  box-shadow: none;
}

.hero-icon.is-storm .weather-lightning-bolt {
  fill: var(--accent-uv);
}

.hero-icon.is-storm .weather-rain-streak {
  stroke: var(--accent-rain);
}

.hero-icon.is-cloud {
  background: var(--ui-bg-white-soft);
  color: var(--text-sub);
  box-shadow: none;
}

.hero-icon.is-snow {
  background: var(--ui-bg-white-soft);
  color: var(--ui-accent-pink);
  box-shadow: none;
}

.hero-icon.is-wind {
  background: var(--ui-bg-white-soft);
  color: var(--accent-wind);
  box-shadow: none;
}

.hero-icon.is-night {
  background: var(--ui-bg-white-soft);
  color: var(--accent-night);
  box-shadow: none;
}

body.dark-mode .hero-icon {
  box-shadow: none;
}

body.dark-mode .loc-btn,
body.dark-mode .condition-chip {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

body.dark-mode .hero-icon {
  background: transparent;
}

body.dark-mode .hero-icon.is-rain {
  background: transparent;
}

body.dark-mode .hero-icon.is-storm {
  background: transparent;
}

body.dark-mode .hero-icon.is-cloud {
  background: transparent;
}

body.dark-mode .hero-icon.is-snow {
  background: transparent;
}

body.dark-mode .hero-icon.is-wind {
  background: transparent;
}

body.dark-mode .hero-icon.is-night {
  background: transparent;
}

body.dark-mode .current-weather-visual {
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.36));
}

.hero-meta {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.cond-text {
  max-width: min(78vw, 360px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(1.35rem, 5.3vw, 1.7rem);
  font-weight: 720;
  line-height: 1.18;
  color: var(--text-main);
}

.cond-range {
  display: none;
}

.current-metrics {
  display: none;
  width: min(100%, 350px);
  margin-top: 4px;
}

.condition-chip {
  min-width: 0;
  padding: 0 12px;
  border: none;
  border-left: 1px solid var(--ui-border-med);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}

.condition-chip:first-child {
  border-left: none;
}

.condition-chip[hidden] {
  display: none !important;
}

.condition-chip-icon {
  font-size: 0.78rem;
  line-height: 1;
  color: var(--text-light);
}

.condition-chip-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-main);
}

.weather-insight-inline {
  width: min(100%, 380px);
  margin: 10px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-sub);
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.weather-insight-inline[hidden] {
  display: none !important;
}

.weather-insight-icon {
  width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  margin-top: 1px;
  flex-shrink: 0;
}

.weather-insight-icon .wi {
  font-size: 14px;
  line-height: 1;
}

.weather-insight-text {
  min-width: 0;
  flex: 1;
  color: var(--text-sub);
}

.weather-insight-caret {
  color: var(--text-light);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  margin-top: 3px;
  transition: transform 0.2s ease;
}

.weather-insight-inline[aria-expanded="true"] .weather-insight-caret {
  transform: rotate(180deg);
}

.weather-insight-inline.tone-rain .weather-insight-icon {
  color: var(--accent-rain);
}

.weather-insight-inline.tone-wind .weather-insight-icon {
  color: var(--accent-wind);
}

.weather-insight-inline.tone-fog .weather-insight-icon {
  color: var(--text-light);
}

.weather-insight-inline.tone-snow .weather-insight-icon {
  color: var(--accent-snow);
}

.weather-insight-inline.tone-storm .weather-insight-icon {
  color: var(--accent-uv);
}

.current-details-trigger {
  width: fit-content;
  margin: 10px auto 0;
  padding: 6px 10px 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.current-details-trigger[hidden] {
  display: none !important;
}

.current-details-trigger-text {
  max-width: min(72vw, 240px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-details-trigger-caret {
  color: var(--text-light);
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.current-details-trigger[aria-expanded="true"] .current-details-trigger-caret {
  transform: rotate(180deg);
}

.current-details-panel {
  width: min(100%, 392px);
  margin: 10px auto 0;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.current-details-panel[hidden] {
  display: none !important;
}

.current-dashboard-back .current-details-panel {
  width: 100%;
  margin: 0 auto;
  padding: 0 18px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.current-dashboard-back .current-details-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  text-align: left;
}

.current-dashboard-back .current-details-icon {
  display: none;
}

.current-dashboard-back .current-details-headline {
  font-size: 1.1rem;
  font-weight: 740;
  letter-spacing: 0;
  line-height: 1.05;
}

.current-dashboard-back .current-details-summary {
  display: none;
}

.current-dashboard-back .current-details-chips {
  display: none;
}

.current-dashboard-back .current-detail-chip {
  display: none;
}

.current-dashboard-back .current-details-timeline {
  display: none;
}

.current-dashboard-back .current-details-time-slot {
  background: var(--ui-bg-white-med);
}

.current-details-back-cue {
  width: 19px;
  height: 19px;
  border-top: 3px solid var(--ui-border-strong);
  border-left: 3px solid var(--ui-border-strong);
  transform: translate(1px, 2px) rotate(-45deg);
  flex: 0 0 auto;
}

.current-details-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  align-items: end;
  gap: 16px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--ui-border-light);
  border-bottom: 1px solid var(--ui-border-light);
}

.current-details-big {
  color: var(--text-main);
  font-size: clamp(2.45rem, 13vw, 3.9rem);
  font-weight: 760;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.current-details-caption {
  margin-top: 5px;
  color: var(--text-sub);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.12;
}

.current-details-side-value {
  color: var(--text-main);
  font-size: clamp(1.45rem, 7vw, 2.25rem);
  font-weight: 740;
  line-height: 1;
}

.current-details-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  margin-top: 12px;
}

.current-details-item {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ui-border-light);
}

.current-details-label {
  min-width: 0;
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 680;
  line-height: 1.05;
}

.current-details-value {
  min-width: 0;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 740;
  line-height: 1.05;
  text-align: right;
}

.current-details-top {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.current-details-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.current-details-icon .wi {
  font-size: 0.88rem;
  line-height: 1;
}

.current-details-copy {
  min-width: 0;
}

.current-details-headline {
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-details-summary {
  margin-top: 2px;
  color: var(--text-sub);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.current-details-verdict {
  max-width: min(100%, 180px);
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ui-bg-white-med);
  color: var(--text-main);
  border: 1px solid var(--ui-border-light);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-details-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.current-detail-chip {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--ui-border-med);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.current-detail-chip-label {
  min-width: 0;
  order: 2;
  color: var(--text-light);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-detail-chip-value {
  min-width: 0;
  order: 1;
  color: var(--text-main);
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-details-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 8px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--ui-border-med);
}

.current-details-time-slot {
  min-width: 0;
  padding: 7px 6px;
  background: var(--surface);
  display: grid;
  gap: 3px;
}

.current-details-time-label {
  color: var(--text-light);
  font-size: 0.55rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-details-time-value {
  min-width: 0;
  color: var(--text-main);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-details-panel.tone-rain .current-details-icon,
.current-detail-chip.tone-rain .current-detail-chip-value,
.current-details-time-slot.tone-rain .current-details-time-value,
.current-details-trigger.tone-rain {
  color: var(--accent-rain);
}

.current-details-panel.tone-wind .current-details-icon,
.current-detail-chip.tone-wind .current-detail-chip-value,
.current-details-time-slot.tone-wind .current-details-time-value,
.current-details-trigger.tone-wind {
  color: var(--accent-wind);
}

.current-details-panel.tone-uv .current-details-icon,
.current-detail-chip.tone-uv .current-detail-chip-value,
.current-details-time-slot.tone-uv .current-details-time-value,
.current-details-trigger.tone-uv,
.current-details-panel.tone-storm .current-details-icon,
.current-detail-chip.tone-storm .current-detail-chip-value,
.current-details-time-slot.tone-storm .current-details-time-value,
.current-details-trigger.tone-storm {
  color: var(--accent-uv);
}

.current-details-panel.tone-humidity .current-details-icon,
.current-detail-chip.tone-humidity .current-detail-chip-value,
.current-details-time-slot.tone-humidity .current-details-time-value,
.current-details-trigger.tone-humidity {
  color: var(--accent-humidity);
}

.current-details-panel.tone-snow .current-details-icon,
.current-detail-chip.tone-snow .current-detail-chip-value,
.current-details-time-slot.tone-snow .current-details-time-value,
.current-details-trigger.tone-snow,
.current-details-panel.tone-cold .current-details-icon,
.current-detail-chip.tone-cold .current-detail-chip-value,
.current-details-time-slot.tone-cold .current-details-time-value,
.current-details-trigger.tone-cold {
  color: var(--accent-snow);
}

.current-details-panel.tone-good .current-details-icon,
.current-detail-chip.tone-good .current-detail-chip-value,
.current-details-time-slot.tone-good .current-details-time-value,
.current-details-trigger.tone-good {
  color: var(--accent-wind);
}

.loading-skeleton {
  position: relative;
  color: transparent !important;
  background: var(--skeleton-base);
  border-radius: 999px;
  overflow: hidden;
  display: inline-block;
}

.loading-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--skeleton-glow), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s ease infinite;
}

.temp-huge.loading-skeleton {
  width: 150px;
  border-radius: 24px;
}

.cond-text.loading-skeleton {
  width: 110px;
  height: 18px;
}

.cond-range.loading-skeleton {
  width: 140px;
  height: 16px;
}

.loc-name.loading-skeleton {
  width: 150px;
  height: 16px;
}

.weekly-trend.skeleton {
  background: var(--skeleton-base);
  overflow: hidden;
}

.weekly-trend.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--skeleton-glow), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 380px) {
  .temp-huge {
    font-size: clamp(4.9rem, 22vw, 5.4rem);
  }

  .hero-icon {
    width: 98px;
    height: 88px;
  }

  .current-weather-visual {
    width: 92px;
    height: 92px;
  }

  .current-metrics {
    width: 100%;
  }

  .condition-chip {
    padding: 0 10px;
  }

  .condition-chip-value {
    font-size: 0.78rem;
  }

  .current-details-panel {
    padding: 9px;
  }

  .current-details-top {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .current-details-verdict {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    margin-top: 2px;
  }

  .current-detail-chip {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .current-detail-chip-value {
    text-align: left;
  }

  .current-dashboard-back .current-details-top {
    grid-template-columns: 1fr;
  }

  .current-dashboard-back .current-details-verdict {
    grid-column: auto;
    justify-self: center;
    margin-top: 0;
  }

  .current-dashboard-back .current-detail-chip-value {
    text-align: center;
  }
}

.section-title {
  padding: 0 28px;
  margin-top: 28px;
  margin-bottom: 16px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.section-title--spaced {
  margin-top: 30px;
}

.daily-strip {
  width: min(100%, 820px);
  margin: 48px auto 0;
  padding: 0 16px 22px;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  scroll-padding-inline: 16px;
  animation: riseIn 0.6s ease both;
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 34px), transparent 100%);
}

.daily-strip::-webkit-scrollbar {
  display: none;
}

.weekly-trend {
  --active-day: 0;
  position: relative;
  width: max(100%, 532px);
  min-width: 532px;
  height: 136px;
  margin: 0 0 12px;
  border: 1px solid var(--ui-border-light);
  border-radius: 24px;
  overflow: visible;
  display: grid;
  grid-template-rows: 66px 70px;
  background: var(--ui-bg-white-strong);
  box-shadow: 0 18px 34px var(--ui-bg-dark-soft);
}

.weekly-trend::after {
  content: "";
  position: absolute;
  left: calc(((100% / 7) * var(--active-day)) + (100% / 14));
  bottom: -10px;
  z-index: 5;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 7px solid var(--surface-strong);
  transform: translateX(-50%);
  pointer-events: none;
  transition: left 0.22s ease;
}

.weekly-sky,
.weekly-day-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekly-sky {
  overflow: hidden;
  border-radius: 24px 24px 0 0;
}

.weekly-sky-segment {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--ui-bg-dark-strong);
  border-right: 1px solid var(--ui-bg-white-med);
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  padding: 0;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
  appearance: none;
  font: inherit;
  transition: filter 0.18s ease;
}

.weekly-sky-segment.active {
  filter: saturate(1.06) contrast(1.02);
}

.weekly-sky-segment:last-child,
.weekly-day-cell:last-child {
  border-right: 0;
}

.weekly-clear {
  background: var(--timeline-clear-day);
}

.weekly-mostly-cloudy {
  background: var(--timeline-mostly-cloudy);
}

.weekly-cloud {
  background: var(--timeline-cloud-day);
}

.weekly-rain-drizzle,
.weekly-rain-light,
.weekly-rain,
.weekly-rain-heavy {
  background: var(--timeline-rain);
  color: var(--ui-bg-dark-strong);
}

.weekly-rain-drizzle {
  background: var(--timeline-rain-drizzle);
}

.weekly-rain-light {
  background: var(--timeline-rain-light);
}

.weekly-rain-heavy {
  background: var(--timeline-rain-heavy);
}

.weekly-night {
  background: var(--timeline-clear-night);
}

.weekly-sky-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 34px;
  height: 32px;
  overflow: visible;
  transform: none;
}

.weekly-mini-icon span {
  position: absolute;
  display: block;
}

.weekly-mini-sun-shape {
  top: 3px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-temp);
  box-shadow:
    0 -11px 0 -9px var(--accent-temp),
    0 11px 0 -9px var(--accent-temp),
    11px 0 0 -9px var(--accent-temp),
    -11px 0 0 -9px var(--accent-temp),
    8px 8px 0 -9px var(--accent-temp),
    -8px 8px 0 -9px var(--accent-temp),
    8px -8px 0 -9px var(--accent-temp),
    -8px -8px 0 -9px var(--accent-temp);
}

.weekly-mini-sun-shape.is-partly,
.weekly-mini-sun-shape.is-mostly,
.weekly-mini-moon-shape.is-partly,
.weekly-mini-moon-shape.is-mostly {
  position: absolute;
  top: 0;
  left: 14px;
  transform: scale(0.65);
}

.weekly-mini-sun-shape.is-partly {
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.weekly-mini-sun-shape.is-mostly {
  clip-path: polygon(0 0, 100% 0, 100% 25%, 0 25%);
}

.weekly-mini-moon-shape.is-partly {
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}

.weekly-mini-moon-shape.is-mostly {
  clip-path: polygon(0 0, 100% 0, 100% 30%, 0 30%);
}

.weekly-mini-cloud-shape {
  left: 0;
  top: 8px;
  width: 34px;
  height: 19px;
  border-radius: 14px;
  background: #d7dfe4;
}

.weekly-mini-cloud-shape::before {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f1f4f6;
}

.weekly-mini-rain-mark {
  top: 25px;
  width: 3px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-rain);
  opacity: 0.72;
}

.weekly-mini-rain-mark-1 {
  left: 11px;
}

.weekly-mini-rain-mark-2 {
  left: 18px;
}

.weekly-mini-rain-mark-3 {
  left: 25px;
}

.weekly-mini-heavy_rain .weekly-mini-rain-mark {
  height: 8px;
  opacity: 0.9;
}

.weekly-mini-drizzle .weekly-mini-rain-mark,
.weekly-mini-light_rain .weekly-mini-rain-mark {
  width: 2px;
  height: 5px;
  opacity: 0.55;
}

.weekly-mini-lightning {
  left: 15px;
  top: 18px;
  width: 8px;
  height: 14px;
  background: var(--accent-uv);
  clip-path: polygon(48% 0, 12% 58%, 45% 52%, 30% 100%, 88% 34%, 55% 40%, 72% 0);
}

.weekly-mini-snow {
  top: 26px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.9;
}

.weekly-mini-snow-one {
  left: 12px;
}

.weekly-mini-snow-two {
  left: 22px;
}

.weekly-mini-fog {
  left: 4px;
  height: 3px;
  border-radius: 999px;
  background: var(--ui-bg-dark-med);
}

.weekly-mini-fog-one {
  top: 26px;
  width: 27px;
}

.weekly-mini-fog-two {
  top: 31px;
  left: 8px;
  width: 20px;
  opacity: 0.72;
}

.weekly-mini-wind-line {
  left: 2px;
  height: 4px;
  border-radius: 999px;
  background: var(--ui-bg-dark-strong);
}

.weekly-mini-wind-line-long {
  top: 11px;
  width: 30px;
}

.weekly-mini-wind-line-short {
  top: 21px;
  left: 8px;
  width: 22px;
  opacity: 0.68;
}

.weekly-mini-moon-shape {
  top: 2px;
  left: 7px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--accent-night);
}

.weekly-mini-moon-shape::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 8px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #d6d9e5;
}

.weekly-mini-moon-shape.is-partly {
  top: -1px;
  left: 14px;
  transform: scale(0.65);
}

.weekly-mini-star {
  top: 4px;
  left: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ui-bg-white-solid);
}

.weekly-day-row {
  align-items: center;
  background: var(--ui-bg-white-solid);
  overflow: hidden;
  border-radius: 0 0 24px 24px;
}

.weekly-day-cell {
  position: relative;
  min-width: 0;
  height: 100%;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  padding: 5px 1px 6px;
  border: 0;
  border-right: 1px solid var(--ui-border-light);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  opacity: 0.82;
  appearance: none;
  font: inherit;
  line-height: 1.02;
  text-align: center;
  transition: background-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.weekly-day-cell.active {
  background: var(--surface-strong);
  color: var(--ui-text-white);
  opacity: 1;
  z-index: 2;
}

.weekly-day-cell:first-child.active {
  border-bottom-left-radius: 24px;
}

.weekly-day-cell:last-child.active {
  border-bottom-right-radius: 24px;
}

.weekly-day-cell:focus-visible {
  outline: 3px solid rgba(39, 124, 183, 0.28);
  outline-offset: -3px;
}

.weekly-day-name {
  color: currentColor;
  font-size: 0.62rem;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.weekly-temp-range {
  display: grid;
  justify-items: center;
  gap: 1px;
}

.weekly-high {
  color: currentColor;
  font-size: 1.05rem;
  font-weight: 820;
  letter-spacing: 0;
}

.weekly-low {
  color: var(--text-sub);
  font-size: 0.82rem;
  font-weight: 720;
}

.weekly-day-cell.active .weekly-low {
  color: var(--ui-text-white);
  opacity: 0.75;
}

.icon-tone-sun {
  color: var(--accent-temp);
}

.icon-tone-night {
  color: var(--accent-night);
}

.icon-tone-rain {
  color: var(--accent-rain);
}

.icon-tone-storm {
  color: var(--accent-uv);
}

.icon-tone-cloud,
.icon-tone-fog {
  color: var(--text-sub);
}

.icon-tone-snow {
  color: var(--ui-accent-pink);
}

.icon-tone-wind {
  color: var(--accent-wind);
}

.chart-wrapper {
  margin: 0;
  padding: 24px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  box-shadow: none;
  position: relative;
  animation: riseIn 0.6s ease both;
}

.hourly-card {
  padding-top: 14px;
}

.chart-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 18px 10px;
  gap: 12px;
}

.chart-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0;
}

.chart-header--tight {
  padding: 4px 18px 8px;
}

.chart-unit {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-sub);
}

.chart-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.chart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-color);
  background: var(--panel-bg);
  color: var(--text-main);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.chart-toggle-caret {
  font-size: 0.7rem;
  transition: transform 0.25s ease;
}

.alerts-list {
  display: grid;
  gap: 12px;
  margin: 18px;
}

.alert-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  padding: 24px 0;
  box-shadow: none;
}

.alert-card.severity-extreme {
  border-color: rgba(239, 68, 68, 0.5);
  --alert-chip-bg: rgba(239, 68, 68, 0.15);
  --alert-chip-text: #ef4444;
}

.alert-card.severity-severe {
  border-color: rgba(234, 88, 12, 0.5);
  --alert-chip-bg: rgba(234, 88, 12, 0.15);
  --alert-chip-text: #ea580c;
}

.alert-card.severity-moderate {
  border-color: rgba(245, 158, 11, 0.45);
  --alert-chip-bg: rgba(245, 158, 11, 0.15);
  --alert-chip-text: #f59e0b;
}

.alert-card.severity-minor {
  border-color: rgba(34, 197, 94, 0.45);
  --alert-chip-bg: rgba(34, 197, 94, 0.15);
  --alert-chip-text: #22c55e;
}

.alert-card.severity-unknown {
  border-color: var(--border-color);
  --alert-chip-bg: var(--surface-soft);
  --alert-chip-text: var(--text-sub);
}

.alert-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.alert-info {
  display: grid;
  gap: 4px;
}

.alert-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0;
}

.alert-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-sub);
}

.alert-severity {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--alert-chip-bg, rgba(148, 163, 184, 0.2));
  color: var(--alert-chip-text, var(--text-sub));
}

.alert-toggle {
  border: 1px solid var(--border-color);
  background: var(--panel-bg);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.alert-toggle::after {
  content: "▾";
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.alert-card.is-expanded .alert-toggle::after {
  transform: rotate(180deg);
}

.alert-body {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-sub);
  line-height: 1.5;
  display: none;
}

.alert-card.is-expanded .alert-body {
  display: block;
}

.alert-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
}

.alert-link:hover {
  text-decoration: underline;
}

/* Snow Forecast Card */
.snow-forecast-card {
  margin: 0;
  padding: 32px 18px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  box-shadow: none;
  animation: riseIn 0.6s ease both;
  color: var(--text-main);
}

.snow-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.snow-outlook-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
}

.snow-outlook-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.snow-outlook-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(244, 114, 182, 0.16);
  display: grid;
  place-items: center;
  color: var(--ui-accent-pink);
  font-size: 22px;
}

.snow-outlook-summary {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
}

.snow-outlook-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.snow-outlook-type {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-sub);
}

.snow-status {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.snow-status.is-upcoming {
  background: rgba(59, 130, 246, 0.12);
  color: var(--ui-accent-blue);
}

.snow-status.is-ongoing {
  background: rgba(16, 185, 129, 0.15);
  color: var(--ui-accent-green);
}

.snow-status.is-ended {
  background: var(--surface-soft);
  color: var(--text-sub);
}

.snow-window {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.snow-window-col {
  display: grid;
  gap: 4px;
}

.snow-window-col--end {
  text-align: right;
  border-left: 1px solid var(--border-color);
  padding-left: 12px;
}

.snow-window-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
}

.snow-window-time {
  font-size: 1rem;
  font-weight: 800;
}

.snow-window-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-sub);
}

.snow-total {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.snow-bucket-title {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.snow-bucket-list {
  display: grid;
  gap: 12px;
}

.snow-bucket-row {
  display: grid;
  gap: 6px;
}

.snow-bucket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.7rem;
  font-weight: 700;
}

.snow-bucket-label {
  color: var(--text-sub);
}

.snow-bucket-value {
  color: var(--text-main);
}

.snow-bucket-bar {
  height: 10px;
  background: var(--surface-soft);
  border-radius: 999px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.snow-bucket-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent-snow);
  min-width: 6px;
}

.snow-empty {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-sub);
  padding: 4px 0 2px;
}

.snow-bucket-more {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-sub);
}

.hourly-card.is-expanded .chart-toggle-caret {
  transform: rotate(180deg);
}

.minutely-wrapper {
  padding: 14px 0 8px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.minutely-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px 10px;
}

.minutely-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0;
}

.minutely-sub {
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 2px;
}

.minutely-unit {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-sub);
}

.minutely-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.minutely-scroller::-webkit-scrollbar {
  display: none;
}

.minutely-plot {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  padding: 0 8px 10px;
  gap: 4px;
}

.minutely-axis {
  position: relative;
  height: var(--minutely-chart-height);
  padding: 4px 0;
  color: var(--text-light);
  font-size: 0.52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  text-align: right;
}

.minutely-axis-label {
  position: absolute;
  right: 0;
  transform: translateY(50%);
  font-size: 0.52rem;
}

.minutely-grid {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: var(--minutely-chart-height);
  position: relative;
  padding-bottom: 0;
}

.minutely-col {
  width: var(--minutely-col-width);
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  padding-bottom: 0;
  z-index: 1;
}

.minutely-bar {
  width: 100%;
  background: linear-gradient(180deg, rgba(39, 124, 183, 0.88), rgba(39, 124, 183, 0.42));
  border-radius: 5px 5px 3px 3px;
}

.minutely-band {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 12px;
  z-index: 0;
  pointer-events: none;
  background: transparent;
}

.minutely-band.low {
  background: transparent;
}

.minutely-band.med {
  background: transparent;
}

.minutely-band.high {
  background: transparent;
}

.minutely-band-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
  z-index: 0;
}

.minutely-cap-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 2px solid rgba(251, 191, 36, 0.75);
  z-index: 1;
}

.minutely-labels {
  position: relative;
  height: var(--minutely-label-height);
}

.minutely-time-label {
  position: absolute;
  bottom: 0;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: 0;
  white-space: nowrap;
}

.chart-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  position: relative;
  scroll-snap-type: x mandatory;
  padding-right: 20px;
}

.hourly-card .chart-scroller {
  padding: 0 18px 12px 22px;
  scroll-snap-type: none;
}

.chart-scroller::-webkit-scrollbar {
  display: none;
}

.chart-layout {
  display: grid;
  grid-template-columns: var(--label-width) 1fr;
}

.sticky-labels {
  position: sticky;
  left: 0;
  background: var(--sticky-bg);
  backdrop-filter: blur(8px);
  z-index: 20;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.lbl {
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--text-light);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.chart-row {
  position: relative;
}

.row-temp {
  height: 140px;
  position: relative;
  border-bottom: none;
  background: var(--row-alt);
  margin-bottom: 0;
}

.row-rain {
  height: 84px;
  border-bottom: none;
  background: var(--card-bg);
  margin-bottom: 0;
}

.row-sky-precip {
  height: 126px;
  border-bottom: none;
  background: transparent;
  border-radius: 14px;
  overflow: visible;
}

.row-rain-intensity {
  height: 84px;
  background: var(--row-alt);
}

.row-humidity {
  height: 84px;
  border-bottom: none;
  background: var(--row-alt);
  margin-bottom: 0;
}

.row-uv {
  height: 84px;
  border-bottom: none;
  background: var(--row-alt);
  margin-bottom: 0;
}

.row-wind {
  height: 104px;
  background: var(--card-bg);
}

.row-flex {
  display: flex;
  height: 100%;
}

.sky-precip-cols {
  position: relative;
  border-radius: 10px;
  overflow: visible;
}

.data-area {
  position: relative;
  display: flex;
  flex-direction: column;
}

.col {
  width: var(--col-width);
  flex-shrink: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  scroll-snap-align: start;
  padding-bottom: 24px;
}

.row-temp .col {
  padding-bottom: 20px;
}

.col.active::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.03);
  pointer-events: none;
  border-left: 1px dashed var(--ui-border-dashed);
  border-right: 1px dashed var(--ui-border-dashed);
}

.t-val {
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 6px;
  z-index: 2;
  transition: 0.2s;
  letter-spacing: 0;
}

.col.active .t-val {
  transform: scale(1.15);
  color: var(--accent-temp);
}

.rain-track {
  width: 24px;
  height: 44px;
  background: rgba(148, 163, 184, 0.25);
  border-radius: 11px;
  position: relative;
  overflow: hidden;
}

.rain-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--accent-rain);
  border-radius: inherit;
}

.rain-intensity-track {
  width: 24px;
  height: 44px;
  background: rgba(39, 124, 183, 0.18);
  border-radius: 11px;
  position: relative;
  overflow: hidden;
}

.rain-intensity-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--accent-rain);
  border-radius: inherit;
}

.rain-intensity-text {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--accent-rain);
  margin-bottom: 4px;
}

.col.is-empty .rain-track,
.col.is-empty .rain-intensity-track {
  opacity: 0.35;
}

.col.is-empty .rain-fill,
.col.is-empty .rain-intensity-fill {
  opacity: 0.15;
}

.r-txt {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-rain);
  margin-bottom: 4px;
}

/* Precip Type Overrides */
.col.is-snow .rain-fill,
.col.is-snow .rain-intensity-fill {
  background: var(--accent-snow);
}
.col.is-snow .rain-intensity-text,
.col.is-snow .r-txt {
  color: var(--accent-snow);
}
.col.is-sleet .rain-fill,
.col.is-sleet .rain-intensity-fill {
  background: var(--accent-sleet);
}
.col.is-sleet .rain-intensity-text,
.col.is-sleet .r-txt {
  color: var(--accent-sleet);
}

.cloud-track {
  width: 24px;
  height: 44px;
  background: rgba(156, 163, 175, 0.12);
  border-radius: 11px;
  position: relative;
  overflow: hidden;
}

.cloud-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--accent-cloud);
  border-radius: inherit;
}

.cloud-txt {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-cloud);
  margin-bottom: 4px;
}

.humidity-track {
  width: 24px;
  height: 44px;
  background: rgba(15, 153, 183, 0.12);
  border-radius: 11px;
  position: relative;
  overflow: hidden;
}

.humidity-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--accent-humidity);
  border-radius: inherit;
}

.humidity-txt {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-humidity);
  margin-bottom: 4px;
}

.uv-track {
  width: 24px;
  height: 44px;
  background: rgba(249, 115, 22, 0.18);
  border-radius: 11px;
  position: relative;
  overflow: hidden;
}

.uv-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--accent-uv);
  border-radius: inherit;
}

.uv-txt {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-uv);
  margin-bottom: 4px;
}

.wind-track {
  width: 24px;
  height: 44px;
  background: rgba(16, 185, 129, 0.18);
  border-radius: 11px;
  position: relative;
  overflow: hidden;
}

.wind-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--accent-wind);
  border-radius: inherit;
}

.w-arr {
  font-size: 0.7rem;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.w-spd {
  font-size: 0.65rem;
  font-weight: 700;
}

.time-lbl {
  font-size: 0.65rem;
  color: var(--text-sub);
  font-weight: 700;
  margin: 0;
  opacity: 1;
  transition: opacity 0.2s;
  letter-spacing: 0;
  position: absolute;
  bottom: 8px;
  white-space: nowrap;
}

.sky-precip-col.storm-hour {
  width: var(--storm-col-width);
  justify-content: flex-end;
  padding: 0 2px;
}

.storm-hour-button {
  width: 100%;
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: 28px 66px 22px;
  align-items: end;
  justify-items: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  padding: 0;
  border-radius: 12px;
}

.storm-hour-button.is-selected {
  background: var(--ui-bg-dark-soft);
  box-shadow: inset 0 0 0 1px var(--border-color);
}

body.dark-mode .storm-hour-button.is-selected {
  background: rgba(255, 255, 255, 0.06);
}

.storm-hour-top {
  display: grid;
  place-items: center;
  min-width: 0;
  padding-bottom: 6px;
}

.storm-hour-icon {
  font-size: 1.08rem;
  color: var(--text-sub);
  line-height: 1;
}

.sky-precip-segment.storm-segment {
  position: relative;
  width: 24px;
  height: 66px;
  border-radius: 11px;
  overflow: hidden;
}

.storm-segment-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.storm-hour-button.is-selected .storm-segment {
  box-shadow:
    0 0 0 2px var(--card-bg),
    0 0 0 4px var(--ui-shadow-ring);
}



.storm-segment-chance {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--ui-text-white);
  line-height: 1;
}

.storm-time-label {
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--text-sub);
  white-space: nowrap;
}

.storm-hour.is-thunderstorm .storm-hour-icon {
  color: var(--ui-accent-purple);
}

.storm-hour.is-snow .storm-hour-icon {
  color: var(--accent-snow);
}

.storm-hour.is-ice .storm-hour-icon,
.storm-hour.is-mixed .storm-hour-icon {
  color: var(--accent-sleet);
}

.storm-detail {
  margin: 4px 18px 4px;
  padding: 9px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-soft);
}

.storm-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.storm-detail-title {
  font-size: 0.72rem;
  font-weight: 850;
}

.storm-risk-chip {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.52rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: var(--ui-border-med);
  color: var(--text-sub);
}

.storm-risk-chip.is-low {
  background: rgba(39, 124, 183, 0.12);
  color: var(--accent-rain);
}

.storm-risk-chip.is-elevated {
  background: rgba(245, 158, 11, 0.16);
  color: var(--ui-accent-orange);
}

.storm-risk-chip.is-high {
  background: rgba(91, 75, 138, 0.18);
  color: var(--ui-accent-purple);
}

.storm-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.storm-detail-metric {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.storm-detail-metric span {
  font-size: 0.52rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-light);
}

.storm-detail-metric strong {
  min-width: 0;
  font-size: 0.66rem;
  font-weight: 850;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 390px) {
  .storm-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sky-precip-inline-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.1px;
  line-height: 1;
  white-space: nowrap;
  max-width: calc(var(--col-width) * 2.5);
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1px 3px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.08);
  text-shadow: 0 1px 1px rgba(15, 23, 42, 0.2);
  opacity: 0.9;
}

.sky-precip-run-label-layer {
  position: absolute;
  inset: 0 auto 0 0;
  pointer-events: none;
  z-index: 4;
}

.sky-precip-run-label {
  position: absolute;
  top: 21px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(15, 23, 42, 0.25);
}

.sky-precip-markers {
  display: none;
}

.temp-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.rain-intensity {
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease;
}

.hourly-card.is-expanded .rain-intensity {
  max-height: 200px;
  opacity: 1;
  transform: translateY(0);
}

.rain-intensity-header {
  position: relative;
  z-index: 2;
  background: var(--card-bg);
  padding: 4px 18px 8px;
  margin-top: 4px;
}

.hourly-scroller--sub {
  padding-top: 0;
}

.row-flex {
  position: relative;
  display: flex;
  height: 100%;
}

.row-flex::after,
.sky-precip-cols::after,
.minutely-grid::after,
.minutely-labels::after {
  content: "";
  display: block;
  flex: 0 0 22px;
  height: 1px;
}

#radar-view {
  position: relative;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-body);
}

.radar-map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.layer-selector {
  position: absolute;
  right: 16px;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 16px);
  z-index: 1005;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: max-content;
  max-width: 220px;
  gap: 8px;
  padding: 12px;
  border-radius: 20px;
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.layer-button {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: var(--panel-bg);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.layer-button:hover {
  border-color: var(--text-main);
}

.layer-button.active {
  background: var(--surface-strong);
  border-color: var(--surface-strong);
  color: var(--ui-text-white);
}

.layer-button--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.refresh-icon {
  width: 18px;
  height: 18px;
}

.radar-timestamp-info {
  margin-left: 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-sub);
  align-self: flex-end;
}

.leaflet-radar-labels-pane {
  pointer-events: none;
}

body.dark-mode .leaflet-control-zoom a,
body.dark-mode .leaflet-bar a {
  background: rgba(23, 24, 27, 0.9);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .leaflet-control-zoom a:hover,
body.dark-mode .leaflet-bar a:hover {
  background: rgba(30, 31, 36, 0.95);
}

body.dark-mode .leaflet-bar {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

body.dark-mode .leaflet-control-attribution {
  background: rgba(23, 24, 27, 0.8);
  color: var(--text-light);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-mode .leaflet-control-attribution a {
  color: var(--text-main);
}

#settings-view {
  padding: 32px 28px 120px;
}

.settings-card {
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 18px;
}

.settings-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
}

.settings-header p {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-top: 6px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  gap: 12px;
  flex-wrap: wrap;
}

.settings-row--stack {
  flex-direction: column;
  align-items: flex-start;
}

.settings-label {
  font-size: 0.85rem;
  font-weight: 700;
}

.settings-sub {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 2px;
}

.pill-group {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--panel-bg);
  border-radius: 999px;
  border: 1px solid var(--border-color);
}

.pill {
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-sub);
  border-radius: 999px;
  cursor: pointer;
}

.pill.active {
  background: var(--surface-strong);
  color: var(--ui-text-white);
}

.ghost-btn {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: var(--panel-bg);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.settings-input {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: var(--panel-bg);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  width: 100%;
  max-width: 200px;
}

.settings-select {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: var(--panel-bg);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 180px;
  max-width: 100%;
}

.settings-input:focus {
  outline: 2px solid rgba(14, 165, 233, 0.3);
  border-color: rgba(14, 165, 233, 0.45);
}

.settings-select:focus {
  outline: 2px solid rgba(14, 165, 233, 0.3);
  border-color: rgba(14, 165, 233, 0.45);
}

@media (max-width: 380px) {
  .settings-select {
    min-width: 140px;
    padding: 7px 10px;
    font-size: 0.72rem;
  }
}

.settings-radio-group {
  display: grid;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-sub);
}

.settings-radio-group input {
  margin-right: 6px;
}

.settings-radio-group label.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-radio-group input:disabled {
  cursor: not-allowed;
}

.settings-meta {
  font-size: 0.7rem;
  color: var(--text-light);
}

.settings-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  display: inline-block;
}

.settings-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.toggle-slider::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}

.settings-toggle input:checked + .toggle-slider {
  background: var(--accent-rain);
}

.settings-toggle input:checked + .toggle-slider::after {
  transform: translateX(20px);
}

.location-picker {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1200;
}

.location-picker.is-open {
  opacity: 1;
  pointer-events: auto;
}

.location-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
}

.location-picker-panel {
  position: absolute;
  left: 50%;
  top: 10%;
  transform: translateX(-50%);
  width: min(92%, 420px);
  background: var(--panel-bg);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  padding: 18px;
  display: grid;
  gap: 16px;
}

.location-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.close-x {
  font-size: 0.85rem;
  font-weight: 800;
}

.location-current-btn {
  width: 100%;
  text-align: left;
}

.location-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.location-results {
  display: grid;
  gap: 14px;
}

.location-section {
  display: grid;
  gap: 8px;
}

.location-title {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.location-list {
  list-style: none;
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.location-list li {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

body.location-picker-open {
  overflow: hidden;
}

.nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--nav-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--text-light);
  cursor: pointer;
  transition: 0.2s;
  width: 70px;
}

.nav-item:focus-visible {
  outline: 2px solid var(--accent-rain);
  outline-offset: 4px;
}

.nav-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: 0.2s;
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.nav-item.active {
  color: var(--text-main);
}

.nav-item.active .nav-icon {
  transform: translateY(-3px);
  fill: var(--text-main);
}

.nav-item.active::after {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--text-main);
  border-radius: 50%;
  margin-top: 4px;
}

.snackbar {
  position: absolute;
  left: 50%;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 12px);
  transform: translateX(-50%) translateY(16px);
  background: rgba(15, 23, 42, 0.92);
  color: var(--ui-text-white);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.snackbar.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#daily-forecast-section {
  margin-top: 16px;
}


.pwa-install-banner {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 12px);
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.dark-mode .pwa-install-banner {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.pwa-install-banner[hidden] {
  display: none !important;
}

.pwa-install-info {
  flex: 1;
}

.pwa-install-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.pwa-install-sub {
  font-size: 0.75rem;
  color: var(--text-sub);
}

.pwa-install-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pwa-install-banner .ghost-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
  background: var(--text-main);
  color: var(--bg-body);
  border: none;
  border-radius: 20px;
  font-weight: 700;
}

.pwa-install-banner .icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ui-bg-white-soft);
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
