/* =========================================================
   Yulgang Christmas 2026 — ธีม C "นิทานกล่องของขวัญ"
   - ภาพจริงตาม docs/asset-manifest.json (ติดตั้งด้วย node tools/install_assets.mjs)
     ชิ้นที่ยังรอทีม (ไอคอนไอเท็ม / ชุดคลุม / NPC) ยังเป็น placeholder: assets/img/ph/<id>.svg
   - กรอบทุกชิ้นเป็น border-image 9-slice / 3-slice แบบแลนดิ้ง 21st (ค่า slice ใน manifest / docs/ui-kit.html)
   - ห้ามใส่ CSS transform บน element ที่ GSAP animate (ใช้ wrapper แยก)
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --ink: #5a1d12;            /* น้ำตาลแดงเข้ม — ตัวหนังสือบนพื้นครีม/ฟ้า */
  --ink-2: #6e3b2c;
  --muted: #9a6b58;
  --line: rgba(122, 46, 18, .18);
  --wire: #fbeedd;
  --wire-2: #f1dcc2;
  --paper: #fff8ec;          /* ครีมกระดาษห่อ */
  --red: #d62828;
  --red-2: #a3121a;
  --green: #1f8a4c;
  --gold: #f4b41a;
  --sky: #bfe0fb;
  --night: #121a3a;
  --accent: #d62828;
  --tbc: #fde68a;
  --tbc-ink: #92400e;
  --snow-color: #ffffff;     /* WebGL อ่านค่านี้ */
  --spark-color: #ffd36b;
  --nav-h: 76px;
  --font-body: 'Noto Sans Thai', system-ui, sans-serif;
  --font-head: 'Kanit', 'Noto Sans Thai', sans-serif;
  --font-deco: 'Cinzel', serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sw: clamp(170px, 17.7vw, 340px);       /* sleigh width */
}
@media (max-width: 767.98px) { :root { --nav-h: 64px; } }

/* ---------- 2. Base ---------- */
/* Lenis + ScrollTrigger ต้องการให้ scroll กระโดดทันที:
   - Bootstrap ตั้ง :root { scroll-behavior: smooth } (specificity สูงกว่า html) → ต้องใช้ :root
   - scroll anchoring ของเบราว์เซอร์ขยับ scrollY เองตอน ScrollTrigger ถอด pin ชั่วคราวระหว่าง refresh (ปรับขนาดหน้าต่าง)
     → วัดตำแหน่ง Hero ผิด (start ติดลบ) แล้วเลื่อนกลับขึ้นมา Hero ว่างเปล่า */
