﻿:root {
  --bg: #e8eef9;
  --card-bg: #ffffff;
  --text: #0f1b33;
  --muted: #5d6b84;
  --shadow: 0 18px 40px rgba(12, 28, 64, 0.12);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --accent: #f5663d;
  --accent-strong: #e3462c;
  --accent-soft: rgba(245, 102, 61, 0.18);
  --cool: #4aa3ff;
  --cool-soft: rgba(74, 163, 255, 0.2);
  --overlay-hot: rgba(245, 102, 61, 0.45);
  --overlay-cool: rgba(74, 163, 255, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #dfe8f9 0%, #eef3fb 52%, #f3f6fc 100%);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

body.app-loading {
  cursor: progress;
}

body[data-theme="temperature"] {
  --accent: #f5663d;
  --accent-strong: #e3462c;
  --accent-soft: rgba(245, 102, 61, 0.2);
  --cool: #4aa3ff;
  --cool-soft: rgba(74, 163, 255, 0.2);
  --overlay-hot: rgba(245, 102, 61, 0.45);
  --overlay-cool: rgba(74, 163, 255, 0.4);
}

body[data-theme="comfort"] {
  --accent: #2fa66a;
  --accent-strong: #1f8a55;
  --accent-soft: rgba(47, 166, 106, 0.2);
  --cool: #f2b948;
  --cool-soft: rgba(242, 185, 72, 0.22);
  --overlay-hot: rgba(47, 166, 106, 0.35);
  --overlay-cool: rgba(242, 185, 72, 0.35);
}

body[data-theme="humidity"] {
  --accent: #2f6fdc;
  --accent-strong: #2257b0;
  --accent-soft: rgba(47, 111, 220, 0.2);
  --cool: #9ac4ff;
  --cool-soft: rgba(154, 196, 255, 0.28);
  --overlay-hot: rgba(47, 111, 220, 0.35);
  --overlay-cool: rgba(154, 196, 255, 0.35);
}

body[data-theme="surf"] {
  --accent: #17a2b8;
  --accent-strong: #0e7f93;
  --accent-soft: rgba(23, 162, 184, 0.2);
  --cool: #7bd7e8;
  --cool-soft: rgba(123, 215, 232, 0.28);
  --overlay-hot: rgba(23, 162, 184, 0.35);
  --overlay-cool: rgba(123, 215, 232, 0.35);
}

body[data-theme="air"] {
  --accent: #2d9c74;
  --accent-strong: #23785a;
  --accent-soft: rgba(45, 156, 116, 0.2);
  --cool: #e58f5b;
  --cool-soft: rgba(229, 143, 91, 0.26);
  --overlay-hot: rgba(45, 156, 116, 0.34);
  --overlay-cool: rgba(229, 143, 91, 0.34);
}

body.surf-mode .map-visual {
  opacity: 0.08;
  background:
    radial-gradient(circle at 18% 65%, rgba(33, 150, 243, 0.25) 0%, rgba(0, 0, 0, 0) 62%),
    radial-gradient(circle at 70% 40%, rgba(0, 143, 168, 0.18) 0%, rgba(0, 0, 0, 0) 58%);
}

body.surf-mode .map-card {
  box-shadow: 0 24px 60px rgba(6, 96, 122, 0.2);
}

.topbar {
  width: 100%;
  background: linear-gradient(120deg, #12439d 0%, #1d6ed6 55%, #3595e6 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(12, 39, 92, 0.25);
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar h1 {
  margin: 0;
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.home-button {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.home-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
  border-radius: 8px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.updated {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  opacity: 0.9;
  text-align: left;
  line-height: 1.2;
}

.updated-line-row {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.updated-line {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Manrope", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.header-weather-icon {
  display: inline-grid;
  place-items: center;
  width: 19px;
  min-width: 19px;
  font-size: 1rem;
  line-height: 1;
}

.header-temperature,
.header-time {
  display: inline-block;
  font: inherit;
  line-height: 1;
}

.header-status-separator {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.36);
}

.refresh-data-button {
  width: 31px;
  height: 31px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.refresh-data-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.refresh-data-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.refresh-data-button:disabled {
  cursor: wait;
}

.refresh-data-button.is-loading {
  opacity: 0.62;
}

.refresh-data-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.refresh-data-button.is-loading .refresh-data-icon {
  animation: refresh-spin 0.9s linear infinite;
}

.updated-source {
  font-size: 0.73rem;
  opacity: 0.8;
  letter-spacing: 0.01em;
}

.weather-icon {
  font-size: 1.1rem;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.lang-toggle button {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-toggle button.active {
  background: #fff;
  color: #1a4ea3;
}

.page {
  max-width: 1680px;
  margin: 0 auto;
  padding: 16px 20px 10px;
  display: flex;
  flex-direction: column;
}

.today-alert-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  padding: 7px 14px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  color: #40516f;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

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

.today-alert-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--accent-strong);
  font-size: 0.82rem;
  opacity: 0.78;
}

.today-alert-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feels-like-strip {
  margin: 4px 0 8px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.feels-like-line {
  margin: 0;
  font-size: 1.03rem;
  font-weight: 700;
  line-height: 1.3;
  color: #16305e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-card {
  width: 100%;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 10px 18px 10px;
  margin-top: 8px;
  margin-bottom: 10px;
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.summary-header h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.summary-meta {
  margin: 0 0 8px;
  padding: 0 4px 3px;
  font-size: 0.73rem;
  color: var(--muted);
  display: block;
  visibility: visible;
  min-height: 1px;
}

.summary-meta-updated {
  font-weight: 600;
  line-height: 1.3;
}

.summary-meta-title {
  font-weight: 700;
  line-height: 1.2;
}

.sources-container {
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  background: rgba(249, 251, 255, 0.9);
  overflow: hidden;
}

.sources-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 7px 10px;
  font-size: 0.74rem;
  cursor: pointer;
}

.sources-toggle:hover {
  background: rgba(15, 23, 42, 0.04);
}

.sources-toggle:focus-visible {
  outline: 2px solid rgba(18, 67, 157, 0.25);
  outline-offset: -2px;
}

.sources-toggle-icon {
  display: inline-grid;
  place-items: center;
  font-size: 0.64rem;
  color: #7583a0;
  transform: rotate(-90deg);
  transition: transform 0.22s ease;
}

.summary-meta.sources-expanded .sources-toggle-icon {
  transform: rotate(0deg);
}

.sources-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.24s ease;
  padding: 0 10px;
}

.summary-meta-list {
  margin: 0;
  padding: 0 0 8px;
  display: grid;
  gap: 4px;
}

.source-line {
  line-height: 1.28;
  font-size: 0.72rem;
  color: #667792;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  font-size: 0.98rem;
  min-width: 0;
}

.summary-item + .summary-item {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.summary-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.summary-text {
  color: var(--text);
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.summary-item--placeholder .summary-icon,
.area-item--placeholder .area-icon,
.summary-item--placeholder .summary-text,
.area-item--placeholder .area-info strong,
.area-item--placeholder .area-tagline,
.area-item--placeholder .area-context,
.area-item--placeholder .area-pill {
  color: transparent;
  background: linear-gradient(90deg, rgba(226, 234, 247, 0.78), rgba(246, 249, 253, 0.95), rgba(226, 234, 247, 0.78));
  background-size: 220% 100%;
  animation: loading-shimmer 1.2s ease-in-out infinite;
}

.summary-item--placeholder .summary-text {
  width: min(520px, 76vw);
  height: 1em;
  border-radius: 999px;
}

.main-content {
  width: 100%;
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  grid-template-rows: auto auto;
  gap: 22px;
  align-items: start;
}

.map-card {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(237, 243, 252, 0.96)),
    var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

body.app-loading .map-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(245, 102, 61, 0.12), rgba(245, 102, 61, 0) 42%),
    radial-gradient(circle at 68% 55%, rgba(74, 163, 255, 0.16), rgba(74, 163, 255, 0) 46%),
    linear-gradient(135deg, #eef4fb, #f8fbff);
}

body.app-loading .map-card::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 18px;
  height: 10px;
  z-index: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(205, 216, 232, 0.3), rgba(255, 255, 255, 0.72), rgba(205, 216, 232, 0.3));
  background-size: 220% 100%;
  animation: loading-shimmer 1.2s ease-in-out infinite;
  opacity: 0.75;
}

#map {
  width: 100%;
  height: 640px;
  position: relative;
  z-index: 1;
  touch-action: none;
}

.map-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(circle at 62% 42%, var(--overlay-hot) 0%, rgba(0, 0, 0, 0) 55%),
    radial-gradient(circle at 26% 58%, var(--overlay-cool) 0%, rgba(0, 0, 0, 0) 60%);
  mix-blend-mode: multiply;
  opacity: 0.2;
}

.heat-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: multiply;
  opacity: 0.85;
}

.map-annotations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.map-card.popup-focus-active .map-annotations,
.map-card.popup-focus-active .map-visual {
  display: none;
}

.data-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: #2a3b5f;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(2px);
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
}

.surf-panel-section-title {
  margin: 6px 0 2px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2a3b5f;
}

.surf-forecast-section {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.map-annotations.zoom-far .map-pill {
  font-size: 0.66rem;
  padding: 7px 12px;
}

.map-annotations.zoom-far .map-callout {
  font-size: 0.72rem;
  padding: 8px 10px;
  max-width: 180px;
}

.map-annotations.zoom-close .map-pill {
  font-size: 0.78rem;
  padding: 9px 16px;
}

.map-annotations.zoom-close .map-callout {
  font-size: 0.86rem;
  padding: 12px 14px;
  max-width: 240px;
}

.map-annotation {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.top-areas-card {
  grid-column: 2;
  grid-row: 1 / span 2;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  min-width: 0;
  width: 100%;
}

.top-areas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.top-areas-header h3 {
  margin: 0;
  font-size: 1.18rem;
}

.top-areas-link {
  color: #2c63b7;
  font-size: 0.78rem;
  font-weight: 600;
}

.top-areas-list {
  display: grid;
  gap: 12px;
}

.mobile-areas-strip {
  display: none;
}

.rain-hourly-strip {
  grid-column: 1 / 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 10px;
  margin-right: 6px;
  padding: 6px 16px 6px;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  cursor: grab;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.rain-hourly-strip[hidden] {
  display: none;
}

.rain-hourly-strip::-webkit-scrollbar {
  display: none;
}

.rain-timeline-runner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
  animation: rain-ticker-scroll 32s linear infinite;
}

.rain-hourly-strip:hover .rain-timeline-runner {
  animation-play-state: paused;
}

.rain-hourly-strip.is-dragging {
  cursor: grabbing;
}

.rain-hourly-strip.is-dragging .rain-timeline-runner {
  animation-play-state: paused;
}

.rain-timeline-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 150px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f9fbfe;
  padding: 7px 10px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
  white-space: nowrap;
  max-width: min(360px, 88vw);
}

.rain-timeline-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rain-timeline-chip--passing {
  border-color: rgba(47, 111, 220, 0.1);
  background: #f8fbff;
}

.rain-timeline-chip--likely,
.rain-timeline-chip--steady {
  border-color: rgba(47, 111, 220, 0.18);
  background: #eef6ff;
}

.rain-timeline-chip--heavier {
  border-color: rgba(31, 111, 229, 0.28);
  background: #e4f0ff;
  box-shadow: 0 4px 12px rgba(31, 111, 229, 0.12);
}

.rain-timeline-time {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: normal;
  color: #12367a;
  flex: 0 0 auto;
}

.rain-timeline-label {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: normal;
  color: #2a3b5f;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rain-timeline-secondary {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  color: #6b7b96;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rain-timeline-secondary::before {
  content: "\2022";
  margin-right: 6px;
  color: #7f8ca3;
}

@keyframes rain-ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.surf-hourly-ticker {
  grid-column: 1 / 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 10px;
  margin-right: 6px;
  padding: 6px 16px 6px;
  overflow: hidden;
  position: relative;
}

.surf-hourly-ticker[hidden] {
  display: none;
}

.surf-ticker-runner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
  animation: surf-ticker-scroll 34s linear infinite;
}

.surf-hourly-ticker:hover .surf-ticker-runner {
  animation-play-state: paused;
}

.surf-ticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
  max-width: min(360px, 88vw);
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f9fbfe;
  padding: 7px 10px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.surf-ticker-time {
  font-size: 0.75rem;
  font-weight: 800;
  color: #12367a;
}

.surf-ticker-metric {
  font-size: 0.73rem;
  font-weight: 700;
  color: #2a3b5f;
}

.surf-ticker-sep {
  font-size: 0.64rem;
  color: #7f8ca3;
}

.surf-ticker-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(47, 166, 106, 0.14);
  color: #1f8a55;
}

.surf-ticker-pill--excellent {
  background: rgba(16, 156, 115, 0.18);
  color: #0d7d5d;
}

.surf-ticker-pill--good {
  background: rgba(47, 166, 106, 0.14);
  color: #1f8a55;
}

.surf-ticker-pill--moderate {
  background: rgba(242, 185, 72, 0.2);
  color: #8b6107;
}

.surf-ticker-pill--rough {
  background: rgba(229, 143, 91, 0.18);
  color: #b45a20;
}

@keyframes surf-ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.top-areas-list .area-item--surf {
  padding: 11px 12px;
}

.surf-hour-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fbfcff;
}

