/* Weatherlore — Apple Safe-Area & Frosted Glass Design System (v30) */

:root {
  --font-app: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif;
  --radius-card: 22px;
  --radius-inner: 16px;
  --radius-pill: 999px;
}

/* Light Theme: Crisp Clear Sky White-Blue */
[data-theme="light"] {
  --bg-canvas: linear-gradient(180deg, #4b91e2 0%, #76b6f3 34%, #b3daf9 68%, #e8f3fe 100%);
  --glass-bg: rgba(255, 255, 255, 0.56);
  --glass-bg-inner: rgba(255, 255, 255, 0.46);
  --glass-hover: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.74);
  --glass-shadow: 0 10px 28px rgba(24, 67, 128, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --sheet-bg: rgba(242, 247, 255, 0.90);
  --text: #0b1f3b;
  --text-secondary: rgba(11, 31, 59, 0.76);
  --text-muted: rgba(11, 31, 59, 0.56);
  --divider: rgba(11, 31, 59, 0.09);
  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, 0.14);
  --precip-blue: #0284c7;
  --text-shadow-main: 0 1px 10px rgba(255, 255, 255, 0.58), 0 1px 2px rgba(11, 31, 59, 0.08);
  --text-shadow-sub: 0 1px 6px rgba(255, 255, 255, 0.48);
  --track-bg: rgba(11, 31, 59, 0.12);
  --mc-precip-top: #0284c7;
  --mc-precip-bot: #38bdf8;
  --mc-precip-active: #0369a1;
  --mc-precip-prob: #007aff;
  --mc-wind-line: #0f766e;
  --mc-wind-gust: rgba(15, 118, 110, 0.56);
  --mc-wind-fill: rgba(20, 184, 166, 0.24);
  --mc-vis-line: #0369a1;
  --mc-vis-fill: rgba(14, 165, 233, 0.24);
  --mc-grid: rgba(11, 31, 59, 0.11);
  --mc-col-active: rgba(0, 122, 255, 0.10);
  --safezone-veil: linear-gradient(180deg, rgba(118, 182, 243, 0.52) 0%, rgba(154, 203, 247, 0.28) 38%, rgba(179, 218, 249, 0.09) 72%, transparent 100%);
}

