/*
 * LifeWeather · 共用天氣小工具樣式
 * 含:天氣詳情卡(sheet)、獨立整頁 app、天氣動效。
 * 不含:天氣小卡(.weather-chip)外觀 — 由宿主頁(入口頁)自行定義,
 *       因為那是宿主頁面 banner 版位的一部分。
 */

:root {
  --bg: #F5F3F0;
  --card: #FFFFFF;
  --ink: #1E1B17;
  --ink-2: #8A8378;
  --ink-3: #B8B0A4;
  --accent: #F0752B;
  --accent-soft: #FDEBDD;
  --radius: 20px;
  --shadow: 0 2px 6px rgba(60,50,40,.05), 0 16px 40px rgba(60,50,40,.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0E0C;
    --card: #1C1A17;
    --ink: #F5F3F0;
    --ink-2: #A39C8F;
    --ink-3: #6B6459;
    --accent-soft: rgba(240,117,43,.16);
    --shadow: 0 2px 6px rgba(0,0,0,.22), 0 16px 40px rgba(0,0,0,.34);
  }
}
:root[data-theme="dark"] {
  --bg: #0F0E0C;
  --card: #1C1A17;
  --ink: #F5F3F0;
  --ink-2: #A39C8F;
  --ink-3: #6B6459;
  --accent-soft: rgba(240,117,43,.16);
  --shadow: 0 2px 6px rgba(0,0,0,.22), 0 16px 40px rgba(0,0,0,.34);
}
:root[data-theme="light"] {
  --bg: #F5F3F0;
  --card: #FFFFFF;
  --ink: #1E1B17;
  --ink-2: #8A8378;
  --ink-3: #B8B0A4;
  --accent-soft: #FDEBDD;
  --shadow: 0 2px 6px rgba(60,50,40,.05), 0 16px 40px rgba(60,50,40,.08);
}

