:root {
  color-scheme: light;
  --sber-green: #21a038;
  --sber-green-dark: #1a8a2e;
  --sber-green-light: #e8f5e9;
  --sber-gradient: linear-gradient(135deg, #21a038 0%, #1b8c2e 50%, #147a24 100%);
  --sber-gradient-light: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  --bg: #f4f5f7;
  --card-bg: #ffffff;
  --surface: #ffffff;
  --text: #2a2a2a;
  --text-secondary: #8b8b8b;
  --text-tertiary: #b0b0b0;
  --line: rgba(0, 0, 0, 0.05);
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 14px;
  --safe-bottom: max(10px, env(safe-area-inset-bottom));
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
}

.loading-screen,
.weather-app {
  min-height: 100vh;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  background: var(--sber-gradient);
  color: white;
}

.loading-mark {
  position: relative;
  width: 78px;
  height: 78px;
}

.loading-ring,
.loading-core {
  position: absolute;
  inset: 0;
  border-radius: 18px;
}

.loading-ring {
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.96);
  animation: spin 1.4s linear infinite;
}

.loading-core {
  inset: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
}

.loading-core span {
  font-size: 1.8rem;
  font-weight: 800;
}

.loading-copy {
  text-align: center;
  max-width: 320px;
}

.loading-kicker {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.loading-copy h1 {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.08;
}

.loading-copy p:last-child {
  margin: 14px 0 0;
  line-height: 1.55;
  opacity: 0.82;
}

.loading-dots {
  display: flex;
  gap: 8px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  animation: pulse 1.2s ease infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.weather-app {
  display: grid;
  gap: 16px;
  padding: 0 16px calc(24px + var(--safe-bottom));
  align-content: start;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
  overflow-x: clip;
}

.weather-app.is-summary-view {
  gap: 12px;
}

.weather-app > * {
  min-width: 0;
}

.app-view > *,
.summary-view > * {
  min-width: 0;
}

.weather-app.is-entering {
  opacity: 0;
  transform: translateY(14px);
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 -16px;
  padding: 16px 16px 12px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--sber-gradient);
  color: white;
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(33, 160, 56, 0.3);
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 2px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sber-green);
  font-weight: 700;
}

.topbar h1 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.1;
}

.header-btn {
  min-width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.header-btn:disabled {
  cursor: default;
  opacity: 0.72;
}

.header-btn__icon {
  display: block;
  line-height: 1;
}

.header-btn__text {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1;
}

.header-btn.is-loading .header-btn__icon {
  animation: spin 0.9s linear infinite;
}

.data-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 4px;
}

.data-status__time {
  min-width: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.data-status__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2f3;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.data-status__badge[data-state="fresh"] {
  background: var(--sber-green-light);
  color: var(--sber-green-dark);
}

.data-status__badge[data-state="cache"] {
  background: #edf5ff;
  color: #2667c9;
}

.data-status__badge[data-state="stale"] {
  background: #fff4e5;
  color: #b76e00;
}

.data-status__badge[data-state="direct"] {
  background: #f2ecff;
  color: #6b43c3;
}

.data-status__badge[data-state="error"] {
  background: #ffe8e8;
  color: #c63c3c;
}

.data-status__badge[data-state="loading"] {
  background: #eef2f3;
  color: var(--text-secondary);
}

.city-selector {
  position: relative;
}

.city-selector__trigger,
.forecast-panel,
.stat-card,
.insight-card,
.city-selector__dropdown {
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.city-selector__trigger {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  min-width: 0;
}

.city-selector__text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.city-selector__label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sber-green);
  font-weight: 700;
}

.city-selector__text strong {
  font-size: 1.05rem;
}

.city-selector__meta {
  font-size: 0.88rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.city-selector__arrow {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--sber-green-light);
  position: relative;
  transition: transform 0.2s ease;
}

.city-selector__arrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--sber-green);
  border-bottom: 2px solid var(--sber-green);
  transform: translateY(-2px) rotate(45deg);
}

.city-selector.is-open .city-selector__arrow {
  transform: rotate(180deg);
}

