/* =========================================================
   圣诞装饰层（只在 body 有 .xmas 时生效）
   开关和时间段在 xmas.js 顶部；整个删掉 xmas.css / xmas.js 两个文件
   以及 index.html 里引用它们的两行，就完全恢复原样。
   ========================================================= */

/* ---------- 1. 飘雪（画布铺满全屏，不挡点击） ---------- */
#xmasSnow{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:60}

/* ---------- 2. 大框顶部的彩灯串 ---------- */
body.xmas .shell{position:relative}
.xm-lights{position:absolute;left:10px;right:10px;top:-6px;height:30px;pointer-events:none;z-index:3}
.xm-lights svg{width:100%;height:100%;overflow:visible}
.xm-wire{fill:none;stroke:#2B3A1F;stroke-width:1.6}
.xm-bulb{transform-box:fill-box;transform-origin:50% 0;animation:xm-twinkle 1.6s ease-in-out infinite}
.xm-bulb.c0{fill:#FF3B3B;filter:drop-shadow(0 0 4px #FF3B3B)}
.xm-bulb.c1{fill:#FFD23F;filter:drop-shadow(0 0 4px #FFD23F);animation-delay:.4s}
.xm-bulb.c2{fill:#3BE37A;filter:drop-shadow(0 0 4px #3BE37A);animation-delay:.8s}
.xm-bulb.c3{fill:#4FC3FF;filter:drop-shadow(0 0 4px #4FC3FF);animation-delay:1.2s}
.xm-cap{fill:#3A3A3A}
@keyframes xm-twinkle{0%,100%{opacity:1}50%{opacity:.35}}
body.xmas .topbar{padding-top:18px}

/* ---------- 3. Logo 戴圣诞帽 ---------- */
body.xmas .logo-box{position:relative}
.xm-hat{position:absolute;left:-12px;top:-17px;width:36px;height:30px;transform:rotate(-22deg);pointer-events:none;
  filter:drop-shadow(0 2px 2px rgba(40,4,10,.45))}

/* ---------- 4. 圣诞横幅 ---------- */
.xm-banner{position:relative;overflow:hidden;display:flex;align-items:center;gap:12px;margin:2px 0 12px;padding:12px 14px;border-radius:18px;
  background:linear-gradient(135deg,#0F6B3A 0%,#178A4A 55%,#0F6B3A 100%);color:#fff;
  box-shadow:0 12px 26px -14px rgba(5,40,20,.9), inset 0 0 0 1.5px rgba(255,255,255,.18)}
.xm-banner::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.22;
  background-image:radial-gradient(#fff 1.2px,transparent 1.4px),radial-gradient(#fff 1px,transparent 1.2px);
  background-size:22px 22px,14px 14px;background-position:0 0,7px 9px}
.xm-banner::after{content:"";position:absolute;inset:-40% auto -40% -60%;width:40%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.35),transparent);transform:skewX(-20deg);animation:xm-shine 4.5s ease-in-out infinite}
@keyframes xm-shine{0%,60%{left:-60%}100%{left:130%}}
.xm-tree{position:relative;flex:0 0 auto;width:44px;height:52px}
.xm-text{position:relative;flex:1;min-width:0}
.xm-title{font-family:"Fredoka",sans-serif;font-weight:700;font-size:19px;line-height:1.1;
  background:linear-gradient(180deg,#FFF6D6,var(--gold-1) 45%,var(--gold-2));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
  filter:drop-shadow(0 2px 0 rgba(0,40,15,.5))}
.xm-sub{margin-top:4px;font-size:12px;font-weight:700;color:rgba(255,255,255,.9)}
.xm-gift{position:relative;flex:0 0 auto;width:38px;height:38px;animation:xm-bob 2.4s ease-in-out infinite}
@keyframes xm-bob{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-4px) rotate(4deg)}}
body.xmas.lang-hi .xm-title{font-family:"Noto Sans Devanagari",sans-serif}

/* ---------- 5. 卡片顶上的积雪 ---------- */
body.xmas .tile.feature::after,
body.xmas .cat-card::after{content:"";position:absolute;left:0;right:0;top:0;height:14px;pointer-events:none;z-index:2;
  background:
    radial-gradient(14px 9px at 8% 100%,#fff 98%,transparent) ,
    radial-gradient(22px 12px at 26% 100%,#fff 98%,transparent),
    radial-gradient(16px 10px at 47% 100%,#fff 98%,transparent),
    radial-gradient(24px 12px at 68% 100%,#fff 98%,transparent),
    radial-gradient(15px 9px at 90% 100%,#fff 98%,transparent),
    linear-gradient(#fff,#fff) 0 100%/100% 7px no-repeat;
  transform:scaleY(-1);filter:drop-shadow(0 2px 2px rgba(120,20,30,.18))}

/* ---------- 6. 标题前的圆点换成圣诞彩球 ---------- */
body.xmas .sect-head .dot{position:relative;width:13px;height:13px;margin-top:3px;
  background:radial-gradient(circle at 35% 30%,#FF8A8A,#E0202E 55%,#9B0F1B);box-shadow:0 0 8px rgba(255,80,80,.7)}
body.xmas .sect:nth-of-type(even) .sect-head .dot{background:radial-gradient(circle at 35% 30%,#FFF1A8,#FFC02E 55%,#C77A0A);box-shadow:0 0 8px rgba(255,200,60,.7)}
body.xmas .sect-head .dot::before{content:"";position:absolute;left:4px;top:-4px;width:5px;height:4px;border-radius:1px;background:#D9D9D9}

/* ---------- 7. 首页三方 logo 区域的冬青装饰 ---------- */
.xm-holly{position:absolute;width:46px;height:34px;pointer-events:none;z-index:1}
.xm-holly.l{left:6px;top:8px;transform:rotate(-18deg)}
.xm-holly.r{right:6px;top:8px;transform:scaleX(-1) rotate(-18deg)}

/* ---------- 8. 大框底部的雪堆 ---------- */
body.xmas .shell{padding-bottom:30px}
.xm-ground{position:absolute;left:0;right:0;bottom:0;height:26px;border-radius:0 0 26px 26px;pointer-events:none;overflow:hidden}
.xm-ground svg{width:100%;height:100%}

/* ---------- 9. 工单卡片右上角小铃铛 ---------- */
.xm-bell{position:absolute;right:56px;top:6px;width:22px;height:26px;z-index:3;transform-origin:50% 0;animation:xm-ring 2.8s ease-in-out infinite;pointer-events:none}
@keyframes xm-ring{0%,70%,100%{transform:rotate(0)}75%{transform:rotate(14deg)}82%{transform:rotate(-12deg)}89%{transform:rotate(8deg)}95%{transform:rotate(-4deg)}}

/* ---------- 10. 横幅可点击 + 弹窗 ---------- */
.xm-banner{cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .15s}
.xm-banner:active{transform:scale(.98)}
.xm-pop{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:24px;background:rgba(30,4,10,.6);
  backdrop-filter:blur(3px);opacity:0;transition:opacity .2s}
.xm-pop.show{opacity:1}
.xm-pop-card{position:relative;width:100%;max-width:320px;text-align:center;padding:34px 22px 22px;border-radius:24px;color:#fff;
  background:linear-gradient(160deg,#178A4A 0%,#0F6B3A 100%);
  box-shadow:0 24px 50px -16px rgba(0,0,0,.6), inset 0 0 0 2px rgba(255,214,90,.55);
  transform:scale(.85) translateY(10px);transition:transform .25s cubic-bezier(.2,1.4,.4,1)}
.xm-pop.show .xm-pop-card{transform:none}
.xm-pop-card::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:.2;
  background-image:radial-gradient(#fff 1.2px,transparent 1.4px);background-size:20px 20px}
.xm-pop-santa{position:absolute;left:-14px;top:-22px;width:64px;height:54px;transform:rotate(-20deg);filter:drop-shadow(0 3px 3px rgba(0,0,0,.35))}
.xm-pop-gift{position:relative;font-size:46px;line-height:1;animation:xm-bob 2.4s ease-in-out infinite}
.xm-pop-title{position:relative;margin-top:10px;font-family:"Fredoka",sans-serif;font-weight:700;font-size:24px;
  background:linear-gradient(180deg,#FFF6D6,var(--gold-1) 45%,var(--gold-2));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.xm-pop-text{position:relative;margin-top:8px;font-size:14.5px;font-weight:700;line-height:1.5;color:rgba(255,255,255,.95)}
.xm-pop-btn{position:relative;margin-top:18px;width:100%;padding:12px;border-radius:14px;font-family:"Fredoka",sans-serif;font-weight:700;font-size:16px;
  color:#5A1218;background:linear-gradient(180deg,var(--gold-1),var(--gold-2));box-shadow:0 8px 16px -8px rgba(245,154,21,.9)}
body.lang-hi .xm-pop-title, body.lang-hi .xm-pop-btn{font-family:"Noto Sans Devanagari",sans-serif}

/* ---------- 11. 子页面（帮助中心 / 工单教程 / App 下载） ---------- */
body.xmas.xm-sub .wrap{position:relative}
body.xmas.xm-sub .xm-lights{top:2px}
body.xmas.xm-sub .top{padding-top:24px}
body.xmas.xm-sub .hero{position:relative}
body.xmas.xm-sub .hero h1::before,
body.xmas.xm-sub .hero h1::after{content:"";display:inline-block;width:26px;height:30px;vertical-align:-4px;
  background:center/contain no-repeat}
body.xmas.xm-sub .hero h1::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 52'%3E%3Cpath d='M22 2l1.6 4.2 4.4.2-3.4 2.7 1.2 4.3L22 11l-3.8 2.4 1.2-4.3L16 6.4l4.4-.2z' fill='%23FFD23F'/%3E%3Cpath d='M22 11l12 15h-7l11 14H6l11-14h-7z' fill='%232FBF62'/%3E%3Cpath d='M22 11l12 15h-7l11 14H22z' fill='%231E9A4B'/%3E%3Crect x='18.5' y='40' width='7' height='8' rx='1.5' fill='%238A4B22'/%3E%3Ccircle cx='17' cy='23' r='2' fill='%23FF3B3B'/%3E%3Ccircle cx='27' cy='30' r='2' fill='%23FFD23F'/%3E%3Ccircle cx='14' cy='35' r='2' fill='%234FC3FF'/%3E%3Ccircle cx='31' cy='37' r='2' fill='%23FF3B3B'/%3E%3C/svg%3E");margin-right:8px}
body.xmas.xm-sub .hero h1::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Crect x='5' y='16' width='30' height='21' rx='3' fill='%23E0202E'/%3E%3Crect x='3' y='11' width='34' height='8' rx='2.5' fill='%23FF4A4A'/%3E%3Crect x='17' y='11' width='6' height='26' fill='%23FFD23F'/%3E%3Cpath d='M20 11C14 2 6 6 10 10c2 2 7 1 10 1s8 1 10-1c4-4-4-8-10 1z' fill='%23FFD23F'/%3E%3C/svg%3E");margin-left:8px;width:24px;height:24px;vertical-align:-2px;animation:xm-bob 2.4s ease-in-out infinite}
body.xmas.xm-sub .xm-holly{top:2px;width:40px;height:30px}
body.xmas.xm-sub .xm-ground{border-radius:0;height:22px}
body.xmas.xm-sub .wrap{padding-bottom:calc(52px + env(safe-area-inset-bottom))}
.xm-hat-app{left:calc(50% - 62px);top:4px;width:48px;height:40px;z-index:2}

@media (prefers-reduced-motion:reduce){
  .xm-pop-gift, body.xmas.xm-sub .hero h1::after{animation:none}
  #xmasSnow{display:none}
  .xm-bulb,.xm-gift,.xm-bell,.xm-banner::after{animation:none}
}
