@font-face { font-family: "GameFont"; src: url("../fonts/game_font.ttf") format("truetype"); font-style: normal; font-weight: normal; font-display: swap; }
/* ============================================================
   Thần Thú Poke — landing
   เรขาคณิตทุกค่าอ้างจาก claude/26-web-landing-spec.md (วัดจากไฟล์จริง)

   ฐานการออกแบบ  เดสก์ท็อป 1920px (1vw = 19.2px)
                 มือถือ     390px (1vw = 3.9px)
   breakpoint    768px จุดเดียว
   วิธีคิด        ค่า px ในสเปก -> vw  =  px / 19.2  (เดสก์ท็อป)
                                      =  px / 3.9   (มือถือ)
   => ย่อ/ขยายจอแล้วสัดส่วนคงเดิมทุกจุด เหมือนต้นแบบ
   ============================================================ */

:root {
  --c-yellow:        #FFE221;   /* ขอบ header, hover, จุดเน้น */
  --c-header-bg:     #17005DDB; /* พื้น header เดสก์ท็อป (โปร่ง ~86%) */
  --c-header-bg-m:   #000000;   /* พื้น header มือถือ */
  --c-header-border: #FFE221;
  --c-primary:       #005787;
  --c-footer-bg:     #000000;
  --c-footer-text:   #FFFFFF;
  --c-ink:           #FFFFFF;
  --c-ink-dim:       #C8D0FF;
  --c-scrim:         #000000B2;

  --header-h:        3.90625vw;  /* 75px  */
  --header-top:      1.4583333vw;/* 28px  */
  --header-max:      79.583333vw;/* 1528px*/
  --z-rail:          40;
  --z-header:        50;
  --z-submenu:       60;
  --z-backdrop:      999;
  --z-drawer:        1000;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #05060f;
  color: var(--c-ink);
  font-family: "GameFont";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* พื้นหลังทั้งหน้า: ภาพเดียวเริ่มใต้ hero พอดี (สเปก: top 1079px เดสก์ท็อป / 733px มือถือ) */
.layout { position: relative; width: 100%; min-height: 100%; }
.layout::before {
  content: "";
  position: absolute;
  top: 187.9487179vw;           /* 733px @390 */
  left: 0; right: 0; bottom: 0;
  background: url("../img/bg-page-m.png") no-repeat center top / cover;
  z-index: -1;
}

/* ============================================================
   HEADER
   ============================================================ */
.header { position: absolute; top: 0; left: 0; right: 0; z-index: var(--z-header); }

.header__bar {
  height: 14.358974vw;                 /* 56px @390 */
  padding: 4.6153846vw 4.1025641vw;    /* 18px 16px */
  background: var(--c-header-bg-m);
  display: flex; align-items: center; gap: 4.1025641vw;
  overflow: hidden;                    /* มือถือเท่านั้น — เดสก์ท็อปต้อง unset ไม่งั้น dropdown โดนตัด */
}

.header__logo {
  flex: 0 0 auto; display: block;
  width: 21.2820513vw; height: 9.4871795vw;                   /* 83x37 */
}
.header__logo img {
  width: 100%; height: 100%; object-fit: contain;
  /* [Thần Thú Poke] เดิม margin-top: -2.6923077vw (-10px) ดันโลโก้ขึ้นจนล้นเหนือแถบ
     วัดจริงที่ 375px: รูปเริ่มที่ y = -1px คือ "โผล่พ้นขอบบนของแถบ" แล้วโดน
     overflow:hidden ของ .header__bar ตัดหัวทิ้ง
     ต้องเลื่อนลง 10.1px ถึงจะอยู่กึ่งกลางแถบพอดี = เอาค่าลบออกทั้งหมด
     (กล่อง <a> ครอบมันอยู่กึ่งกลางถูกต้องอยู่แล้ว 9.1..44.7 ในแถบสูง 53.8) */
  margin-top: 0;
}

.header__nav { display: none; }

.header__actions { margin-left: auto; display: flex; flex-direction: row-reverse; gap: 4.1025641vw; }
.header__actions img { width: 24.1025641vw; height: auto; }  /* 94px */

.header__burger { flex: 0 0 auto; width: 6.1538462vw; height: 6.1538462vw; }
.header__burger span,
.header__burger span::before,
.header__burger span::after {
  display: block; height: 2px; background: var(--c-ink); border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.header__burger span { position: relative; }
.header__burger span::before { content: ""; position: absolute; top: -7px; left: 0; right: 0; }
.header__burger span::after  { content: ""; position: absolute; top:  7px; left: 0; right: 0; }

/* ============================================================
   HERO  (สเปก: สูง 734px มือถือ / 1080px เดสก์ท็อป)
   ============================================================ */
.hero { position: relative; height: 188.2051282vw; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
/* <picture> เป็น inline โดยปริยาย ทำให้ height:100% ของ img ข้างในคำนวณไม่ออก
   ต้องบังคับเป็นบล็อกเต็มพื้นที่ก่อน ไม่งั้นโปสเตอร์จะสูงเป็นศูนย์
   (เพิ่มตอนเปลี่ยน hero จาก <img> สองใบมาเป็น <picture> — 29 ส.ค. 2569) */
.hero__media picture { display: block; width: 100%; height: 100%; }
.hero__media img,
.hero__media video { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__media--desktop { display: none; }

/* การ์ดดาวน์โหลดลอยทับ hero (สเปก: มือถือ top 572 left 32 box 326x108) */
.jump {
  position: absolute;
  top: 146.6666667vw;    /* 572px */
  left: 8.2051282vw;     /* 32px  */
  width: 83.5897436vw;   /* 326px */
  height: 27.6923077vw;  /* 108px */
  padding: 2.0512821vw 3.0769231vw;
  display: flex; align-items: center; gap: 2.5641026vw;
}
.jump__plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.jump__icon {
  position: relative; flex: 0 0 auto;
  width: 24.1025641vw; height: 24.1025641vw;   /* 94px */
  border-radius: 6.1538462vw; overflow: hidden;
}
.jump__icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 2.3076923vw; }

.jump__btns { position: relative; display: flex; flex-direction: column; gap: .5128205vw; }
/* 🔴 ความสูงต้องเป็น auto — ห้ามใส่ตัวเลขกลับมา
   .jump เป็น flex row ที่ของล้น ⇒ ความกว้างของปุ่มถูกบีบลงราว 6%
   ถ้าล็อกความสูงไว้ด้วย รูปจะถูกยืดในแนวตั้งเงียบ ๆ (object-fit: fill ไม่ฟ้อง)
   PageSpeed จับได้ในหัวข้อ "แสดงรูปภาพที่มีสัดส่วนไม่ถูกต้อง" — วัดได้เพี้ยน 6.1% */
.jump__btns img { width: 25.6410256vw; height: auto; }  /* 100x30 */

.jump__badge { position: relative; flex: 0 0 auto; width: 24.1025641vw; height: 24.1025641vw; }
.jump__badge img { width: 100%; height: 100%; object-fit: contain; }
.jump__badge .shine {
  position: absolute; inset: 0;
  animation: shine 1.5s linear 2s infinite;
  -webkit-mask-image: linear-gradient(115deg, transparent 40%, #000 50%, transparent 60%);
          mask-image: linear-gradient(115deg, transparent 40%, #000 50%, transparent 60%);
  -webkit-mask-size: 300% 100%; mask-size: 300% 100%;
  filter: brightness(1.7);
}
@keyframes shine {
  from { -webkit-mask-position: 120% 0; mask-position: 120% 0; }
  to   { -webkit-mask-position: -20% 0; mask-position: -20% 0; }
}

/* ============================================================
   SECTION ทั่วไป — หัวข้อเป็น "รูป" ตามต้นแบบ
   ============================================================ */
.section { position: relative; width: 100%; }
.section__title {
  display: block; margin: 0 auto;
  width: 94.3589744vw;    /* 368px */
  height: 10.7692308vw;   /* 42px  */
  object-fit: contain;
}

.section--news    { height: 226.1538462vw; padding-top: 8.7179487vw; }  /* 882 / 34 */
.section--feature { height:  85.6410256vw; padding-top: 3.0769231vw; }  /* 334 / 12 */
.section--contact { height:  76.9230769vw; padding-top: 8.2051282vw; }  /* 300 / 32 */

/* ---------- ข่าว ---------- */
.news { position: relative; margin-top: 4.1025641vw; }
.news__slider { position: relative; width: 95.8974359vw; margin: 0 auto; }  /* 374px */
.news__frame  { width: 100%; height: auto; }
.news__box { position: relative; width: 100%; }
/* กรอบ 374x214 padding 10px -> ช่องภาพ 354x199 (มือถือ) */
.news__slides {
  position: absolute; inset: 2.5641026vw;
  overflow: hidden; border-radius: 1.2vw;
}
.news__slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .6s ease;   /* speed 600ms ตามต้นแบบ */
}
.news__slide.is-on { opacity: 1; }

.news__bullets { display: flex; justify-content: center; gap: 2vw; margin-top: 2vw; }
.news__bullets img { width: 3.5897436vw; height: 3.5897436vw; }

.news__tabs { display: flex; justify-content: center; gap: 1.5vw; margin-top: 4vw; }
.news__tab { position: relative; width: 24vw; }
.news__tab img { width: 100%; height: auto; }
.news__tab .lbl {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 3.3333333vw; font-weight: 700; color: var(--c-ink);
  text-shadow: 0 .3vw .6vw rgba(0,0,0,.55);
}

.news__list { width: 95.8974359vw; margin: 3vw auto 0; }   /* 374px */
.news__row {
  display: flex; align-items: center; gap: 2.5641026vw;
  min-height: 9.2307692vw;
  padding: 1.5vw 2vw;
  border-bottom: 1px solid rgba(255,255,255,.14);
  font-size: 3.3333333vw;
}
.news__row .tag {
  flex: 0 0 auto; padding: .4vw 1.6vw; border-radius: 1vw;
  background: rgba(255,226,33,.16); color: var(--c-yellow);
  font-size: 2.8205128vw; font-weight: 700;
}
.news__row .t { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news__row .d { flex: 0 0 auto; color: var(--c-ink-dim); font-size: 2.8205128vw; }
.news__row:hover .t { color: var(--c-yellow); }

.news__more { display: block; margin: 3vw auto 0; width: 40.5128205vw; }
.news__more img { width: 100%; height: auto; }

/* ---------- แถบเมนู 4 ช่อง (กริดเดียวของหน้า) ---------- */
.menu4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3.0769231vw; width: 95.3846154vw; margin: 4vw auto 0; }  /* 372px gap12 */
.menu4 img { width: 100%; height: auto; border-radius: 1.5vw; }

/* ---------- ฟีเจอร์เด่น : coverflow (สไลด์กลางเด่น ข้าง ๆ หรี่+ย่อ) ---------- */
.feature { position: relative; margin-top: 2.5641026vw; }
.feature__stage {
  position: relative; width: 100%; margin: 0 auto;
  height: 51.2820513vw;      /* สไลด์มือถือ 200px */
  overflow: hidden;
  perspective: 1200px;
}
.feature__slide {
  position: absolute; top: 0; left: 50%;
  width: 88.7179487vw; height: 51.2820513vw;     /* 346x200 */
  margin-left: -44.3589744vw;
  transition: transform .45s ease, opacity .45s ease;
  will-change: transform;
}
.feature__frame   { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 2; pointer-events: none; }
.feature__art {
  position: absolute; top: 1.0256410vw; left: 1.0256410vw;      /* margin 4px */
  width: calc(100% - 2.0512820vw); height: calc(100% - 2.0512820vw);
  object-fit: contain;
}
.feature__slide::before {
  content: ""; position: absolute; inset: 0; z-index: 3;
  background: #00000075; opacity: 1; transition: opacity .3s ease; pointer-events: none;
}
.feature__slide.is-active::before { opacity: 0; }

.feature__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 8vw; height: 8vw; display: grid; place-items: center;
  color: var(--c-ink); font-size: 6vw; line-height: 1;
  text-shadow: 0 .4vw .8vw rgba(0,0,0,.6);
}
.feature__nav--prev { left: 1vw; }
.feature__nav--next { right: 1vw; }
.feature__nav:hover { color: var(--c-yellow); }

.feature__dots { display: flex; justify-content: center; gap: 1.5vw; margin-top: 2vw; }
.feature__dots img { width: 5.1282051vw; height: 5.1282051vw; }

/* ============================================================
   โค้ดของขวัญ — ป๊อปอัปที่เด้งจากปุ่มกลางหน้า (แทนที่ปุ่มเติมเงิน)

   มาร์กอัปถูกฝังโดย public_web/site.php ตอนเสิร์ฟ ไม่ได้อยู่ใน index.html
   ⇒ เปิดไฟล์ตรง ๆ จะไม่เห็นกล่องนี้ ซึ่งถูกต้องแล้ว
   หน่วยเป็น px ไม่ใช่ vw เพราะเป็นกล่องข้อความ ต้องอ่านออกเท่ากันทุกขนาดจอ
   ============================================================ */
.gift {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-scrim);
  padding: 20px;
}
.gift[hidden] { display: none; }
.gift__box {
  position: relative; width: 100%; max-width: 420px;
  background: var(--c-header-bg); border: 2px solid var(--c-yellow);
  border-radius: 18px; padding: 26px 22px 22px;
  color: var(--c-ink); text-align: center;
  box-shadow: 0 18px 50px #00000080;
  /* หลายโค้ดพร้อมกันแล้วยาวเกินจอ ให้เลื่อนในกล่อง ไม่ใช่ดันกล่องทะลุจอ */
  max-height: calc(100vh - 40px); overflow-y: auto;
}
.gift__x {
  position: absolute; top: 6px; right: 10px;
  background: none; border: 0; color: var(--c-ink-dim);
  font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.gift__x:hover { color: var(--c-yellow); }
.gift__t { margin: 0 0 8px; font-size: 20px; color: var(--c-yellow); }
.gift__d { margin: 0 0 16px; font-size: 14px; color: var(--c-ink-dim); line-height: 1.5; }

/* รายการโค้ด — ระยะห่างมาจาก gap ของตัวลิสต์ ไม่ใช่ margin ของลูกแต่ละตัว */
.gift__list { display: flex; flex-direction: column; gap: 14px; }
.gift__item { text-align: left; }
.gift__label {
  display: block; margin: 0 0 5px;
  font-size: 13px; font-weight: 700; color: var(--c-yellow);
}
.gift__code {
  display: flex; align-items: stretch; gap: 8px;
  background: #00000059; border: 1px dashed var(--c-yellow);
  border-radius: 12px; padding: 10px 10px 10px 14px;
}
.gift__code span {
  flex: 1; align-self: center; text-align: left;
  font-size: 19px; font-weight: 700; letter-spacing: 1px;
  /* โค้ดต้องอ่านทีละตัวได้ ตัวอักษรที่หน้าตาคล้ายกันต้องแยกออก */
  font-family: "GameFont";
  word-break: break-all;
}
.gift__copy {
  flex: none; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--c-yellow); color: #000; font-weight: 700;
  font-size: 13px; padding: 8px 14px;
}
.gift__copy:hover { filter: brightness(1.08); }
.gift__u { margin: 6px 0 0; font-size: 12px; color: var(--c-ink-dim); }

/* ---------- โค้ดที่ต้องเข้ากลุ่มก่อนถึงจะเห็น ----------
   ตัวโค้ดจริงไม่เคยถูกส่งมาถึงหน้านี้เลย (Site::gift() ตัดทิ้งตั้งแต่ฝั่งเซิร์ฟเวอร์)
   ที่เห็นเป็นจุด ๆ คือตัวอักษรตายตัวที่วาดไว้เฉย ๆ ไม่ใช่โค้ดที่ถูกเบลอ */
.gift__code--lock { border-style: solid; border-color: var(--c-ink-dim); }
.gift__code--lock span {
  color: var(--c-ink-dim); letter-spacing: 4px; user-select: none;
}
.gift__go {
  flex: none; display: inline-flex; align-items: center;
  border: 0; border-radius: 8px; text-decoration: none;
  background: var(--c-yellow); color: #000; font-weight: 700;
  font-size: 13px; padding: 8px 14px; white-space: nowrap;
}
.gift__go:hover { filter: brightness(1.08); }
.gift__hint { margin: 6px 0 0; font-size: 12px; color: var(--c-ink-dim); line-height: 1.5; }

@media (max-width: 767px) {
  .gift__box { max-width: none; padding: 22px 16px 18px; }
  .gift__t { font-size: 18px; }
  .gift__code span { font-size: 17px; }
  /* จอแคบ ปุ่มกับโค้ดเบียดกันจนกดพลาด ⇒ ให้ปุ่มลงบรรทัดใหม่เต็มความกว้าง */
  .gift__code { flex-wrap: wrap; }
  .gift__copy, .gift__go { width: 100%; justify-content: center; }
}

/* ============================================================
   HOVER — ค่าที่วัดจากเว็บต้นแบบโดยตรง
   ============================================================ */
.jump__btns a,
.jump__badge { transition: transform .2s ease, filter .2s ease; }
.jump__btns a:hover { transform: translateY(-2px); filter: brightness(1.08); }

.jump__icon { transition: filter .2s ease; }
.jump__icon:hover { filter: brightness(1.1) drop-shadow(0 8px 16px rgba(0,0,0,.4)); }

.menu4 a { transition: transform .3s ease, filter .3s ease; display: block; }
.menu4 a:hover { transform: translateY(-8px) scale(1.05); filter: drop-shadow(0 8px 16px rgba(0,0,0,.3)); }
.menu4 a:hover img { animation: menuPulse .6s ease-in-out 1; }
@keyframes menuPulse { 50% { transform: scale(1.085); } }

.contact__socials a { transition: transform .2s ease; display: block; }
.contact__socials a:hover { transform: scale(1.1); }

.btn-top { transition: opacity .25s ease, filter .2s ease; }
.btn-top:hover { filter: brightness(1.1); }

.submenu a { transition: opacity .18s ease; }
.submenu a:hover { opacity: .8; }

/* ---------- ติดตามเรา ---------- */
.contact { position: relative; width: 73.0769231vw; margin: 3vw auto 0; }  /* 285px */
.contact__frame { width: 100%; height: auto; }
.contact__frame--d { display: none; }   /* กรอบเดสก์ท็อปคนละรูปกับมือถือ */
.contact__inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2.5vw;
}
/* ไอคอนแอป + ปุ่มร้าน (ช่องรูป ขนาดตามเอกสารส่งทีมออกแบบ) */
.contact__icon { flex: 0 0 auto; width: 16.1538462vw; height: 16.1538462vw; }  /* 63px */
.contact__icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 2.5vw; }
.contact__community { display: flex; flex-direction: column; align-items: center; gap: 2vw; }
.contact__strip { width: 49.2307692vw; height: auto; }
.contact__socials { display: flex; gap: 4vw; }
.contact__socials img { width: 10.7692308vw; height: 10.7692308vw; }  /* 42px */
.contact__stores { display: flex; flex-direction: column; gap: 1.0256410vw; }   /* 4px */
.contact__stores img { width: 30vw; height: auto; }