:root { scroll-behavior: auto; overflow-anchor: none; }
body { overflow-anchor: none; }
body {
  background: var(--sky);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html.is-loading, html.is-loading body { overflow: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 3000; padding: .5rem 1rem; background: var(--ink); color: #fff; border-radius: 6px; }
.skip-link:focus { top: 12px; }

.eyebrow {
  font-family: var(--font-deco); font-weight: 700; letter-spacing: .32em; text-transform: uppercase;
  font-size: clamp(12px, .9vw, 15px); color: var(--red); margin: 0 0 .6rem;
}
.lead-th { font-size: clamp(15px, 1.05vw, 18px); color: var(--ink-2); max-width: 42em; }
/* ช่วงพื้นหลังมืด (ศึกข้ามเซิร์ฟ / ข่าวสาร / footer) */
.on-dark { color: #f3f6ff; }
.on-dark .eyebrow { color: var(--gold); }
.on-dark .lead-th { color: #e6ecff; text-shadow: 0 2px 10px rgba(0, 0, 20, .6); }

/* .tbc = ข้อมูลที่แต่งขึ้น รอทีมยืนยัน — เจ้าของงานให้แสดงเหมือนข้อมูลจริง (2026-11-18): ไม่มีไฮไลต์/ป้าย
   คง class ไว้ใน HTML เพื่อค้นหาจุดที่ต้องแก้เมื่อได้ข้อมูลจริง · เปิดไฮไลต์กลับได้ด้วย html.show-tbc */
html.show-tbc .tbc {
  background: var(--tbc); color: inherit; padding: 0 .28em; border-radius: 3px;
  box-shadow: inset 0 -2px 0 #f59e0b; white-space: nowrap;
}
html.show-tbc .tbc::after {
  content: "TBC"; font: 700 .58em/1 Consolas, monospace; color: var(--tbc-ink);
  margin-left: .3em; vertical-align: super; letter-spacing: .04em;
}

/* ---------- 3. 9-slice / 3-slice frames (border-image) ----------
   .fr::before = พื้นด้านใน (inset ตามขอบใน --fi)
   .fr::after  = กรอบ 9-slice ทับด้านบน — มุมลายสวยไม่ถูกพื้นทับ */
.fr { position: relative; isolation: isolate; }
.fr::before {
  content: ""; position: absolute; inset: var(--fi); z-index: -1;
  background: var(--fill, #fff); border-radius: var(--fr-r, 3px); pointer-events: none;
}
.fr::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-style: solid; border-color: transparent; border-width: var(--bw);
  border-image-source: var(--fr-img);
  border-image-slice: var(--fr-slice);
  border-image-width: var(--bw);
  border-image-repeat: round;
}
/* ค่า slice / bw / fi วัดจากไฟล์จริง (docs/ui-kit.html) — bw = slice × scale ของแต่ละกรอบ */
.fr--panel    { --fr-img: url(../img/ui/frame-panel.webp);    --fr-slice: 215 250 225 295; --bw: 60px 70px 63px 83px; --fi: 28px 29px 26px 29px; --fill: rgba(255, 249, 238, .97); }
.fr--card     { --fr-img: url(../img/ui/frame-card.webp);     --fr-slice: 205 205 180 210; --bw: 57px 57px 50px 59px; --fi: 27px 22px 22px 21px; --fill: #fffaf0; }
.fr--video    { --fr-img: url(../img/ui/frame-video.webp);    --fr-slice: 190 150 160 150; --bw: 61px 48px 51px 48px; --fi: 34px 27px 26px 27px; --fill: #0b1022; }
.fr--navy     { --fr-img: url(../img/ui/frame-video.webp);    --fr-slice: 190 150 160 150; --bw: 38px 30px 32px 30px; --fi: 21px 17px 16px 17px; --fill: rgba(16, 24, 56, .94); }
.fr--banner   { --fr-img: url(../img/ui/frame-banner.webp);   --fr-slice: 135 152 110 152; --bw: 38px 43px 31px 43px; --fi: 18px 14px 9px 14px;  --fill: #fffaf0; }
.fr--showcase { --fr-img: url(../img/ui/frame-showcase.webp); --fr-slice: 165 175 160 170; --bw: 50px 53px 48px 51px; --fi: 27px 23px 24px 23px; --fill: #eaf4ff; }
/* ช่องปฏิทิน: โบว์อยู่กลางขอบบน ทำ 9-slice ไม่ได้ → ภาพพื้นหลังทั้งชิ้น (mode: bg ใน manifest) */
.fr--cal, .fr--cal-gold { --fi: 16% 13% 13% 13%; --fill: #fffaf0; }
.fr--cal-gold { --fill: #fff4cf; }
.fr--cal::after, .fr--cal-gold::after { border: 0; border-image: none; background: url(../img/ui/cal-cell.webp) center / 100% 100% no-repeat; }
/* ไฟล์กรอบทองมีขอบโปร่งมากกว่ากรอบแดง → ขยายออกให้กรอบเท่ากันทุกช่อง */
.fr--cal-gold::after { inset: -1.2% -4.6% -3.4%; background-image: url(../img/ui/cal-cell-gold.webp); }
@media (max-width: 767.98px) {
  .fr--panel { --bw: 41px 48px 43px 56px; --fi: 19px 20px 18px 20px; }
  .fr--card  { --bw: 41px 41px 36px 42px; --fi: 19px 16px 16px 15px; }
  .fr--video { --bw: 38px 30px 32px 30px; --fi: 21px 17px 16px 17px; }
  .fr--showcase { --bw: 33px 35px 32px 34px; --fi: 18px 15px 16px 15px; }
}

/* 3-slice title bar: หัวท้ายวาดสวย ช่วงกลางยืด ภาพตัวหนังสือวางทับ */
/* ริบบิ้นแดง frame-title.webp 2410×428: หัว/ท้าย (หางริบบิ้น + ฮอลลี่) กว้าง 360px ในไฟล์ · ตัวริบบิ้นอยู่ช่วงบน ~75% */
.title-bar {
  --h: clamp(76px, 6.2vw, 112px);
  --cap: calc(var(--h) * .84);
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--h); max-width: 100%; min-width: calc(var(--cap) * 2 + 40px);
  margin: 0 0 1rem; padding: 0 0 calc(var(--h) * .12);
  border-style: solid; border-color: transparent; border-width: 0 calc(var(--cap) * .92);
  border-image: url(../img/ui/frame-title.webp) 0 360 fill / 0 var(--cap) stretch;
  filter: drop-shadow(0 6px 10px rgba(90, 10, 10, .25));
}
.title-bar__text { display: block; height: calc(var(--h) * .5); width: auto; max-width: 100%; object-fit: contain; }
.title-bar--sub { --h: clamp(58px, 4.4vw, 80px); }
/* หัวข้อ 2 บรรทัด (Activity) — ริบบิ้นสูงขึ้น ตัวหนังสือกินพื้นที่มากขึ้น */
.title-bar--2l { --h: clamp(104px, 8.6vw, 156px); }
.title-bar--2l .title-bar__text { height: calc(var(--h) * .64); }

/* 3-slice buttons — ปุ่มแคปซูลลูกอม 1388×296 หัว/ท้าย 150px · หิมะเกาะช่วงบน ~22% → ดันตัวหนังสือลงเล็กน้อย
   CTA ของทุก section ขนาดเท่ากัน (--h × --w คงที่) · ปุ่มบน navbar ใช้ .btn-f--sm (ขนาดตามข้อความ) */
.btn-f {
  --h: 76px;
  --w: 330px;
  --cap: calc(var(--h) * .51);
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  box-sizing: border-box; height: var(--h); width: var(--w); max-width: 100%;
  padding: calc(var(--h) * .14) .5rem 0;
  border-style: solid; border-color: transparent; border-width: 0 var(--cap);
  border-image-source: var(--img);
  border-image-slice: 0 var(--slice) fill;
  border-image-width: 0 var(--cap);
  border-image-repeat: stretch;
  font-family: var(--font-head); font-weight: 600; font-size: calc(var(--h) * .3); line-height: 1;
  color: #fff; text-decoration: none; white-space: nowrap; text-shadow: 0 2px 0 rgba(80, 0, 0, .35);
  filter: drop-shadow(0 4px 6px rgba(60, 10, 10, .22));
  transition: filter .3s var(--ease), translate .3s var(--ease);
}
.btn-f:hover { filter: brightness(1.08) drop-shadow(0 8px 12px rgba(60, 10, 10, .28)); translate: 0 -2px; color: #fff; }
.btn-f--primary   { --img: url(../img/ui/btn-primary.webp);   --slice: 150; }
.btn-f--secondary { --img: url(../img/ui/btn-secondary.webp); --slice: 150; text-shadow: 0 2px 0 rgba(0, 50, 20, .4); }
.btn-f--sm { --h: 48px; width: auto; min-width: calc(var(--cap) * 2 + 4rem); }
@media (max-width: 575.98px) { .btn-f:not(.btn-f--sm) { --h: 66px; --w: min(300px, 86vw); } }

/* 3-slice ป้าย gift tag 1318×366 — ฮอลลี่อยู่หัวซ้าย */
.tag-f {
  --h: 42px; --cap: calc(var(--h) * .55);
  display: inline-flex; align-items: center; height: var(--h); margin: 0 0 .6rem; align-self: flex-start;
  padding: calc(var(--h) * .08) .3rem 0; min-width: calc(var(--cap) * 2 + 2rem); justify-content: center;
  border-style: solid; border-color: transparent; border-width: 0 var(--cap);
  border-image: url(../img/ui/tag-label.webp) 0 200 fill / 0 var(--cap) stretch;
  font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--red-2);
}

/* ---------- 4. Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #ffffff, #d7ecfd 70%); animation: loaderFailsafe 0s 7s forwards;
}
@keyframes loaderFailsafe { to { visibility: hidden; opacity: 0; } }
.loader-inner { text-align: center; width: min(280px, 70vw); }
.loader-gift { width: 120px; height: 120px; filter: drop-shadow(0 6px 10px rgba(120, 20, 20, .25)); }
.lg-box { fill: var(--red); stroke: var(--red-2); stroke-width: 2; }
.lg-lid { fill: #e8433f; stroke: var(--red-2); stroke-width: 2; }
.loader-ribbon { fill: none; stroke: var(--gold); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.loader-pct { font: 800 2.2rem/1 var(--font-head); margin-top: .5rem; color: var(--red); }
.loader-bar { height: 6px; background: #fff; border-radius: 3px; overflow: hidden; margin: .8rem 0 .5rem; box-shadow: inset 0 0 0 1px var(--line); }
.loader-bar span { display: block; height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--red) 0 8px, #fff 8px 16px); }
.loader-text { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- 5. World (fixed backgrounds) / snow / sleigh ---------- */
.world { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.world-sky { position: absolute; inset: 0; background: linear-gradient(#9fd0f8, #eaf5ff); }
/* ฉากต่อเนื่องผืนเดียว (B): stage ละช่วงเวลา = ฉากไกล + แถบหน้า อยู่ในเลเยอร์ fixed เดียวกัน
   main.js initWorld: stage ถัดไป fade ทับ + แถบหน้าของเดิมจมลง / ของใหม่โผล่ขึ้น · ไม่มีเส้นแบ่ง section */
.world-stage { position: absolute; inset: 0; }
.world-stage:not([data-stage="hero"]) { opacity: 0; visibility: hidden; }
.world-far { position: absolute; inset: 0; will-change: transform; }
.world-far img { position: absolute; left: 0; top: -5%; width: 100%; height: 110%; object-fit: cover; max-width: none; }
.world-strips { position: absolute; inset: 0; }
.world-strip { position: absolute; bottom: 0; left: 50%; width: max(100vw, 1100px); margin-left: calc(max(100vw, 1100px) / -2); pointer-events: none; transform-origin: 50% 100%; will-change: transform; } /* parallax: GSAP scale ยึดขอบล่าง */
.world-strip img { display: block; width: 100%; height: auto; max-width: none; }
.hero-layer--mid { bottom: 8vh; }
.hero-layer--near { bottom: -2vh; }
.world-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

/* พลุ (C2) */
.fw { position: absolute; width: 0; height: 0; }
.fw i { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px 3px var(--c); }
.fw-core { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .9), var(--c) 30%, transparent 70%); }

/* ช่วงฉากเชื่อม: พื้นที่ว่างให้ฉากเปลี่ยน + คำบรรยายสั้นเล่าเรื่อง */
.transit { position: relative; z-index: 3; height: 100vh; pointer-events: none; }
.transit-cap {
  position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; margin: 0; padding: 0 16px; opacity: 0;
  display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; color: #fff;
}
.transit-kicker { font: 700 clamp(13px, .95vw, 16px)/1 var(--font-head); letter-spacing: .35em; color: #ffe08a; text-shadow: 0 2px 8px rgba(0, 0, 30, .6); }
.transit-line { font: 800 clamp(22px, 2.5vw, 44px)/1.3 var(--font-head); text-shadow: 0 3px 16px rgba(0, 0, 40, .75), 0 0 2px rgba(0, 0, 0, .6); max-width: 22em; }
.transit-line .tl { display: block; } /* ตัดบรรทัดตามวรรคที่กำหนด */
@media (max-width: 991.98px) { .transit { height: 90vh; } }
@media (prefers-reduced-motion: reduce) {
  .transit { height: 40vh; }
  .transit-cap { opacity: 1; }
}

#snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.snow-css { display: none; position: fixed; inset: 0; z-index: 1; pointer-events: none; }
html.no-webgl .snow-css {
  display: block; opacity: .7;
  background-image:
    radial-gradient(3px 3px at 20% 30%, var(--snow-color) 50%, transparent 51%),
    radial-gradient(2px 2px at 70% 10%, var(--snow-color) 50%, transparent 51%),
    radial-gradient(4px 4px at 45% 70%, var(--snow-color) 50%, transparent 51%),
    radial-gradient(2px 2px at 85% 55%, var(--snow-color) 50%, transparent 51%);
  background-size: 360px 360px, 280px 280px, 420px 420px, 220px 220px;
  animation: snowCss 18s linear infinite;
}
@keyframes snowCss { to { background-position: 40px 360px, -30px 280px, 20px 420px, -20px 220px; } }
@media (prefers-reduced-motion: reduce) { html.no-webgl .snow-css { animation: none; } }

#sleigh { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.sleigh-mover {
  position: absolute; left: 0; top: 0; width: var(--sw); height: calc(var(--sw) / 2);
  margin: calc(var(--sw) / -4) 0 0 calc(var(--sw) / -2);
  will-change: transform; transform: translate3d(-999px, -999px, 0);
}
.sleigh-evade, .sleigh-flip, .sleigh-tilt, .sleigh-bob { width: 100%; height: 100%; }
.sleigh-bob { animation: sleighBob 1.6s ease-in-out infinite; }
.sleigh-bob img { width: 100%; height: 100%; display: block; }
@keyframes sleighBob { 50% { translate: 0 -7px; } }
@media (prefers-reduced-motion: reduce) { #sleigh { display: none; } }

/* ---------- 6. Layout layers ---------- */
.scene { position: relative; z-index: 3; }

/* ---------- 7. Header / dot nav ---------- */
.site-nav {
  height: var(--nav-h); padding: 0; z-index: 1030;
  transition: background-color .35s, box-shadow .35s, backdrop-filter .35s;
}
.site-nav.is-scrolled { background: rgba(255, 255, 255, .88); backdrop-filter: blur(12px); box-shadow: 0 6px 18px rgba(60, 20, 10, .12); }
/* ขอบล่างลายแคนดี้ (แบบ mockup C) */
.site-nav.is-scrolled::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px; background: repeating-linear-gradient(-45deg, var(--red) 0 10px, #fff 10px 20px); }
.site-nav .navbar-brand img { height: calc(var(--nav-h) - 22px); width: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25)); }
.site-nav .nav-link { font-family: var(--font-head); font-weight: 600; color: var(--ink-2); padding: .4rem .9rem !important; position: relative; }
.site-nav:not(.is-scrolled) .nav-link { color: #3a1a10; text-shadow: 0 0 8px rgba(255, 255, 255, .9), 0 0 2px #fff; }
.site-nav .nav-link::after { content: ""; position: absolute; left: .9rem; right: .9rem; bottom: 0; height: 3px; border-radius: 2px; background: var(--red); scale: 0 1; transition: scale .35s var(--ease); }
.site-nav .nav-link:hover, .site-nav .nav-link.is-active { color: var(--red); }
.site-nav .nav-link.is-active::after { scale: 1 1; }
.site-nav .navbar-toggler { border: 0; font-size: 1.9rem; color: var(--ink); box-shadow: none; }
.nav-cta { display: flex; gap: .5rem; align-items: center; }
@media (max-width: 1199.98px) {
  .site-nav .offcanvas { width: min(340px, 86vw); }
  .site-nav .navbar-nav { margin: 0 0 1.5rem !important; }
  .site-nav .nav-link { padding: .7rem .2rem !important; font-size: 1.1rem; }
  .site-nav .nav-link::after { left: .2rem; right: auto; width: 2rem; }
  .nav-cta { flex-direction: column; align-items: stretch; }
}

.dot-nav {
  position: fixed; left: 18px; top: 50%; translate: 0 -50%; z-index: 1020;
  display: flex; flex-direction: column; gap: 14px;
}
.dot-nav button {
  width: 28px; height: 28px; padding: 0; border: 0; position: relative;
  background: url(../img/ui/dot.webp) center / contain no-repeat; filter: drop-shadow(0 1px 2px rgba(0, 30, 80, .45));
  transition: scale .3s var(--ease);
}
.dot-nav button.is-active { background-image: url(../img/ui/dot-active.webp); scale: 1.3; }
.dot-nav button span {
  position: absolute; left: 38px; top: 50%; translate: 0 -50%; white-space: nowrap;
  font: 600 13px/1 var(--font-head); color: var(--red-2); background: var(--paper); border: 2px solid var(--red);
  padding: .35rem .65rem; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .25s;
}
.dot-nav button:hover span, .dot-nav button:focus-visible span { opacity: 1; }
@media (max-width: 767.98px) { .dot-nav { display: none; } }

/* ---------- 8. HERO ---------- */
.hero { position: relative; height: 100svh; min-height: 720px; overflow: hidden; }
.hero-fg { position: absolute; bottom: -2vh; z-index: 5; pointer-events: none; }
/* กองของขวัญสไตล์อนิเมะ (2026-11-19) ทรงสูงกว่าเดิม → ลดความกว้างให้ความสูงใกล้ของเดิม ไม่บังขาตัวละครเพิ่ม */
.hero-fg--l { left: -2vw; width: clamp(180px, 24vw, 470px); }
.hero-fg--r { right: -2vw; width: clamp(150px, 19.5vw, 380px); }

.hero-char { position: absolute; bottom: 0; z-index: 2; pointer-events: none; }
.hero-char--l { left: max(-3vw, calc(50% - 980px)); height: min(80vh, 775px); }
.hero-char--r { right: max(-3vw, calc(50% - 1000px)); height: min(70vh, 625px); }
.hero-char-par, .hero-char-img { height: 100%; }
.hero-char-img { width: auto; max-width: none; display: block; }

.hero-center {
  position: absolute; left: 0; right: 0; top: calc(var(--nav-h) + 1vh); z-index: 6;
  display: flex; justify-content: center; pointer-events: none;
}
.logo-parallax { display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: auto; }
.hero-logo { margin: 0; }
/* โลโก้แต่งคริสต์มาสทั้งชิ้น (LOGO-XMAS-FULL 1200×914) — ชั่วคราวจนกว่าจะ breakdown เป็นเลเยอร์ */
.logo-wrap { position: relative; display: block; height: min(440px, 41vh); aspect-ratio: 1200 / 914; filter: drop-shadow(0 10px 18px rgba(40, 20, 60, .25)); }
.logo-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.logo-shine {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.75) 50%, transparent 60%) no-repeat;
  background-size: 250% 100%; background-position: 160% 0; animation: shine 5s 4s ease-in-out infinite;
  /* ให้แสงวิ่งเฉพาะบนเนื้อโลโก้ ไม่ทับฟ้ารอบ ๆ */
  -webkit-mask: url(../img/hero/logo-xmas-full.webp) center / 100% 100% no-repeat; mask: url(../img/hero/logo-xmas-full.webp) center / 100% 100% no-repeat;
}
@keyframes shine { 0%, 70% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
.logo-deco { position: absolute; height: auto; max-width: none; filter: drop-shadow(0 3px 4px rgba(40, 20, 60, .25)); }
/* ตำแหน่งเป็น % ของกรอบโลโก้ 560×463 (ปรับจากภาพจริง) */
.d-snow21    { left: 17%;  top: -4%;  width: 46%; }
.d-snowplate { left: 19%;  top: 56%;  width: 60%; }
.d-hollyl    { left: -9%;  top: 46%;  width: 29%; }
.d-hollyr    { left: 80%;  top: 46%;  width: 29%; }
.d-ribbon    { left: 27%;  top: 82%;  width: 46%; }
.d-hat       { left: 70%;  top: 21%;  width: 17%; }
.d-ornr      { left: 5%;   top: 12%;  width: 7%;  transform-origin: 50% 0; }
.d-orng      { left: 84%;  top: 2%;   width: 7%;  transform-origin: 50% 0; }
.d-ornb      { left: 92%;  top: 66%;  width: 6.5%; transform-origin: 50% 0; }
.d-bell      { left: 39%;  top: 84%;  width: 22%; transform-origin: 50% 0; }

/* ป้ายคำโปรย (แบบ zoom-C-hero): กระดาษครีมขอบทอง หิมะเกาะขอบบน ฮอลลี่ 2 ข้าง */
.hero-plaque {
  position: relative; margin-top: -.6rem; padding: clamp(14px, 1.6vh, 22px) clamp(36px, 3vw, 56px) clamp(12px, 1.4vh, 18px);
  background: linear-gradient(#fffaf0, #f6e6c8); border-radius: 18px;
  box-shadow: 0 0 0 3px #e2b04a, 0 0 0 6px #fff6dd, 0 0 0 8px #c9861c, 0 12px 24px rgba(90, 40, 0, .28);
}
.hero-plaque::before {
  content: ""; position: absolute; left: 4%; right: 4%; top: -14px; height: 26px;
  background: url(../img/hero/deco-snowcap-plate.webp) center / 100% 100% no-repeat; pointer-events: none;
}
.hero-plaque-holly { position: absolute; top: 50%; width: clamp(70px, 6vw, 112px); height: auto; translate: 0 -50%; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); }
.hero-plaque-holly--l { left: clamp(-58px, -3.6vw, -40px); }
.hero-plaque-holly--r { right: clamp(-58px, -3.6vw, -40px); }
.hero-tagline { display: block; height: min(104px, 9.6vh); width: auto; }
/* ป้ายวันที่สีทอง + ไอคอนปฏิทิน */
.hero-date {
  display: inline-flex; align-items: center; gap: .55rem; align-self: center; margin: .9rem 0 .9rem;
  padding: .45rem 1.3rem .45rem 1rem; border-radius: 999px;
  background: linear-gradient(#ffe48a, #f4b41a 60%, #d99a12); box-shadow: inset 0 0 0 2px #fff3c4, 0 0 0 2px #b97a06, 0 6px 12px rgba(90, 40, 0, .25);
  font: 700 clamp(15px, 1.1vw, 19px)/1 var(--font-head); color: #5a1d12;
}
.hero-date i { color: var(--red); font-size: 1.15em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .6rem 1rem; justify-content: center; }

/* orbit: คอนเทนต์ประจำเดือน 4 ชิ้นรอบโลโก้ */
.orbit { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.orbit-item {
  --cw: clamp(206px, 14.4vw, 270px);
  position: absolute; width: var(--cw); left: calc(50% + var(--ox) - var(--cw) / 2); top: var(--oy);
  pointer-events: auto;
}
.orbit-item--1 { --ox: calc(-1 * clamp(330px, 27.5vw, 560px)); --oy: calc(var(--nav-h) + 3vh); }
/* การ์ดล่าง: ขอบในต้องพ้นแถวปุ่ม CTA (กว้าง 676 → ครึ่ง 338 + เผื่อ 22) แต่ไม่ล้นจอ (QA 2026-12-01) */
.orbit-item--2, .orbit-item--4 { --olow: min(max(24vw, 360px + var(--cw) / 2), 50vw - var(--cw) / 2 - 24px); }
.orbit-item--2 { --ox: calc(-1 * var(--olow)); --oy: calc(50% + 4vh); }
.orbit-item--3 { --ox: clamp(330px, 27.5vw, 560px);            --oy: calc(var(--nav-h) + 3vh); }
.orbit-item--4 { --ox: var(--olow); --oy: calc(50% + 4vh); }
.orbit-parallax, .orbit-float, .gift-content { position: relative; }
/* การ์ดกล่องของขวัญ (แบบ zoom-C-hero): กรอบโค้งลายแคนดี้ + โบว์ทองด้านบน + ภาพ + ชื่อ — ไม่มีคำบรรยาย
   เอียงเล็กน้อยด้วย rotate (property แยกจาก transform ที่ GSAP ใช้) */
.orbit-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .45rem; width: 100%;
  padding: clamp(22px, 2.4vh, 30px) clamp(14px, 1vw, 18px) clamp(12px, 1.4vh, 16px);
  border: 9px solid transparent; border-radius: 26px; text-align: center; cursor: pointer; font: inherit; color: var(--ink); text-decoration: none;
  background: linear-gradient(#fffaf0, #f7e8cc) padding-box, repeating-linear-gradient(-45deg, #d62828 0 9px, #fff 9px 18px) border-box;
  box-shadow: inset 0 0 0 2px #e2b04a, 0 10px 18px rgba(80, 30, 0, .25);
  rotate: var(--tilt, 0deg); transition: translate .35s var(--ease), filter .35s, rotate .35s var(--ease);
}
.orbit-item--1 { --tilt: -4deg; } .orbit-item--2 { --tilt: 3deg; } .orbit-item--3 { --tilt: 4deg; } .orbit-item--4 { --tilt: -3deg; }
.orbit-card:hover { translate: 0 -5px; rotate: 0deg; filter: brightness(1.04) drop-shadow(0 12px 18px rgba(80, 20, 0, .2)); color: var(--ink); }
/* โบว์ทอง = ส่วนบนของฝากล่อง gift-lid-red (โบว์ทอง) ตัดด้วย background-position + mask ไล่จางขอบล่าง */
.orbit-bow {
  position: absolute; left: 50%; top: 0; width: 64%; aspect-ratio: 401 / 128; translate: -50% -58%; z-index: 3; pointer-events: none;
  background: url(../img/hero/gift-lid-red.webp) center top / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(#000 74%, transparent 96%); mask-image: linear-gradient(#000 74%, transparent 96%);
  filter: drop-shadow(0 4px 4px rgba(80, 40, 0, .3));
}
/* ภาพประกอบ: ITEM-*-ART มีกรอบแคนดี้ในตัว → ขยายแล้วตัดขอบออก เหลือแต่ภาพด้านใน */
.orbit-pic { position: relative; display: block; width: 100%; aspect-ratio: 1 / .86; overflow: hidden; border-radius: 16px; box-shadow: inset 0 0 0 2px rgba(201, 134, 28, .5); }
/* ภาพการ์ดสไตล์อนิเมะ (2026-11-19) เป็นภาพสี่เหลี่ยมเต็มช่อง ไม่มีกรอบในตัวแล้ว → แค่ cover ช่อง (เดิม 124% เพื่อตัดกรอบลายแคนดี้ของภาพเก่าทิ้ง) */
.orbit-art { position: absolute; left: 50%; top: 50%; width: 104%; max-width: none; height: auto; translate: -50% -50%; }
.orbit-title { display: block; height: clamp(40px, 5.2vh, 56px); width: auto; max-width: 100%; object-fit: contain; }
/* ชื่อ 1 บรรทัด (Daily Login) สูงครึ่งหนึ่งของชื่อ 2 บรรทัด + เว้นบนล่าง → การ์ดสูงเท่ากัน */
.orbit-title--1l { height: clamp(22px, 2.9vh, 31px); margin: clamp(9px, 1.15vh, 12.5px) 0; }
.orbit-sub { display: block; margin-top: -.2rem; font: 600 clamp(12px, 1.5vh, 15px)/1.25 var(--font-head); color: var(--ink-2); }
/* กล่องของขวัญหล่นมาครอบการ์ด: ฝา (มีโบว์) 401×251 วางทับตัวกล่อง 400×345 — ขอบล่างฝาซ้อนตัวกล่อง ~26% ของความกว้าง */
.gift { position: absolute; left: 14%; width: 72%; top: 0; z-index: 8; pointer-events: none; filter: drop-shadow(0 10px 14px rgba(60, 20, 0, .25)); }
.gift img { display: block; width: 100%; height: auto; }
.gift-lid { position: relative; z-index: 2; margin-bottom: -26%; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 3vh; z-index: 8; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  font: 600 13px/1 var(--font-head); color: var(--red-2); text-shadow: 0 0 6px #fff, 0 0 2px #fff;
}
/* ซ่อนทันทีที่เริ่มเลื่อนออกจาก Hero (คลาสจาก initHeroScroll — ไม่ชนกับ tween ของ intro) */
.scroll-cue { transition: opacity .3s; }
.hero.is-leaving .scroll-cue { opacity: 0 !important; }
.scroll-cue-mouse { width: 22px; height: 34px; border: 2px solid var(--red); border-radius: 12px; position: relative; background: rgba(255, 255, 255, .6); }
.scroll-cue-mouse::after { content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: var(--red); animation: cue 1.6s infinite; }
@keyframes cue { 0% { opacity: 0; translate: 0 -3px; } 40% { opacity: 1; } 100% { opacity: 0; translate: 0 9px; } }

@media (min-width: 992px) and (max-width: 1279.98px) { .hero-cta .btn-f { width: 246px; } }
@media (max-width: 991.98px) {
  .hero { height: auto; min-height: 100svh; padding: calc(var(--nav-h) + 2vh) 0 4rem; }
  .hero-center { position: relative; top: auto; }
  .logo-wrap { height: auto; width: min(420px, 78vw); }
  .hero-tagline { height: auto; width: min(320px, 60vw); }
  .hero-plaque { padding: 12px 30px 10px; }
  .hero-plaque-holly { width: 64px; }
  .hero-plaque-holly--l { left: -34px; } .hero-plaque-holly--r { right: -34px; }
  .orbit { position: relative; inset: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 2rem 16px 0; max-width: 640px; margin: 0 auto; }
  .orbit-item { position: relative; left: auto; top: auto; width: auto; }
  .orbit { padding-top: 3rem; row-gap: 2.6rem; }
  .hero-char { top: calc(var(--nav-h) + 4vh); bottom: auto; height: 46vh; opacity: .35; }
  .hero-char--l { left: -14vw; } .hero-char--r { right: -18vw; }
  .hero-fg, .scroll-cue { display: none; }
}
@media (max-width: 575.98px) {
  .orbit { gap: 10px; }
  .orbit-card { padding: 18px 10px 10px; border-width: 7px; }
}

/* ไม่มี GSAP (CDN ล่ม): แสดงเนื้อหาครบแบบไม่มีอนิเมชัน — คลาสใส่จากสคริปต์ท้าย index.html */
html.no-anim .gift, html.no-anim .wrap-cover, html.no-anim .scroll-cue, html.no-anim .dot-nav { display: none !important; }
html.no-anim .h-viewport { overflow-x: auto; }

/* ---------- 9. ACTIVITY (horizontal) ---------- */
.activity { position: relative; overflow: hidden; }
.h-viewport { height: 100svh; min-height: 680px; padding-top: var(--nav-h); display: flex; align-items: center; position: relative; z-index: 1; }
.h-track {
  display: flex; gap: clamp(28px, 3.5vw, 64px); padding: 0 6vw; width: max-content;
  height: calc(100svh - var(--nav-h) - 5vh); min-height: 600px; align-items: stretch;
}
.panel { flex: 0 0 auto; width: min(1240px, 78vw); height: 100%; position: relative; }
.panel--intro { width: min(640px, 40vw); display: flex; flex-direction: column; justify-content: center; }
.panel--intro .title-bar { align-self: flex-start; margin-left: -.6rem; }
/* กระดาษครีมรองข้อความ intro ให้อ่านง่ายบนฉากบ่าย */
.intro-paper { background: rgba(255, 249, 238, .92); border-radius: 22px; padding: 1.3rem 1.6rem 1.1rem; box-shadow: 0 10px 30px rgba(120, 60, 0, .18), inset 0 0 0 3px rgba(214, 40, 40, .12); }
.intro-paper .lead-th { margin: 0; }
.intro-list { list-style: none; padding: 0; margin: 1rem 0 .4rem; display: grid; gap: .55rem; }
.intro-list li { font: 600 1.05rem/1.4 var(--font-head); display: flex; gap: .8rem; align-items: center; color: var(--ink); }
.intro-list span { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--red); color: #fff; font: 700 .85rem/1 var(--font-deco); box-shadow: 0 0 0 3px var(--gold); flex: none; }
.intro-hint { align-items: center; gap: .5rem; color: var(--red-2); font: 600 14px/1 var(--font-head); margin: .8rem 0 0; }
.panel-box { height: 100%; padding: clamp(54px, 4.6vw, 80px) clamp(60px, 5vw, 92px); overflow: hidden; }
.pg { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(20px, 3vw, 56px); height: 100%; }
.pg-main, .pg-side { min-height: 0; display: flex; flex-direction: column; }
.panel-title { margin: 0 0 .2rem; }
.panel-title img { height: clamp(44px, 5.4vh, 72px); width: auto; }
.panel-sub { font: 600 1rem/1.3 var(--font-head); color: var(--green); margin: 0 0 .5rem; }
.panel-desc { font-size: clamp(14px, .95vw, 16px); color: var(--ink-2); margin-bottom: .8rem; }
.panel-note { font-size: 13px; color: var(--muted); margin: .6rem 0 0; }
.pg-mascot { width: clamp(110px, 9vw, 170px); align-self: flex-start; margin-top: auto; }

/* gift-wrap cover ของแต่ละแผง */
.wrap-cover { position: absolute; inset: var(--fi); z-index: 4; pointer-events: none; overflow: hidden; border-radius: 3px; }
/* กระดาษห่อของขวัญ: ลายแคนดี้แดง-ขาว + ริบบิ้นทองแนวนอน · ริบบิ้นทองแนวตั้งที่รอยต่อ · โบว์ใหญ่ตรงกลาง */
.wrap-half {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background:
    linear-gradient(transparent calc(50% - 22px), #f6c33b calc(50% - 22px), #ffe08a 50%, #d99a12 calc(50% + 22px), transparent calc(50% + 22px)),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .55) 0 5px, transparent 6px) 0 0 / 46px 46px,
    repeating-linear-gradient(45deg, #d62828 0 26px, #b51c22 26px 30px, #f8efe2 30px 56px, #e9dccb 56px 60px);
}
.wrap-half--l { left: 0; box-shadow: inset -26px 0 0 #f2b829, inset -30px 0 0 #b27a07; }
.wrap-half--r { right: 0; box-shadow: inset 26px 0 0 #f2b829, inset 30px 0 0 #b27a07; }
.wrap-bow {
  position: absolute; left: 50%; top: 50%; width: min(300px, 44%); aspect-ratio: 480 / 191; translate: -50% -50%;
  background: url(../img/hero/deco-ribbon.webp) center / contain no-repeat; font-size: 0; color: transparent;
  filter: drop-shadow(0 8px 10px rgba(80, 0, 0, .35));
}

/* newchar — คอลัมน์รางวัลกว้างครึ่งแผง ให้ไอคอน 4 ชิ้นอยู่แถวเดียว */
.pg--newchar { grid-template-columns: 1fr 1fr; }
.pg--login { grid-template-columns: .8fr 1.2fr; }
.showcase { position: relative; margin-top: auto; padding-right: clamp(60px, 6vw, 120px); }
.showcase-frame { padding: 30px 30px 28px; }
.showcase-frame img { display: block; width: 100%; max-height: 30vh; object-fit: contain; position: relative; z-index: 1; border-radius: 6px; }
.showcase-mascot { position: absolute; right: 0; bottom: -10px; width: clamp(100px, 8.4vw, 160px); z-index: 4; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .2)); }
.showcase-cap { font: 600 13px/1.2 var(--font-head); color: var(--muted); margin: .5rem 0 0; }
/* รางวัลสร้างตัวใหม่ (feedback 2026-11-23): หัว Lv1 + การ์ด Lv10–100 (2 คอลัมน์ Lv100 กว้างเต็ม) — ไอคอนจริง 32×32 ในช่องขอบทอง */
.lv-start { background: linear-gradient(#fff2dc, #ffe6bf); border-radius: 16px; padding: clamp(8px, 1.2vh, 14px) 16px; box-shadow: inset 0 0 0 2px #e2b04a, 0 6px 14px rgba(120, 60, 0, .14); text-align: center; }
.lv-start__title { font: 800 clamp(1rem, 2.1vh, 1.25rem)/1.25 var(--font-head); color: var(--red-2); margin: 0 0 .45rem; }
.lv-start__title span { color: var(--green); }
.lv-items { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(4px, .35vw, 6px); }
.lv-items li { line-height: 0; border-radius: 7px; padding: 2px; background: linear-gradient(#ffe58a, #c98a12); box-shadow: 0 2px 4px rgba(80, 40, 0, .25); }
.lv-items img { display: block; width: clamp(30px, 4.1vh, 44px); height: auto; border-radius: 5px; }
.lv-grid { list-style: none; padding: 0; margin: clamp(8px, 1.4vh, 16px) 0 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(min-content, 1fr); gap: clamp(6px, 1.1vh, 12px); flex: 1; min-height: 0; }
.lv-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(.35rem, 1vh, .7rem); padding: clamp(6px, 1.1vh, 12px) 10px; border-radius: 14px; text-align: center;
  background: #fffaf2; box-shadow: inset 0 0 0 2px #f0d6ad; opacity: .5; scale: .97; transition: opacity .45s, scale .45s var(--ease), box-shadow .45s; }
.lv-card--big { grid-column: 1 / -1; }
.lv-card.is-reached { opacity: 1; scale: 1; box-shadow: inset 0 0 0 2px var(--red), 0 6px 14px rgba(150, 30, 20, .14); }
.lv-name { margin: 0; font: 700 clamp(.9rem, 1.9vh, 1.08rem)/1.2 var(--font-head); color: var(--ink); }
.lv-name b { color: var(--red-2); }
.lv-name span { display: inline-block; margin-left: .2rem; padding: .12rem .5rem; border-radius: 999px; background: var(--green); color: #fff; font: 700 .72rem/1.2 var(--font-head); vertical-align: .1em; }
.lv-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1rem; flex-wrap: wrap; margin-top: clamp(8px, 1.4vh, 14px); }
.lv-foot .panel-note { margin: 0; color: var(--ink-2); }
.lv-foot .panel-note b { color: var(--red-2); }

/* login calendar */
.cond-head { font: 700 .95rem/1.3 var(--font-head); color: var(--red-2); margin: 0 0 .3rem; }
.cond-list { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .25rem; font-size: 14px; color: var(--ink-2); }
.cond-list i { color: var(--red); margin-right: .35rem; }
.cal { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(5px, .5vw, 10px); align-content: start; }
.pg--login .pg-side { justify-content: center; }
.pg--login .login-more { flex-shrink: 0; } /* จอเตี้ย: ให้หมีย่อแทนปุ่ม */
.pg--login .pg-mascot { min-height: 0; object-fit: contain; object-position: 0 100%; }
.cal-cell { aspect-ratio: 438 / 476; perspective: 600px; }
.cal-in { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; padding-top: 11%; }
.cal-in img { display: block; width: 54%; height: auto; padding: 2px; border-radius: 7px; background: linear-gradient(#ffe58a, #c98a12); box-shadow: 0 2px 4px rgba(80, 40, 0, .25); }
.cal-cell.is-big .cal-in img { box-shadow: 0 0 10px 2px rgba(255, 190, 40, .85); }
/* เลขวัน = เหรียญมุมซ้ายบน (วางเหนือกรอบ ::after z 3 ไม่ให้โบว์/กรอบบัง) */
.cal-day {
  position: absolute; left: 0; top: 8%; z-index: 4; display: grid; place-items: center; width: 31%; aspect-ratio: 1; border-radius: 50%;
  background: #fffaf0; box-shadow: 0 0 0 1.5px #d9a227, 0 2px 4px rgba(90, 20, 0, .35);
  font: 800 clamp(9px, .85vw, 14px)/1 var(--font-head); color: var(--red-2);
}
.cal-cell.is-big .cal-day { background: var(--red); color: #fff; }
/* ฝาประตูอดเวนต์ = กล่องของขวัญห่อกระดาษ (พลิกเปิดตาม scroll) — ซ้อนใต้กรอบช่อง (::after z 3) */
.cal-door {
  position: absolute; inset: 17% 12% 11%; z-index: 2; display: grid; place-items: center; border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 43%, #f6c33b 43% 57%, transparent 57%),
    linear-gradient(transparent 43%, #f6c33b 43% 57%, transparent 57%),
    repeating-linear-gradient(-45deg, #d62828 0 7px, #f8efe2 7px 14px);
  font: 800 clamp(12px, 1vw, 18px)/1 var(--font-head); color: #fff; text-shadow: 0 0 3px var(--red-2), 0 2px 0 var(--red-2);
  transform-origin: 0 50%; backface-visibility: hidden; box-shadow: inset 0 0 0 2px rgba(120, 10, 10, .35);
}
.cal-cell.is-big .cal-door { background:
    linear-gradient(90deg, transparent 43%, #d62828 43% 57%, transparent 57%),
    linear-gradient(transparent 43%, #d62828 43% 57%, transparent 57%),
    repeating-linear-gradient(-45deg, #f4b41a 0 7px, #fff3c4 7px 14px); }

/* buff */
.pg--buff { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; gap: clamp(10px, 1.6vh, 24px); }
.pg-head { display: flex; gap: 2rem; align-items: flex-end; justify-content: space-between; }
.pg-head .panel-desc { max-width: 40em; margin-bottom: 0; }
.pg-head .pg-mascot { margin: 0; width: clamp(90px, 7.6vw, 150px); }
.buff-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 24px); min-height: 0; }
.buff-card { padding: clamp(40px, 4vh, 54px) 40px clamp(30px, 3vh, 40px); text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.buff-card h4 { font: 700 1.05rem/1.2 var(--font-head); margin: .4rem 0 .2rem; color: var(--red-2); position: relative; z-index: 1; }
.buff-card p { position: relative; z-index: 1; }
/* การ์ดที่มี 2 เหรียญ (+50% และ x3 · 2026-11-30): วางคู่กัน ย่อได้เมื่อการ์ดแคบ */
.buff-badges { position: relative; z-index: 1; display: flex; justify-content: center; gap: 8px; width: 100%; }
.buff-badges .buff-badge { flex: 0 1 clamp(84px, 11vh, 150px); min-width: 0; }
.buff-badge { position: relative; z-index: 1; width: clamp(84px, 11vh, 150px); container-type: inline-size; filter: drop-shadow(0 6px 8px rgba(80, 30, 0, .25)); }
.buff-badge img { display: block; width: 100%; }
/* ตัวเลขวางตรงกลางเหรียญ (ใต้โบว์) */
.buff-num { position: absolute; inset: 22% 0 0; display: grid; place-items: center; font: 800 clamp(20px, 3vh, 34px)/1 var(--font-head); font-size: clamp(18px, 27cqw, 34px); color: var(--red-2); text-shadow: 0 2px 0 #fff, 0 0 6px #fff; }
.buff-badge--red .buff-num { color: #fff; text-shadow: 0 2px 0 var(--red-2), 0 0 8px rgba(120, 0, 0, .6); }
.buff-when { font-size: 14px; margin: 0 0 .3rem; }
.buff-icons { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .25rem; font-size: 13px; color: var(--muted); margin: 0; }
.buff-icons img { width: 28px; height: auto; }
.dec-strip-wrap { min-width: 0; }
.dec-label { font: 700 13px/1 var(--font-head); color: var(--red-2); margin: 0 0 .4rem; }
.dec-strip { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(31, minmax(0, 1fr)); gap: 3px; }
.dec-day { position: relative; text-align: center; font: 600 clamp(9px, .62vw, 12px)/1 var(--font-head); color: var(--muted); padding: .5rem 0 .55rem; background: #fdf1e0; border-radius: 4px; transition: background-color .3s, color .3s; }
.dec-day.is-wk { box-shadow: inset 0 -4px 0 var(--green); }
.dec-day.is-wd { box-shadow: inset 0 -4px 0 var(--red); }
.dec-day.is-sp { box-shadow: inset 0 -4px 0 var(--gold); }
.dec-day.is-lit { background: var(--green); color: #fff; }
.dec-day.is-lit.is-wd { background: var(--red); }
.dec-day.is-lit.is-sp { background: #d99a12; }
.dec-legend { font-size: 12px; color: var(--muted); margin: .45rem 0 0; display: flex; gap: .4rem 1rem; align-items: center; flex-wrap: wrap; }
.dec-legend .k { display: inline-block; width: 18px; height: 4px; margin-right: .3rem; vertical-align: middle; border-radius: 2px; }
.k--wk { background: var(--green); } .k--wd { background: var(--red); } .k--sp { background: var(--gold); }

@media (max-width: 991.98px) {
  .h-viewport { height: auto; min-height: 0; padding: calc(var(--nav-h) + 6vh) 0 4rem; display: block; }
  .h-track { flex-direction: column; width: auto; height: auto; min-height: 0; padding: 0 16px; gap: 28px; }
  .panel, .panel--intro { width: 100%; height: auto; }
  .panel-box { height: auto; padding: 60px 48px 50px 52px; }
  .pg { grid-template-columns: 1fr; }
  .lv-grid { flex: none; }
  .pg-head { flex-direction: row; }
  .buff-cards { grid-template-columns: 1fr; }
  .showcase-frame img { max-height: none; }
}
@media (max-width: 575.98px) {
  .panel-box { padding: 54px 34px 44px 40px; }
  .cal { grid-template-columns: repeat(4, 1fr); gap: 6px; } /* 7 ช่องต่อแถวไอคอนเหลือ 19px อ่านไม่ออก */
  .cal-day { font-size: 11px; }
  .dec-strip { gap: 1px; }
  .dec-day { font-size: 8px; padding: .35rem 0 .45rem; }
  .pg-head .pg-mascot { display: none; }
}

/* ---------- 10. WAR ---------- */
.war { position: relative; padding: calc(var(--nav-h) + 8vh) 0 12vh; overflow: hidden; }
/* หมอกเปิดฉาก (mask) อยู่ที่ section เต็มความกว้าง — ถ้าอยู่ที่ .war-inner (container) ตัวละครที่ยืนนอก container จะถูกตัด */
#war {
  --fog: 130%;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(var(--fog) - 30%), transparent var(--fog));
          mask-image: linear-gradient(to bottom, #000 calc(var(--fog) - 30%), transparent var(--fog));
}
.war-inner {
  position: relative; z-index: 1;
}
.war-head { text-align: center; display: flex; flex-direction: column; align-items: center; }
/* หัวข้อแบบป้าย (Higgsfield 2026-11-18): ป้ายน้ำเงินขอบทอง + ดาบไขว้ — ตัวอักษรอยู่บนพื้นเข้มเสมอ อ่านง่ายบนฟ้าสว่าง */
.war-title { margin: -.2rem 0 -.6rem; line-height: 0; }
.war-title img { height: clamp(140px, 15vw, 290px); width: auto; max-width: min(96vw, 860px); object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 10, 40, .45)); }
.war .eyebrow { color: #fff3c4; text-shadow: 0 1px 2px rgba(10, 20, 60, .9), 0 0 12px rgba(10, 20, 60, .7); }
.war-head .lead-th { margin: 0 auto; }
/* ตัวละครยืนพิงกรอบวิดีโอ (2026-11-18) — วิดีโออยู่กลาง กว้างเท่าแถวการ์ดข้อมูล (เต็ม container) ไม่ขยับหลบตัวละคร
   ตัวละครวาง absolute นอกกรอบ อยู่หน้ากรอบ ทับขอบกรอบเล็กน้อย + เอียงเข้าหากรอบ (rotate แยกจาก transform ที่ GSAP ใช้)
   จอแคบกว่า ~1600px ตัวละครจะล้นขอบจอบางส่วน (section overflow: hidden) — ไม่ให้บังภาพวิดีโอ */
.war-stage { --ch: clamp(320px, 30vw, 600px); position: relative; margin-top: 4vh; }
.war-char { position: absolute; bottom: -1.5%; z-index: 3; height: var(--ch); width: auto; max-width: none; pointer-events: none; transform-origin: 50% 100%; filter: drop-shadow(0 12px 18px rgba(0, 0, 20, .5)); }
.war-char--l { right: calc(100% - var(--ch) * .075); rotate: 2.5deg; }
.war-char--r { left: calc(100% - var(--ch) * .02); rotate: -2deg; }
.war-video { position: relative; padding: 42px 36px 34px 35px; z-index: 2; filter: drop-shadow(0 18px 30px rgba(0, 0, 20, .55)); }
.video-box { position: relative; z-index: 1; aspect-ratio: 16 / 9; overflow: hidden; background: #0b1022; border-radius: 10px; }
.video-host, .video-box > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
  background: linear-gradient(rgba(8, 12, 30, .35), rgba(8, 12, 30, .55)), url(../img/bg/war-far.webp) center / cover; color: #fff; font: 600 1.1rem/1.2 var(--font-head);
}
.video-poster i { font-size: 4rem; color: #fff; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); }
.video-poster small { font: 400 12px/1 Consolas, monospace; color: rgba(255, 255, 255, .7); }
.has-player .video-poster { display: none; }
.video-unmute, .video-replay {
  position: absolute; z-index: 3; border: 0; border-radius: 999px; background: rgba(17,24,39,.86); color: #fff;
  font: 600 1rem/1 var(--font-head); padding: .85rem 1.3rem; display: inline-flex; align-items: center; gap: .5rem;
}
.video-unmute { left: 16px; bottom: 56px; }
.video-fallback { position: absolute; left: 50%; bottom: 24px; z-index: 5; translate: -50% 0; max-width: calc(100% - 32px); }
.video-fallback[hidden] { display: none; }
.video-replay { left: 50%; top: 50%; translate: -50% -50%; font-size: 1.15rem; padding: 1rem 1.6rem; }
/* ตารางเวลาสงคราม (2026-11-28 แทนการ์ดข้อมูล 3 ใบ) — สร้างจาก assets/data/war-schedule.json (main.js buildWarSchedule)
   ช่องสีแยกตามประเภทสงคราม โทนอัญมณีขอบทองบนกรอบน้ำเงิน · .has-hl = กำลังไฮไลต์ (ช่องอื่นจางด้วย filter
   ไม่ใช้ opacity เพราะ GSAP ตั้ง opacity ตอนอนิเมชันเข้า) · ขยายช่องด้วย property scale (แยกจาก transform ของ GSAP) */
.war-schedule { margin-top: clamp(2.5rem, 6vh, 4.5rem); text-align: center; }
.ws-title { position: relative; z-index: 4; margin: 0 auto .2rem; }
.ws-title .title-bar__text { height: calc(var(--h) * .4); } /* ตัวอักษรไม่มีสระบน/ล่าง → ภาพเต็มความสูงกว่า war-sub */
.ws-frame { --ws-bg: #10183a; padding: 46px 34px 30px; text-align: left; filter: drop-shadow(0 18px 30px rgba(0, 0, 20, .5)); }
.ws-scroll { position: relative; z-index: 1; }
.ws-board { position: relative; }
.ws-table { width: 100%; border-collapse: separate; border-spacing: 5px; table-layout: fixed; margin: 0; color: #fff; font-family: var(--font-head); }
.ws-table th, .ws-table td { padding: 0; vertical-align: middle; }
.ws-corner { width: 86px; }
.ws-day { padding: 0 0 6px !important; text-align: center; font: 600 15px/1.15 var(--font-head); color: #ffe08a; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); transition: color .2s, text-shadow .2s, opacity .2s; }
.ws-day-name { display: block; }
.ws-today-tag { display: none; }
.ws-day.is-today .ws-today-tag {
  display: inline-block; margin-top: 4px; padding: 2px 9px; border-radius: 999px; text-shadow: none;
  background: linear-gradient(#fff1b8, #f4b41a); color: #5a1d12; font: 700 11px/1.25 var(--font-head); box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.ws-day.is-hl { color: #fff; text-shadow: 0 0 10px rgba(255, 214, 102, .95), 0 1px 2px rgba(0, 0, 0, .6); }
.ws-time-in {
  display: block; margin-right: 6px; padding: 8px 0; border-radius: 999px; text-align: center;
  font: 600 14px/1 var(--font-head); color: #ffe08a; background: linear-gradient(#0d1433, #060a1d);
  box-shadow: inset 0 0 0 1px rgba(244, 180, 26, .5); transition: background .2s, color .2s, box-shadow .2s, opacity .2s;
}
.ws-time.is-hl .ws-time-in { color: #3a1d00; background: linear-gradient(#fff1b8, #f4b41a); box-shadow: 0 0 14px rgba(255, 200, 70, .75); }

.ws-chip {
  --c1: #2a3870; --c2: #18224d; --tx: #fff; --ts: 0 1px 2px rgba(0, 0, 0, .6);
  position: relative; display: flex; flex-wrap: wrap; align-items: baseline; align-content: center; justify-content: center; column-gap: .35em;
  min-height: 42px; padding: 5px 8px; border-radius: 9px; text-align: center;
  font: 500 13.5px/1.2 var(--font-head); color: var(--tx); text-shadow: var(--ts);
  background: linear-gradient(180deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 224, 138, .6), 0 2px 4px rgba(0, 0, 0, .35);
  transition: filter .2s, box-shadow .2s, scale .25s var(--ease);
}
.ws-sub { flex-basis: 100%; font-size: .86em; opacity: .92; }
td[colspan] .ws-sub { flex-basis: auto; }
.ws-chip--guild   { --c1: #ffd968; --c2: #e39b12; --tx: #3b2200; --ts: 0 1px 0 rgba(255, 255, 255, .45); }
.ws-chip--master  { --c1: #2b9d69; --c2: #0f5a37; }
.ws-chip--faction { --c1: #9257de; --c2: #52269f; }
.ws-chip--pin     { --c1: #a6defe; --c2: #4aa2e2; --tx: #0b2452; --ts: 0 1px 0 rgba(255, 255, 255, .5); }
.ws-chip--kuen    { --c1: #3a69d8; --c2: #172f82; }
.ws-chip--tiger   { --c1: #e5373d; --c2: #8e0f16; }
.ws-chip--sky     { --c1: #ffb050; --c2: #d6650c; --tx: #3d1400; --ts: 0 1px 0 rgba(255, 255, 255, .4); }
.ws-chip--fort    { --c1: #e8609f; --c2: #a12d68; }
.ws-chip--empty   { background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(170, 190, 255, .09); }
/* ศึกข้ามเซิร์ฟ: สติกเกอร์ดาบไขว้ (ICON-INFO-JOIN) ที่มุมซ้ายบน */
.ws-cross { position: absolute; left: -8px; top: -10px; width: 26px; height: auto; rotate: -12deg; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .55)); }
.ws-chip.is-cross { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1.5px #ffe08a, 0 2px 4px rgba(0, 0, 0, .35); }

.ws-cell.is-hl .ws-chip {
  z-index: 2; scale: 1.05; filter: brightness(1.12) saturate(1.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 2px #ffe08a, 0 0 18px 3px rgba(255, 200, 70, .75);
}
.ws-board.has-hl .ws-cell:not(.is-hl) .ws-chip { filter: brightness(.42) saturate(.35); }
.ws-board.has-hl .ws-time:not(.is-hl) .ws-time-in,
.ws-board.has-hl .ws-day:not(.is-hl) { opacity: .45; }
.ws-cell:focus { outline: none; }
.ws-cell:focus-visible .ws-chip { outline: 2px dashed #fff; outline-offset: 3px; }

/* คอลัมน์วันนี้ — กรอบทองครอบทั้งคอลัมน์ (main.js วางตำแหน่งตามหัวคอลัมน์) */
.ws-today {
  position: absolute; z-index: 3; display: none; pointer-events: none; border-radius: 12px;
  border: 2px solid rgba(255, 224, 138, .9); box-shadow: 0 0 16px rgba(255, 200, 70, .45), inset 0 0 14px rgba(255, 200, 70, .22);
  transition: opacity .2s;
}
.ws-today.is-on { display: block; }
.ws-board.has-hl .ws-today { opacity: .35; }

.ws-foot { position: relative; z-index: 1; margin-top: .8rem; text-align: center; }
.ws-hint { margin: 0 0 .15rem; font-size: 14px; color: #e6ecff; }
.ws-hint .bi { color: var(--gold); }
.ws-note { margin: 0; font-size: 12.5px; color: rgba(214, 224, 255, .72); }

@media (max-width: 991.98px) {
  .war-stage { display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
  .war-video { grid-column: 1 / -1; grid-row: 2; }
  .war-char { position: relative; bottom: auto; left: auto; right: auto; height: min(62vw, 330px); margin: 0 0 -6px; rotate: none; }
  .war-char--l { justify-self: center; } .war-char--r { justify-self: start; margin-left: -8%; }
  /* ตาราง: เลื่อนแนวนอนในกรอบ คอลัมน์เวลาติดซ้าย แถววันติดบน (ตารางสูงเกินจอ → เลื่อนแนวตั้งในกรอบได้ หัวตารางค้างไว้) */
  .ws-frame { padding: 42px 22px 24px; }
  .ws-scroll {
    overflow: auto; max-height: calc(100svh - var(--nav-h) - 56px); overscroll-behavior-x: contain;
    scrollbar-width: thin; scrollbar-color: rgba(244, 180, 26, .7) transparent;
  }
  .ws-table { min-width: 900px; } /* ช่องกว้าง ~110px ชื่อสงครามไม่เกิน 2 บรรทัด ตารางเตี้ยลง */
  .ws-corner { width: 66px; }
  .ws-corner, .ws-time { position: sticky; left: 0; z-index: 5; background: var(--ws-bg); box-shadow: 5px 0 0 var(--ws-bg), -5px 0 0 var(--ws-bg); }
  .ws-table thead th { position: sticky; top: 0; z-index: 6; background: var(--ws-bg); box-shadow: 0 -5px 0 var(--ws-bg), 0 5px 0 var(--ws-bg); }
  .ws-table thead .ws-corner { z-index: 7; }
  .ws-time-in { font-size: 13px; padding: 7px 0; margin-right: 2px; }
  .ws-day { font-size: 14px; }
  .ws-chip { font-size: 12.5px; min-height: 40px; padding: 4px 6px; }
}
@media (max-width: 767.98px) {
  .war-video { padding: 26px 23px 22px 22px; } /* กรอบมือถือสเกล .2 */
  .ws-frame { padding: 40px 16px 22px; }
  .ws-table { min-width: 860px; }
  .ws-chip { font-size: 12px; min-height: 38px; }
}

/* ---------- 11. NEWS ---------- */
.news { position: relative; padding: calc(var(--nav-h) + 5vh) 0 6vh; overflow: hidden; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.news-head { text-align: center; display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; }
.news-head .lead-th { margin: 0 auto; }
.news-stage { position: relative; margin-top: 1rem; z-index: 2; display: flex; align-items: flex-end; }
.news-train { position: relative; z-index: 2; width: 100%; }
.news-swiper { overflow: visible; padding: 12px 0 20px; }
.news-swiper .swiper-slide { width: clamp(300px, min(44vw, 74vh), 860px); }
.news-card { display: block; padding: 0; color: inherit; text-decoration: none; }
.news-card .fr--banner { padding: 0; }
.news-card img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 628; object-fit: cover; position: relative; z-index: 1; border-radius: 6px; padding: 14px 12px 8px; }
/* ไม่มีข่าว / โหลดข่าวไม่ได้ (QA 2026-12-01) */
.news-swiper:has(.news-state) .swiper-wrapper { justify-content: center; }
.news-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; aspect-ratio: 1200 / 628; padding: 1.5rem; text-align: center; position: relative; z-index: 1; color: var(--ink); font: 600 clamp(15px, 1.5vw, 22px)/1.5 var(--font-head); }
.news-state img { width: clamp(64px, 7vw, 110px); height: auto; padding: 0; aspect-ratio: auto; }
.news-state p { margin: 0; }
.news-state .btn-f { background: none; box-shadow: none; }
/* แบนเนอร์ข่าวที่ยังไม่มีภาพ (ข่าวยังไม่เผยแพร่) — การ์ดชื่อข่าว */
.news-soon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; aspect-ratio: 1200 / 628; padding: 1.5rem; text-align: center; position: relative; z-index: 1; color: var(--ink); background: radial-gradient(circle at 50% 35%, #fffdf6, #f7e6c6); }
.news-card .news-soon-art { width: auto; height: 46%; aspect-ratio: auto; object-fit: contain; padding: 0; border-radius: 14px; }
.news-soon b { font: 800 clamp(18px, 2.2vw, 34px)/1.25 var(--font-head); color: var(--red); }
.news-soon small { font: 600 clamp(13px, 1.1vw, 18px)/1.4 var(--font-head); color: var(--ink-2); }
.news-card-title { display: block; font: 600 14px/1.4 var(--font-head); margin-top: .5rem; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 20, .7); }
.news-santa { position: absolute; left: 0; bottom: -1vh; width: clamp(220px, 19vw, 380px); z-index: 3; pointer-events: none; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45)); }
.news-santa-walk img { display: block; width: 100%; height: auto; }
.news-santa.is-walking .news-santa-walk { animation: walk .5s ease-in-out infinite alternate; }
@keyframes walk { from { translate: 0 0; rotate: -2deg; } to { translate: 0 -8px; rotate: 2deg; } }
.news-rope { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; overflow: visible; pointer-events: none; }
/* ริบบิ้นแดงผูกขบวนแบนเนอร์ */
.news-rope path { fill: none; stroke: var(--red); stroke-width: 7; stroke-linecap: round; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }
.news-nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2vh; }
.news.is-arrived .news-rope { opacity: 0; transition: opacity .4s; }
@media (max-width: 991.98px) {
  .news { min-height: 0; }
  .news-santa { position: relative; left: auto; bottom: auto; margin: 1rem 0 0 auto; width: 160px; display: block; }
  .news-rope { display: none; }
}

/* ---------- 12. FOOTER ---------- */
.site-footer { position: relative; padding: 14vh 0 0; overflow: hidden; }
.footer-inner { position: relative; z-index: 1; }
.footer-hero { text-align: center; display: flex; flex-direction: column; align-items: center; }
.footer-title { margin: 0 0 .5rem; }
.footer-title img { height: clamp(60px, 6vw, 100px); width: auto; }
/* แก๊งหมี — สเกลเดียวกันทั้งแถว (ความสูงตามไฟล์จริง: แพนด้าสูงสุดเพราะเขากวาง) */
.footer-bears { display: flex; justify-content: center; align-items: flex-end; gap: clamp(4px, 1vw, 18px); margin: 2rem 0 1.8rem; }
.footer-bears img { height: clamp(120px, 14vw, 256px); width: auto; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .4)); }
.footer-bears img[data-asset="MASCOT-BLACK-GIFT"] { height: clamp(112px, 13.1vw, 240px); }
.footer-bears img[data-asset="MASCOT-GRIZZLY-XMAS"] { height: clamp(105px, 12.2vw, 224px); }
.footer-bears img[data-asset="MASCOT-REDPANDA-MEGAPHONE"] { height: clamp(109px, 12.7vw, 232px); }
.footer-bears img[data-asset="MASCOT-POLAR-WAVE"] { height: clamp(115px, 13.4vw, 245px); }
/* แถบล่างเต็มความกว้าง — โครงเดียวกับแลนดิ้ง 21st (.footer) โทนกลางคืนน้ำเงินแทนแดงเลือดหมู
   ::before ไล่สีจากฉากเข้าพื้น footer แทนขอบตัด · พื้นเข้มเพราะแถบโลโก้ผู้ให้บริการมีตัวอักษรสีขาว */
.footer-bar {
  position: relative; z-index: 2; margin-top: 7rem;
  background: linear-gradient(180deg, #0c1230, #060918);
  color: rgba(226, 233, 255, .72); padding: 1rem 0 2.5rem; font-size: .86rem;
}
.footer-bar::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 160px;
  background: linear-gradient(to top, #0c1230, rgba(12, 18, 48, 0)); pointer-events: none;
}
.footer-bar a { color: inherit; text-decoration: none; transition: color .2s var(--ease), border-color .2s var(--ease); }
.foot-rule { border-color: rgba(244, 180, 26, .35); opacity: 1; margin: 1rem 0 1.2rem; }
.foot-logos { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-bottom: 1rem; }
.foot-logo { height: 42px; width: auto; opacity: .95; }
/* CI ผู้ให้บริการ — สไตล์เดียวกับ #wm_pp_footer_ci_center ของเว็บหลัก: แถบโลโก้ขนาดจริง 317×45 + ลิขสิทธิ์ Kanit 200 12px/18px #eaeaea
   (ภาพและข้อความมาจากสคริปต์กลาง footer_wp_ci_game.js · aspect-ratio จองที่ไว้ก่อนภาพโหลด) */
.foot-ci-center { font: 200 12px/18px var(--font-head); color: #eaeaea; }
.foot-ci-center img { width: 317px; max-width: 100%; height: auto; aspect-ratio: 317 / 45; }
.foot-head { font: 700 .92rem/1.3 var(--font-head); color: var(--gold); margin-bottom: .7rem; }
.foot-list { margin: 0; padding: 0; list-style: none; }
.foot-list li { margin-bottom: .35rem; }
.foot-list a:hover { color: #ffe08a; }
.socials { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.socials a { display: inline-grid; place-items: center; min-width: 42px; height: 32px; padding: 0 .6rem; border: 1px solid rgba(226, 233, 255, .25); border-radius: 6px; font: 600 .72rem/1 var(--font-head); }
.socials a:hover { border-color: var(--gold); color: #ffe08a; }
.ci-text { line-height: 1.7; margin: 0; }
.ci-small { font-size: .75rem; opacity: .72; }

/* ---------- 13. Modals (ฐาน Bootstrap modal — modal X-MAS / ราชสีห์คำรามเอาออกแล้ว 2026-11-23) ---------- */
.yg-modal .modal-content { background: none; border: 0; border-radius: 0; padding: 30px; }
.yg-modal .modal-body { position: relative; z-index: 1; padding: clamp(24px, 3vw, 44px); }
.yg-modal .modal-dialog-scrollable .modal-content { max-height: calc(100% - 2rem); }

/* ---------- 13b. Popup ชุดคลุมประจำเดือน — โครง + อนิเมชันจากแลนดิ้ง 21st (.ad-pop) ธีมคริสต์มาส ----------
   พวงหรีด (splash) ไม่มีกรอบ · ภาพซ้าย รายละเอียดขวา บนหน้าเว็บที่เบลอ
   ชั้น: veil (เบลอ) < stage < หิมะ canvas < body · ค่าใน CSS = สถานะสุดท้าย (GSAP ทำแค่ทางเข้า) */
.ad-pop {
  --art: min(96dvh, 56vw);    /* ขนาดพวงหรีด */
  --ch: min(60dvh, 32vw);     /* ความสูงตัวละคร — ให้อยู่ในวงพวงหรีด */
  --gold-200: #ffe8a8; --gold-300: #ffd977; --gold-400: #f5bd45; --cream: #fff6e4;
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--cream); overflow: hidden;
}
.ad-pop[open] { display: block; }
.ad-pop::backdrop { background: transparent; }
.ad-pop__veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 30% 50%, rgba(214, 40, 40, .25), transparent 70%),
    linear-gradient(90deg, rgba(8, 14, 40, .5), rgba(12, 18, 48, .82) 58%, rgba(8, 12, 34, .92));
  -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15);
}
.ad-pop__fx { position: fixed; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.ad-pop__layout { position: relative; height: 100%; display: grid; grid-template-columns: 56fr 44fr; align-items: center; }
.ad-pop__stage { position: relative; z-index: 1; height: 100%; }
.ad-pop__art, .ad-pop__glow, .ad-pop__rays, .ad-pop__flash { position: absolute; inset: 0; margin: auto; pointer-events: none; }
.ad-pop__art { width: var(--art); height: var(--art); max-width: none; object-fit: contain; }
.ad-pop__glow { width: calc(var(--art) * .62); height: calc(var(--art) * .62); border-radius: 50%; background: radial-gradient(circle, rgba(255, 236, 180, .6), rgba(255, 110, 110, .28) 45%, transparent 70%); }
.ad-pop__rays {
  width: calc(var(--art) * 1.1); height: calc(var(--art) * 1.1); border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 217, 119, .16) 0deg 4deg, transparent 4deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 15%, transparent 66%); mask: radial-gradient(circle, #000 15%, transparent 66%);
}
.ad-pop__chars { position: absolute; inset: 8dvh 0 0; margin: auto; height: var(--ch); display: flex; justify-content: center; align-items: flex-end; pointer-events: none; }
.ad-pop__char { display: block; width: auto; height: 100%; max-width: none; filter: drop-shadow(0 18px 30px rgba(0, 0, 30, .55)); }
.ad-pop__char + .ad-pop__char { height: 98%; margin-left: calc(var(--ch) * -.06); }
.ad-pop__flash { width: calc(var(--art) * .7); height: calc(var(--art) * .7); border-radius: 50%; background: radial-gradient(circle, #fff, rgba(255, 238, 190, .7) 30%, transparent 65%); opacity: 0; mix-blend-mode: screen; }

.ad-pop__body { position: relative; z-index: 3; max-width: 620px; padding: 40px clamp(20px, 5vw, 96px) 40px 0; }
.ad-pop__kicker { margin: 0 0 .3rem; font: 700 .82rem/1.4 var(--font-deco); letter-spacing: .3em; color: var(--gold-300); text-shadow: 0 1px 3px rgba(0, 0, 20, .9), 0 0 12px rgba(245, 189, 69, .4); }
.ad-pop__title { display: flex; align-items: center; gap: .6rem; margin: 0; font: 800 clamp(2.2rem, 3.4vw, 3.6rem)/1.3 var(--font-head); white-space: nowrap; }
.ad-pop__title > span {
  padding: .08em 0;   /* เผื่อสระ/วรรณยุกต์ไทย ไม่ให้ background-clip ตัด */
  background: linear-gradient(100deg, #fff8e8 0%, #ffe7a6 28%, #f5bd45 46%, #fff6dc 54%, #ffd977 70%, #d99a24 100%) 100% 0 / 240% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(110, 10, 10, .65)) drop-shadow(0 0 18px rgba(255, 90, 90, .35));
}
.ad-pop__title .bi { font-size: .45em; color: #bfe6ff; filter: drop-shadow(0 0 8px rgba(160, 220, 255, .9)); }
.ad-pop__flourish { display: block; width: min(100%, 420px); height: 24px; margin: -.3rem 0 .2rem; overflow: visible; }
.ad-pop__flourish path { fill: none; stroke: var(--gold-400); stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(245, 189, 69, .8)); }
.ad-pop__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: .4rem 0 1.4rem; font: 500 1rem/1.4 var(--font-head); color: #fff; }
.ad-pop__meta::before { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-400)); }
.ad-pop__meta small { padding: .1rem .65rem; border: 1px solid rgba(245, 189, 69, .5); border-radius: 99px; font-size: .78rem; color: var(--gold-200); }

/* แถวราคา: ปลายตัดเฉียง · ขอบทอง = พื้นหลัง li, เนื้อใน = ::before (inset 1px) */
.ad-pop__tiers { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ad-pop__tiers li, .ad-pop .pop-btn {
  --cut: 16px; --hex: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 50%);
  position: relative; isolation: isolate; clip-path: var(--hex);
}
.ad-pop__tiers li::before, .ad-pop .pop-btn::before { content: ""; position: absolute; inset: 1px; z-index: -1; clip-path: var(--hex); }
.ad-pop__tiers li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 14px; padding: 11px 26px 11px 18px; background: linear-gradient(90deg, rgba(245, 189, 69, .8), rgba(245, 189, 69, .25) 50%, rgba(245, 189, 69, .8)); }
.ad-pop__tiers li::before { background: linear-gradient(90deg, rgba(14, 22, 58, .95), rgba(10, 16, 44, .9)); }
.ad-pop__badge {
  grid-row: span 2; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--gold-400); background: radial-gradient(circle at 35% 30%, #1f8a4c, #0c3d22);
  box-shadow: inset 0 0 10px rgba(245, 189, 69, .35), 0 0 0 3px rgba(245, 189, 69, .12);
  font: 900 .95rem/1 var(--font-deco); color: var(--gold-200);
}
.ad-pop__tiers b { font: 600 1.05rem/1.3 var(--font-head); color: #fff; }
.ad-pop__price { grid-column: 3; grid-row: 1 / span 2; font: 700 1.7rem/1 var(--font-head); white-space: nowrap; color: var(--gold-200); text-shadow: 0 0 14px rgba(245, 189, 69, .35); }
.ad-pop__price small { font-size: .55em; font-weight: 600; color: var(--gold-400); }
.ad-pop__opt { grid-column: 2; font-size: .78rem; line-height: 1.45; color: var(--cream); opacity: .78; }
.ad-pop__tiers li.is-top { background: linear-gradient(90deg, #ffd977, #ff6b6b 50%, #ffd977); }
.ad-pop__tiers li.is-top::before { background: linear-gradient(90deg, rgba(150, 18, 26, .95), rgba(96, 12, 30, .92)); }
.ad-pop__tiers li.is-top::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%) 120% 0 / 250% 100% no-repeat; animation: adPopShine 3.4s ease-in-out infinite; }
.ad-pop__tiers li.is-top .ad-pop__badge { border-color: #ffb3b3; background: radial-gradient(circle at 35% 30%, #e23b3b, #8a0e16); color: #fff3d6; }
@keyframes adPopShine { 0%, 45% { background-position: 120% 0; } 100% { background-position: -120% 0; } }

.ad-pop__note { margin: 1rem 0 0; font-size: .82rem; line-height: 1.6; color: var(--cream); opacity: .7; }
.ad-pop__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.6rem; }
.pop-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-width: 150px; height: 52px; padding: 0 1.8rem;
  border: 0; border-radius: 0; background: linear-gradient(90deg, rgba(245, 189, 69, .65), rgba(245, 189, 69, .25), rgba(245, 189, 69, .65));
  font: 500 1rem/1 var(--font-head); letter-spacing: .12em; color: var(--cream); cursor: pointer; text-decoration: none; transition: filter .2s, color .2s;
}
.ad-pop .pop-btn::before { background: rgba(10, 16, 44, .9); transition: background-color .2s; }
.pop-btn:hover, .pop-btn:focus-visible { color: #fff; }
.ad-pop .pop-btn:hover::before, .ad-pop .pop-btn:focus-visible::before { background: rgba(120, 16, 24, .92); }
.pop-btn--primary { min-width: 250px; font-weight: 700; color: #4a1208; background: linear-gradient(180deg, #fff3c4, #ffd977 42%, #e0a93a); }
.ad-pop .pop-btn--primary::before { display: none; }
.pop-btn--primary:hover, .pop-btn--primary:focus-visible { color: #4a1208; filter: brightness(1.1) saturate(1.1); }
.pop-btn--primary .bi { transition: transform .25s var(--ease); }
.pop-btn--primary:hover .bi { transform: translateX(4px); }
.ad-pop__x {
  position: absolute; top: 18px; right: 22px; z-index: 4; display: grid; place-items: center; width: 48px; height: 48px;
  border: 1px solid rgba(255, 243, 214, .35); border-radius: 50%; background: rgba(8, 12, 34, .4); color: #fff; font-size: 1.15rem;
  transition: rotate .3s var(--ease), border-color .2s, background-color .2s;
}
.ad-pop__x:hover, .ad-pop__x:focus-visible { rotate: 90deg; border-color: var(--gold-300); background: rgba(245, 189, 69, .15); }
body.has-pop { overflow: hidden; }

/* ---------- 13c. Popup "เร็ว ๆ นี้" — ลิงก์ data-news ที่เว็บหลักยังไม่เผยแพร่ (assets/js/links.js) ---------- */
.soon-pop { width: min(92vw, 400px); max-width: none; padding: 0; border: 0; background: transparent; overflow: visible; }
.soon-pop::backdrop { background: rgba(10, 16, 44, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.soon-pop[open] { animation: soonIn .45s var(--ease); }
.soon-pop[open]::backdrop { animation: soonFade .3s ease; }
.soon-pop__box {
  position: relative; padding: 92px 28px 28px; margin-top: 70px; border-radius: 26px; text-align: center; color: var(--ink);
  background: linear-gradient(var(--paper), var(--paper)) padding-box, repeating-linear-gradient(-45deg, var(--red) 0 12px, #fff 12px 24px) border-box;
  border: 9px solid transparent; box-shadow: 0 24px 50px rgba(0, 0, 30, .35);
}
.soon-pop__img { position: absolute; left: 50%; top: -92px; width: auto; height: 170px; translate: -50% 0; filter: drop-shadow(0 8px 10px rgba(0, 0, 30, .25)); }
.soon-pop__title { margin: 0 0 .5rem; font: 800 1.45rem/1.35 var(--font-head); color: var(--red-2); }
.soon-pop__text { margin: 0 0 1.3rem; font-size: .98rem; line-height: 1.65; color: var(--ink-2); }
.soon-pop__ok { min-width: 150px; }
@keyframes soonIn { from { opacity: 0; transform: translateY(24px) scale(.92); } }
@keyframes soonFade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .soon-pop[open], .soon-pop[open]::backdrop { animation: none; } }
.login-more { justify-self: start; align-self: flex-start; width: max-content; margin-top: .4rem; }
@media (min-width: 992px) and (max-height: 760px) {
  .ad-pop__title { font-size: clamp(2rem, 3.6vw, 3.2rem); }
  .ad-pop__meta { margin-bottom: .9rem; }
  .ad-pop__tiers { gap: 8px; }
  .ad-pop__tiers li { padding-block: 7px; }
  .ad-pop__badge { width: 38px; height: 38px; }
  .ad-pop__price { font-size: 1.4rem; }
  .ad-pop__note { margin-top: .7rem; }
  .ad-pop__actions { margin-top: 1rem; }
  .pop-btn { height: 46px; }
}
@media (max-width: 991.98px) {
  .ad-pop { --art: min(118vw, 62dvh); --ch: min(38dvh, 80vw); }
  .ad-pop__layout { display: block; overflow-y: auto; overscroll-behavior: contain; }
  .ad-pop__stage { height: 54dvh; }
  .ad-pop__chars { inset: 3dvh 0 0; }
  .ad-pop__body { max-width: 640px; margin: -1dvh auto 0; padding: 0 16px 28px; }
  .ad-pop__kicker { font-size: .66rem; letter-spacing: .18em; }
  .ad-pop__title { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .ad-pop__meta { margin: .2rem 0 1rem; font-size: .85rem; }
  .ad-pop__meta::before { display: none; }
  .ad-pop__tiers { gap: 8px; }
  .ad-pop__tiers li { --cut: 12px; column-gap: 10px; padding: 9px 18px 9px 12px; }
  .ad-pop__badge { width: 36px; height: 36px; font-size: .78rem; }
  .ad-pop__tiers b { font-size: .92rem; }
  .ad-pop__price { font-size: 1.2rem; }
  .ad-pop__opt { font-size: .72rem; }
  .ad-pop__note { font-size: .74rem; }
  .ad-pop__actions { gap: 10px; margin-top: 1.1rem; }
  .pop-btn { flex: 1 1 0; min-width: 0; height: 46px; padding: 0 .8rem; letter-spacing: .06em; }
  .ad-pop__x { top: 10px; right: 10px; width: 42px; height: 42px; }
}