.surf-hour-time {
  font-size: 0.78rem;
  font-weight: 800;
  color: #12367a;
}

.surf-hour-info {
  display: grid;
  gap: 1px;
}

.surf-hour-primary {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.surf-hour-secondary {
  font-size: 0.72rem;
  color: var(--muted);
}

.surf-hour-pill {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: normal;
  line-height: 1.1;
  text-align: center;
  max-width: 112px;
}

.surf-hour-pill--excellent {
  background: rgba(16, 156, 115, 0.18);
  color: #0d7d5d;
}

.surf-hour-pill--good {
  background: rgba(47, 166, 106, 0.14);
  color: #1f8a55;
}

.surf-hour-pill--moderate {
  background: rgba(242, 185, 72, 0.2);
  color: #8b6107;
}

.surf-hour-pill--rough {
  background: rgba(229, 143, 91, 0.18);
  color: #b45a20;
}

.rain-probability-card {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f9fbfe;
}

.rain-probability-title {
  margin: 0 0 10px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2a3b5f;
}

.rain-probability-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  min-width: 0;
}

.rain-probability-row + .rain-probability-row {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.rain-probability-row + .rain-probability-fallback {
  margin-top: 8px;
}

.rain-probability-label {
  color: var(--muted);
  font-weight: 600;
}

.rain-probability-value {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text);
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.rain-probability-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.rain-probability-pill--low {
  background: rgba(47, 166, 106, 0.16);
  color: #1f8a55;
}

.rain-probability-pill--moderate {
  background: rgba(242, 185, 72, 0.22);
  color: #8b6107;
}

.rain-probability-pill--high {
  background: rgba(47, 111, 220, 0.18);
  color: #2257b0;
}

.rain-probability-fallback {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.panel-empty {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(15, 23, 42, 0.12);
  background: #f7f9fc;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.area-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 92px;
  padding: 12px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f9fbfe;
  cursor: pointer;
  touch-action: manipulation;
  transform: translateZ(0);
  will-change: transform;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    background 0.18s ease-out,
    border-color 0.18s ease-out;
}

.area-item:hover {
  transform: translateY(-1px) scale(1.006);
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.area-item:active {
  transform: translateY(0) scale(0.986);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.area-item--placeholder {
  pointer-events: none;
}

.area-item--placeholder .area-info strong {
  width: 130px;
  height: 1em;
  border-radius: 999px;
}

.area-item--placeholder .area-tagline {
  width: 160px;
  height: 0.9em;
  border-radius: 999px;
}

.area-item--placeholder .area-context {
  width: 90px;
  height: 0.8em;
  border-radius: 999px;
}

.area-item--placeholder .area-pill {
  width: 58px;
}

.area-item--surf .area-pill {
  margin-top: 0;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  text-transform: none;
  max-width: none;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
  align-self: center;
  padding: 0 10px;
}

.area-item--temperature {
  gap: 12px;
  padding: 12px 12px;
}

.area-item:focus-visible {
  outline: 2px solid rgba(18, 67, 157, 0.32);
  outline-offset: 2px;
}

.area-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-top: 0;
  line-height: 1;
}

.area-item[data-variant="negative"] .area-icon {
  background: var(--cool-soft);
  color: var(--cool);
}

.area-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
}

.area-item--temperature .area-info {
  gap: 3px;
  min-width: 0;
}

.area-item--surf .area-info {
  min-width: 0;
  gap: 3px;
}

.area-item--surf .area-info strong {
  font-size: 1rem;
  line-height: 1.2;
}

.area-info strong {
  display: -webkit-box;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.area-item--temperature .area-info strong {
  font-size: 1rem;
  line-height: 1.2;
}

.area-info span {
  font-size: 0.76rem;
  color: var(--muted);
}

.area-tagline {
  display: -webkit-box;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2a3b5f;
  line-height: 1.25;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.area-item--temperature .area-tagline {
  font-size: 0.88rem;
  line-height: 1.25;
}

.area-item--surf .area-tagline {
  font-size: 0.84rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.area-context {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.2;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.area-item--surf .area-context {
  font-size: 0.73rem;
  line-height: 1.24;
}

.area-context--metrics {
  font-size: 0.68rem;
  color: #3f4d66;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.surf-water-meta {
  margin-top: 2px;
  font-size: 0.72rem;
  line-height: 1.1;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.surf-water-meta--mobile {
  font-size: 0.7rem;
}

.area-item--temperature .area-context {
  line-height: 1.2;
}

.area-secondary-temp {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.2;
}

.area-item--temperature .area-secondary-temp {
  font-size: 0.7rem;
  line-height: 1.22;
  letter-spacing: 0;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
}

.area-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent-soft);
  color: var(--accent-strong);
  align-self: center;
  flex: 0 0 auto;
  margin-top: 0;
  white-space: nowrap;
  max-width: 136px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.area-item--temperature .area-pill {
  margin-top: 0;
  font-size: 0.68rem;
}

.area-item--surf .area-arrow {
  margin-top: 0;
}

.area-item[data-variant="negative"] .area-pill {
  background: var(--cool-soft);
  color: var(--cool);
}

.area-arrow {
  color: #8aa2c7;
  font-size: 1.1rem;
  flex: 0 0 auto;
  margin-top: 0;
  align-self: center;
  line-height: 1;
}

.area-item--temperature .area-arrow {
  margin-top: 0;
}

.site-footer {
  width: 100%;
  margin: 10px auto 10px;
  text-align: center;
  color: #40516f;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.45;
  opacity: 0.75;
}

.bottom-tabs {
  width: 100%;
  position: sticky;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  justify-content: center;
  z-index: 1000;
  pointer-events: none;
  margin: auto 0 10px;
}

.tab-group {
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: #fff;
  border-radius: 999px;
  padding: 5px;
  gap: 4px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.1);
  min-width: min(760px, 92vw);
}

.tab-button {
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.tab-button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
  font-weight: 800;
}

.tab-icon {
  font-size: 0.95rem;
}

.tab-label {
  white-space: nowrap;
}

.mode-switching {
  animation: mode-fade 220ms ease;
}

@keyframes mode-fade {
  0% {
    opacity: 0.74;
  }
  100% {
    opacity: 1;
  }
}

@keyframes refresh-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes loading-shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

.maplibregl-map {
  background: transparent;
  font-family: "Manrope", "Segoe UI", sans-serif;
  touch-action: none;
}

.popup {
  min-width: 162px;
  max-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.popup-title {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
  color: #0f1c36;
  line-height: 1.18;
}

.popup-category {
  display: inline-flex;
  position: static;
  align-items: center;
  align-self: flex-start;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf3ff;
  color: #1f4d93;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 3px;
  white-space: normal;
  word-break: break-word;
}

.popup-debug-line {
  margin-top: 1px;
  font-size: 0.73rem;
  color: #5d6b84;
  line-height: 1.25;
}

.popup-secondary-line {
  font-size: 0.7rem;
  color: #6e7e98;
}

.popup-debug-label {
  font-weight: 700;
}

.popup-note {
  margin-top: 2px;
  font-size: 0.73rem;
  color: #415170;
  line-height: 1.25;
}

.maplibregl-ctrl-group {
  border: none;
  box-shadow: none;
  background: transparent;
}

.maplibregl-ctrl-group button {
  border-radius: 10px !important;
}

.maplibregl-popup-content {
  padding: 10px 12px;
  border-radius: 8px;
}

.maplibregl-popup-close-button {
  color: #64748b;
  font-size: 18px;
  padding: 4px 7px;
}

.map-point-marker {
  width: var(--marker-size, 6px);
  height: var(--marker-size, 6px);
  padding: 0;
  border: var(--marker-weight, 1px) solid var(--marker-color, #ffffff);
  border-radius: 999px;
  background: var(--marker-fill, #ffffff);
  opacity: var(--marker-opacity, 1);
  appearance: none;
  box-sizing: border-box;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.maplibregl-canvas {
  filter: grayscale(0.08) saturate(0.72) contrast(0.92);
}

.map-pill {
  width: max-content;
  min-width: 96px;
  max-width: min(260px, calc(100vw - 32px));
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  box-shadow: var(--shadow-soft);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-strong);
  backdrop-filter: blur(6px);
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  cursor: pointer;
  pointer-events: auto;
  transform: translateZ(0);
  will-change: transform;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    background 0.18s ease-out,
    border-color 0.18s ease-out;
}

.map-pill:hover {
  transform: translateY(-1px) scale(1.015);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.96);
}

.map-pill:active {
  transform: translateY(0) scale(0.97);
  box-shadow: var(--shadow-soft);
}

.map-pill:focus-visible {
  outline: 2px solid rgba(18, 67, 157, 0.32);
  outline-offset: 3px;
}

.map-pill.negative {
  border-color: var(--cool);
  color: var(--cool);
}

.map-pill-main {
  display: inline-block;
  white-space: nowrap;
  line-height: 1;
  text-align: center;
  margin-right: -0.08em;
}

.map-pill-secondary {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.1;
  color: #6a7b99;
  white-space: nowrap;
}

.map-pill-secondary--temperature {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: center;
  align-items: center;
  column-gap: 8px;
  row-gap: 1px;
  width: 100%;
  font-size: 0.64rem;
  line-height: 1.15;
}

.temperature-detail-part {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}

.temperature-detail-part strong {
  color: #40516f;
  font-size: 1em;
  font-weight: 800;
}

.map-pill.negative .map-pill-secondary {
  color: #7c93bc;
}

.map-pill.negative .temperature-detail-part strong {
  color: #56719f;
}

@media (max-width: 560px) {
  .map-pill {
    min-width: 92px;
    min-height: 34px;
    padding: 7px 11px;
    font-size: 0.66rem;
  }

  .map-pill-secondary--temperature {
    grid-template-columns: repeat(2, max-content);
    column-gap: 6px;
    font-size: 0.58rem;
    line-height: 1.12;
  }

  .map-annotations.zoom-far .map-pill,
  .map-annotations.zoom-close .map-pill {
    padding: 7px 11px;
  }

  .map-pill-main {
    font-size: 0.98em;
  }

  .temperature-detail-part {
    gap: 2px;
  }
}

.map-callout {
  max-width: 210px;
  min-width: 160px;
  background: rgba(255, 255, 255, 0.92);
  color: #1a243d;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.08);
  line-height: 1.3;
  backdrop-filter: blur(6px);
}

.map-callout strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: #0e172b;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .top-areas-card,
  .map-card,
  .rain-hourly-strip,
  .surf-hourly-ticker {
    grid-column: auto;
    grid-row: auto;
  }

  .rain-hourly-strip,
  .surf-hourly-ticker {
    margin-right: 0;
  }

  #map {
    height: 520px;
  }
}

@media (min-width: 1025px) and (max-width: 1180px) {
  .main-content {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 360px);
    gap: 18px;
  }

  .top-areas-card {
    padding: 15px;
  }

  .top-areas-list {
    gap: 10px;
  }

  .area-item {
    gap: 10px;
    padding: 12px 11px;
  }

  .area-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .area-pill {
    max-width: 118px;
  }

  .area-item--surf .area-pill {
    max-width: 118px;
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .summary-list {
    grid-template-columns: 1fr;
  }

  #map {
    height: 430px;
  }

  .tab-group {
    min-width: calc(100vw - 20px);
  }

  .tab-button {
    padding: 8px 6px;
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    min-height: 100svh;
    --mobile-bottom-tab-offset: calc(env(safe-area-inset-bottom, 0px) + 5px);
    --mobile-bottom-tab-height: 50px;
    --mobile-bottom-tab-gap: clamp(9px, 1.6svh, 14px);
  }

  .topbar {
    box-shadow: 0 6px 14px rgba(12, 39, 92, 0.18);
  }

  .topbar-inner {
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    justify-content: space-between;
    padding: 8px max(10px, env(safe-area-inset-left)) 8px max(10px, env(safe-area-inset-right));
    gap: 7px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .topbar-left {
    grid-column: 1;
    min-width: 0;
  }

  .topbar h1 {
    font-size: 1.08rem;
    line-height: 1.05;
    white-space: nowrap;
  }

  .topbar-right {
    display: contents;
  }

  .lang-toggle {
    grid-column: 2;
    justify-self: center;
    padding: 2px;
    gap: 2px;
    flex: 0 0 auto;
  }

  .lang-toggle button {
    padding: 3px 7px;
    font-size: 0.64rem;
    line-height: 1;
  }

  .updated {
    grid-column: 3;
    justify-self: end;
    gap: 0;
    width: max-content;
    min-width: max-content;
    align-items: flex-end;
  }

  .updated-line-row {
    gap: 8px;
    width: max-content;
    flex-wrap: nowrap;
  }

  .updated-line {
    flex: 0 0 auto;
    gap: 9px;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }

  .header-weather-icon {
    width: 16px;
    min-width: 16px;
    font-size: 0.82rem;
  }

  .header-status-separator {
    height: 16px;
  }

  .updated-source {
    display: none;
  }

  .refresh-data-button {
    display: inline-grid;
    width: 28px;
    height: 28px;
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.14);
    opacity: 0.9;
  }

  .refresh-data-icon {
    font-size: 0.86rem;
  }

  .page {
    width: 100%;
    max-width: 100%;
    padding: 7px max(9px, env(safe-area-inset-left)) 4px max(9px, env(safe-area-inset-right));
    overflow-x: hidden;
  }

  .summary-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 7px 10px 7px;
    margin-top: 0;
    margin-bottom: 6px;
    border-radius: 18px;
  }

  .today-alert-strip {
    margin: 0 0 6px;
    padding: 6px 10px;
    border-radius: 11px;
    font-size: 0.76rem;
    gap: 8px;
  }

  .today-alert-icon {
    font-size: 0.76rem;
  }

  .summary-item {
    gap: 9px;
    padding: 4px 1px;
    font-size: 0.9rem;
    line-height: 1.22;
  }

  .summary-icon {
    width: 28px;
    height: 28px;
    font-size: 0.86rem;
    flex: 0 0 28px;
  }

  .summary-meta {
    margin: 4px 0 0;
    padding: 0;
  }

  .sources-container {
    border-radius: 10px;
  }

  .sources-toggle {
    padding: 5px 7px;
    font-size: 0.69rem;
    line-height: 1.1;
    gap: 6px;
  }

  .sources-content {
    padding: 0 7px;
  }

  .summary-meta-list {
    padding-bottom: 5px;
    gap: 2px;
  }

  .source-line {
    font-size: 0.66rem;
    line-height: 1.15;
    overflow-wrap: normal;
    word-break: normal;
  }

  .main-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 6px;
    gap: 5px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    overflow: hidden;
  }

  .map-card {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(12, 28, 64, 0.1);
  }

  #map {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 50svh;
    min-height: 300px;
    max-height: 430px;
  }

  .top-areas-card {
    display: none;
  }

  .surf-hourly-ticker {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 4px;
    padding: 6px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x;
  }

  .surf-hourly-ticker::-webkit-scrollbar {
    display: none;
  }

  .rain-hourly-strip {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 4px;
    padding: 6px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x;
  }

  .rain-hourly-strip::-webkit-scrollbar {
    display: none;
  }

  .rain-timeline-runner {
    gap: 7px;
  }

  .rain-hourly-strip:active .rain-timeline-runner,
  .surf-hourly-ticker:active .surf-ticker-runner {
    animation-play-state: paused;
  }

  .rain-timeline-chip {
    min-width: 142px;
    padding: 6px 9px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    touch-action: pan-x;
  }

  .rain-timeline-time {
    font-size: 0.76rem;
  }

  .rain-timeline-label {
    font-size: 0.73rem;
  }

  .rain-timeline-secondary {
    font-size: 0.65rem;
  }

  .surf-ticker-runner {
    gap: 7px;
  }

  .surf-ticker-chip {
    gap: 5px;
    padding: 6px 8px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    touch-action: pan-x;
  }

  .surf-ticker-time {
    font-size: 0.76rem;
  }

  .surf-ticker-metric {
    font-size: 0.73rem;
  }

  .surf-ticker-pill {
    font-size: 0.66rem;
    padding: 2px 7px;
    white-space: nowrap;
  }

  .mobile-areas-strip {
    grid-column: 1;
    grid-row: 3;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: -1px 0 2px;
    overflow: hidden;
  }

  .mobile-areas-strip[hidden] {
    display: none;
  }

  .mobile-areas-list {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px max(1px, env(safe-area-inset-right)) calc(var(--mobile-bottom-tab-gap) + 2px) max(1px, env(safe-area-inset-left));
    scroll-padding-inline: max(1px, env(safe-area-inset-left));
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x;
  }

  .mobile-areas-list::-webkit-scrollbar {
    display: none;
  }

  .mobile-areas-list .area-item {
    flex: 0 0 clamp(264px, 84vw, 340px);
    max-width: calc(100vw - 34px);
    min-width: 0;
    margin: 0;
    height: 104px;
    min-height: 104px;
    align-items: center;
    padding: 9px 9px;
    gap: 8px;
    border-radius: 14px;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.04);
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    touch-action: pan-x;
  }

  .mobile-areas-list .area-item:active {
    transform: scale(0.992);
  }

  .mobile-areas-list .area-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 12px;
    font-size: 1rem;
    margin-top: 0;
  }

  .mobile-areas-list .area-info {
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: center;
    align-self: stretch;
  }

  .mobile-areas-list .area-info strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.12;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-areas-list .area-tagline {
    display: block;
    font-size: 0.78rem;
    line-height: 1.16;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-areas-list .area-secondary-temp {
    display: block;
    font-size: 0.68rem;
    line-height: 1.16;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
  }

  .mobile-areas-list .area-context {
    font-size: 0.68rem;
    line-height: 1.14;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-areas-list .area-pill {
    flex: 0 1 auto;
    align-self: center;
    margin-top: 0;
    min-width: 0;
    min-height: 20px;
    padding: 0 7px;
    font-size: 0.56rem;
    line-height: 1.1;
    max-width: clamp(58px, 20vw, 82px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.02em;
  }

  .mobile-areas-list .area-arrow {
    flex: 0 0 auto;
    align-self: center;
    margin-top: 0;
  }

  .mobile-areas-list .rain-probability-card--mobile {
    flex: 0 0 clamp(264px, 84vw, 340px);
    max-width: calc(100vw - 34px);
    height: 104px;
    min-height: 104px;
    margin: 0;
    background: rgba(249, 251, 254, 0.96);
  }

  .mobile-areas-list .rain-probability-card--mobile .area-icon {
    background: rgba(47, 111, 220, 0.1);
    color: #2f6fdc;
  }

  .mobile-areas-list .rain-probability-card--mobile .area-pill {
    background: rgba(47, 166, 106, 0.16);
    color: #1f8a55;
  }

  .mobile-areas-list .rain-probability-card--mobile .area-pill.rain-probability-pill--moderate {
    background: rgba(242, 185, 72, 0.22);
    color: #8b6107;
  }

  .mobile-areas-list .rain-probability-card--mobile .area-pill.rain-probability-pill--high {
    background: rgba(47, 111, 220, 0.18);
    color: #2257b0;
  }

  .site-footer {
    margin: 6px auto calc(var(--mobile-bottom-tab-height) + var(--mobile-bottom-tab-offset) + 6px);
    padding: 0 12px;
    font-size: 0.74rem;
    line-height: 1.35;
  }

  .bottom-tabs {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    bottom: var(--mobile-bottom-tab-offset);
    margin: 0;
    padding: 0 max(8px, env(safe-area-inset-left)) 0 max(8px, env(safe-area-inset-right));
    touch-action: manipulation;
  }

  .tab-group {
    width: 100%;
    max-width: 520px;
    min-width: 0;
    gap: 3px;
    padding: 4px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
    touch-action: manipulation;
  }

  .tab-button {
    min-width: 0;
    min-height: 44px;
    padding: 8px 6px;
    gap: 5px;
    font-size: 0.78rem;
    touch-action: manipulation;
  }

  .tab-icon {
    flex: 0 0 auto;
    font-size: 0.92rem;
  }

  .tab-label {
    display: none;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .tab-button {
    padding: 7px 6px;
    justify-content: center;
  }
}