.city-selector__dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 30;
  padding: 14px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: grid;
  gap: 12px;
  max-width: 100%;
}

.view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(33, 160, 56, 0.08);
  align-self: flex-start;
}

.view-switcher__btn {
  min-width: 108px;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
}

.view-switcher__btn.is-active {
  background: white;
  color: var(--sber-green);
  box-shadow: 0 6px 16px rgba(33, 160, 56, 0.12);
}

.app-view,
.summary-view {
  display: grid;
  gap: 16px;
}

.summary-view {
  gap: 10px;
}

.summary-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.summary-filter {
  display: grid;
  gap: 8px;
  min-width: min(100%, 240px);
}

.summary-filter__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sber-green);
  font-weight: 700;
}

.summary-filter select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  background: white;
  color: var(--text);
  font: inherit;
}

.summary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.summary-share-btn {
  min-height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #34a853 0%, #1f8f48 100%);
  color: white;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(33, 160, 56, 0.18);
}

.summary-reset-btn {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(33, 160, 56, 0.18);
  border-radius: 14px;
  background: white;
  color: var(--sber-green);
  font-size: 0.92rem;
  font-weight: 700;
}

.summary-card {
  border-radius: var(--radius-xl);
  padding: 20px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.summary-card__meta {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fafcfb;
  border: 1px solid rgba(33, 160, 56, 0.08);
}

.summary-item__bullet {
  color: var(--sber-green);
  font-weight: 800;
  line-height: 1.4;
}

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

.summary-item__content strong {
  font-size: 0.98rem;
}

.summary-item__content span {
  color: var(--text-secondary);
  line-height: 1.45;
}

.summary-item__remove {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  background: white;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
}

.summary-list__empty {
  padding: 18px;
  border-radius: 16px;
  background: #fafbfc;
  color: var(--text-secondary);
  text-align: center;
}

.city-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  background: var(--bg);
  border-radius: 14px;
  border: 2px solid transparent;
}

.city-search:focus-within {
  background: white;
  border-color: var(--sber-green);
  box-shadow: 0 0 0 4px rgba(33, 160, 56, 0.1);
}

.city-search__icon {
  color: var(--text-tertiary);
}

.city-search input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
}

.city-search input::placeholder {
  color: var(--text-tertiary);
}

.city-options {
  max-height: 320px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
}

.city-option {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-lg);
  background: #fafbfc;
  text-align: left;
  display: grid;
  gap: 8px;
}

.city-option__top,
.city-option__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.city-option__zone {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--sber-green-light);
  color: var(--sber-green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.city-option__condition {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.city-option__temp {
  font-weight: 800;
}

.city-option.is-active {
  border-color: rgba(33, 160, 56, 0.2);
  background: linear-gradient(135deg, #f2fbf4 0%, #ffffff 100%);
}

.city-chip-empty {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: #fafbfc;
  text-align: center;
  color: var(--text-secondary);
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--sber-gradient);
  padding: 28px 24px;
  color: white;
  box-shadow: 0 8px 32px rgba(33, 160, 56, 0.25);
}

.hero-card__backdrop,
.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}

.hero-card::before {
  width: 200px;
  height: 200px;
  top: -60px;
  right: -40px;
}

.hero-card::after {
  width: 160px;
  height: 160px;
  bottom: -80px;
  left: -30px;
  background: rgba(255, 255, 255, 0.05);
}

.hero-card__backdrop {
  display: none;
}

.hero-card__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
}

.location-label {
  margin: 0 0 8px;
  font-size: 0.84rem;
  opacity: 0.82;
  font-weight: 500;
}

.location-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.location-row h2 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.05;
  min-width: 0;
}

.status-pill {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
}

.condition-text,
.feels-like {
  margin: 0;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.hero-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
}

