/* Christmas mode — active when <html data-christmas="on"> */
:root[data-christmas="on"] {
  --bg: #070a10;
  --bg-elev: #0c1019;
  --surface: #111620;
  --surface-2: #19202d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 206, 110, 0.3);
  --gold: #e63946;
  --gold-light: #ff8a8a;
  --gold-deep: #b3202e;
  --gold-gradient: linear-gradient(135deg, #ffe29a 0%, #e63946 48%, #1f9d55 100%);
  --gold-glow: rgba(230, 57, 70, 0.35);
  --on-gold: #ffffff;
}
:root[data-christmas="on"] body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(31, 157, 85, 0.16), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(230, 57, 70, 0.12), transparent 60%),
    var(--bg);
}

.xm-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9990; overflow: hidden; }

/* Aurora */
.xm-aurora {
  position: absolute; left: -10%; top: -20%; width: 120%; height: 55%;
  background: linear-gradient(100deg, transparent 10%, rgba(60, 220, 140, .14) 35%, rgba(80, 160, 255, .12) 55%, rgba(230, 57, 70, .08) 75%, transparent 90%);
  filter: blur(40px); animation: xm-aurora 16s ease-in-out infinite alternate;
}
@keyframes xm-aurora { to { transform: translateX(8%) skewX(-6deg); opacity: .6; } }

/* Snow ground glow */
.xm-ground {
  position: absolute; left: 0; right: 0; bottom: -30px; height: 90px;
  background: radial-gradient(ellipse at 50% 100%, rgba(235, 245, 255, .22), transparent 70%);
}

/* Snowflakes */
.xm-flake { position: absolute; top: -30px; color: #fff; opacity: .85; text-shadow: 0 0 6px rgba(190, 220, 255, .8); animation: xm-fall linear forwards; }
@keyframes xm-fall {
  0% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(40px, 55vh) rotate(180deg); }
  100% { transform: translate(-30px, 110vh) rotate(360deg); }
}

/* Garland of lights across the top */
.xm-garland { position: absolute; top: 0; left: 0; right: 0; height: 34px; display: flex; justify-content: space-between; padding: 0 6px; }
.xm-garland::before {
  content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 14px;
  border-bottom: 2px solid rgba(20, 90, 50, .9); border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.xm-light {
  position: relative; width: 9px; height: 13px; margin-top: 12px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--c); box-shadow: 0 0 10px 3px var(--c); animation: xm-twinkle 2.2s ease-in-out infinite;
  animation-delay: var(--d);
}
.xm-light::before { content: ''; position: absolute; top: -4px; left: 2px; width: 5px; height: 4px; background: #1b3a2a; border-radius: 1px; }
@keyframes xm-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Santa sleigh */
.xm-sleigh { position: absolute; left: -160px; font-size: 38px; white-space: nowrap; animation: xm-fly linear forwards; filter: drop-shadow(0 0 8px rgba(255, 220, 140, .4)); }
@keyframes xm-fly {
  0% { transform: translate(0, 0); }
  30% { transform: translate(35vw, -5vh); }
  60% { transform: translate(70vw, 4vh); }
  100% { transform: translate(120vw, -4vh); }
}

/* Shooting star */
.xm-star { position: absolute; width: 90px; height: 2px; background: linear-gradient(90deg, transparent, #fff); transform: rotate(28deg); animation: xm-shoot 1.1s ease-out forwards; }
@keyframes xm-shoot { 0% { opacity: 0; transform: translate(0, 0) rotate(28deg); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(260px, 140px) rotate(28deg); } }

/* Click burst */
.xm-pop { position: fixed; font-size: 28px; pointer-events: none; z-index: 9995; animation: xm-pop 1.6s ease-out forwards; }
@keyframes xm-pop { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(-50%, -160px) scale(1.2); opacity: 0; } }

/* Warm glow following the cursor */
.xm-torch { position: absolute; inset: 0; background: radial-gradient(260px circle at var(--hx, 50%) var(--hy, 50%), rgba(255, 215, 130, .08), transparent 70%); }

/* Corner trees */
.xm-holly { position: absolute; top: 28px; font-size: 54px; opacity: .8; }
.xm-holly.l { left: 8px; transform: rotate(-20deg); }
.xm-holly.r { right: 8px; transform: scaleX(-1) rotate(-20deg); }

/* Glowing headings */
:root[data-christmas="on"] h1 { text-shadow: 0 0 24px rgba(230, 57, 70, .35), 0 0 60px rgba(31, 157, 85, .25); }

@media (max-width: 640px) { .xm-holly { font-size: 36px; } .xm-light:nth-child(even) { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .xm-aurora, .xm-light { animation: none !important; }
}