.tnum { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* ================= 詳情卡(sheet):自帶 overlay,不依賴宿主 .settings-* ================= */
.weather-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(20,16,10,0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
  /* 防透影機制:只淡出遮罩、卡片滑走;visibility 等動畫結束才隱藏,
     絕不對整個 overlay 用 opacity ——否則卡片會跟著半透明。 */
  transition: background .25s ease, visibility 0s linear .25s;
}
.weather-overlay.open {
  background: rgba(20,16,10,.45);
  pointer-events: auto;
  visibility: visible;
  transition: background .25s ease, visibility 0s linear 0s;
}
.weather-sheet {
  width: 100%;
  max-width: none;
  max-height: 86vh;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: Inter, "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif;
  /* 關閉時整張卡滑到畫面外(不靠淡出),全程維持實心不透光 */
  transform: translateY(100%);
  transition: transform .25s cubic-bezier(.22,.61,.36,1);
  overflow: hidden;
}
.weather-overlay.open .weather-sheet { transform: translateY(0); }
@media (min-width: 640px) {
  /* 桌機:先收回成有邊界的置中卡片(細節之後再調);手機維持滿版 */
  .weather-overlay { align-items: center; padding: 20px; }
  .weather-sheet { max-width: 480px; border-radius: 24px; max-height: 84vh; }
}

/* 把手 + 關閉鈕:浮在天空動效上(絕對定位),不佔白色標題列 */
.weather-sheet-handle {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 4px; border-radius: 999px;
  background: rgba(255,255,255,.7); z-index: 3;
}
@media (min-width: 640px) { .weather-sheet-handle { display: none; } }

.weather-sheet-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(25,25,25,.28); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  padding: 0; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.weather-sheet-close svg { width: 18px; height: 18px; }

/* 身:無內距,讓頂部 hero 全出血鋪滿;內容包在有內距的 content 裡 */
.weather-sheet-body {
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.weather-sheet-content {
  padding: 18px 18px calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.weather-sheet-body > .weather-state { padding: 52px 18px; text-align: center; color: var(--ink-2); }
/* 隱藏卡片內捲軸(桌機常駐捲軸很醜);仍可滾動/滑動,與手機一致 */
.weather-sheet-body, .weather-hourly { scrollbar-width: none; -ms-overflow-style: none; }
.weather-sheet-body::-webkit-scrollbar, .weather-hourly::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* ================= 共用內容區塊(sheet 與獨立 app 共用) ================= */
.weather-block-label {
  font-size: 11px; font-weight: 700; color: var(--ink-2);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px;
}

.weather-loc { display: flex; align-items: flex-start; gap: 10px; }
.weather-loc svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.weather-loc-text { min-width: 0; }
.weather-loc-name { font-size: 18px; font-weight: 800; line-height: 1.3; }
.weather-loc-source { font-size: 12px; color: var(--ink-2); margin-top: 2px; }

.weather-now { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.weather-now-temp { font-size: 48px; font-weight: 800; line-height: 1; }
.weather-now-desc { font-size: 14px; font-weight: 700; }
.weather-now-meta { font-size: 12px; color: var(--ink-2); }

.weather-tips { display: flex; flex-direction: column; gap: 10px; }
.weather-tip-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink); line-height: 1.4; }
.weather-tip-row svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }

.weather-hourly {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch;
}
.weather-hour-item { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; min-width: 32px; }
.weather-hour-time { font-size: 11px; color: var(--ink-2); }
.weather-hour-item svg { width: 18px; height: 18px; color: var(--accent); }
.weather-hour-temp { font-size: 12px; font-weight: 700; }

.weather-daily { display: flex; flex-direction: column; }
.weather-day-row { display: flex; flex-direction: column; gap: 4px; padding: 9px 0; border-top: 1px solid var(--accent-soft); font-size: 13px; }
.weather-day-row:first-child { border-top: none; }
.weather-day-main { display: flex; align-items: center; gap: 10px; width: 100%; }
.weather-day-name { width: 34px; flex-shrink: 0; font-weight: 700; }
.weather-day-icon { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.weather-day-pop { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--ink-2); }
.weather-day-pop svg { width: 12px; height: 12px; color: var(--accent); }
.weather-day-range { margin-left: auto; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.weather-day-detail { font-size: 12px; line-height: 1.45; color: var(--ink-2); padding-left: 34px; }

.weather-official-info { display: grid; gap: 16px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.weather-warning-block { background: #FFF1EF; border-left: 3px solid #C9382B; padding: 13px 14px; color: #5E211A; }
.weather-warning-block .weather-block-label { color: #9C2A20; margin-bottom: 8px; }
.weather-warning { display: grid; gap: 4px; font-size: 13px; line-height: 1.45; }
.weather-warning + .weather-warning { border-top: 1px solid rgba(156,42,32,.16); margin-top: 10px; padding-top: 10px; }
.weather-observation { font-size: 13px; line-height: 1.45; color: var(--ink); }
.weather-observation small { display: block; color: var(--ink-2); font-size: 11px; margin-top: 4px; }
@media (prefers-color-scheme: dark) {
  .weather-warning-block { background: rgba(201,56,43,.18); color: #FFD7D1; }
  .weather-warning-block .weather-block-label { color: #FFB5AC; }
}

.weather-open-app,
.weather-windy {
  display: block; text-align: center; font-size: 13px; font-weight: 700;
  color: var(--accent); padding: 2px 0 4px;
}

.weather-state { font-size: 13px; color: var(--ink-2); text-align: center; padding: 30px 0; }
.weather-state-error { padding: 60px 20px; }

.weather-icon-anim { display: inline-block; }
.wx-sun .weather-icon-anim { animation: wx-icon-spin 16s linear infinite; }
.wx-rain .weather-icon-anim,
.wx-thunder .weather-icon-anim { animation: wx-icon-bob 2.2s ease-in-out infinite; }
.wx-snow .weather-icon-anim { animation: wx-icon-bob 3s ease-in-out infinite; }
.wx-cloud .weather-icon-anim { animation: wx-icon-drift 6s ease-in-out infinite; }

@keyframes wx-icon-spin { to { transform: rotate(360deg); } }
@keyframes wx-icon-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
@keyframes wx-icon-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

/* ================= 獨立整頁 app ================= */
html, body { background: var(--bg); }
body {
  font-family: Inter, "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.weather-app {
  max-width: 640px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.weather-app-section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.weather-app-foot {
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0 8px;
}
.weather-app-foot a { color: var(--accent); font-weight: 700; text-decoration: none; }

/* ---------------- hero:主視覺 + 天氣動效 ---------------- */
.weather-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 22px;
  background: linear-gradient(180deg, var(--sky-a, #D9E4EE), var(--sky-b, #E9EFF4) 44%, var(--card) 100%);
  color: var(--ink);
}
/* 依天氣的天空色調(底部一律收到 --card,文字永遠可讀) */
.weather-hero.wx-sun     { --sky-a: #FCE0B0; --sky-b: #FDEED6; }
.weather-hero.wx-moon    { --sky-a: #3A4C72; --sky-b: #8391AD; }
.weather-hero.wx-cloud   { --sky-a: #C2D1DE; --sky-b: #E1E8EE; }
.weather-hero.wx-overcast{ --sky-a: #B2B8BD; --sky-b: #D2D6DA; }
.weather-hero.wx-rain    { --sky-a: #9DAFBE; --sky-b: #C8D1DA; }
.weather-hero.wx-shower  { --sky-a: #7C8D9C; --sky-b: #AEB9C3; }
.weather-hero.wx-thunder { --sky-a: #8A88A2; --sky-b: #C0BFCF; }
.weather-hero.wx-snow    { --sky-a: #B9C9D6; --sky-b: #DCE6EE; }
.weather-hero.wx-fog     { --sky-a: #C5CBD1; --sky-b: #E2E5E9; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .weather-hero         { --sky-a: #263041; --sky-b: #1E2530; }
  :root:not([data-theme="light"]) .weather-hero.wx-sun     { --sky-a: #4A3826; --sky-b: #2C231B; }
  :root:not([data-theme="light"]) .weather-hero.wx-moon    { --sky-a: #16213E; --sky-b: #131A2A; }
  :root:not([data-theme="light"]) .weather-hero.wx-cloud   { --sky-a: #2A3340; --sky-b: #1E242D; }
  :root:not([data-theme="light"]) .weather-hero.wx-overcast{ --sky-a: #23272E; --sky-b: #181B20; }
  :root:not([data-theme="light"]) .weather-hero.wx-rain    { --sky-a: #232D37; --sky-b: #1A2028; }
  :root:not([data-theme="light"]) .weather-hero.wx-shower  { --sky-a: #1C252E; --sky-b: #14191F; }
  :root:not([data-theme="light"]) .weather-hero.wx-thunder { --sky-a: #2A2740; --sky-b: #1C1B28; }
  :root:not([data-theme="light"]) .weather-hero.wx-snow    { --sky-a: #2C3742; --sky-b: #1F262E; }
  :root:not([data-theme="light"]) .weather-hero.wx-fog     { --sky-a: #2C3138; --sky-b: #1F2429; }
}
:root[data-theme="dark"] .weather-hero         { --sky-a: #263041; --sky-b: #1E2530; }
:root[data-theme="dark"] .weather-hero.wx-sun     { --sky-a: #4A3826; --sky-b: #2C231B; }
:root[data-theme="dark"] .weather-hero.wx-moon    { --sky-a: #16213E; --sky-b: #131A2A; }
:root[data-theme="dark"] .weather-hero.wx-cloud   { --sky-a: #2A3340; --sky-b: #1E242D; }
:root[data-theme="dark"] .weather-hero.wx-overcast{ --sky-a: #23272E; --sky-b: #181B20; }
:root[data-theme="dark"] .weather-hero.wx-rain    { --sky-a: #232D37; --sky-b: #1A2028; }
:root[data-theme="dark"] .weather-hero.wx-shower  { --sky-a: #1C252E; --sky-b: #14191F; }
:root[data-theme="dark"] .weather-hero.wx-thunder { --sky-a: #2A2740; --sky-b: #1C1B28; }
:root[data-theme="dark"] .weather-hero.wx-snow    { --sky-a: #2C3742; --sky-b: #1F262E; }
:root[data-theme="dark"] .weather-hero.wx-fog     { --sky-a: #2C3138; --sky-b: #1F2429; }

.weather-hero-skeleton { min-height: 220px; align-items: center; justify-content: center; }
.weather-skel-pulse {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent-soft);
  animation: wx-skel-pulse 1.4s ease-in-out infinite;
}
@keyframes wx-skel-pulse {
  0%, 100% { opacity: .5; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.05); }
}

.weather-hero-content { position: relative; z-index: 2; width: 100%; }
.weather-hero-loc { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.weather-hero-loc-name { font-size: 22px; font-weight: 800; }
.weather-hero-loc-source { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.weather-hero-main { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.weather-hero-main svg { color: var(--accent); flex-shrink: 0; }
.weather-hero-temp { font-size: 64px; font-weight: 800; line-height: 1; }
.weather-hero-desc { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-top: 6px; }

/* 詳情卡頂部:矮版動效 hero(複用 .weather-hero 的天空漸層與動效,縮小尺寸+多一行濕度風) */
.weather-hero--sheet { min-height: 190px; border-radius: 0; box-shadow: none; }
.weather-hero--sheet .weather-hero-main { margin-top: 8px; }
.weather-sheet-hero-temp { font-size: 46px; font-weight: 800; line-height: 1; }
.weather-sheet-hero-meta { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-top: 8px; }

.wx-fx { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }

/* --- 晴:暖陽在右上,柔光暈 + 緩轉光芒 --- */
.wx-sun-wrap { position: absolute; top: -46px; right: -30px; width: 210px; height: 210px; }
.wx-sun-glow {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,201,120,.6), rgba(255,185,95,.18) 46%, rgba(255,185,95,0) 70%);
  animation: wx-glow-pulse 6s ease-in-out infinite;
}
.wx-sun-rays {
  position: absolute; inset: 34px; color: rgba(255,192,112,.5);
  animation: wx-spin 60s linear infinite;
}
.wx-sun-rays svg { width: 100%; height: 100%; display: block; }
.wx-sun-core {
  position: absolute; inset: 74px; border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #FFE9BE, #FFC878 78%);
  box-shadow: 0 0 26px rgba(255,196,116,.55);
}
@keyframes wx-spin { to { transform: rotate(360deg); } }
@keyframes wx-glow-pulse { 0%, 100% { opacity: .78; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }

/* --- 晴夜:月亮 + 星星 --- */
.wx-moon-wrap { position: absolute; top: -24px; right: -6px; width: 150px; height: 150px; }
.wx-moon-glow {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(214,226,246,.42), rgba(214,226,246,0) 64%);
  animation: wx-glow-pulse 7s ease-in-out infinite;
}
.wx-moon-core {
  position: absolute; inset: 52px; border-radius: 50%;
  background: radial-gradient(circle at 36% 36%, #F5F7FC, #C9D3E6 82%);
  box-shadow: 0 0 22px rgba(206,220,246,.5);
}
.wx-stars { position: absolute; inset: 0; }
.wx-star {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #FFFFFF; opacity: .8;
  animation: wx-twinkle 3.2s ease-in-out infinite;
}
@keyframes wx-twinkle { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: .95; transform: scale(1); } }

/* --- 多雲:柔焦蓬鬆雲層,前後景視差 --- */
.wx-cloud-el {
  position: absolute; border-radius: 50%;
  background:
    radial-gradient(ellipse 42% 74% at 30% 60%, rgba(255,255,255,.96), rgba(255,255,255,0) 72%),
    radial-gradient(ellipse 46% 96% at 54% 44%, rgba(255,255,255,.96), rgba(255,255,255,0) 72%),
    radial-gradient(ellipse 38% 68% at 76% 62%, rgba(255,255,255,.96), rgba(255,255,255,0) 72%);
  filter: blur(3px);
}
.wx-cloud-1 { width: 190px; height: 78px; top: 12%; opacity: .9; animation: wx-cloud-drift 36s linear infinite; }
.wx-cloud-2 { width: 140px; height: 58px; top: 32%; opacity: .6; filter: blur(5px); animation: wx-cloud-drift 48s linear infinite; animation-delay: -10s; }
.wx-cloud-3 { width: 108px; height: 46px; top: 50%; opacity: .45; filter: blur(6px); animation: wx-cloud-drift 42s linear infinite; animation-delay: -24s; }
.wx-cloud-4 { width: 160px; height: 66px; top: 22%; opacity: .3; filter: blur(8px); animation: wx-cloud-drift 60s linear infinite; animation-delay: -34s; }
@keyframes wx-cloud-drift { from { transform: translateX(-60%); } to { transform: translateX(760px); } }

/* --- 霧:柔和水平霧帶 --- */
.wx-fog-layer {
  position: absolute; left: -20%; width: 140%; height: 66px;
  background: linear-gradient(180deg, rgba(222,226,230,0), rgba(222,226,230,.55) 50%, rgba(222,226,230,0));
  filter: blur(6px);
}
.wx-fog-1 { top: 20%; animation: wx-fog-drift 11s ease-in-out infinite; }
.wx-fog-2 { top: 40%; animation: wx-fog-drift 14s ease-in-out infinite reverse; }
.wx-fog-3 { top: 60%; animation: wx-fog-drift 12s ease-in-out infinite; animation-delay: -3s; }
.wx-fog-4 { top: 78%; animation: wx-fog-drift 16s ease-in-out infinite reverse; animation-delay: -5s; }
@keyframes wx-fog-drift { 0%, 100% { transform: translateX(-5%); opacity: .5; } 50% { transform: translateX(5%); opacity: .85; } }

/* --- 雨:細緻半透明雨絲(帶風的傾斜) --- */
.wx-drop {
  position: absolute; top: -14%; width: 2px; height: 18px; border-radius: 999px;
  background: linear-gradient(to bottom, rgba(224,238,250,0), rgba(224,238,250,.98));
  animation-name: wx-drop-fall; animation-timing-function: linear; animation-iteration-count: infinite;
}
.wx-fx-shower .wx-drop { width: 2.6px; }
@keyframes wx-drop-fall {
  0% { transform: translate(0, -30px) rotate(14deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(-60px, 330px) rotate(14deg); opacity: .12; }
}

/* --- 雷:雨 + 逼真閃電 --- */
.wx-flash {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 64% 16%, rgba(255,255,255,.92), rgba(226,232,255,.22) 42%, rgba(226,232,255,0) 72%);
  opacity: 0; animation: wx-flash-strike 8s ease-in-out infinite;
}
@keyframes wx-flash-strike {
  0%, 88%, 100% { opacity: 0; }
  89% { opacity: .95; }
  90.5% { opacity: .12; }
  91.5% { opacity: .75; }
  93% { opacity: 0; }
}

/* --- 雪:柔軟雪花,前後景視差 --- */
.wx-flake {
  position: absolute; top: -8%; border-radius: 50%;
  background: radial-gradient(circle, #FFFFFF, rgba(255,255,255,.92) 55%, rgba(255,255,255,0));
  box-shadow: 0 1px 2px rgba(90,110,130,.28);
  animation-name: wx-flake-fall; animation-timing-function: ease-in-out; animation-iteration-count: infinite;
}
@keyframes wx-flake-fall {
  0% { transform: translate(0, -10px); opacity: 0; }
  12% { opacity: 1; }
  50% { transform: translate(14px, 150px); }
  100% { transform: translate(-10px, 330px); opacity: .15; }
}

/* --- 陰天:厚重灰雲層,慢慢蓋過整片天(與多雲分明的白雲不同) --- */
.wx-ov {
  position: absolute; border-radius: 50%;
  background: radial-gradient(ellipse 60% 82% at 50% 50%, rgba(148,156,164,.6), rgba(148,156,164,0) 70%);
  filter: blur(16px);
}
.wx-ov-1 { width: 340px; height: 160px; top: 2%;  opacity: .85; animation: wx-cloud-drift 72s linear infinite; }
.wx-ov-2 { width: 280px; height: 140px; top: 24%; opacity: .65; animation: wx-cloud-drift 92s linear infinite; animation-delay: -32s; }
.wx-ov-3 { width: 320px; height: 150px; top: 12%; opacity: .55; animation: wx-cloud-drift 82s linear infinite; animation-delay: -58s; }
.wx-ov-4 { width: 260px; height: 130px; top: 38%; opacity: .5;  animation: wx-cloud-drift 104s linear infinite; animation-delay: -74s; }

/* 深色:雲/霧改冷灰,不刺眼(其餘動效本身已適用) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wx-cloud-el {
    background:
      radial-gradient(ellipse 42% 74% at 30% 60%, rgba(206,216,228,.55), rgba(206,216,228,0) 72%),
      radial-gradient(ellipse 46% 96% at 54% 44%, rgba(206,216,228,.55), rgba(206,216,228,0) 72%),
      radial-gradient(ellipse 38% 68% at 76% 62%, rgba(206,216,228,.55), rgba(206,216,228,0) 72%);
  }
  :root:not([data-theme="light"]) .wx-fog-layer { background: linear-gradient(180deg, rgba(150,160,172,0), rgba(150,160,172,.4) 50%, rgba(150,160,172,0)); }
}
:root[data-theme="dark"] .wx-cloud-el {
  background:
    radial-gradient(ellipse 42% 74% at 30% 60%, rgba(206,216,228,.55), rgba(206,216,228,0) 72%),
    radial-gradient(ellipse 46% 96% at 54% 44%, rgba(206,216,228,.55), rgba(206,216,228,0) 72%),
    radial-gradient(ellipse 38% 68% at 76% 62%, rgba(206,216,228,.55), rgba(206,216,228,0) 72%);
}
:root[data-theme="dark"] .wx-fog-layer { background: linear-gradient(180deg, rgba(150,160,172,0), rgba(150,160,172,.4) 50%, rgba(150,160,172,0)); }

@media (prefers-reduced-motion: reduce) {
  .weather-icon-anim,
  .wx-sun-glow, .wx-sun-rays, .wx-moon-glow, .wx-star,
  .wx-cloud-el, .wx-ov, .wx-fog-layer,
  .wx-drop, .wx-flash, .wx-flake,
  .weather-skel-pulse {
    animation: none !important;
  }
}

@media (max-width: 380px) {
  .weather-hero-temp { font-size: 52px; }
  .weather-hero { min-height: 240px; }
}