/* Dark Theme: Deep Midnight Blue */
[data-theme="dark"] {
  --bg-canvas: linear-gradient(180deg, #050c1d 0%, #0a1834 38%, #10254b 74%, #163161 100%);
  --glass-bg: rgba(22, 42, 82, 0.48);
  --glass-bg-inner: rgba(12, 26, 56, 0.46);
  --glass-hover: rgba(34, 62, 114, 0.60);
  --glass-border: rgba(186, 214, 255, 0.18);
  --glass-shadow: 0 14px 36px rgba(2, 8, 22, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  --sheet-bg: rgba(10, 22, 48, 0.92);
  --text: #f5f9ff;
  --text-secondary: rgba(219, 234, 254, 0.82);
  --text-muted: rgba(186, 214, 255, 0.64);
  --divider: rgba(186, 214, 255, 0.12);
  --accent: #40a9ff;
  --accent-soft: rgba(64, 169, 255, 0.18);
  --precip-blue: #7dd3fc;
  --text-shadow-main: 0 2px 12px rgba(2, 8, 22, 0.55);
  --text-shadow-sub: 0 1px 8px rgba(2, 8, 22, 0.45);
  --track-bg: rgba(255, 255, 255, 0.14);
  --mc-precip-top: #7dd3fc;
  --mc-precip-bot: #0ea5e9;
  --mc-precip-active: #bae6fd;
  --mc-precip-prob: #60a5fa;
  --mc-wind-line: #5eead4;
  --mc-wind-gust: rgba(153, 246, 228, 0.58);
  --mc-wind-fill: rgba(94, 234, 212, 0.24);
  --mc-vis-line: #93c5fd;
  --mc-vis-fill: rgba(96, 165, 250, 0.26);
  --mc-grid: rgba(186, 214, 255, 0.13);
  --mc-col-active: rgba(125, 211, 252, 0.12);
  --safezone-veil: linear-gradient(180deg, rgba(5, 12, 29, 0.62) 0%, rgba(10, 24, 52, 0.34) 38%, rgba(10, 24, 52, 0.10) 72%, transparent 100%);
}

/* Forest Theme: Luminous Sunlit Alpine Sage Gradient */
[data-theme="forest"] {
  --bg-canvas: radial-gradient(circle at 18% 8%, rgba(235, 255, 244, 0.44) 0%, transparent 48%),
    linear-gradient(175deg, #349876 0%, #5ec09c 34%, #9edec4 68%, #e4f8ed 100%);
  --glass-bg: rgba(255, 255, 255, 0.54);
  --glass-bg-inner: rgba(255, 255, 255, 0.44);
  --glass-hover: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.74);
  --glass-shadow: 0 10px 28px rgba(14, 78, 56, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --sheet-bg: rgba(238, 251, 244, 0.92);
  --text: #092c20;
  --text-secondary: rgba(9, 44, 32, 0.78);
  --text-muted: rgba(9, 44, 32, 0.58);
  --divider: rgba(9, 44, 32, 0.10);
  --accent: #0f8a5f;
  --accent-soft: rgba(15, 138, 95, 0.15);
  --precip-blue: #0284c7;
  --text-shadow-main: 0 1px 10px rgba(255, 255, 255, 0.52), 0 1px 2px rgba(9, 44, 32, 0.08);
  --text-shadow-sub: 0 1px 6px rgba(255, 255, 255, 0.42);
  --track-bg: rgba(9, 44, 32, 0.12);
  --mc-precip-top: #0284c7;
  --mc-precip-bot: #38bdf8;
  --mc-precip-active: #0369a1;
  --mc-precip-prob: #0369a1;
  --mc-wind-line: #0f8a5f;
  --mc-wind-gust: rgba(15, 138, 95, 0.56);
  --mc-wind-fill: rgba(16, 185, 129, 0.24);
  --mc-vis-line: #0284c7;
  --mc-vis-fill: rgba(14, 165, 233, 0.22);
  --mc-grid: rgba(9, 44, 32, 0.11);
  --mc-col-active: rgba(15, 138, 95, 0.12);
  --safezone-veil: linear-gradient(180deg, rgba(52, 152, 118, 0.50) 0%, rgba(94, 192, 156, 0.26) 38%, rgba(158, 222, 196, 0.08) 72%, transparent 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  font-family: var(--font-app);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-shadow: var(--text-shadow-sub);
  overflow-x: clip;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.app-shell::-webkit-scrollbar,
.hourly-strip::-webkit-scrollbar,
.settings-body::-webkit-scrollbar,
.settings-legal-body::-webkit-scrollbar,
.watched-list::-webkit-scrollbar,
.notif-feed::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.app-shell,
.hourly-strip,
.settings-body,
.settings-legal-body,
.watched-list,
.notif-feed {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.mode-wide {
  background: var(--bg-canvas);
  background-attachment: fixed;
}

body.mode-mobile {
  background: #060a12;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18px 10px;
}

.hidden {
  display: none !important;
}

button,
input,
select {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.app-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  position: relative;
}

body.mode-mobile .app-shell {
  width: 390px;
  max-width: 100%;
  height: min(844px, calc(100vh - 36px));
  min-height: 0;
  border-radius: 44px;
  border: none;
  background-clip: padding-box;
  background: var(--bg-canvas);
  overflow-y: auto;
  overflow-x: clip;
  box-shadow: 0 0 0 6px #121826, 0 28px 80px rgba(0, 0, 0, 0.65);
}

/* Sticky Safe-Area Topbar: Search Left, Settings Right */
.topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
}

.topbar::before,
.topbar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.topbar::before {
  height: calc(max(20px, env(safe-area-inset-top)) + 68px);
  background: var(--safezone-veil);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.86) 22%, rgba(0, 0, 0, 0.48) 50%, rgba(0, 0, 0, 0.16) 78%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.86) 22%, rgba(0, 0, 0, 0.48) 50%, rgba(0, 0, 0, 0.16) 78%, rgba(0, 0, 0, 0) 100%);
}

.topbar::after {
  height: calc(max(20px, env(safe-area-inset-top)) + 42px);
  backdrop-filter: blur(18px) saturate(155%);
  -webkit-backdrop-filter: blur(18px) saturate(155%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.72) 34%, rgba(0, 0, 0, 0.22) 68%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.72) 34%, rgba(0, 0, 0, 0.22) 68%, rgba(0, 0, 0, 0) 100%);
}

