/* 半写实天气浮层：多层渐变光照、柔边云层和粒子只表达既有天气，不推断昼夜。 */
#weatherScene .weather-popover{isolation:isolate;min-height:min(302px,calc(100dvh - 160px));border-color:rgba(255,255,255,.22);background:#516779;color:#fff;overflow-x:hidden}
.weather-landscape{position:absolute;inset:0;z-index:-2;overflow:hidden;pointer-events:none;border-radius:inherit;background:#516779}
.weather-atmosphere{position:absolute;inset:0;overflow:hidden;background:linear-gradient(155deg,#1875b8 0%,#59b3e2 48%,#c3e7ed 100%)}
.weather-atmosphere.sky-rain{background:linear-gradient(165deg,#192b3c 0%,#536b7e 53%,#91a4ad 100%)}
.weather-atmosphere.sky-overcast{background:linear-gradient(165deg,#4b6477,#8b9da9 60%,#c4cbd0)}
.weather-atmosphere.sky-mist{background:linear-gradient(160deg,#748895,#b5c0c3 70%,#d4d8d5)}
.weather-atmosphere.sky-snow{background:linear-gradient(155deg,#526f91,#9fb9d0 55%,#d5e2e8)}
.weather-atmosphere.sky-unknown{background:linear-gradient(150deg,#566d7d,#8e9ea9)}
.weather-transition .weather-atmosphere:last-child{mask-image:linear-gradient(100deg,transparent 8%,#000 78%)}
.sky-sun{position:absolute;right:35px;top:30px;width:72px;height:72px;border-radius:50%;background:radial-gradient(circle,#fffef0 0%,#fff8cb 35%,#ffe693 58%,#ffd77b80 68%,transparent 73%);box-shadow:0 0 32px 18px #fff0a35c,0 0 95px 48px #fff7d638;animation:skySunGlow 8s ease-in-out infinite}
.sky-sun::before{content:'';position:absolute;inset:-100px;background:conic-gradient(from 10deg,transparent,#fff9de18 8deg,transparent 18deg,transparent 44deg,#fff9de20 51deg,transparent 58deg,transparent 95deg,#fff9de18 105deg,transparent 118deg,transparent 166deg,#fff9de18 177deg,transparent 185deg,transparent 239deg,#fff9de18 251deg,transparent 262deg,transparent 305deg,#fff9de18 319deg,transparent 332deg);filter:blur(4px);border-radius:50%;animation:skyLightTurn 90s linear infinite}
.sky-cloud{position:absolute;width:300px;height:145px;opacity:.88;filter:blur(8px);background:radial-gradient(ellipse at 23% 67%,#fff 0%,#edf5f9 22%,transparent 43%),radial-gradient(ellipse at 48% 44%,#fff 0%,#f0f7fa 28%,transparent 49%),radial-gradient(ellipse at 75% 65%,#f9fdff 0%,#cbdde8 29%,transparent 48%);animation:skyCloudDrift 23s ease-in-out infinite alternate}
.sky-cloud-far{top:16px;left:-140px;opacity:.5;transform:scale(.8);animation-duration:36s}.sky-cloud-near{top:82px;right:-140px;opacity:.7;animation-delay:-9s}
.sky-rain .sky-sun,.sky-overcast .sky-sun,.sky-snow .sky-sun,.sky-mist .sky-sun,.sky-unknown .sky-sun{display:none}
.sky-rain .sky-cloud,.sky-overcast .sky-cloud{background:radial-gradient(ellipse at 23% 67%,#465769 0%,#354859 22%,transparent 43%),radial-gradient(ellipse at 48% 44%,#70808d 0%,#4d606f 28%,transparent 49%),radial-gradient(ellipse at 75% 65%,#465868 0%,#283c50 29%,transparent 48%);filter:blur(6px);opacity:.95}
.sky-rain .sky-cloud-near,.sky-overcast .sky-cloud-near{top:0;right:-58px;width:390px;height:160px}.sky-cloudy .sky-cloud-near{top:35px;right:-80px;opacity:.9}.sky-unknown .sky-cloud{display:none}.sky-mist .sky-cloud{width:500px;filter:blur(22px);opacity:.5}
.sky-precipitation{position:absolute;inset:65px -20px 0;display:none;overflow:hidden}.sky-rain .sky-precipitation,.sky-snow .sky-precipitation{display:block}
.sky-precipitation i{position:absolute;top:-30px;left:var(--x);width:1px;height:29px;background:linear-gradient(transparent,#d8edfa9c);border-radius:50%;animation:skyRainFall var(--speed) linear var(--delay) infinite}
.sky-snow .sky-precipitation i{width:4px;height:4px;background:#fff;box-shadow:0 0 5px #ffffff80;animation-name:skySnowFall;animation-duration:calc(var(--speed)*6)}
/* 下半部遮罩承接信息，天空保留层次；不因主题改变真实天气类别。 */
#weatherScene .weather-popover::after{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,#102c4433 0%,#102c4410 25%,#102c4475 62%,#0a243dd4 100%);border-radius:inherit}
#weatherScene .weather-popover .weather-copy{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-height:170px;text-align:left}
#weatherScene .weather-popover .weather-copy strong{font-size:42px;font-weight:500;color:#fff;text-shadow:0 2px 12px #143d6055;order:1}
#weatherScene .weather-popover #weatherSceneLabel{order:0;font-size:12px;color:#f1f7ff}
#weatherScene .weather-popover #weatherSceneLocation{order:2;color:#f1f7ff;font-size:13px}
#weatherScene .weather-popover #weatherSceneCondition{order:3;margin-top:auto;color:#fff;font-size:16px;font-weight:500}
#weatherScene .weather-popover .weather-details{display:grid;gap:8px;text-align:left;color:#f0f6fd;margin:0;font-size:12px;line-height:1.5}
#weatherScene .weather-popover .weather-side{margin:18px 0 0;padding-top:14px;border-top:1px solid #ffffff30}
/* 收起时停止所有背景绘制；减少动态效果时仍保留天气静态场景。 */
#weatherScene:not(.weather-open) .weather-landscape *{animation-play-state:paused}
@keyframes skySunGlow{50%{opacity:.86;transform:scale(1.04)}}
@keyframes skyLightTurn{to{transform:rotate(360deg)}}
@keyframes skyCloudDrift{from{translate:-14px 0}to{translate:18px -5px}}
@keyframes skyRainFall{to{transform:translate(-48px,330px);opacity:.15}}
@keyframes skySnowFall{to{transform:translate(28px,300px);opacity:.2}}
@media(prefers-reduced-motion:reduce){#weatherScene .weather-landscape *{animation:none!important}.sky-precipitation i{top:calc(var(--x)*.7)}}

/* 每个已识别天气种类都有独立表现；强度通过粒子密度、速度和光照表达。 */
.weather-atmosphere[data-kind="partly-cloudy"] .sky-cloud-near{top:80px;opacity:.75}
.weather-atmosphere[data-kind="cloudy"] .sky-sun{opacity:.4;filter:blur(5px)}
.weather-atmosphere[data-kind="cloudy"] .sky-cloud-near{width:420px;top:12px;right:-100px;opacity:1}
.weather-atmosphere[data-kind="overcast"] .sky-cloud-far{opacity:1;width:440px;top:-30px}
.sky-fog,.sky-lightning,.sky-wind,.sky-vortex{display:none;position:absolute;pointer-events:none}
.sky-mist .sky-fog{display:block;inset:35% -35% -20%;background:repeating-linear-gradient(173deg,transparent 0 25px,#e4ebec90 45px,transparent 75px);filter:blur(15px);animation:skyFogDrift 18s ease-in-out infinite alternate}
.weather-atmosphere[data-kind="fog"] .sky-cloud{filter:blur(27px);opacity:.8}
.weather-atmosphere[data-kind="haze"]{background:linear-gradient(145deg,#8e9393,#bab4a2 65%,#d0c7ae)}
.weather-atmosphere[data-kind="haze"] .sky-sun{display:block;opacity:.35;filter:blur(7px);box-shadow:none}
.weather-atmosphere[data-kind="dust"]{background:linear-gradient(150deg,#826b4d,#b99b6e 65%,#dbc393)}
.weather-atmosphere[data-kind="dust"] .sky-fog{background:repeating-linear-gradient(168deg,transparent 0 30px,#bd9d6e99 55px,transparent 85px);animation-duration:5s}
.weather-atmosphere[data-kind="dust"] .sky-precipitation{display:block;inset:0}
.weather-atmosphere[data-kind="dust"] .sky-precipitation i{top:var(--x);height:2px;width:2px;background:#e6cf9b;animation:skyDustFly 3s linear var(--delay) infinite}
.weather-atmosphere[data-kind="drizzle"] .sky-precipitation i,.weather-atmosphere[data-kind="freezing-drizzle"] .sky-precipitation i{height:9px;opacity:.45;animation-duration:calc(var(--speed)*2)}
.weather-atmosphere[data-kind="drizzle"] .sky-precipitation i:nth-child(n+9),.weather-atmosphere[data-kind="freezing-drizzle"] .sky-precipitation i:nth-child(n+9),.weather-atmosphere[data-kind="rain-light"] .sky-precipitation i:nth-child(n+12){display:none}
.weather-atmosphere[data-kind="rain-light"] .sky-precipitation i{height:17px;animation-duration:calc(var(--speed)*1.4)}
.weather-atmosphere[data-kind="rain-heavy"] .sky-precipitation i{height:38px;width:1.5px;animation-duration:calc(var(--speed)*.75)}
.weather-atmosphere[data-kind="rain-storm"],.weather-atmosphere[data-kind="rain-extreme"],.weather-atmosphere[data-kind="thunder"]{background:linear-gradient(155deg,#101e30,#34485b 60%,#7b92a0)}
.weather-atmosphere[data-kind="rain-storm"] .sky-precipitation i{height:46px;width:1.5px;animation-duration:calc(var(--speed)*.6)}
.weather-atmosphere[data-kind="rain-extreme"] .sky-precipitation i{height:65px;width:2px;box-shadow:12px -20px 0 #d8edfa45;animation-duration:calc(var(--speed)*.45)}
.weather-atmosphere[data-kind="shower"] .sky-precipitation{animation:skyShowerWave 8s ease-in-out infinite}
.weather-atmosphere[data-kind="shower-heavy"] .sky-precipitation{animation:skyShowerWave 5s ease-in-out infinite}
.weather-atmosphere[data-kind="shower-heavy"] .sky-precipitation i{height:40px;animation-duration:calc(var(--speed)*.65)}
/* 雷光为柔和低亮度闪动，不使用全屏高频白闪。 */
.weather-atmosphere[data-kind="thunder"] .sky-lightning,.weather-atmosphere[data-kind="hail"] .sky-lightning{display:block;top:64px;right:56px;width:28px;height:86px;background:#e4edff;clip-path:polygon(45% 0,100% 0,62% 40%,90% 40%,0 100%,30% 51%,4% 51%);filter:blur(1px);opacity:0;animation:skyLightning 9s linear infinite}
.weather-atmosphere[data-kind="hail"] .sky-precipitation i{width:5px;height:5px;background:radial-gradient(circle at 30% 25%,#fff,#b7d1e1 70%);box-shadow:0 1px 2px #fff8;animation-duration:calc(var(--speed)*1.2)}
.weather-atmosphere[data-kind="freezing-rain"],.weather-atmosphere[data-kind="freezing-drizzle"]{background:linear-gradient(160deg,#344f6b,#6e9ab7 62%,#c4dbe7)}
.weather-atmosphere[data-kind="freezing-rain"] .sky-precipitation i:nth-child(3n),.weather-atmosphere[data-kind="freezing-drizzle"] .sky-precipitation i:nth-child(3n){height:4px;width:3px;background:#e5f7ff;box-shadow:0 0 3px #b6e4ff}
.weather-atmosphere[data-kind="sleet"] .sky-precipitation i:nth-child(even){width:1px;height:22px;border-radius:50%;background:linear-gradient(transparent,#d8edfa);animation:skyRainFall var(--speed) linear var(--delay) infinite}
.weather-atmosphere[data-kind="snow-light"] .sky-precipitation i:nth-child(n+10){display:none}
.weather-atmosphere[data-kind="snow-light"] .sky-precipitation i{width:3px;height:3px;animation-duration:calc(var(--speed)*8)}
.weather-atmosphere[data-kind="snow-heavy"] .sky-precipitation i{width:6px;height:6px;box-shadow:18px -35px 2px #ffffff90;animation-duration:calc(var(--speed)*4)}
.weather-atmosphere[data-kind="blizzard"]{background:linear-gradient(150deg,#3b526b,#92a9bb 70%,#c4d4de)}
.weather-atmosphere[data-kind="blizzard"] .sky-precipitation i{width:5px;height:5px;box-shadow:18px -35px 1px #fff8;animation:skyBlizzard calc(var(--speed)*2) linear var(--delay) infinite}
.weather-atmosphere[data-kind="snow-shower"] .sky-precipitation{animation:skyShowerWave 7s ease-in-out infinite}
.weather-atmosphere[data-kind="snow-grains"] .sky-precipitation i{width:2px;height:2px;box-shadow:none;animation-duration:calc(var(--speed)*2.5)}
.weather-atmosphere[data-kind="windy"] .sky-wind,.weather-atmosphere[data-kind="typhoon"] .sky-wind{display:block;inset:35px -40%;background:repeating-linear-gradient(172deg,transparent 0 42px,#e5f1f53b 44px,transparent 46px);filter:blur(1px);animation:skyWindSweep 3s linear infinite}
.weather-atmosphere[data-kind="windy"] .sky-cloud{animation-duration:4s}
.weather-atmosphere[data-kind="typhoon"]{background:linear-gradient(150deg,#1b303d,#4e6f7b 70%,#91a5ab)}
.weather-atmosphere[data-kind="typhoon"] .sky-vortex{display:block;right:-45px;top:-65px;width:280px;height:280px;border-radius:50%;background:repeating-conic-gradient(from 15deg,transparent 0deg,#bdced34d 30deg,transparent 65deg);mask-image:radial-gradient(circle,transparent 7%,#000 22%,transparent 68%);filter:blur(6px);animation:skyLightTurn 12s linear infinite}
.weather-atmosphere[data-kind="typhoon"] .sky-precipitation i{animation-name:skyStormRain;animation-duration:calc(var(--speed)*.6);height:36px}
@keyframes skyFogDrift{to{translate:40px -8px}}
@keyframes skyDustFly{from{transform:translate(130px,0);opacity:0}30%{opacity:.65}to{transform:translate(-160px,45px);opacity:0}}
@keyframes skyShowerWave{0%,100%{opacity:.25}45%,70%{opacity:1}}
@keyframes skyLightning{0%,75%,81%,100%{opacity:0}77%{opacity:.48}79%{opacity:.1}}
@keyframes skyBlizzard{from{transform:translate(100px,-20px)}to{transform:translate(-160px,310px);opacity:.2}}
@keyframes skyWindSweep{from{transform:translateX(70px)}to{transform:translateX(-70px)}}
@keyframes skyStormRain{to{transform:translate(-160px,330px);opacity:.2}}
