:root {
  --forecast-bg: #07101e;
  --forecast-panel: rgba(8, 18, 38, 0.84);
  --forecast-panel-strong: rgba(8, 15, 30, 0.9);
  --forecast-border: rgba(135, 170, 220, 0.24);
  --forecast-text: #f7fbff;
  --forecast-muted: rgba(219, 233, 246, 0.72);
  --forecast-hot: #ff8a4c;
  --forecast-cold: #63d8ff;
  --forecast-cyan: #6ee7ff;
  --forecast-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  --forecast-blur: blur(10px) saturate(1.08);
  --forecast-timeline-height: 68px;
  --forecast-timeline-mobile-height: 86px;
  --forecast-timeline-max-width: 920px;
  --forecast-timeline-step-width: 44px;
}

* {
  box-sizing: border-box;
}

html,
body,
.forecast-shell,
#map {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--forecast-bg);
  color: var(--forecast-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.forecast-shell {
  position: relative;
}

#map {
  background: var(--forecast-bg);
}

.leaflet-container {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--forecast-bg);
}

.leaflet-zoom-animated,
.leaflet-marker-icon,
.forecast-marker-host {
  will-change: transform;
}

.leaflet-tile-pane {
  filter: saturate(1.04) contrast(1.04) brightness(0.93);
}

.leaflet-tile-pane::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 8, 18, 0.12), rgba(3, 8, 18, 0) 20%, rgba(3, 8, 18, 0) 78%, rgba(3, 8, 18, 0.1)),
    radial-gradient(circle at center, rgba(3, 8, 18, 0) 62%, rgba(3, 8, 18, 0.14) 100%);
}

.leaflet-div-icon {
  background: transparent;
  border: 0;
}

.forecast-loading {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  background: rgba(5, 10, 20, 0.96);
  color: var(--forecast-text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.forecast-loading.is-hidden {
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.forecast-loading.is-error {
  text-align: center;
  color: #ffb3b3;
}

.forecast-loading.is-error strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
}

.forecast-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--forecast-cyan);
  border-radius: 50%;
  animation: forecast-spin 0.9s linear infinite;
}

@keyframes forecast-spin {
  to {
    transform: rotate(360deg);
  }
}

.forecast-topbar {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  pointer-events: none;
}

.forecast-brand,
.forecast-tools,
.forecast-view-panel {
  background: var(--forecast-panel);
  border: 1px solid var(--forecast-border);
  box-shadow: var(--forecast-shadow);
  backdrop-filter: var(--forecast-blur);
  -webkit-backdrop-filter: var(--forecast-blur);
}

.is-moving .forecast-brand,
.is-moving .forecast-tools,
.is-moving .forecast-view-panel,
.is-moving .forecast-popup {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.forecast-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 14px;
}

.forecast-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.forecast-brand p,
.forecast-brand h1 {
  margin: 0;
}

.forecast-brand p {
  color: var(--forecast-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-brand h1 {
  margin-top: 2px;
  color: var(--forecast-text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
}

.forecast-tools {
  position: absolute;
  top: 80px;
  right: 18px;
  z-index: 1000;
  display: grid;
  grid-template-columns: repeat(2, 42px);
  gap: 7px;
  padding: 7px;
  border-radius: 17px;
}

.forecast-tools button {
  width: 42px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(170, 205, 245, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--forecast-text);
  cursor: pointer;
  font: 800 18px/1 Inter, system-ui, sans-serif;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.forecast-tools button:hover {
  border-color: rgba(110, 231, 255, 0.48);
  background: rgba(110, 231, 255, 0.14);
  transform: translateY(-1px);
}

#btn-view {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border-radius: 13px;
  background: rgba(110, 231, 255, 0.11);
  color: var(--forecast-text);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#btn-toggle-temp {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  height: 32px;
  font-size: 11px;
  border-radius: 12px;
}

#btn-toggle-temp.is-active {
  border-color: rgba(110, 231, 255, 0.48);
  background: rgba(110, 231, 255, 0.15);
  color: var(--forecast-cyan);
}

.forecast-view-panel {
  position: absolute;
  top: 80px;
  right: 122px;
  z-index: 1000;
  width: 246px;
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(8px, 0, 0);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.forecast-view-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

.forecast-view-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.forecast-view-panel strong,
.forecast-view-panel__province span {
  color: var(--forecast-text);
  font-size: 12px;
  font-weight: 800;
}

.forecast-view-panel header button {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--forecast-text);
  cursor: pointer;
  font: 800 18px/1 Inter, system-ui, sans-serif;
}

.forecast-view-panel__modes,
.forecast-view-panel__province div {
  display: grid;
  gap: 7px;
}

.forecast-view-panel__modes {
  grid-template-columns: 1fr 1fr;
}

.forecast-view-panel__province {
  display: grid;
  gap: 8px;
}

.forecast-view-panel__province div {
  grid-template-columns: repeat(3, 1fr);
}

.forecast-view-panel__modes button,
.forecast-view-panel__province button {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--forecast-muted);
  cursor: pointer;
  font: 800 11px/1 Inter, system-ui, sans-serif;
}

.forecast-view-panel__modes button:hover,
.forecast-view-panel__province button:hover,
.forecast-view-panel__modes button.is-active,
.forecast-view-panel__province button.is-active {
  border-color: rgba(110, 231, 255, 0.48);
  background: rgba(110, 231, 255, 0.15);
  color: var(--forecast-cyan);
}

.forecast-province-focus-dim {
  transition: fill-opacity 0.18s ease;
}

.forecast-province-focus-frame {
  filter: drop-shadow(0 0 8px rgba(110, 231, 255, 0.34));
}

.has-province-focus .forecast-marker-host {
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.36));
}