body.is-scrolled .topbar::before,
body.is-scrolled .topbar::after {
  opacity: 1;
}

body.mode-mobile .topbar {
  padding: 20px 14px 8px;
}

body.mode-mobile .topbar::before {
  height: 92px;
  border-radius: 44px 44px 0 0;
}

body.mode-mobile .topbar::after {
  height: 58px;
  border-radius: 44px 44px 0 0;
}

.topbar-row {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.glass-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--glass-shadow);
  transition: transform 0.15s ease, background 0.15s ease;
}

.glass-icon-btn:hover {
  background: var(--glass-hover);
  transform: translateY(-1px);
}

.icon-sm {
  width: 19px;
  height: 19px;
}

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: none;
}

/* Search Bar */
.search-box {
  width: 100%;
  max-width: 680px;
  margin: 8px auto 0;
  display: none;
  position: relative;
}

.search-box.is-open {
  display: block;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--glass-shadow);
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

#search-input {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--text);
}

#search-input::placeholder {
  color: var(--text-muted);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 950;
  border-radius: 16px;
  background: var(--sheet-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.search-item {
  width: 100%;
  padding: 11px 14px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--divider);
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background: var(--accent-soft);
}

.search-item small {
  color: var(--text-muted);
  font-size: 12.5px;
}

/* Main Safe-Area Single-Scroll Feed */
.feed-container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 4px max(16px, env(safe-area-inset-right)) calc(34px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

body.mode-mobile .feed-container {
  padding-left: 14px;
  padding-right: 14px;
}

.glass-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  box-shadow: var(--glass-shadow);
  padding: 16px;
}

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

.section-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* 1. Quote Card */
.quote-card {
  padding: 13px 16px;
}

.weather-quote {
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.48;
  color: var(--text-secondary);
  text-align: center;
  font-style: italic;
  cursor: pointer;
  user-select: none;
  text-shadow: var(--text-shadow-main);
}

/* 2. Centered Hero Weather Card */
.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  padding: 18px 16px;
}

.loc-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  text-shadow: var(--text-shadow-main);
}

.loc-line-1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.loc-line-2 {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.25;
}

.hero-icon-temp-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 6px 0 2px;
}

.hero-weather-icon {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
}

.weather-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hero-temp {
  font-size: 62px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: var(--text-shadow-main);
}

.hero-feels {
  font-size: 15.5px;
  font-weight: 700;
  text-shadow: var(--text-shadow-main);
  margin-top: 2px;
}

.hero-cond {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-secondary);
}

.hero-dn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 13.5px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.dot-sep {
  opacity: 0.55;
}

.hero-watch-row {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

.pill-action-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
}

.pill-action-btn:hover {
  background: var(--accent);
  color: #fff;
  text-shadow: none;
}

/* 3. Hourly Horizontal Strip */
.hourly-card {
  padding: 12px 14px;
}

.hourly-strip {
  width: 100%;
  max-width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none !important;
  -ms-overflow-style: none;
}

