/* FESTIVAL_V1：节日主题样式。只在 <html> 带 fest-xxx 类时生效；平时完全不起作用 */
html.fest{--fx-bg:linear-gradient(125deg,#fff1e2,#ffe3cf,#ffeedd,#ffe3cf);--fx-hero:linear-gradient(115deg,#b3161f,#d42a2a,#e0472b,#b81d29);
  --fx-accent:#c8202f;--fx-accent2:#9e1424;--fx-num:#9e1424;--fx-gold:#f2c14e;--fx-card:#fffaf2;--fx-line:#f0d9b5}
html.fest-yuandan{--fx-bg:linear-gradient(125deg,#eef1fb,#f6efe2,#eaf0fa,#f7ecdf);--fx-hero:linear-gradient(115deg,#1d2a5b,#34408a,#7a4fa0,#22306a);
  --fx-accent:#3a46a0;--fx-accent2:#26307a;--fx-num:#2c3a8a;--fx-gold:#f5c451;--fx-card:#fffdf8;--fx-line:#e6e2f0}
html.fest-yuanxiao{--fx-bg:linear-gradient(125deg,#fff0e6,#ffe6ec,#fff3df,#ffe8e8);--fx-hero:linear-gradient(115deg,#c0282e,#e0503a,#e2843a,#c43a45);
  --fx-accent:#d0383a;--fx-accent2:#a82430;--fx-num:#a82430}
html.fest-duanwu{--fx-bg:linear-gradient(125deg,#eaf5ec,#f2f7e6,#e6f2ee,#eef6e3);--fx-hero:linear-gradient(115deg,#1f5e4a,#2f7d5c,#4f9a5a,#22644e);
  --fx-accent:#2f7d5c;--fx-accent2:#1f5e4a;--fx-num:#22644e;--fx-gold:#e8c45a;--fx-card:#fbfdf8;--fx-line:#d8e8d6}
html.fest-zhongqiu{--fx-bg:linear-gradient(125deg,#f6f1e6,#efe9f6,#f8f0de,#ece8f4);--fx-hero:linear-gradient(115deg,#1e2350,#2e3470,#4a3f7e,#232a5e);
  --fx-accent:#3a3f86;--fx-accent2:#262b66;--fx-num:#2e3470;--fx-gold:#f3cf6b;--fx-card:#fffdf7;--fx-line:#e7e1ef}
html.fest-guoqing{--fx-bg:linear-gradient(125deg,#fff0e4,#ffe7d6,#fff4e0,#ffe6d8);--fx-hero:linear-gradient(115deg,#b5121b,#d4202a,#e34a2a,#b8141e)}
html.fest-laodong{--fx-bg:linear-gradient(125deg,#eef7ea,#fbf6e2,#eaf5ee,#f8f3df);--fx-hero:linear-gradient(115deg,#2f7a4d,#4a9a4f,#8ab04a,#357e52);
  --fx-accent:#3d8a52;--fx-accent2:#2c6b3f;--fx-num:#2f7a4d;--fx-gold:#f0c44e;--fx-card:#fdfdf8;--fx-line:#dfeadb}
html.fest-qingming{--fx-bg:linear-gradient(125deg,#eef2ef,#eef1f2,#f1f3ee,#edf1f0);--fx-hero:linear-gradient(115deg,#4d6460,#5d7570,#6b7f78,#51685f);
  --fx-accent:#5d7570;--fx-accent2:#4d6460;--fx-num:#4d6460;--fx-gold:#cfd8cf;--fx-card:#fbfcfb;--fx-line:#e1e7e3}

html.fest body{background:var(--fx-bg)!important;background-size:300% 300%!important;background-attachment:fixed!important}
html.fest .hm-hero{background:var(--fx-hero)!important;background-size:300% 300%!important;position:relative;overflow:hidden}
html.fest .hm-hero>*{position:relative;z-index:1}
html.fest .hm-hero .fx-hero-deco{position:absolute;z-index:0;pointer-events:none}
html.fest .hm-stat{background:var(--fx-card)!important;border-color:var(--fx-line)!important}
html.fest .hm-stat b{color:var(--fx-num)}
html.fest .hm-stat.warn b{color:#d9771a}
html.fest .hm-stat.bad b{color:#c0392b}
html.fest .hm-panel{background:var(--fx-card)!important;border-color:var(--fx-line)!important}
html.fest .hm-badge{background:var(--fx-accent)}
html.fest .hm-acts a.primary{background:linear-gradient(135deg,var(--fx-accent),var(--fx-accent2))!important;border-color:var(--fx-accent2)!important}
html.fest .hm-chip:not(.blue){background:var(--fx-accent);color:#fff}
html.fest .hm-rule{border-color:var(--fx-line)}
html.fest .login-logo{background:var(--fx-accent)!important}
html.fest .fx-lunar{display:block;font-size:12px;opacity:.9;margin-top:2px}
html.fest .hm-ava{box-shadow:0 0 0 2px var(--fx-gold)}

/* 装饰：都放在首页欢迎卡里（不挡任何按钮和文字） */
html.fest .fx-hd-wrap{right:200px;top:0;bottom:0;width:240px}
.fx-hd{position:absolute;pointer-events:none}
.fx-lantern{top:0;width:34px;transform-origin:50% 0;animation:fxSwing 3.2s ease-in-out infinite}
.fx-lantern.h1{right:70px}.fx-lantern.h2{right:20px;width:28px;animation-delay:-1.2s}
@keyframes fxSwing{0%,100%{transform:rotate(6deg)}50%{transform:rotate(-6deg)}}
.fx-tr{right:10px;top:4px;width:110px}
.fx-tl{right:10px;top:0;width:200px;opacity:.9}
.fx-br{right:6px;bottom:2px;width:150px}
.fx-moon{animation:fxGlow 4s ease-in-out infinite}
@keyframes fxGlow{0%,100%{filter:drop-shadow(0 0 6px rgba(243,207,107,.5))}50%{filter:drop-shadow(0 0 16px rgba(243,207,107,.9))}}
.fx-boat{animation:fxBob 2.6s ease-in-out infinite}
@keyframes fxBob{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-5px) rotate(1deg)}}
#fx-sky{position:fixed;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none}

/* 火花 / 金币 */
.fx-spark{position:fixed;z-index:60;width:6px;height:6px;border-radius:50%;pointer-events:none;background:var(--fx-gold,#f2c14e);box-shadow:0 0 6px var(--fx-gold,#f2c14e);animation:fxSpark .6s ease-out forwards}
@keyframes fxSpark{from{opacity:1;transform:translate(0,0) scale(1)}to{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.3)}}
.fx-coin{position:fixed;z-index:60;width:16px;height:16px;border-radius:50%;pointer-events:none;background:radial-gradient(circle at 35% 35%,#fff1b0,#f2c14e 60%,#c8901e);box-shadow:0 0 0 2px #e0a732 inset;animation:fxFall linear forwards}
.fx-coin.rb{width:8px;height:16px;border-radius:2px;background:var(--fx-accent,#c8202f);box-shadow:none}
.fx-coin.leaf{width:12px;height:8px;border-radius:8px 0;background:#4f9a5a;box-shadow:none}
.fx-coin.star{width:10px;height:10px;background:#f3cf6b;box-shadow:0 0 6px #f3cf6b;border-radius:2px;transform:rotate(45deg)}
@keyframes fxFall{to{transform:translate(var(--dx),var(--dy)) rotate(var(--r));opacity:.15}}

/* 问候浮层 */
.fx-greet{position:fixed;inset:0;z-index:70;display:grid;place-items:center;background:rgba(40,10,15,.28);backdrop-filter:blur(2px);animation:fxIn .3s ease-out}
.fx-greet.out{animation:fxOut .45s ease-in forwards}
@keyframes fxIn{from{opacity:0}to{opacity:1}}
@keyframes fxOut{to{opacity:0}}
.fx-card{position:relative;width:min(340px,86vw);background:linear-gradient(180deg,#fffaf0,#fff0d8);border:3px solid var(--fx-gold,#f2c14e);border-radius:22px;padding:18px 18px 16px;text-align:center;box-shadow:0 18px 50px rgba(60,10,20,.35);animation:fxPop .55s cubic-bezier(.2,1.4,.4,1)}
@keyframes fxPop{from{transform:scale(.6) translateY(30px);opacity:0}to{transform:none;opacity:1}}
.fx-card svg{width:190px;height:190px;max-width:100%;display:block;margin:0 auto}
.fx-card h3{margin:4px 0 2px;font-size:24px;color:var(--fx-accent,#c8202f)}
.fx-card p{margin:0;font-size:14px;color:#6e4a36;line-height:1.6}
.fx-card .fx-x{position:absolute;top:8px;right:10px;border:0;background:transparent;font:inherit;font-size:20px;color:#a08070;cursor:pointer;line-height:1;padding:4px}
.fx-card .fx-hint{display:block;margin-top:10px;font-size:12px;color:#a08070}
.fx-mascot{transform-origin:100px 170px;animation:fxBow 1.6s ease-in-out .5s 2}
@keyframes fxBow{0%,100%{transform:rotate(0)}40%,60%{transform:rotate(10deg) translateY(5px)}}
.fx-wave{animation:fxShake .5s ease-in-out .5s 6}
@keyframes fxShake{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}

@media (prefers-reduced-motion:reduce){html.fest body{animation:none!important}.fx-lantern,.fx-moon,.fx-boat,.fx-mascot,.fx-wave,.fx-card{animation:none!important}#fx-sky{display:none}}