.forecast-province-inset {
  position: absolute;
  right: 18px;
  bottom: calc(var(--forecast-timeline-height) + 12px);
  z-index: 1000;
  width: 390px;
  height: 260px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  padding: 10px;
  border-radius: 17px;
  background: rgba(7, 16, 32, 0.82);
  border: 1px solid rgba(135, 170, 220, 0.24);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
  backdrop-filter: var(--forecast-blur);
  -webkit-backdrop-filter: var(--forecast-blur);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 10px, 0) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
  overflow: hidden;
}

.forecast-province-inset.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.forecast-province-inset header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.forecast-province-inset header span {
  color: var(--forecast-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-province-inset header strong {
  min-width: 0;
  overflow: hidden;
  color: var(--forecast-text);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-province-inset__map {
  min-height: 0;
  overflow: hidden;
  border-radius: 13px;
  background: rgba(4, 10, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.forecast-province-inset__map .leaflet-tile-pane {
  filter: saturate(1.05) contrast(1.04) brightness(0.96);
}

.forecast-inset-marker-host {
  background: transparent;
  border: 0;
}

.forecast-inset-marker {
  display: grid;
  justify-items: center;
  gap: 1px;
  color: var(--forecast-text);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.86);
  transform: translate3d(var(--inset-marker-x, 0), var(--inset-marker-y, 0), 0);
}

.forecast-inset-marker__icon,
.forecast-inset-marker__icon .ws-weather-icon,
.forecast-inset-marker__icon .ws-weather-icon__static,
.forecast-inset-marker__icon .ws-weather-icon__animated,
.forecast-inset-marker__icon .ws-weather-icon__svg {
  width: 28px;
  height: 28px;
}

.forecast-inset-marker__temp {
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(5, 12, 24, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--forecast-text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.forecast-inset-marker__name {
  max-width: 84px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-inset-marker--no-temp .forecast-inset-marker__name {
  margin-top: -2px;
}

.forecast-marker-host {
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

.ws-marker-minimal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--forecast-text);
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

.ws-marker-minimal-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  padding: 3px 7px 3px 5px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(5, 12, 24, 0.46);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

.ws-marker-minimal--core .ws-marker-minimal-main {
  min-height: 36px;
  padding: 3px 6px 3px 4px;
  background: rgba(5, 12, 24, 0.4);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.ws-marker-minimal--core .ws-marker-minimal-name {
  max-width: 96px;
  font-size: 9px;
}

.ws-marker-minimal--mainland .ws-marker-minimal-name,
.ws-marker-minimal--core.ws-marker-minimal--mainland .ws-marker-minimal-name {
  max-width: 132px;
  overflow: visible;
  font-size: 9px;
  line-height: 1.08;
  text-overflow: clip;
  white-space: normal;
}

.is-moving .ws-marker-minimal-main {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.ws-marker-minimal-icon {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
}

.ws-marker-minimal--core .ws-marker-minimal-icon {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.ws-marker-minimal .ws-weather-icon,
.ws-marker-minimal .ws-weather-icon__static,
.ws-marker-minimal .ws-weather-icon__animated,
.ws-marker-minimal .ws-weather-icon__svg {
  width: 34px;
  height: 34px;
}

.ws-marker-minimal--core .ws-weather-icon,
.ws-marker-minimal--core .ws-weather-icon__static,
.ws-marker-minimal--core .ws-weather-icon__animated,
.ws-marker-minimal--core .ws-weather-icon__svg {
  width: 30px;
  height: 30px;
}

.ws-marker-minimal-temp {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--forecast-text);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.82);
  white-space: nowrap;
}

.ws-marker-minimal-temp strong,
.ws-marker-minimal-temp em {
  font-style: normal;
  font-weight: 850;
  line-height: 1;
}

.ws-marker-minimal-temp strong {
  color: var(--forecast-hot);
  font-size: 21px;
}

.ws-marker-minimal-temp em {
  color: var(--forecast-cold);
  font-size: 14px;
}

.ws-marker-minimal-temp--single strong {
  color: var(--forecast-text);
  font-size: 22px;
}

.ws-marker-minimal--core .ws-marker-minimal-temp strong {
  font-size: 19px;
}

.ws-marker-minimal--no-temp .ws-marker-minimal-main {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  gap: 0;
  padding: 0;
  border-radius: 50%;
}

.ws-marker-minimal--no-temp .ws-marker-minimal-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.ws-marker-minimal--core.ws-marker-minimal--no-temp .ws-marker-minimal-main {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
}

.ws-marker-minimal--core.ws-marker-minimal--no-temp .ws-marker-minimal-icon {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.ws-marker-minimal-name {
  max-width: 108px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.82);
  white-space: nowrap;
}

.ws-marker-minimal:not(.ws-marker-minimal--placement-center)::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 18px;
  height: 1px;
  background: rgba(210, 232, 255, 0.34);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.36);
  transform-origin: left center;
}

.ws-marker-minimal--placement-top::after {
  transform: rotate(90deg);
}

.ws-marker-minimal--placement-bottom::after {
  transform: rotate(-90deg);
}

.ws-marker-minimal--placement-right::after {
  transform: rotate(180deg);
}

.ws-marker-minimal--placement-left::after {
  transform: rotate(0deg);
}

.ws-marker-minimal--placement-top-right::after {
  transform: rotate(140deg);
}

.ws-marker-minimal--placement-top-left::after {
  transform: rotate(40deg);
}

.ws-marker-minimal--placement-bottom-right::after {
  transform: rotate(-140deg);
}

.ws-marker-minimal--placement-bottom-left::after {
  transform: rotate(-40deg);
}

.ws-marker-minimal--placement-far-top::after {
  width: 30px;
  transform: rotate(90deg);
}

.ws-marker-minimal--placement-far-bottom::after {
  width: 30px;
  transform: rotate(-90deg);
}

.ws-marker-minimal--placement-far-right::after {
  width: 30px;
  transform: rotate(180deg);
}

.ws-marker-minimal--placement-far-left::after {
  width: 30px;
  transform: rotate(0deg);
}

.ws-weather-icon,
.ws-weather-icon__static,
.ws-weather-icon__animated,
.ws-weather-icon__svg {
  width: 36px;
  height: 36px;
}

.ws-weather-icon {
  position: relative;
  display: grid;
  place-items: center;
  transform: translate3d(0, 0, 0);
}

.ws-weather-icon__static,
.ws-weather-icon__animated {
  position: absolute;
  inset: 0;
}

.ws-weather-icon__static {
  z-index: 1;
  object-fit: contain;
}

.ws-weather-icon__animated {
  z-index: 2;
  display: grid;
  place-items: center;
}

.ws-weather-icon.is-animated .ws-weather-icon__static,
.ws-weather-icon.is-static .ws-weather-icon__animated {
  opacity: 0;
}

.ws-weather-icon.is-static .ws-weather-icon__static,
.ws-weather-icon.is-animated .ws-weather-icon__animated {
  opacity: 1;
}

.is-weather-icon-paused .ws-weather-icon__animated {
  opacity: 0;
}

.is-weather-icon-paused .ws-weather-icon__static {
  opacity: 1;
}

.ws-weather-icon__svg {
  display: block;
  overflow: visible;
}

.ws-icon__sun {
  transform-origin: 25px 24px;
  animation: ws-sun-spin 18s linear infinite;
}

.ws-icon__moon {
  transform-origin: 28px 30px;
  animation: ws-moon-night-float 6.8s ease-in-out infinite;
}

.ws-icon__moon-body {
  transform-origin: 28px 30px;
  animation: ws-moon-night-pulse 5.6s ease-in-out infinite;
}

.ws-icon__star {
  transform-origin: center;
  animation: ws-star-twinkle 3.8s ease-in-out infinite;
}

.ws-icon__star--2 {
  animation-delay: -1.15s;
}

.ws-icon__star--3 {
  animation-delay: -2.1s;
}

.ws-icon__cloud {
  animation: ws-cloud-drift 5.8s ease-in-out infinite;
}

.ws-weather-icon--night .ws-icon__cloud {
  animation-duration: 7.2s;
}

.ws-icon__cloud--back {
  animation-duration: 7.4s;
  animation-delay: -1.2s;
}

.ws-weather-icon--night .ws-icon__cloud--back {
  animation-duration: 8.8s;
}

.ws-icon__rain {
  animation: ws-rain-fall 0.92s linear infinite;
}

.ws-weather-icon--night .ws-icon__rain {
  animation-duration: 1.05s;
}

.ws-icon__rain--1 {
  animation-delay: -0.22s;
}

.ws-icon__rain--2 {
  animation-delay: -0.46s;
}

.ws-icon__snow,
.ws-icon__hail {
  animation: ws-snow-fall 1.8s ease-in-out infinite;
}

.ws-weather-icon--night .ws-icon__snow,
.ws-weather-icon--night .ws-icon__hail {
  animation-duration: 2.25s;
}

.ws-icon__snow--1,
.ws-icon__hail--late {
  animation-delay: -0.5s;
}

.ws-icon__snow--2 {
  animation-delay: -0.95s;
}

.ws-icon__lightning {
  animation: ws-lightning-flash 2.7s steps(1, end) infinite;
}

.ws-weather-icon--night .ws-icon__lightning {
  animation-duration: 3.4s;
}

.ws-icon__fog,
.ws-icon__veil {
  animation: ws-fog-drift 4.8s ease-in-out infinite;
}

.ws-weather-icon--night .ws-icon__fog,
.ws-weather-icon--night .ws-icon__veil {
  animation-duration: 6.2s;
}

.ws-icon__badge {
  animation: ws-badge-pulse 2.2s ease-in-out infinite;
}

.is-weather-icon-paused .ws-weather-icon * {
  animation-play-state: paused !important;
}

@keyframes ws-sun-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ws-float-soft {
  50% {
    transform: translate3d(1px, -1px, 0);
  }
}

@keyframes ws-moon-night-float {
  50% {
    transform: translate3d(1.2px, -1.4px, 0);
  }
}

@keyframes ws-moon-night-pulse {
  50% {
    opacity: 0.86;
    transform: scale(0.985);
  }
}

@keyframes ws-star-twinkle {
  0%,
  100% {
    opacity: 0.38;
    transform: scale(0.82);
  }
  45% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ws-cloud-drift {
  50% {
    transform: translate3d(1.6px, 0, 0);
  }
}

@keyframes ws-rain-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -5px, 0);
  }
  25%,
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(-2px, 6px, 0);
  }
}

@keyframes ws-snow-fall {
  50% {
    opacity: 0.78;
    transform: translate3d(1px, 4px, 0);
  }
}

@keyframes ws-lightning-flash {
  0%,
  74%,
  100% {
    opacity: 0.36;
  }
  76%,
  82% {
    opacity: 1;
  }
}

@keyframes ws-fog-drift {
  50% {
    opacity: 0.74;
    transform: translate3d(3px, 0, 0);
  }
}

@keyframes ws-badge-pulse {
  50% {
    opacity: 0.66;
    transform: scale(0.88);
    transform-origin: 53px 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ws-weather-icon__animated {
    display: none;
  }

  .ws-weather-icon__static {
    opacity: 1 !important;
  }

  .ws-weather-icon * {
    animation: none !important;
  }
}

.forecast-timeline {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 1100;
  width: min(var(--forecast-timeline-max-width), calc(100vw - 32px));
  min-height: var(--forecast-timeline-height);
  max-height: var(--forecast-timeline-height);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 136px 9px 11px;
  border: 1px solid rgba(160, 190, 230, 0.16);
  border-radius: 18px;
  background: rgba(6, 14, 28, 0.76);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
  color: var(--forecast-text);
  transform: translateX(-50%);
  backdrop-filter: blur(8px) saturate(1.06);
  -webkit-backdrop-filter: blur(8px) saturate(1.06);
}

.is-moving .forecast-timeline {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 -5px 18px rgba(0, 0, 0, 0.26);
}

.forecast-timeline__controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-button,
.timeline-mode button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--forecast-text);
  cursor: pointer;
  font: 800 14px/1 Inter, system-ui, sans-serif;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.timeline-button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.timeline-button--play {
  color: var(--forecast-cyan);
}

.timeline-button:hover,
.timeline-mode button:hover {
  border-color: rgba(110, 231, 255, 0.48);
  background: rgba(110, 231, 255, 0.14);
}

.timeline-mode {
  position: absolute;
  top: 9px;
  right: 11px;
  width: 116px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.timeline-mode button {
  min-height: 25px;
  border-radius: 999px;
  font-size: 11px;
}

.timeline-mode button.is-active {
  border-color: rgba(110, 231, 255, 0.42);
  background: rgba(110, 231, 255, 0.18);
  color: var(--forecast-cyan);
}

.forecast-timeline__main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.forecast-timeline__selected {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
}

.forecast-timeline__selected span {
  display: none;
  color: var(--forecast-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-timeline__selected strong {
  overflow: hidden;
  color: var(--forecast-text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-timeline__track {
  position: relative;
  --timeline-step-width: var(--forecast-timeline-step-width);
  display: grid;
  grid-auto-columns: var(--timeline-step-width);
  grid-auto-flow: column;
  align-items: end;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 26px;
  padding: 7px 2px 2px;
  scroll-behavior: smooth;
  scrollbar-color: rgba(110, 231, 255, 0.5) rgba(255, 255, 255, 0.08);
  scrollbar-width: none;
}

.forecast-timeline__track::-webkit-scrollbar {
  display: none;
}

.forecast-timeline__track::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 6px;
  height: 1px;
  background: linear-gradient(90deg, rgba(110, 231, 255, 0.08), rgba(110, 231, 255, 0.34), rgba(110, 231, 255, 0.08));
  pointer-events: none;
}

.is-timeline-rail-hidden .forecast-timeline__track::before {
  display: none;
}

.timeline-step {
  position: relative;
  min-width: 0;
  min-height: 22px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--forecast-muted);
  cursor: pointer;
  font-family: Inter, system-ui, sans-serif;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.timeline-step::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(219, 233, 246, 0.34);
  transform: translateX(-50%);
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.timeline-step:hover {
  color: var(--forecast-text);
  background: rgba(110, 231, 255, 0.08);
}

.timeline-step.is-active {
  border-color: rgba(110, 231, 255, 0.36);
  background: rgba(110, 231, 255, 0.16);
  color: var(--forecast-text);
  box-shadow: none;
}

.timeline-step.is-active::before {
  background: var(--forecast-cyan);
  box-shadow: 0 0 0 4px rgba(110, 231, 255, 0.14), 0 0 12px rgba(110, 231, 255, 0.45);
  transform: translateX(-50%) scale(1.25);
}

.timeline-step__day {
  display: none;
  overflow: hidden;
  color: var(--forecast-cyan);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.timeline-step__day--empty {
  opacity: 0;
}

.timeline-step strong {
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.forecast-debug-panel {
  position: fixed;
  top: 92px;
  left: 18px;
  z-index: 6000;
  width: min(330px, calc(100vw - 36px));
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(110, 231, 255, 0.36);
  border-radius: 12px;
  background: rgba(5, 12, 24, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  color: var(--forecast-text);
  font: 700 11px/1.35 Inter, system-ui, sans-serif;
  pointer-events: none;
}

.forecast-debug-panel strong {
  color: var(--forecast-cyan);
  font-size: 12px;
}

.forecast-debug-panel span {
  color: var(--forecast-muted);
}

.forecast-popup-shell .leaflet-popup-content-wrapper,
.forecast-popup-shell .leaflet-popup-tip {
  background: transparent;
  box-shadow: none;
}

.forecast-popup-shell .leaflet-popup-content {
  width: 306px !important;
  margin: 0;
}

.forecast-popup {
  overflow: hidden;
  border: 1px solid rgba(135, 170, 220, 0.26);
  border-radius: 14px;
  background: var(--forecast-panel-strong);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  color: var(--forecast-text);
  backdrop-filter: var(--forecast-blur);
  -webkit-backdrop-filter: var(--forecast-blur);
}

.forecast-popup header {
  padding: 14px 15px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.forecast-popup header span {
  display: block;
  margin-top: 5px;
  color: var(--forecast-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.forecast-popup h2,
.forecast-popup p,
.forecast-popup dl {
  margin: 0;
}

.forecast-popup h2 {
  font-size: 20px;
  font-weight: 800;
}

.forecast-popup p {
  margin-top: 5px;
  color: var(--forecast-muted);
  font-size: 13px;
  font-weight: 700;
}

.forecast-popup__summary {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.forecast-popup__icon,
.forecast-popup__icon .ws-weather-icon,
.forecast-popup__icon .ws-weather-icon__static,
.forecast-popup__icon .ws-weather-icon__animated,
.forecast-popup__icon .ws-weather-icon__svg {
  width: 44px;
  height: 44px;
}

.forecast-popup__summary strong,
.forecast-popup__summary em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-popup__summary strong {
  color: var(--forecast-text);
  font-size: 14px;
  font-weight: 800;
}

.forecast-popup__summary em {
  margin-top: 3px;
  color: var(--forecast-cyan);
  font-size: 18px;
  font-style: normal;
  font-weight: 800;
}

.forecast-popup dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}

.forecast-popup__metric {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
}

.forecast-popup__metric dt {
  margin: 0 0 4px;
  color: var(--forecast-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.forecast-popup__metric dd {
  margin: 0;
  color: var(--forecast-text);
  font-size: 14px;
  font-weight: 800;
}

.forecast-popup__link {
  display: block;
  margin: 0 12px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(110, 231, 255, 0.14);
  color: var(--forecast-cyan);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 760px) {
  :root {
    --forecast-timeline-height: var(--forecast-timeline-mobile-height);
  }

  .forecast-topbar {
    top: 12px;
    left: 12px;
    right: 12px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .forecast-brand {
    width: min(100%, 340px);
    padding: 10px 12px;
  }

  .forecast-brand h1 {
    font-size: 19px;
  }

  .forecast-tools {
    top: auto;
    right: 12px;
    bottom: calc(var(--forecast-timeline-height) + 26px);
  }

  .forecast-view-panel {
    top: 12px;
    right: 112px;
    bottom: auto;
    width: min(246px, calc(100vw - 86px));
  }

  .forecast-province-inset {
    right: 12px;
    bottom: calc(var(--forecast-timeline-height) + 12px);
    width: min(292px, calc(100vw - 24px));
    height: 188px;
    padding: 8px;
    border-radius: 15px;
  }

  .forecast-timeline {
    left: 50%;
    right: auto;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: min(calc(100vw - 20px), var(--forecast-timeline-max-width));
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 6px;
    padding: 9px 10px 8px;
    border-radius: 16px;
  }

  .forecast-timeline__controls {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .timeline-mode {
    top: 9px;
    right: 10px;
    width: 104px;
  }

  .forecast-timeline__selected {
    position: absolute;
    top: 13px;
    left: 128px;
    right: 122px;
    min-height: 28px;
    align-items: center;
  }

  .forecast-timeline__selected strong {
    max-width: 100%;
    font-size: 13px;
  }

  .forecast-timeline__track {
    --timeline-step-width: 38px;
    min-height: 28px;
    padding-top: 7px;
  }

  .timeline-step {
    min-height: 22px;
    padding: 0 4px;
  }

  .timeline-step strong {
    font-size: 10px;
  }

  .timeline-button {
    width: 34px;
    height: 32px;
  }

  .timeline-mode button {
    min-height: 24px;
    font-size: 10px;
  }

  .ws-marker-minimal-main {
    min-height: 34px;
    padding: 2px 6px 2px 4px;
  }

  .ws-marker-minimal-icon,
  .ws-marker-minimal .ws-weather-icon,
  .ws-marker-minimal .ws-weather-icon__static,
  .ws-marker-minimal .ws-weather-icon__animated,
  .ws-marker-minimal .ws-weather-icon__svg {
    width: 30px;
    height: 30px;
  }

  .ws-marker-minimal-icon {
    flex-basis: 30px;
  }

  .ws-marker-minimal-temp strong,
  .ws-marker-minimal-temp--single strong {
    font-size: 19px;
  }

  .ws-marker-minimal-temp em {
    font-size: 13px;
  }

  .ws-marker-minimal-name {
    max-width: 92px;
    font-size: 9px;
  }

  .ws-marker-minimal--core .ws-marker-minimal-name {
    max-width: 86px;
    font-size: 8.5px;
  }
}