.temperature-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.temperature-value {
  font-size: 4.5rem;
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.temperature-unit {
  margin-top: 10px;
  font-size: 1.5rem;
  font-weight: 600;
}

.weather-scene {
  width: 132px;
  height: 132px;
  flex-shrink: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.weather-scene::after {
  content: "";
  position: absolute;
  inset: auto 16px 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  filter: blur(9px);
}

.scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.weather-scene[data-scene="sunny"] .scene--sunny,
.weather-scene[data-scene="cloudy"] .scene--cloudy,
.weather-scene[data-scene="rainy"] .scene--rainy,
.weather-scene[data-scene="windy"] .scene--windy {
  opacity: 1;
  transform: scale(1);
}

.sun {
  position: absolute;
  width: 54px;
  height: 54px;
  top: 18px;
  right: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8c4, #ffb627 72%);
  box-shadow: 0 0 0 10px rgba(255, 190, 61, 0.18);
  animation: pulseSun 3s ease-in-out infinite;
}

.sun::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 214, 120, 0.42);
  animation: spin 12s linear infinite;
}

.cloud {
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #dfeef2);
  box-shadow: inset 0 -6px 12px rgba(172, 200, 212, 0.22);
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  width: 28px;
  height: 28px;
  left: 10px;
  top: -14px;
}

.cloud::after {
  width: 34px;
  height: 34px;
  right: 10px;
  top: -18px;
}

.cloud--one {
  width: 70px;
  height: 26px;
  left: 16px;
  bottom: 28px;
  animation: drift 5.8s ease-in-out infinite;
}

.cloud--two {
  width: 52px;
  height: 22px;
  left: 56px;
  bottom: 48px;
  opacity: 0.94;
  animation: drift 6.6s ease-in-out infinite reverse;
}

.cloud--large {
  width: 90px;
  height: 30px;
  top: 38px;
  left: 16px;
}

.cloud--medium {
  width: 64px;
  height: 24px;
  top: 70px;
  right: 16px;
}

.cloud--storm {
  width: 90px;
  height: 30px;
  top: 28px;
  left: 22px;
  background: linear-gradient(180deg, #f7fafc, #c9d7e0);
}

.cloud--wind {
  width: 74px;
  height: 24px;
  top: 32px;
  right: 16px;
}

.mist {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 28px;
  height: 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(213, 229, 236, 0.14), rgba(213, 229, 236, 0.6));
  filter: blur(4px);
  animation: mist 4s ease-in-out infinite;
}

.rain {
  position: absolute;
  top: 66px;
  width: 3px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(79, 167, 255, 0.1), rgba(57, 134, 246, 0.95));
  animation: rain 1.1s linear infinite;
}

.rain--one { left: 52px; }
.rain--two { left: 70px; animation-delay: 0.2s; }
.rain--three { left: 88px; animation-delay: 0.4s; }

.wind {
  position: absolute;
  left: 18px;
  right: 18px;
  height: 10px;
  border-top: 3px solid rgba(76, 168, 255, 0.65);
  border-radius: 50%;
  animation: wind 2.4s ease-in-out infinite;
}

.wind::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -5px;
  width: 14px;
  height: 14px;
  border-right: 3px solid rgba(76, 168, 255, 0.65);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-radius: 50%;
}

.wind--one { top: 54px; }
.wind--two { top: 76px; left: 28px; animation-delay: 0.25s; }
.wind--three { top: 98px; right: 28px; animation-delay: 0.5s; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-head > * {
  min-width: 0;
}

.section-head h3,
.insight-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.section-head p,
.stat-note,
.insight-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.4;
}

.section-head p {
  font-size: 0.84rem;
  max-width: 190px;
  text-align: right;
}

.forecast-panel,
.insight-card {
  border-radius: var(--radius-xl);
  padding: 20px;
}

.forecast-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}

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

.daily-forecast-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scroll-snap-type: x mandatory;
}

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

.forecast-item {
  width: 76px;
  flex-shrink: 0;
  padding: 14px 8px;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.03);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
}

.forecast-item.is-now {
  background: var(--sber-green);
}

.daily-forecast-item {
  width: 110px;
  flex-shrink: 0;
  padding: 14px 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%);
  border: 1px solid rgba(33, 160, 56, 0.08);
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
  text-align: center;
  scroll-snap-align: start;
}