/* ============================================================
   ล็อกอิน (สมัครทำในเกมเท่านั้น)
   ============================================================ */
.auth {
  width: 89.7435897vw; margin: 6vw auto;
  padding: 5vw; border-radius: 3vw;
  background: rgba(9, 6, 34, .82);
  border: 2px solid var(--c-header-border);
  backdrop-filter: blur(6px);
}
.auth__head { display: flex; align-items: center; justify-content: space-between; gap: 2vw; margin-bottom: 3vw; }
.auth__head h2 { margin: 0; font-size: 4.6153846vw; }
.auth__note { font-size: 3.0769231vw; color: var(--c-ink-dim); }
.auth__field { display: block; margin-bottom: 2.5vw; }
.auth__field span { display: block; font-size: 3.0769231vw; color: var(--c-ink-dim); margin-bottom: 1vw; }
.auth__field input {
  width: 100%; padding: 3vw; border-radius: 2vw;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.22);
  color: var(--c-ink); font-size: 3.5897436vw;
}
.auth__field input:focus { outline: 2px solid var(--c-yellow); outline-offset: 1px; }
.auth__submit {
  width: 100%; padding: 3.2vw; border-radius: 2vw;
  background: var(--c-yellow); color: #2a1d00; font-weight: 800; font-size: 3.8461538vw;
}
.auth__submit[disabled] { opacity: .55; cursor: progress; }
.auth__msg { margin-top: 2.5vw; font-size: 3.3333333vw; min-height: 4vw; }
.auth__msg.ok  { color: #7CFFA6; }
.auth__msg.err { color: #FF8A8A; }
.auth__who { display: flex; align-items: center; justify-content: space-between; gap: 2vw; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--c-footer-bg); color: var(--c-footer-text); padding: 6vw 5.1282051vw; }
.footer__in { max-width: 1280px; margin: 0 auto; display: grid; gap: 3vw; font-size: 3.0769231vw; line-height: 1.7; }
.footer__marks { display: flex; align-items: center; gap: 4vw; }
.footer__marks img { height: 8vw; width: auto; }
.footer a:hover { color: var(--c-yellow); }

/* ============================================================
   แถบลอยขวา + ปุ่มขึ้นบน (เดสก์ท็อปเท่านั้น)
   ============================================================ */
.rail { display: none; }
.btn-top {
  position: fixed; right: 4vw; bottom: 6vw; z-index: var(--z-rail);
  width: 26.1538462vw; opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.btn-top.is-on { opacity: 1; pointer-events: auto; }
.btn-top img { width: 100%; height: auto; }

/* ============================================================
   เมนูมือถือ (drawer)  — สเปก: top 60, กว้าง 75% สูงสุด 374px, 300ms
   ============================================================ */
.backdrop {
  position: fixed; top: 14.358974vw; left: 0; right: 0; bottom: 0;
  background: var(--c-scrim); z-index: var(--z-backdrop);
  opacity: 0; pointer-events: none; transition: opacity .3s ease-in-out;
}
.backdrop.is-on { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 15.3846154vw; right: 0; bottom: 0;
  width: 100%; z-index: var(--z-drawer);
  transform: translateX(100%); transition: transform .3s ease-in-out;
}
.drawer.is-on { transform: translateX(0); }
.drawer__panel {
  width: 75%; max-width: 374px; height: 100%;
  /* 🔴 ต้องชิดขอบขวา ไม่ใช่ `margin: 0 auto`
     กล่อง .drawer กว้างเต็มจอ (width:100%) ⇒ auto ทั้งสองข้างทำให้แผงไปอยู่กลางจอ
     วัดจริงที่ 375px: เว้นข้างละ 47px ทั้งซ้ายและขวา ดูเหมือนเมนูลอยกลางหน้า
     ปุ่มสามขีดอยู่มุมขวาบน เมนูจึงต้องออกมาจากขอบขวาให้ตรงกับที่นิ้วเพิ่งกด
     margin-left:auto ดันแผงไปชิดขวา ส่วน margin-right เหลือ 0 ตามค่าเริ่มต้น */
  margin-left: auto;
  padding-top: 2.5641026vw; background: var(--c-header-bg-m);
  overflow-y: auto;
}
.drawer__panel a {
  display: block; padding: 4.6153846vw 5.1282051vw;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: 4.1025641vw;
}
.drawer__panel a:hover { color: var(--c-yellow); }

body.is-locked { overflow: hidden; }

/* ============================================================
   ================  เดสก์ท็อป  >= 768px  (ฐาน 1920)  ==========
   ============================================================ */
@media (min-width: 768px) {

  .layout::before {
    top: 56.1979167vw;                       /* 1079px */
    background-image: url("../img/bg-page.png");
  }

  /* ---------- header: แคปซูลลอยกลางจอ ---------- */
  .header__bar {
    position: absolute; left: 50%; transform: translateX(-50%);
    top: var(--header-top);
    width: var(--header-max); max-width: var(--header-max);
    height: var(--header-h);
    padding: 1.0416667vw;                    /* 20px */
    border: 2px solid var(--c-header-border);
    border-radius: 3.3854167vw;              /* 65px */
    background: var(--c-header-bg);
    gap: 0;
    overflow: unset;                         /* ต้อง unset ไม่งั้น submenu โดนตัด */
  }
  /* โลโก้เป็น px คงที่ (ไม่สเกลตามจอ) และล้นขึ้นเหนือแถบ */
  /* โลโก้ต้องเป็น vw เหมือนแถบ ไม่งั้นพอจอเล็กลงมันจะใหญ่เกินแถบจนดูลอยหลุด
     (230x104 ที่ฐาน 1920 -> สัดส่วนต่อแถบคงที่ทุกความกว้างจอ) */
  .header__logo {
    order: 2; flex: 0 0 auto;
    width: 11.9791667vw; height: 5.4166667vw;
  }
  .header__logo img {
    width: 100%; height: 100%; object-fit: contain;
    margin-top: 0;                               /* ล้างค่ามือถือ (ตอนนี้มือถือเป็น 0 แล้ว แต่คงไว้กันพลาด) */
    /* [Thần Thú Poke] เดิม translateY(-.5208333vw) = -10px ทำให้โลโก้สูงกว่ากึ่งกลางแถบ 10px
       วัดที่ 1920: แถบอยู่ y 28..103 (สูง 75) · รูปอยู่ 3.5..107.5 ⇒ ต้องเลื่อนลง 10px
       เอา transform ออก = โลโก้ล้นขึ้นบน 14.5px ล้นลงล่าง 14.5px เท่ากันพอดี
       (ตั้งใจให้ล้นอยู่แล้ว เพราะโลโก้สูง 104 แต่แถบสูง 75 — แค่ให้ล้นสมมาตร) */
  }
  .header__actions, .header__burger { display: none; }

  .header__nav { display: flex; flex: 1 1 0; min-width: 0; }
  .header__nav--l { order: 1; }
  .header__nav--r { order: 3; }
  .header__nav ul {
    list-style: none; margin: 0; padding: 0 1.0416667vw;
    display: flex; align-items: center; justify-content: center;
    gap: 1.0416667vw; width: 100%;
  }
  .header__nav li { flex: 1 1 0; text-align: center; position: relative; }
  .header__nav a {
    display: block; font-size: 1.25vw; line-height: 1.25; font-weight: 700;
    white-space: nowrap; transition: color .18s ease;
  }
  .header__nav a:hover { color: var(--c-yellow); }

  /* ตัวชี้ว่าเมนูนี้มีเมนูย่อย */
  .header__nav li.has-sub > a::after {
    content: ""; display: inline-block; vertical-align: middle;
    margin-left: .35em; width: .5em; height: .5em;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translateY(-.15em) rotate(45deg);
    transition: transform .18s ease;
  }
  .header__nav li.has-sub:hover > a::after { transform: translateY(.05em) rotate(-135deg); }

  /* submenu ใช้ px คงที่ (ไม่สเกลตามจอ) */
  .submenu {
    position: absolute; left: 50%; transform: translateX(-50%);
    top: 40px; z-index: var(--z-submenu);
    display: flex; flex-direction: column; gap: 8px;
    min-width: 168px; padding: 12px 11px; border-radius: 18px;
    background: var(--c-header-bg); border: 2px solid var(--c-header-border);
    opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility .18s ease;
  }
  .header__nav li:hover > .submenu { opacity: 1; visibility: visible; }
  .submenu a { font-size: 16px; line-height: 1.25; font-weight: 600; white-space: nowrap; }

  /* ---------- hero ---------- */
  .hero { height: 56.25vw; }                 /* 1080px, 16:9 */
  .hero__media--mobile  { display: none; }
  .hero__media--desktop { display: block; }

  .jump {
    top: 43.125vw;        /* 828px */
    left: 31.6666667vw;   /* 608px */
    width: 36.6666667vw;  /* 704px */
    height: 12.0833333vw; /* 232px */
    padding: 1.0416667vw .5729167vw;
    gap: .8333333vw;
  }
  .jump__icon { width: 10.8333333vw; height: 10.9375vw; border-radius: .9375vw; }
  .jump__icon img { border-radius: .78125vw; }
  .jump__btns { gap: .3125vw; }
  .jump__btns img { width: 11.5104167vw; height: auto; }   /* 221x66 */
  .jump__badge { width: 10.8333333vw; height: 10.9375vw; }

  /* ---------- section ---------- */
  .section__title { width: 53.90625vw; height: 6.5104167vw; }   /* 1035x125 */
  .section--news    { height: 57.2916667vw; padding-top: 2.9166667vw; }  /* 1100 / 56 */
  /* [Thần Thú Poke] ดันเนื้อหาลงมา 60px (ฐาน 1920) ตามที่เจ้าของขอ
     ที่มาของตัวเลข: วัดเทียบกับเว็บเวียดนามที่ความกว้างเดียวกัน (1280)
       เวียดนาม  ส่วนข่าวเริ่ม y=760 · ส่วนจุดเด่นเริ่ม y=1493
       ของเรา    ส่วนข่าวเริ่ม y=720 · ส่วนจุดเด่นเริ่ม y=1453
     ⇒ ของเขาต่ำกว่าเรา 40px ที่ 1280 = 3.125vw = 60px ที่ฐาน 1920
     56 + 60 = 116px = 6.0416667vw
     🔑 ความสูงของ section คงเดิม (1060) เนื้อหายังไม่ล้น:
        เดิมเนื้อหาจบที่ 846/1060 ⇒ ใหม่จบที่ 906/1060 ยังเหลือที่ว่าง 154px */
  .section--feature { height: 55.2083333vw; padding-top: 6.0416667vw; }  /* 1060 / 116 */
  .section--contact { height: 30vw;         padding-top: 3.59375vw;   }  /* 576 / 69 */

  /* ข่าว: กรอบสไลด์ซ้าย + รายการขวา */
  .news { display: flex; justify-content: center; gap: 1.5625vw; margin-top: 1.5625vw; }
  .news__slider { width: 46.0416667vw; margin: 0; }             /* 884px */
  /* กรอบ 884x509 padding 20/23 -> ช่องภาพ 838x470 */
  .news__slides { inset: 1.0416667vw 1.1979167vw; border-radius: .6vw; }
  .news__bullets { gap: .5vw; margin-top: .8vw; }
  .news__bullets img { width: 2.1354167vw; height: 2.1354167vw; }  /* 41px */

  .news__side { width: 38.4375vw; position: relative; }         /* 738px */
  .news__tabs { justify-content: flex-start; gap: .4166667vw; margin: 0 0 .8vw; }
  .news__tab { width: 8.4375vw; }                                /* 162px */
  .news__tab .lbl { font-size: .9375vw; }
  .news__list { width: 100%; margin: 0; }
  .news__row { min-height: 2.7vw; font-size: 1.0416667vw; padding: .4vw .8vw; gap: .8vw; }
  .news__row .tag, .news__row .d { font-size: .9375vw; }
  .news__more { width: 8.2291667vw; margin-top: 1vw; }           /* 158px */

  .menu4 { grid-template-columns: repeat(4, 1fr); gap: .9375vw; width: 88.0729167vw; margin-top: 1.5625vw; }
  .menu4 img { border-radius: .5vw; }

  /* ฟีเจอร์: การ์ดใหญ่ 930x521 */
  .feature__track { gap: 1.0416667vw; padding: 1.5625vw 6vw; }
  .feature__card { flex: 0 0 48.4375vw; border-radius: .8vw; }

  /* ---------- ฟีเจอร์เด่น: ค่าเดสก์ท็อป (ขาดไปทำให้บานทั้งบล็อก) ---------- */
  .feature { margin-top: 1.6666667vw; }   /* 32px — lg:mt-8 ของต้นแบบ */
  .feature__stage {
    /* 🔑 กรอบนอกของต้นแบบกว้าง 1443px ไม่ใช่เต็มจอ — เป็นตัวตัดว่าสไลด์ข้างโผล่มาแค่ไหน
       ถ้าปล่อย 100% สไลด์ข้างจะโผล่มาเต็มใบทั้งสองข้าง บล็อกเลยดูบานกว่าต้นแบบ
       (สเปก 26-web-landing-spec.md: featured wrapper 1443x584 = 75.15625vw overflow-hidden) */
    width: 75.15625vw;                 /* 1443px */
    height: 29.2708333vw;              /* 562px */
  }
  .feature__slide {
    width: 50.8333333vw; height: 29.2708333vw;              /* 976x562 */
    margin-left: -25.4166667vw;
  }
  .feature__art {
    top: 1.09375vw; left: 1.1458333vw;                       /* margin 21/22 */
    width: calc(100% - 2.2916667vw); height: calc(100% - 2.1875vw);
  }
  .feature__nav { width: 3.0208333vw; height: 6.0416667vw; font-size: 2.4vw; }
  .feature__nav--prev { left: 8vw; }
  .feature__nav--next { right: 8vw; }
  .feature__dots { gap: .5vw; margin-top: 1vw; }
  .feature__dots img { width: 2.6041667vw; height: 2.6041667vw; }   /* 50px */

  /* ---------- ติดตามเรา: กรอบแนวนอน 1292x269 ---------- */
  .contact__frame--m { display: none; }
  .contact__frame--d { display: block; }
  .contact { width: 67.2916667vw; margin-top: 1.5625vw; }
  .contact__inner { flex-direction: row; gap: 1.5vw; }
  .contact__icon { width: 9.21875vw; height: 9.2708333vw; }      /* 177x178 */
  .contact__icon img { border-radius: .78125vw; }
  .contact__community { gap: .8vw; }
  .contact__strip { width: 20.15625vw; }                          /* 387px */
  .contact__socials { gap: 1.0416667vw; }
  .contact__socials img { width: 5.9375vw; height: 5.9375vw; }    /* 114px */
  .contact__stores { flex-direction: column; gap: .9375vw; }      /* 18px */
  .contact__stores img { width: 13.90625vw; }                     /* 267px */

  /* ล็อกอิน */
  .auth { width: 36vw; margin: 3vw auto; padding: 1.6vw; border-radius: 1vw; }
  .auth__head h2 { font-size: 1.4583333vw; }
  .auth__note, .auth__field span { font-size: .8333333vw; }
  .auth__field input { padding: .8vw; border-radius: .5vw; font-size: 1vw; }
  .auth__submit { padding: .9vw; border-radius: .5vw; font-size: 1.0416667vw; }
  .auth__msg { font-size: .9375vw; }

  .footer { padding: 2.5vw 3vw; }
  .footer__in { font-size: .8333333vw; }
  .footer__marks img { height: 2.2vw; }

  .btn-top { right: 2vw; bottom: 3vw; width: 5.3125vw; }          /* 102px */

  .backdrop, .drawer { display: none; }
}

/* ---------- แถบลอยขวา: เดสก์ท็อปกว้าง >= 1280px ---------- */
@media (min-width: 1280px) {
  .rail {
    display: block; position: fixed; right: 0; top: 50%;
    transform: translateY(-50%); z-index: var(--z-rail);
    transition: transform .3s ease-in-out;
  }
  .rail.is-off { transform: translate(100%, -50%); }
  .rail__panel { position: relative; width: 12.5vw; }             /* 240px */
  .rail__panel > img { width: 100%; height: auto; }
  .rail__tab {
    position: absolute; left: 0; top: 30.7%;   /* กึ่งกลางปุ่มอยู่ที่ 30.7% ของความสูงแผง */
    transform: translate(-100%, -50%);
    width: 2.1875vw;                                              /* 42px */
    aspect-ratio: 84 / 242;                                       /* สัดส่วนของแถบพับ */
    display: block; padding: 0;
  }
  .rail__tab img { width: 100%; height: 100%; object-fit: contain; }
  .rail__body {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center;
    padding-top: 1.6666667vw;                                     /* 32px */
  }
  /* ตราเติมเงิน 214x214 + แสงวับเหมือนการ์ดบน hero */
  .rail__badge { position: relative; width: 11.1458333vw; height: 11.1458333vw; }
  .rail__badge img { width: 100%; height: 100%; object-fit: contain; }
  .rail__badge .shine {
    position: absolute; inset: 0;
    animation: shine 1.5s linear 2s infinite;
    -webkit-mask-image: linear-gradient(153deg, transparent 45%, #000 50%, transparent 55%);
            mask-image: linear-gradient(153deg, transparent 45%, #000 50%, transparent 55%);
    -webkit-mask-size: 300% 200%; mask-size: 300% 200%;
    filter: brightness(1.7);
  }
  /* ปุ่มโหลด 3 อัน 212x65 gap 4 */
  .rail__stores { display: flex; flex-direction: column; gap: .2083333vw; margin-top: 1.7708333vw; }
  .rail__stores img { width: 11.0416667vw; height: 3.3854167vw; object-fit: contain; }
  .rail__stores a { transition: transform .2s ease, filter .2s ease; }
  .rail__stores a:hover { transform: translateY(-2px); filter: brightness(1.08); }
  /* โซเชียล 4 อัน 49x49 gap 4 */
  .rail__socials { display: flex; gap: .2083333vw; margin-top: .4166667vw; }
  .rail__socials img { width: 2.5520833vw; height: 2.5520833vw; object-fit: contain; }
  .rail__socials a { transition: transform .2s ease; }
  .rail__socials a:hover { transform: scale(1.1); }
}

/* ============================================================
   โหมดดูเทียบเลย์เอาต์ (?art=ref) — สลับพื้นหลังไปชุดอ้างอิง
   ใช้ระหว่างพัฒนาเท่านั้น ค่าปกติคือ placeholder ของเรา
   ============================================================ */
html[data-art="ref"] .layout::before { background-image: url("https://thanthupoke.online/assets/img-ref/bg-page-m.png"); }
@media (min-width: 768px) {
  html[data-art="ref"] .layout::before { background-image: url("https://thanthupoke.online/assets/img-ref/bg-page.png"); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   ป๊อปอัปชวนเข้ากลุ่ม Facebook  (เพิ่ม 4 ก.ย. 2569)
   มาร์กอัปถูกฝังโดย public_web/site.php ตอนเสิร์ฟ — ไม่มีในไฟล์ที่ทีมออกแบบเปิด
   ไม่มีกล่อง = ผู้ดูแลปิดอยู่ / ยังไม่ได้ตั้งลิงก์กลุ่ม / ยังไม่ได้ใส่ของรางวัล

   🔴 กฎ Intrusive Interstitial ของ Google บังคับเฉพาะ "มือถือ"
      ⇒ จอ < 768px ต้องเป็นแผ่นเลื่อนขึ้นจากล่าง ให้เนื้อหาด้านบนยังมองเห็น
        ห้ามเปลี่ยนเป็นกล่องกลางจอเต็มโดยไม่รู้ว่าแลกกับอันดับค้นหาบนมือถือ
      จอ >= 768px เป็นกล่องกลางจอได้ กฎนี้ไม่ครอบคลุมเดสก์ท็อป

   🔴 ห้ามล็อกการเลื่อนหน้า (overflow:hidden บน body) โดยเด็ดขาด
      เนื้อหาต้องยังเลื่อนอ่านได้ทั้งที่ป๊อปอัปเปิดอยู่ — เป็นเงื่อนไขที่ทำให้
      กล่องนี้นับเป็น "กินพื้นที่พอสมควร" ไม่ใช่ "บังเนื้อหา"

   ทุกอย่างเป็น position:fixed ⇒ ไม่ดันเนื้อหา คะแนน CLS ไม่เสีย
   ============================================================ */
.gpop {
  position: fixed; inset: 0; z-index: 2100;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 9px;
  background: #00000073;
  /* กล่องอยู่ล่าง แต่พื้นหลังคลุมทั้งจอเพื่อให้แตะที่ว่างแล้วปิดได้ */
}
.gpop[hidden] { display: none; }

.gpop__box {
  position: relative; width: 100%; max-width: 340px;
  color: #fff; text-align: center;
  border: 2px solid var(--c-yellow); border-radius: 16px;
  padding: 14px 13px 11px;
  /* แผ่นการ์ดสีน้ำเงินลายทแยงมีดาว — ทรงเดียวกับ card-plate.png ที่เว็บใช้
     วาดด้วย CSS ล้วนเพื่อไม่ต้องโหลดรูปพื้นหลังเพิ่มอีกไฟล์ */
  background:
    repeating-linear-gradient(115deg, #ffffff0f 0 2px, transparent 2px 9px),
    radial-gradient(120% 85% at 50% 8%, #2f6ff0 0%, #154bb8 42%, #0a2a76 100%);
  box-shadow: 0 16px 44px #000000a6, inset 0 0 22px #7fe3ff26, 0 0 0 3px #7fe3ff1f;
  max-height: calc(100vh - 24px); overflow-y: auto;
  animation: gpop-up .22s ease-out both;
}
/* ประกายดาวเล็ก ๆ บนแผ่นการ์ด */
.gpop__box::before {
  content: ""; position: absolute; inset: 0; border-radius: 14px; pointer-events: none;
  background:
    radial-gradient(1.6px 1.6px at 14% 18%, #fff9 50%, transparent),
    radial-gradient(1.4px 1.4px at 78% 12%, #fff8 50%, transparent),
    radial-gradient(1.8px 1.8px at 88% 62%, #fff7 50%, transparent),
    radial-gradient(1.3px 1.3px at 24% 74%, #fff7 50%, transparent),
    radial-gradient(1.5px 1.5px at 55% 90%, #fff6 50%, transparent);
}
.gpop__box > * { position: relative; }

@keyframes gpop-up { from { opacity: 0; transform: translateY(14px); } }

/* 🪤 ปุ่มปิดต้องอยู่ **ในกล่อง** ห้ามวางล้ำออกนอกด้วยค่าติดลบ
   กล่องมี overflow-y:auto (กันเนื้อหายาวเกินจอเตี้ย) ซึ่งทำให้ overflow-x เป็น auto ตามไปด้วย
   ⇒ อะไรที่ล้ำออกไปจะสร้าง "แถบเลื่อนแนวนอน" ขึ้นมาในกล่องทันที
   วัดจริงตอนทดสอบ: right:-12px ทำให้ scrollWidth 348 > clientWidth 336
   (ป๊อปอัปโค้ดของขวัญเดิมก็วางปุ่มไว้ในกล่องด้วยเหตุผลเดียวกัน) */
.gpop__x {
  position: absolute; top: 6px; right: 6px; width: 27px; height: 27px;
  border-radius: 50%; background: #E2453B; border: 2px solid #fff; color: #fff;
  font-size: 16px; line-height: 1; cursor: pointer; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px #0007; z-index: 3; padding: 0;
}
.gpop__x:hover { filter: brightness(1.1); }
.gpop__logo { width: 112px; height: auto; margin: -2px auto 5px; display: block;
              filter: drop-shadow(0 3px 6px #0006); }
.gpop__t { margin: 0 0 2px; font-size: 16px; font-weight: 800; color: var(--c-yellow);
           text-shadow: 0 2px 0 #0a2a76, 0 0 14px #ffe22140; line-height: 1.3; }
.gpop__d { margin: 0 0 9px; font-size: 11.5px; color: #D8E8FF; line-height: 1.45; }

/* ตารางของรางวัล — ทรงเดียวกับช่องไอเทมในเกม 3 คอลัมน์ */
.gpop__rw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 9px; }
.gpop__i {
  position: relative; padding: 6px 3px 4px; border-radius: 9px;
  background: linear-gradient(180deg, #0b2a6bcc, #08205199);
  border: 1px solid #ffffff2e; box-shadow: inset 0 1px 0 #ffffff1f;
}
.gpop__im { width: 36px; height: 36px; display: block; margin: 0 auto;
            object-fit: contain; filter: drop-shadow(0 2px 3px #0006); }
.gpop__n {
  position: absolute; right: 3px; top: 29px;
  background: #081736e8; border: 1px solid #ffffff33; color: #fff;
  font-size: 10.5px; font-weight: 800; line-height: 1;
  padding: 2.5px 5px; border-radius: 6px; text-shadow: 0 1px 0 #000;
}
.gpop__l {
  display: block; margin-top: 4px; font-size: 9.5px; color: #BDD6FF; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.gpop__note {
  margin: 0 0 9px; padding-top: 9px; border-top: 1px solid #ffffff2b;
  font-size: 11px; color: #D8E8FF; line-height: 1.45;
}

/* ปุ่มเป็นสีน้ำเงิน Facebook + ไอคอนกลุ่มของเว็บเอง
   ⇒ อ่านแล้วรู้ทันทีว่าลิงก์ไป Facebook จริง ไม่ใช่ปุ่ม "รับรางวัล" แบบโฆษณาหลอก */
.gpop__cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: linear-gradient(180deg, #2B88FF, #1877F2); color: #fff;
  font-weight: 800; font-size: 13.5px; text-decoration: none;
  border-radius: 10px; padding: 10px 12px; border: 0; cursor: pointer;
  box-shadow: 0 4px 0 #0F5FC7, 0 8px 18px #1877f24d;
}
.gpop__cta img { width: 21px; height: 21px; border-radius: 5px; flex: none; }
.gpop__cta:hover { filter: brightness(1.06); }
.gpop__cta:active { transform: translateY(2px); box-shadow: 0 2px 0 #0F5FC7; }

.gpop__later {
  display: block; margin: 8px auto 0; background: none; border: 0;
  color: #ffffff73; font-size: 11px; text-decoration: underline; cursor: pointer;
  font-family: inherit; padding: 2px 6px;
}
.gpop__later:hover { color: #fff; }

/* เดสก์ท็อป — กล่องกลางจอ (กฎ Intrusive Interstitial ไม่ครอบคลุมจอนี้) */
@media (min-width: 768px) {
  .gpop { align-items: center; padding: 20px; background: var(--c-scrim); }
  .gpop__box { padding: 16px 15px 13px; max-height: calc(100vh - 40px); }
  .gpop__logo { width: 132px; }
  .gpop__t { font-size: 17.5px; }
  .gpop__d { font-size: 12px; margin-bottom: 11px; }
  .gpop__rw { gap: 7px; margin-bottom: 11px; }
  .gpop__im { width: 40px; height: 40px; }
  .gpop__n { top: 32px; }
  .gpop__note { font-size: 11.5px; margin-bottom: 10px; }
  .gpop__cta { font-size: 14.5px; padding: 11px 12px; }
}

input, textarea, select, button { font-family: "GameFont"; }