.hourly-strip::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.hour-pill {
  flex: 0 0 64px;
  padding: 9px 6px;
  border-radius: 16px;
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.hour-pill.now {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.hour-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.hour-icon-wrap {
  width: 32px;
  height: 32px;
}

.hour-prob {
  font-size: 11px;
  font-weight: 600;
  color: var(--precip-blue);
  min-height: 14px;
}

.hour-temp {
  font-size: 15.5px;
  font-weight: 600;
  text-shadow: var(--text-shadow-main);
}

/* 4. Short Commentary & Advice Card */
.short-headline {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-shadow: var(--text-shadow-main);
}

.short-summary-text {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.advice-pills {
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.advice-pills li {
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  color: var(--text);
}

/* Alerts Card */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-card {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--glass-bg-inner);
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.alert-card.severity-critical {
  border-color: rgba(239, 68, 68, 0.65);
}

.alert-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
}

.alert-time {
  font-size: 12px;
  color: var(--text-muted);
}

.alert-desc {
  margin-top: 3px;
  font-size: 13px;
  color: var(--text-secondary);
}

.pill-count {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.22);
}

/* 5. 7-Day Forecast Card (Clean vertical list) */
.weekly-card {
  padding: 10px 14px;
}

.weekly-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.day-row {
  border-bottom: 1px solid var(--divider);
  min-width: 0;
}

.day-row:last-child {
  border-bottom: none;
}

.day-row-summary {
  width: 100%;
  padding: 10px 4px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 38px minmax(0, 1.5fr);
  align-items: center;
  gap: 8px;
  text-align: left;
  transition: background 0.15s ease;
}

.day-row-summary:hover {
  background: var(--glass-bg-inner);
}

.day-name-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.day-name-col strong {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-name-col small {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-icon-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.day-icon-box {
  width: 30px;
  height: 30px;
}

.day-prob-mini {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--precip-blue);
  line-height: 1;
}

.day-temps-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.dn-val-night {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  min-width: 28px;
  text-align: right;
}

.dn-val-day {
  font-size: 14px;
  font-weight: 600;
  min-width: 28px;
  text-align: right;
}

.temp-bar-track {
  position: relative;
  flex: 1;
  min-width: 36px;
  max-width: 130px;
  height: 5px;
  border-radius: 999px;
  background: var(--track-bg);
  overflow: hidden;
}

.temp-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #fbbf24 55%, #f97316 100%);
}

.day-row-details {
  display: none;
  padding: 4px 4px 12px;
}

.day-row.expanded .day-row-details {
  display: block;
}

.day-meta-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.day-meta-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  border-radius: 13px;
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  min-width: 0;
}

.day-meta-label {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
}

.day-meta-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-provider-strip {
  position: relative;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}

.day-provider-strip.has-overflow {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}

.day-provider-track {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
}

.day-provider-track.is-scrolling {
  padding-inline: 12px;
  animation: dayProvPingPong var(--marquee-dur, 14s) linear infinite;
}

.day-provider-strip:hover .day-provider-track.is-scrolling,
.day-provider-strip:active .day-provider-track.is-scrolling {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .day-provider-track.is-scrolling {
    animation: none;
  }
}

@keyframes dayProvPingPong {
  0% {
    transform: translateX(0);
  }

  48%,
  52% {
    transform: translateX(var(--marquee-shift, 0px));
  }

  100% {
    transform: translateX(0);
  }
}

.day-prov-item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  flex: 0 0 auto;
}

.day-prov-sep {
  opacity: 0.45;
  flex: 0 0 auto;
}

.day-prov-init {
  font-weight: 700;
  color: var(--text-primary);
}

.day-prov-rain {
  font-style: normal;
  font-size: 10px;
  color: var(--precip-blue);
}

/* 6. NewMap Embedded Weather Map Card */
.map-card {
  padding: 0;
  overflow: hidden;
}

.wx-map-host {
  width: 100%;
  height: 580px;
  --wm-font: var(--font-app);
  --wm-font-size: 13px;
  --wm-font-size-small: 11px;
  --wm-safe-top: 0px;
  --wm-safe-bottom: 0px;
  --wm-inset: 10px;
  --wm-gap: 6px;
  --wm-panel-padding: 7px 10px;
  --wm-panel-radius: 15px;
  --wm-panel-blur: 18px;
  --wm-btn-height: 34px;
  --wm-play-size: 36px;
  --wm-accent: var(--accent);
}

body.mode-mobile .wx-map-host {
  height: 540px;
}

@media (max-width: 520px) {
  .wx-map-host {
    height: 540px;
  }
}

#wx-map.wm-root .maplibregl-ctrl-top-right {
  top: calc(var(--wm-inset) + var(--wm-btn-height) + 14px);
  right: 10px;
}

#wx-map.wm-root .maplibregl-ctrl-group {
  display: flex !important;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--wm-panel-bg);
  border: var(--wm-panel-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--wm-panel-shadow);
}

