/* boot-motion.js — ใส่คลาส fx-motion ก่อนวาดเฟรมแรก (สคริปต์ใน head, โหลดแบบ synchronous) * * แยกออกมาจาก inline script ใน index.html เพื่อให้ page ใช้ Content-Security-Policy * แบบ script-src 'self' ได้ (ไม่ต้องเปิด 'unsafe-inline') * JS ปิด หรือผู้ใช้ตั้ง reduced-motion → ไม่ใส่คลาส → เนื้อหาเห็นปกติทันที */ (function () { try { if (!window.matchMedia("(prefers-reduced-motion: reduce)").matches) { document.documentElement.classList.add("fx-motion"); } } catch (error) { /* ถ้า matchMedia ใช้ไม่ได้ ก็ไม่ต้องมีอนิเมชัน */ } })();