.daily-forecast-item.is-today {
  background: linear-gradient(180deg, #ecf8ef 0%, #ffffff 100%);
  border-color: rgba(33, 160, 56, 0.2);
}

.daily-forecast-item--empty {
  width: 100%;
}

.daily-forecast-day {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.daily-forecast-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.daily-forecast-temp {
  font-size: 0.92rem;
  line-height: 1.2;
}

.daily-forecast-label {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.forecast-badge,
.forecast-time {
  display: block;
}

.forecast-badge {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.forecast-icon-wrap {
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(33, 160, 56, 0.08);
}

.forecast-icon {
  font-size: 1.2rem;
}

.forecast-time {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  min-height: 30px;
}

.forecast-temp {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 700;
}

.forecast-item.is-now .forecast-badge,
.forecast-item.is-now .forecast-time,
.forecast-item.is-now .forecast-temp,
.forecast-item.is-now .forecast-icon {
  color: white;
}

.forecast-item.is-now .forecast-icon-wrap {
  background: rgba(255, 255, 255, 0.14);
}

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

.stat-card {
  padding: 18px 16px;
  border-radius: var(--radius-lg);
}

.stat-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--sber-green-light);
}

.stat-card--accent {
  background: var(--sber-gradient);
  color: white;
}

.stat-card--accent .stat-icon {
  background: rgba(255, 255, 255, 0.16);
}

.stat-card--accent .stat-label,
.stat-card--accent .stat-note,
.stat-card--accent .stat-icon {
  color: rgba(255, 255, 255, 0.88);
}

.stat-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  font-weight: 700;
}

.stat-value {
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: 8px;
}

.insight-card {
  background: linear-gradient(135deg, #fff3e0, #fff8e1);
  border: 1px solid rgba(255, 152, 0, 0.15);
}

.insight-card .eyebrow {
  color: #e67e00;
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

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

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

@keyframes mist {
  0%, 100% { transform: translateX(0); opacity: 0.65; }
  50% { transform: translateX(6px); opacity: 0.92; }
}

@keyframes rain {
  0% { transform: translateY(-8px); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(24px); opacity: 0; }
}

@keyframes wind {
  0%, 100% { transform: translateX(-8px); opacity: 0.55; }
  50% { transform: translateX(8px); opacity: 1; }
}

@media (max-width: 390px) {
  .weather-app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar {
    gap: 8px;
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar h1 {
    font-size: 1.08rem;
  }

  .header-btn {
    min-width: 0;
    gap: 6px;
    padding: 0 10px;
  }

  .header-btn__text {
    font-size: 0.78rem;
  }

  .hero-card {
    padding: 22px 18px;
  }

  .hero-main {
    flex-direction: row;
    align-items: flex-end;
  }

  .weather-scene {
    width: 112px;
    height: 112px;
  }

  .temperature-value {
    font-size: 3.8rem;
  }

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

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head p {
    text-align: left;
    max-width: none;
  }

  .view-switcher {
    width: 100%;
  }

  .view-switcher__btn {
    min-width: 0;
    flex: 1 1 0;
    padding: 0 12px;
    font-size: 0.84rem;
  }
}

@media (max-width: 560px) {
  .header-btn {
    gap: 6px;
    padding: 0 12px;
  }

  .header-btn__text {
    font-size: 0.8rem;
  }

  .city-selector__meta {
    white-space: normal;
  }

  .location-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .status-pill {
    justify-self: start;
  }

  .hero-main {
    flex-direction: row;
    align-items: flex-end;
    gap: 12px;
  }

  .weather-scene {
    align-self: flex-end;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head p {
    max-width: none;
    text-align: left;
  }

  .city-option__top,
  .city-option__bottom {
    align-items: flex-start;
  }

  .summary-controls {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .summary-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-actions,
  .summary-filter,
  .summary-reset-btn,
  .summary-share-btn {
    width: 100%;
  }

  .summary-item {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .summary-item__remove {
    grid-column: 2;
    justify-self: start;
  }
}

@media (min-width: 521px) {
  body {
    padding: 16px 0;
  }

  .app-shell {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