#wx-map.wm-root .maplibregl-ctrl-group button {
  width: 36px;
  height: 36px;
}

[data-theme="light"] #wx-map.wm-root {
  --wm-panel-bg: rgba(255, 255, 255, 0.56);
  --wm-panel-border: 1px solid rgba(255, 255, 255, 0.74);
  --wm-panel-shadow: 0 10px 28px rgba(15, 35, 70, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.80);
  --wm-panel-blur: 22px;
  --wm-btn-active-bg: rgba(11, 31, 59, 0.10);
  --wm-tooltip-bg: rgba(255, 255, 255, 0.76);
}

[data-theme="dark"] #wx-map.wm-root {
  --wm-panel-bg: rgba(12, 24, 52, 0.48);
  --wm-panel-border: 1px solid rgba(186, 214, 255, 0.22);
  --wm-panel-shadow: 0 12px 32px rgba(2, 8, 22, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --wm-panel-blur: 22px;
  --wm-btn-active-bg: rgba(186, 214, 255, 0.16);
  --wm-tooltip-bg: rgba(10, 22, 48, 0.74);
}

[data-theme="forest"] #wx-map.wm-root {
  --wm-panel-bg: rgba(242, 253, 247, 0.54);
  --wm-panel-border: 1px solid rgba(255, 255, 255, 0.76);
  --wm-panel-shadow: 0 10px 28px rgba(14, 78, 56, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  --wm-panel-blur: 22px;
  --wm-accent: #0f8a5f;
  --wm-btn-active-bg: rgba(9, 44, 32, 0.10);
  --wm-tooltip-bg: rgba(238, 251, 244, 0.78);
}

#wx-map.wm-root .wm-panel,
#wx-map.wm-root .wm-tooltip,
#wx-map.wm-root .maplibregl-ctrl-group {
  backdrop-filter: blur(var(--wm-panel-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--wm-panel-blur)) saturate(170%);
}

/* 7. Wind & Precip Celtic Duo Card */
.duo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.duo-tile {
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-inner);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  min-width: 0;
}

.duo-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.duo-visual {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rain-shower-stage {
  position: relative;
  width: 92px;
  height: 92px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 84%, transparent 100%);
  filter: drop-shadow(0 2px 5px rgba(3, 105, 161, 0.22));
}

[data-theme="dark"] .rain-shower-stage {
  filter: drop-shadow(0 2px 6px rgba(2, 12, 30, 0.45));
}

