/* site-bg.css — พื้นหลังดำ #000000 เป็นสีหลัก มีแสงเทาจางมากๆ แทบมองไม่เห็น (โหมดมืดเท่านั้น)
   ปรับความเทา: ตัวเลข .13 ที่คูณไว้ = ความเข้มสูงสุดของเทา (ยิ่งน้อยยิ่งดำ)
   วางไว้หลังสุด (z -4) ใต้ชั้นหิมะ/สภาพอากาศ (z -1) จึงอยู่ร่วมกันได้ */

:root:not([data-theme="light"]) body,
:root:not([data-theme="light"]) .shell{
  background:transparent;
}

:root:not([data-theme="light"]) body::before,
:root:not([data-theme="light"]) body::after{
  content:""; position:fixed; z-index:-4; pointer-events:none;
}

/* ชั้นแสงเทาไล่เป็นดำ (จุดหยุดสีแบบ ease เพื่อไม่ให้เห็นขอบ/แถบ) */
:root:not([data-theme="light"]) body::before{
  inset:-20%;
  background:
    radial-gradient(ellipse 70% 60% at 28% 22%,
      rgba(102,102,102,0.13) 0%, rgba(102,102,102,0.121) 8%, rgba(102,102,102,0.104) 17%,
      rgba(102,102,102,0.083) 27%, rgba(102,102,102,0.061) 38%, rgba(102,102,102,0.04) 50%,
      rgba(102,102,102,0.023) 62%, rgba(102,102,102,0.01) 75%, rgba(102,102,102,0.003) 88%,
      rgba(102,102,102,0) 100%),
    radial-gradient(ellipse 60% 55% at 80% 85%,
      rgba(102,102,102,0.072) 0%, rgba(102,102,102,0.06) 10%, rgba(102,102,102,0.044) 22%,
      rgba(102,102,102,0.029) 36%, rgba(102,102,102,0.016) 50%, rgba(102,102,102,0.007) 66%,
      rgba(102,102,102,0.001) 84%, rgba(102,102,102,0) 100%);
  animation:siteBgDrift 28s ease-in-out infinite alternate;
  will-change:transform;
}

/* เกรนบาง ๆ กันสีเป็นแถบ (banding) */
:root:not([data-theme="light"]) body::after{
  inset:0; opacity:.07; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

@keyframes siteBgDrift{
  from{ transform:translate3d(-3%,-2%,0) scale(1); }
  to{ transform:translate3d(3%,3%,0) scale(1.08); }
}
html.wfx-on body::before{ animation:none; } /* เปิดหิมะอยู่ = หยุดขยับ กันกระตุก */
@media (prefers-reduced-motion:reduce){
  :root:not([data-theme="light"]) body::before{ animation:none; }
}