.celtic-rain-drop {
  position: absolute;
  top: 0;
  left: var(--x, 32px);
  width: var(--w, 22px);
  height: var(--h, 27px);
  background: linear-gradient(180deg, #0ea5e9 0%, #0369a1 55%, #0b3b75 100%);
  -webkit-mask-image: url("/icons/motifs/celtic-raindrop.png");
  mask-image: url("/icons/motifs/celtic-raindrop.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  animation-name: celticDropFall;
  animation-duration: calc(var(--drop-dur, 2.4s) * var(--rain-speed, 1));
  animation-delay: var(--drop-delay, 0s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

[data-theme="dark"] .celtic-rain-drop {
  background: linear-gradient(180deg, #e0f2fe 0%, #38bdf8 65%, #0284c7 100%);
}

@keyframes celticDropFall {
  0% {
    transform: translateY(-40px);
    opacity: 0;
  }

  14% {
    opacity: var(--op, 0.94);
  }

  66% {
    opacity: var(--op, 0.90);
  }

  78%,
  100% {
    transform: translateY(108px);
    opacity: 0;
  }
}

.celtic-drop-emblem {
  position: relative;
  overflow: hidden;
  width: 72px;
  height: 86px;
  background: linear-gradient(180deg, #0284c7 0%, #0b3b75 100%);
  -webkit-mask-image: url("/icons/motifs/celtic-raindrop.png");
  mask-image: url("/icons/motifs/celtic-raindrop.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.16));
}

[data-theme="dark"] .celtic-drop-emblem {
  background: linear-gradient(180deg, #e0f2fe 0%, #38bdf8 100%);
}

.celtic-drop-emblem.is-snow {
  width: 82px;
  height: 82px;
  background: linear-gradient(155deg, #7dd3fc 0%, #0ea5e9 34%, #0369a1 74%, #0c4a6e 100%);
  -webkit-mask-image: url("/icons/motifs/celtic-snowflake.png");
  mask-image: url("/icons/motifs/celtic-snowflake.png");
  filter: drop-shadow(0 2px 5px rgba(7, 45, 76, 0.34)) drop-shadow(0 0 1px rgba(12, 74, 110, 0.55));
  animation: snowCrystalSpin 42s linear infinite;
}

[data-theme="dark"] .celtic-drop-emblem.is-snow {
  background: linear-gradient(150deg, #f0f9ff 0%, #bae6fd 38%, #38bdf8 78%, #0284c7 100%);
  filter: drop-shadow(0 2px 6px rgba(2, 12, 30, 0.55)) drop-shadow(0 0 8px rgba(125, 211, 252, 0.42));
}

@keyframes snowCrystalSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .celtic-drop-emblem.is-snow {
    animation: none;
  }

  .celtic-rain-drop {
    animation: none;
    transform: translateY(var(--drop-rest-y, 34px));
    opacity: var(--op, 0.92);
  }
}

@keyframes triskelSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.triskel-spin {
  transform-origin: 60px 60px;
  animation: triskelSpin var(--spin-dur, 5.2s) linear infinite;
}

@keyframes triskelSway {
  0% {
    transform: rotate(0deg);
  }

  22% {
    transform: rotate(8deg);
  }

  47% {
    transform: rotate(-6deg);
  }

  71% {
    transform: rotate(5deg);
  }

  88% {
    transform: rotate(-7deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

.triskel-sway {
  transform-origin: 60px 60px;
  animation: triskelSway 8.5s ease-in-out infinite;
}

#wind-bearing-arrow {
  will-change: transform;
}

.duo-val {
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-shadow: var(--text-shadow-main);
}

.duo-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.trio-meta-strip {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 480px) {
  .trio-meta-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.mode-mobile .trio-meta-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meta-chip {
  padding: 8px 6px;
  border-radius: 12px;
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.meta-chip span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.meta-chip strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
}

/* 8. Sources & Wide Summary Card */
.pill-info {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--accent-soft);
  border: 1px solid var(--glass-border);
}

.consensus-box {
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-inner);
  padding: 11px 14px;
  margin-bottom: 12px;
}

.consensus-top {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.confidence-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--track-bg);
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #34d399);
  transition: width 0.4s ease;
}

.confidence-label {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

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

body.mode-mobile .providers-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 520px) {
  .providers-grid {
    grid-template-columns: 1fr;
  }
}

.provider-card {
  padding: 12px 13px;
  border-radius: var(--radius-inner);
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  min-width: 0;
}

.provider-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
}

.provider-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.provider-name {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.provider-full-name {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.25;
  padding-left: 14px;
}

.provider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.provider-weight {
  font-size: 11.5px;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
  margin-top: 1px;
}

.provider-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 6px;
  font-variant-numeric: tabular-nums;
}

.provider-side-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.provider-temp {
  font-size: 22px;
  font-weight: 600;
  text-shadow: var(--text-shadow-main);
}

.provider-delta {
  font-size: 12px;
  color: var(--text-muted);
}

.provider-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.provider-error {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.ai-wide-box {
  margin-top: 12px;
  padding: 14px 15px;
  border-radius: var(--radius-inner);
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
}

.ai-wide-viewport {
  overflow: hidden;
  width: 100%;
}

.ai-wide-slider {
  display: flex;
  align-items: flex-start;
  width: 200%;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.ai-wide-slider.is-tomorrow {
  transform: translateX(-50%);
}

.ai-wide-slide {
  flex: 0 0 50%;
  width: 50%;
  min-width: 0;
}

.ai-wide-slide-kicker {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.ai-wide-text {
  font-size: 14px;
  line-height: 1.56;
  color: var(--text-secondary);
}

.ai-wide-outlook {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}

.ai-wide-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-wide-footer .ai-meta-footnote {
  margin-top: 0;
}

.tomorrow-commentary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.tomorrow-commentary-btn.is-open {
  flex-direction: row-reverse;
}

.tomorrow-commentary-btn:hover {
  background: var(--glass-bg-inner);
}

.tomorrow-commentary-arrow {
  font-size: 13px;
  color: var(--accent);
  line-height: 1;
}

.ai-meta-footnote {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Settings Centered Overlay Modal */
.settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1150;
  background: rgba(4, 10, 24, 0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.settings-sheet {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(420px, calc(100vw - 28px));
  max-height: min(84vh, 760px);
  z-index: 1200;
  border-radius: 26px;
  background: var(--sheet-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(34px) saturate(165%);
  -webkit-backdrop-filter: blur(34px) saturate(165%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -48%) scale(0.96);
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.settings-sheet.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

body.mode-mobile .settings-sheet {
  width: min(358px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 64px));
}

.settings-head {
  padding: 16px 18px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--divider);
}

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

.settings-head h2 {
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  transition: background 0.16s ease, transform 0.12s ease;
}

.settings-back-btn:hover {
  background: var(--glass-hover);
}

.settings-back-btn:active {
  transform: scale(0.96);
}

.legal-sub-card {
  padding: 15px;
  border-radius: var(--radius-inner);
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.legal-sub-card h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.legal-sub-card h4 {
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 4px;
  color: var(--accent);
}

.legal-sub-card p,
.legal-sub-card li {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.legal-sub-card ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-sub-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.legal-sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.settings-body {
  padding: 14px max(16px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.settings-group {
  padding: 14px;
  border-radius: var(--radius-inner);
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.settings-group h3 {
  font-size: 15px;
  font-weight: 600;
}

.settings-group-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.panel-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pref-lbl {
  font-size: 13.5px;
  font-weight: 500;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 3px;
  border-radius: 11px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  gap: 2px;
}

.seg-btn {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.seg-btn.active {
  background: var(--accent);
  color: #fff;
  text-shadow: none;
}

.primary-btn {
  padding: 8px 14px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  text-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.secondary-btn {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  min-width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--track-bg);
  overflow: hidden;
  transition: background 0.2s ease;
}

.slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.switch input:checked+.slider {
  background: var(--accent);
}

.switch input:checked+.slider::before {
  transform: translateX(20px);
}

.monitor-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.control-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.control-group select,
.threshold-item input {
  width: 100%;
  padding: 6px 9px;
  border-radius: 9px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 13px;
  color: var(--text);
}

.mono-stat {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.center-btn-row,
.sim-buttons,
.legal-links-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.browser-notif-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--divider);
}

.browser-notif-row strong {
  font-size: 13px;
}

.thresholds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.threshold-item span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.threshold-check {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.watched-list,
.notif-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.watched-item,
.notif-item {
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.sim-btn {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.attribution-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Toasts */
.toast-container {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 1500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(320px, calc(100vw - 28px));
}

.toast {
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--sheet-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px);
  box-shadow: var(--glass-shadow);
  font-size: 13px;
}

.toast-msg {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.deeplink-focus {
  box-shadow: 0 0 0 2px var(--accent), var(--glass-shadow) !important;
  transition: box-shadow 0.35s ease;
}

/* Clickable Metric Action Tiles inside Weekly Forecast */
.day-meta-action {
  appearance: none;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.day-meta-action:hover {
  background: var(--glass-hover);
  border-color: var(--accent);
}

.day-meta-action:active {
  transform: scale(0.985);
}

.day-meta-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
}

.day-meta-cue {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

/* Unified Interactive Metric Chart Sheet (Yağış / Rüzgâr / Görüş Mesafesi) */
.metric-chart-backdrop {
  z-index: 1240;
}

.metric-chart-sheet {
  z-index: 1280;
  width: min(460px, calc(100vw - 24px));
  max-height: min(88vh, 800px);
}

body.mode-mobile .metric-chart-sheet {
  width: min(370px, calc(100vw - 24px));
  max-height: min(790px, calc(100vh - 48px));
}

.metric-chart-head {
  padding: 12px 14px 10px;
  justify-content: flex-start;
  align-items: center;
}

.metric-chart-back-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mc-back-arrow {
  width: 17px;
  height: 17px;
  display: block;
}

.metric-chart-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 9px 14px 10px;
  border-bottom: 1px solid var(--divider);
  background: var(--glass-bg-inner);
}

.mc-tab-btn {
  appearance: none;
  border: 1px solid var(--glass-border);
  background: transparent;
  border-radius: 12px;
  padding: 7px 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.mc-tab-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

.metric-chart-body {
  padding: 12px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.metric-chart-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.mc-day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.mc-day-pill {
  appearance: none;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-inner);
  border-radius: 11px;
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.mc-day-pill strong {
  font-size: 11px;
  font-weight: 650;
  color: var(--text);
}

.mc-day-pill span {
  font-size: 9.5px;
  color: var(--text-muted);
}

.mc-day-pill.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.mc-hero {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 2px 0;
}

.mc-hero-val {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.mc-hero-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.mc-card {
  border-radius: 16px;
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  padding: 11px 11px 8px;
}

.mc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.mc-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.mc-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mc-leg-bar {
  display: inline-block;
  width: 8px;
  height: 10px;
  border-radius: 2px;
  background: var(--mc-precip-top);
}

.mc-leg-dot.is-prob {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mc-precip-prob);
}

.mc-leg-line {
  display: inline-block;
  width: 12px;
  height: 2.5px;
  border-radius: 2px;
}

.mc-leg-line.is-wind {
  background: var(--mc-wind-line);
}

.mc-leg-line.is-vis {
  background: var(--mc-vis-line);
}

.mc-leg-dash {
  display: inline-block;
  width: 12px;
  height: 0;
  border-top: 2px dashed var(--mc-wind-gust);
}

.mc-leg-dash.is-vis {
  border-top-color: var(--mc-vis-line);
  opacity: 0.6;
}

.mc-svg {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  touch-action: pan-y;
}

.mc-grid-line {
  stroke: var(--mc-grid);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.mc-axis-lbl {
  font-size: 9.5px;
  fill: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.mc-axis-unit {
  font-size: 9px;
  font-weight: 600;
  fill: var(--text-muted);
}

.mc-val-top {
  font-size: 9.5px;
  font-weight: 600;
  fill: var(--text-secondary);
  text-anchor: middle;
  font-variant-numeric: tabular-nums;
}

.mc-val-top.is-active {
  fill: var(--text);
  font-weight: 700;
}

.mc-x-lbl {
  font-size: 10px;
  font-weight: 500;
  fill: var(--text-muted);
  text-anchor: middle;
}

.mc-x-lbl.is-active {
  fill: var(--text);
  font-weight: 700;
}

.mc-prob-sub {
  font-size: 8.5px;
  fill: var(--text-muted);
  text-anchor: middle;
  font-variant-numeric: tabular-nums;
}

.mc-col-hit {
  cursor: pointer;
}

.mc-col-highlight {
  fill: var(--mc-col-active);
}

.mc-active-hairline {
  stroke: var(--accent);
  stroke-width: 1.3;
  stroke-dasharray: 2.5 2.5;
  opacity: 0.72;
}

.mc-wind-dir-arrow {
  fill: var(--text-muted);
}

.mc-wind-dir-arrow.is-active {
  fill: var(--mc-wind-line);
}

.mc-hourly-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mc-scrub-pill {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 4px 10px;
  font-variant-numeric: tabular-nums;
}

.mc-scrub-pill.is-active {
  color: var(--text);
  border-color: var(--accent);
}

.mc-scrub-line {
  stroke: var(--text);
  stroke-opacity: 0.48;
  stroke-width: 1.2;
}

.mc-scrub-dot {
  fill: var(--accent);
  stroke: #ffffff;
  stroke-width: 1.8;
}

.mc-empty-hourly {
  font-size: 12px;
  color: var(--text-muted);
  padding: 14px 6px;
  text-align: center;
}

.mc-insight {
  font-size: 12.5px;
  line-height: 1.48;
  color: var(--text-secondary);
  background: var(--glass-bg-inner);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 10px 12px;
}