/* WM356 theme — glue CSS สำหรับส่วนที่ bridge สร้างเอง (เสริม /wm356/style.css) */

/* ตัวแปรที่ footer ธีม pop777 เดิม (wm356-footer-pop777.css) อ้างถึง — map เป็นโทน wm356 */
:root {
  --background: #0f0f0f;
  --foreground: #fafafa;
  --surface: #1d1d1d;
  --gold: #ecbd7b;
  --gold-light: #f2cf7f;
  --gold-pale: #e0c587;
  --gold-muted: rgba(236, 189, 123, .14);
  --gold-border: rgba(236, 189, 123, .24);
  --shadow: 0 18px 42px rgba(0, 0, 0, .42);
}

/* กันหน้าเลื่อนแนวนอน (template บางส่วนกว้างเกินจอ) */
html, body { overflow-x: hidden; max-width: 100%; }

/* ── กรอบ focus ────────────────────────────────────────────────────────────
   /wm356/style.css:219 ของ template ตั้ง `button:focus { outline: 5px auto -webkit-focus-ring-color }`
   ซึ่งเป็นกรอบ focus ดีฟอลต์ของเบราว์เซอร์ และ `auto` ใช้สีตามตัวอักษรของปุ่มนั้น
   พอปุ่มในแถบล่างเปลี่ยนเป็นสีทองตอนกด กรอบเลยกลายเป็นสี่เหลี่ยมทองค้างอยู่หลังคลิก

   แก้แบบไม่ทิ้งการเข้าถึงด้วยคีย์บอร์ด:
     - คลิก/แตะ (:focus แต่ไม่ใช่ :focus-visible) = ไม่มีกรอบ
     - กด Tab (:focus-visible) = มีกรอบทองมนตามธีม บอกตำแหน่งให้คนที่ใช้คีย์บอร์ด
   ห้ามใส่ `outline: none` ลอย ๆ เพราะคนที่ใช้คีย์บอร์ดจะหาไม่เจอว่าโฟกัสอยู่ตรงไหน
   (เบราว์เซอร์เก่าที่ไม่รู้จัก :focus-visible จะทิ้งกฎนี้ทั้งบล็อก = กลับไปเป็นพฤติกรรมเดิม ปลอดภัย) */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(236, 189, 123, .85);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ── Utility ของ Bootstrap ที่ markup ของ template ใช้ (ธีมนี้ไม่ได้โหลด Bootstrap) ── */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.w-100 { width: 100% !important; }
.img-fluid { max-width: 100%; height: auto; }
@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
}

/* ── ปุ่มพื้นฐาน (ไม่ได้โหลด Bootstrap ในธีมนี้ จึงนิยาม .btn เอง) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border: 1px solid transparent; border-radius: 8px;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.2;
  cursor: pointer; text-align: center; text-decoration: none; transition: .18s;
  -webkit-appearance: none; appearance: none;
}
.btn:hover { text-decoration: none; opacity: .92; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-block, .btn.btn-block { display: flex; width: 100%; }
.btn-primary, .btn.-submit, .btn.btn-primary {
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
  color: #241a06 !important; border-color: transparent;
}
.btn-primary:hover, .btn.-submit:hover { color: #241a06 !important; }
.btn-secondary { background: #333; color: #fafafa; border-color: #3b3b3c; }
.btn-danger { background: linear-gradient(180deg, #f22662, #c31b4e); color: #fff; }
.btn-success { background: radial-gradient(150% 100% at 50% 0, #4cab89 0, #225442 100%); color: #fff; }
.btn.-submit { margin-top: 4px; }

/* โลโก้เว็บจริงใน header (template เผื่อ 440x104) */
.wm-site-logo { max-height: 64px; width: auto; object-fit: contain; }

/* แบนเนอร์แบบหมุนเอง */
/* ══════════════════════════════════════════════════════════
   จองพื้นที่ให้ส่วนที่ JS วาดทีหลัง — ลด Cumulative Layout Shift
   trace ของจริงชี้ว่า CLS = 0.3175 (เกณฑ์ "แย่" คือ > 0.25)
   ก้อนใหญ่สุด 0.213 เกิดตอน ~4.85 วิ ซึ่งเป็นจังหวะที่ lobby/bigwin
   วาดเสร็จแล้วดันเนื้อหาข้างล่างลงไป 116px
   วิธีแก้: กันพื้นที่ไว้ล่วงหน้าด้วย min-height ตั้งแต่ HTML แรก
   ══════════════════════════════════════════════════════════ */
#wmProviderArea:empty { min-height: 240px; }
#wmGameGrid:empty { min-height: 0; }
/* แถบ Big Win / เกมล่าสุด ถูกซ่อนไว้จนกว่าข้อมูลจะมา — จองความสูงไว้ก่อน
   ถ้าไม่มีข้อมูลจริงค่อยยุบ (เกิดครั้งเดียวและเป็นการเลื่อนขึ้น ซึ่งไม่นับเป็น CLS หนัก) */
.wm-bigwin[hidden]:not(.-no-data) { display: block !important; visibility: hidden; min-height: 108px; margin-bottom: 16px; }
.wm-recent[hidden]:not(.-no-data) { display: block !important; visibility: hidden; min-height: 122px; }
.wm-bigwin[hidden] *, .wm-recent[hidden] * { visibility: hidden; }
/* -no-data = ถามเซิร์ฟเวอร์แล้วไม่มีข้อมูลจริง → ยุบทิ้ง ไม่ทิ้งช่องว่างค้างไว้
   (ถ้าไม่มีคลาสนี้แปลว่ายังโหลดอยู่ ต้องกันที่ไว้ก่อนกัน layout กระโดด) */
/* สไลด์แบนเนอร์: บอกสัดส่วนไว้ก่อน เบราว์เซอร์จะได้กันที่ก่อนรูปโหลดเสร็จ */
.wm-slide img, .wm-banner-static .wm-banner-slide img { aspect-ratio: 1200 / 400; }

.wm-banner-static { position: relative; }
.wm-banner-static .wm-banner-slide { display: none; }
.wm-banner-static .wm-banner-slide.-active { display: block; animation: wmFade .6s ease; }
.wm-banner-static .wm-banner-slide img { width: 100%; max-width: 1200px; margin: 0 auto; border-radius: 8px; display: block; }
@keyframes wmFade { from { opacity: 0; } to { opacity: 1; } }

/* ── Marquee (ข้อความวิ่ง ตั้งค่าจาก BO) ── */
.wm-marquee {
  display: flex; align-items: center; gap: 10px;
  max-width: 1280px; margin: 0 auto; padding: 7px 14px;
  background: linear-gradient(90deg, rgba(236, 189, 123, .12), rgba(15, 15, 15, .2));
  border-bottom: 1px solid rgba(236, 189, 123, .18);
  overflow: hidden;
}
/* วนแบบไม่มีรอยต่อ: เลื่อนไปเท่ากับ "ความกว้างข้อความ 1 ชุด + ระยะห่าง" พอดีเป๊ะ
   (ของเดิมใช้ -50% ซึ่งไม่เท่ากับ span+gap จึงกระตุกทุกรอบ)
   ค่า --wm-mq-shift วัดจริงด้วย JS ใน tuneMarquee() */
.wm-marquee .-track {
  display: flex; gap: var(--wm-mq-gap, 60px); white-space: nowrap;
  will-change: transform;
  animation: wmMarquee 26s linear infinite;
}
.wm-marquee .-track span { color: #f2e3c6; font-size: 13px; flex: 0 0 auto; }
.wm-marquee:hover .-track { animation-play-state: paused; }
@keyframes wmMarquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--wm-mq-shift, 50%)), 0, 0); }
}

/* ── ปุ่มฝาก-ถอน (mobile CTA + ในโมดัล) ── */
.wm-mobile-cta, .wm-account-cta {
  display: none; gap: 10px; max-width: 1280px; margin: 10px auto 4px; padding: 0 12px;
}
.wm-account-cta { display: flex; margin: 0 0 14px; padding: 0; }
.wm-cta {
  position: relative; overflow: hidden;
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 14px; padding: 11px 10px; cursor: pointer;
  font-family: inherit; color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.wm-cta i { font-size: 19px; }
/* ไอคอน png ชุดเดียวกับเมนู hamburger (ic-account-deposit/withdraw) */
.wm-cta .-ic {
  width: 34px; height: 34px; object-fit: contain; display: block; flex: 0 0 34px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .38));
}
.wm-cta span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.wm-cta b { font-size: 16px; font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .28); }
.wm-cta small { font-size: 11px; opacity: .85; }
.wm-cta.-deposit { background: linear-gradient(180deg, #3ad976 0%, #37c26a 45%, #16803f 100%); }
.wm-cta.-withdraw { background: linear-gradient(180deg, #ff7d4d 0%, #f2683c 45%, #b52a18 100%); }
.wm-cta:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .38); }
.wm-cta:active { transform: translateY(1px) scale(.99); }
/* แสงกวาดผ่านปุ่ม — เรียกสายตาลูกค้าไปที่ปุ่มฝาก/ถอน */
.wm-cta::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 38%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .42) 50%, transparent 100%);
  transform: translateX(0) skewX(-18deg); pointer-events: none;
  animation: wmCtaShine 3.6s ease-in-out infinite;
  will-change: transform;
}
.wm-cta.-withdraw::after { animation-delay: 1.2s; }
/* animate transform ไม่ใช่ left — left บังคับคิด layout ใหม่ทุกเฟรม
   500% = ระยะเดิม 190% ของความกว้างปุ่ม ÷ ความกว้าง ::after ที่ 38% */
@keyframes wmCtaShine {
  0%, 62% { transform: translateX(0) skewX(-18deg); }
  100%    { transform: translateX(500%) skewX(-18deg); }
}
@media (prefers-reduced-motion: reduce) { .wm-cta::after { animation: none; } }

/* ── Slider แบนเนอร์ (core wm356 markup) ── */
.wm-slider { position: relative; overflow: hidden; max-width: 1200px; margin: 0 auto; }
.wm-slider-track { display: flex; transition: transform .45s cubic-bezier(.4, 0, .2, 1); }
.wm-slider .wm-slide { flex: 0 0 100%; max-width: 100%; }
.wm-slider .wm-slide img { width: 100%; display: block; border-radius: 10px; }
.wm-slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(236, 189, 123, .45);
  background: rgba(15, 15, 15, .6); color: #ecbd7b; cursor: pointer; opacity: 0; transition: .2s;
}
.wm-slider:hover .wm-slider-arrow { opacity: 1; }
.wm-slider-arrow.-prev { left: 10px; }
.wm-slider-arrow.-next { right: 10px; }
.wm-slider-dots { display: flex; justify-content: center; gap: 7px; margin-top: 10px; }
.wm-slider-dot {
  width: 24px; height: 5px; border-radius: 3px; border: 0; padding: 0; cursor: pointer;
  background: rgba(250, 250, 250, .3); transition: .2s;
}
.wm-slider-dot.-active { background: #ecbd7b; width: 34px; }

/* ── Popup banner (จาก BO) ── */
.wm-popup-overlay {
  position: fixed; inset: 0; z-index: 1500; display: none;
  align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, .78);
}
.wm-popup-overlay.show { display: flex; animation: wmBackdropIn .22s ease-out both; }
/* กล่องลอยขึ้น+ขยายเข้า (ยืมคีย์เฟรมพื้นหลังของโมดัลมาใช้ซ้ำ)
   ขาปิดต้องพึ่ง JS เหมือนโมดัล เพราะ display ทรานซิชันไม่ได้ */
.wm-popup-overlay.show .wm-popup-box { animation: wmPopupIn .28s cubic-bezier(.2, .9, .3, 1.08) both; }
.wm-popup-overlay.-closing { animation: wmBackdropOut .18s ease-in both; }
.wm-popup-overlay.-closing .wm-popup-box { animation: wmPopupOut .18s ease-in both; }
@keyframes wmPopupIn {
  from { opacity: 0; transform: translateY(14px) scale(.94); }
  to   { opacity: 1; transform: none; }
}
@keyframes wmPopupOut {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(8px) scale(.97); }
}
.wm-popup-box {
  position: relative; max-width: 420px; width: 100%; text-align: center;
  background: #1a1a1a; border: 1px solid rgba(236, 189, 123, .3); border-radius: 14px;
  padding: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .7);
}
.wm-popup-title { color: #ecbd7b; font-weight: 600; margin-bottom: 10px; }
/* รูปเป็น lazy และอยู่ใต้ display:none จึง "เพิ่งเริ่มโหลด" ตอนกล่องเปิด
   ปล่อยไว้จะกระตุกโผล่ทีหลังกล่อง — JS ติด -fade ให้ตอนเปิด แล้ว -in ตอนโหลดเสร็จ
   ไม่ตั้ง opacity:0 เป็นค่าเริ่มต้นใน CSS เพื่อไม่ให้รูปหายถ้า JS ไม่ทำงาน */
.wm-popup-img { width: 100%; border-radius: 10px; display: block; }
.wm-popup-img.-fade { animation: wmPopupImgIn .32s ease-out both; }
@keyframes wmPopupImgIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .wm-popup-overlay.show, .wm-popup-overlay.show .wm-popup-box,
  .wm-popup-overlay.-closing, .wm-popup-overlay.-closing .wm-popup-box,
  .wm-popup-img.-fade { animation: none; }
}
.wm-popup-close {
  position: absolute; top: -12px; right: -12px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(236, 189, 123, .5); background: #1a1a1a; color: #ecbd7b; cursor: pointer; z-index: 2;
}
.wm-popup-dismiss {
  margin-top: 12px; background: none; border: 0; color: #9d9d9d;
  font-family: inherit; font-size: 12px; text-decoration: underline; cursor: pointer;
}

/* ── ตัวเลือกธนาคาร (หน้าสมัคร) ── */
.wm-bank-picker {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px; max-height: 260px; overflow-y: auto; padding: 4px;
}
.wm-bank-opt {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: #272727; border: 1px solid #3b3b3c; border-radius: 8px;
  padding: 9px 5px; cursor: pointer; font-family: inherit; transition: .15s;
}
.wm-bank-opt img { width: 34px; height: 34px; object-fit: contain; border-radius: 6px; }
.wm-bank-opt span { color: #cfcfcf; font-size: 11px; text-align: center; line-height: 1.2; }
.wm-bank-opt:hover { border-color: rgba(236, 189, 123, .6); }
.wm-bank-opt.-active {
  border-color: #ecbd7b; background: rgba(236, 189, 123, .12);
  box-shadow: 0 0 0 1px rgba(236, 189, 123, .5);
}
.wm-bank-opt.-active span { color: #ecbd7b; font-weight: 600; }

/* โลโก้ธนาคาร/เกตเวย์ — กระเบื้องแก้ว (glass tile)
   ไฟล์ไอคอนเป็นแผ่นสีแบรนด์เต็มรูปอยู่แล้ว ห้ามใส่พื้นขาว/padding ทับ
   ring+gloss ต้องอยู่บน pseudo-element ของ span ครอบ เพราะ <img> ใส่ pseudo-element ไม่ได้
   และ inset shadow บน img จะถูกเนื้อรูปทับจนมองไม่เห็น */
.wm-bank-ic {
  position: relative; display: inline-flex; flex: none;
  width: 26px; height: 26px; border-radius: 7px; overflow: hidden;
  margin-right: 8px; vertical-align: middle;
  background: rgba(255, 255, 255, .08); /* กันไอคอน fallback (bank.svg พื้นใส) จมหายบนพื้นมืด */
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
.wm-bank-ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wm-bank-ic::before,
.wm-bank-ic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.wm-bank-ic::before { border: 1px solid rgba(255, 255, 255, .25); }
.wm-bank-ic::after {
  background: linear-gradient(150deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, .08) 38%, rgba(255, 255, 255, 0) 56%);
}
.wm-account-row b .wm-bank-ic { margin-right: 6px; }
/* ขนาดเล็กบนแท็บ/chip/หัวข้อฝาก (เช่นโลโก้ gateway) */
.wm-bank-ic.-sm { width: 18px; height: 18px; border-radius: 5px; margin-right: 4px; }

/* ── แถบกิจกรรมเหนือสไลด์ (pill แบบ toy777) ── */
.wm-activity-bar {
  width: 100%; padding: 12px 10px 10px; position: relative;
  background: linear-gradient(180deg, rgba(10, 10, 12, .92), rgba(15, 15, 15, .55));
}
/* ขอบจาง ๆ ซ้าย-ขวา บอกว่ายังมีปุ่มต่อไปอีก (JS สลับคลาส -fade-l / -fade-r) */
.wm-activity-bar::before,
.wm-activity-bar::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 56px; z-index: 4;
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.wm-activity-bar::before { left: 0; background: linear-gradient(90deg, rgba(10, 10, 12, .96), rgba(10, 10, 12, 0)); }
.wm-activity-bar::after { right: 0; background: linear-gradient(270deg, rgba(10, 10, 12, .96), rgba(10, 10, 12, 0)); }
.wm-activity-bar.-fade-l::before { opacity: 1; }
.wm-activity-bar.-fade-r::after { opacity: 1; }
/* เลื่อนแนวนอนได้ทุกขนาดจอ; margin auto บนลูกตัวแรก/ตัวท้าย = จัดกลางเมื่อไม่ล้น
   แต่ไม่โดนตัดหัวแถวเวลาล้น (ต่างจาก justify-content: center) */
.wm-activity-inner {
  display: flex; gap: 12px; max-width: 1280px; margin: 0 auto;
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; scroll-behavior: smooth; padding: 4px 2px 6px;
}
.wm-activity-inner::-webkit-scrollbar { display: none; }
.wm-activity-inner > :first-child { margin-left: auto; }
.wm-activity-inner > :last-child { margin-right: auto; }

/* ปุ่มลูกศรเลื่อนแถบ */
.wm-activity-nav {
  position: absolute; top: 50%; margin-top: -18px; z-index: 6;
  width: 36px; height: 36px; padding: 0; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 14px; color: #ecbd7b;
  background: linear-gradient(180deg, rgba(38, 38, 46, .97), rgba(14, 14, 18, .97));
  border: 1px solid rgba(236, 189, 123, .55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .1);
  transition: opacity .2s, transform .2s, background .2s, color .2s;
}
.wm-activity-nav.-prev { left: 6px; }
.wm-activity-nav.-next { right: 6px; }
.wm-activity-nav:hover { background: linear-gradient(180deg, #f3d190, #d9a94f); color: #241a06; }
.wm-activity-nav:active { transform: scale(.9); }
.wm-activity-nav.-off { opacity: 0; pointer-events: none; transform: scale(.6); }
/* กะพริบบอกใบ้ครั้งแรกว่า "เลื่อนได้นะ" */
.wm-activity-nav.-hint { animation: wmNavHint 1.5s ease-in-out infinite; }
/* วงแหวนกระเพื่อม — ของเดิมยัด box-shadow ไว้ใน keyframes ซึ่ง repaint ทุกเฟรม
   ย้ายมาเป็น ::after วงแหวนขนาดคงที่ที่ scale + จาง (transform/opacity ล้วน)
   .75s = ครึ่งรอบของ wmNavHint จึงกระเพื่อม 2 ครั้งต่อรอบเท่าของเดิม */
.wm-activity-nav.-hint::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(236, 189, 123, .55);
  animation: wmNavHintRing .75s ease-in-out infinite;
}
@keyframes wmNavHint {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(5px); }
}
@keyframes wmNavHintRing {
  from { transform: scale(1);   opacity: .6; }
  to   { transform: scale(1.5); opacity: 0; }
}

.wm-activity-pill {
  position: relative; overflow: hidden;
  flex: 0 0 auto; display: flex; align-items: center; gap: 9px;
  padding: 7px 18px 7px 10px; cursor: pointer; font-family: inherit;
  background: linear-gradient(180deg, #1b1b22 0%, #101014 100%);
  border: 1px solid #4a4a55; border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 3px 10px rgba(0, 0, 0, .45);
  transition: border-color .18s, box-shadow .18s, transform .18s; text-align: left;
}
/* แสงกวาดผ่านเป็นระลอก (ตั้ง delay ไล่ทีละปุ่มด้านล่าง) */
/* หมายเหตุ perf: กวาดด้วย transform ไม่ใช่ left — ปุ่ม 9 อันวิ่ง animation ตลอดเวลา
   ถ้าขยับ left เบราว์เซอร์ต้องคำนวณ layout ใหม่ทุกเฟรม (ของเดิมในธีมอย่าง wmCtaShine
   ยังใช้ left อยู่ แต่มีแค่ปุ่มเดียว) ระยะ 444% = 200% ของความกว้างปุ่ม ÷ 45% ของแถบแสง */
.wm-activity-pill::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%;
  transform: skewX(-18deg); pointer-events: none; z-index: 1;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .14) 42%, rgba(236, 189, 123, .3) 58%, rgba(255, 255, 255, 0));
  animation: wmPillSheen 6s ease-in-out infinite;
}
@keyframes wmPillSheen {
  0%, 74% { transform: translateX(0) skewX(-18deg); }
  94%, 100% { transform: translateX(444%) skewX(-18deg); }
}
.wm-activity-pill:hover {
  border-color: #ecbd7b; transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 18px rgba(236, 189, 123, .28);
}
.wm-activity-pill:active { transform: translateY(-1px) scale(.95); }
.wm-activity-pill img {
  width: 38px; height: 38px; object-fit: contain; position: relative; z-index: 2;
  animation: wmPillIcon 3.6s ease-in-out infinite;
}
@keyframes wmPillIcon {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(-5deg); }
}
.wm-activity-pill:hover img { animation: wmPillIconPop .7s ease-in-out infinite; }
@keyframes wmPillIconPop {
  0%, 100% { transform: scale(1) rotate(-7deg); }
  50% { transform: scale(1.2) rotate(7deg); }
}
.wm-activity-pill .-txt { display: flex; flex-direction: column; line-height: 1.15; position: relative; z-index: 2; }
.wm-activity-pill .-txt b { color: #fafafa; font-size: 14px; font-weight: 600; white-space: nowrap; transition: color .18s; }
.wm-activity-pill .-txt small { color: #9d9d9d; font-size: 11px; white-space: nowrap; }
.wm-activity-pill:hover .-txt b { color: #ecbd7b; }
/* ไล่จังหวะทีละปุ่ม ให้แสง/ไอคอนขยับเป็นคลื่น ไม่ใช่พร้อมกันทั้งแถว */
.wm-activity-pill:nth-child(1) { --wm-d: 0s; }
.wm-activity-pill:nth-child(2) { --wm-d: .22s; }
.wm-activity-pill:nth-child(3) { --wm-d: .44s; }
.wm-activity-pill:nth-child(4) { --wm-d: .66s; }
.wm-activity-pill:nth-child(5) { --wm-d: .88s; }
.wm-activity-pill:nth-child(6) { --wm-d: 1.1s; }
.wm-activity-pill:nth-child(7) { --wm-d: 1.32s; }
.wm-activity-pill:nth-child(8) { --wm-d: 1.54s; }
.wm-activity-pill:nth-child(9) { --wm-d: 1.76s; }
.wm-activity-pill::before { animation-delay: var(--wm-d, 0s); }
.wm-activity-pill img { animation-delay: var(--wm-d, 0s); }
.wm-activity-pill:hover img { animation-delay: 0s; }

@media (max-width: 1100px) {
  .wm-activity-nav { width: 30px; height: 30px; margin-top: -15px; font-size: 12px; }
  .wm-activity-nav.-prev { left: 2px; }
  .wm-activity-nav.-next { right: 2px; }
  .wm-activity-bar::before, .wm-activity-bar::after { width: 40px; }
  .wm-activity-pill { padding: 6px 14px 6px 8px; }
  .wm-activity-pill img { width: 32px; height: 32px; }
  .wm-activity-pill .-txt b { font-size: 13px; }
  .wm-activity-pill .-txt small { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .wm-activity-pill::before,
  .wm-activity-pill img,
  .wm-activity-pill:hover img,
  .wm-activity-nav.-hint { animation: none; }
  .wm-activity-nav.-hint::after { display: none; }
}

/* ── Lobby (สไตล์ toy777): 2 สถานะ — .-home / .-selected ── */
.wm-lobby-core { max-width: 1280px; margin: 0 auto 40px; padding: 0 12px; }

/* กล่องหมวด — ปล่อยให้ CSS เดิมของ wm356 คุมทั้งหมด (x-category-total-game -v2 / x-category-button)
   ไม่ override อะไรเลย เพื่อให้หน้าตาเหมือนต้นฉบับเป๊ะ */

/* ฝั่งรายการเกม/ค่าย */
.wm-lobby-core .-games-list-container { min-width: 0; }
.wm-lobby-core .-game-title-wrapper {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 6px 0 16px; flex-wrap: wrap;
}
.wm-lobby-core .-game-title { margin: 0; color: #fafafa; font-size: 24px; font-weight: 700; }
.wm-lobby-core .-game-title .-sub-title { color: #fafafa; font-weight: 700; }
.wm-lobby-core .-game-search-inner { flex: 0 0 230px; max-width: 100%; }
.wm-lobby-core .x-search-component { position: relative; display: flex; align-items: center; }
.wm-lobby-core .-form-search-input {
  width: 100%; background: #1e1e22; border: 1px solid #3b3b3c; border-radius: 18px;
  color: #fafafa; padding: 8px 40px 8px 16px; font-size: 14px; outline: none; font-family: inherit;
}
.wm-lobby-core .-form-search-input:focus { border-color: #ecbd7b; }
/* ช่องค้นหาเป็น input-group ของ Bootstrap (template) ซึ่งบังคับตัดมุมขวาของ input ทิ้ง
   + วาดปุ่มเป็นบล็อกพื้นทองมุม 8px ลอยทับขอบมน → ทับกลับให้เป็นไอคอนเล็กในช่องแทน
   (ต้องเจาะจงถึง .x-search-component.input-group เพราะ selector ของ template แรงกว่า) */
.wm-lobby-core .x-search-component.input-group .-form-search-input {
  border-radius: 18px;
}
.wm-lobby-core .input-group-prepend {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  height: auto; align-items: center;
}
.wm-lobby-core .x-search-component.input-group .-text-group-wrapper {
  background: none; border: 0; padding: 0; border-radius: 0; height: auto;
}
.wm-lobby-core .x-search-component.input-group .-btn-search {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border-radius: 50%;
  background: none; border: 0; color: #9d9d9d; cursor: pointer; transition: .15s;
}
.wm-lobby-core .x-search-component.input-group .-btn-search:hover {
  background: rgba(236, 189, 123, .14); color: #ecbd7b;
}
/* template วาดไอคอนด้วย background-clip:text (สีเข้มตายตัว 20px) — คืนให้ใช้สีของปุ่ม */
.wm-lobby-core .x-search-component.input-group .-btn-search .fa-search {
  font-size: 15px; line-height: 1; background: none;
  -webkit-background-clip: border-box; background-clip: border-box;
  -webkit-text-fill-color: currentColor;
}

/* กริดการ์ด (ค่าย/เกม) */
#wmProviderArea, #wmGameGrid { display: flex; flex-flow: row wrap; gap: 16px 12px; padding: 0; margin: 0; list-style: none; }
#wmProviderArea > .nav-item, #wmGameGrid > .nav-item { flex: 0 0 calc((100% - 5 * 12px) / 6); max-width: calc((100% - 5 * 12px) / 6); list-style: none; }
#wmProviderArea > .nav-item.-empty, #wmGameGrid > .nav-item.-empty { flex: 1 1 100%; max-width: 100%; }

/* ── การ์ดค่าย: กรอบหกเหลี่ยมโทนทองของธีม + โลโก้ใหญ่ขึ้น ── */
.wm-provider-open, .wm-game-card { cursor: pointer; }
.wm-provider-open .-inner-wrapper {
  position: relative; aspect-ratio: 1 / 1.08; overflow: hidden;
  clip-path: polygon(50% 0, 98% 25%, 98% 75%, 50% 100%, 2% 75%, 2% 25%);
  background: linear-gradient(180deg, #f2cf7f 0%, #c4a55f 45%, #6b5629 100%);
  padding: 3px; transition: transform .18s;
}
.wm-provider-open:hover .-inner-wrapper { transform: translateY(-3px); }
.wm-provider-open .-cover-img {
  width: 100%; height: 100%; object-fit: contain; display: block; padding: 16%;
  clip-path: polygon(50% 0, 98% 25%, 98% 75%, 50% 100%, 2% 75%, 2% 25%);
  background: radial-gradient(120% 100% at 50% 0, #23232b 0, #0f0f12 72%);
}

/* ── การ์ดเกม: ไม่มีกรอบ ใช้ขอบมนโทนธีม ──
   สัดส่วนตามภาพเกมจริง (326×440) ให้เห็นภาพเต็มใบแนวตั้ง ไม่ถูก crop เป็นสี่เหลี่ยมจัตุรัส */
.wm-game-card .-inner-wrapper {
  position: relative; aspect-ratio: 326 / 440; overflow: hidden;
  border: 1px solid var(--gold-border, rgba(236,189,123,.24)); border-radius: 12px;
  background: #16161a; transition: transform .18s, border-color .18s;
}
.wm-game-card:hover .-inner-wrapper { transform: translateY(-3px); border-color: #ecbd7b; }
.wm-game-card .-cover-img {
  width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 11px;
  background: radial-gradient(120% 100% at 50% 0, #23232b 0, #0f0f12 72%);
}
.wm-provider-open .-overlay, .wm-game-card .-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); opacity: 0; transition: .2s;
}
.wm-provider-open:hover .-overlay, .wm-game-card:hover .-overlay { opacity: 1; }
.wm-provider-open .-btn-play, .wm-game-card .-btn-play {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: radial-gradient(150% 100% at 50% 0, #4cab89 0, #225442 100%);
  color: #fff; border-radius: 6px; padding: 8px 16px; font-weight: 600; font-size: 13px;
}
/* แถบ % (เฉพาะการ์ดค่ายหมวดสล็อต) */
.wm-heat {
  position: relative; height: 17px; margin: -8px auto 0; width: 84%; z-index: 2;
  background: #101322; border: 1px solid #2c3350; border-radius: 9px; overflow: hidden;
}
.wm-heat .-bar {
  position: absolute; inset: 0 auto 0 0; border-radius: 9px;
  background: linear-gradient(90deg, #2f6bff, #6fa0ff);
  transform-origin: left center;
}
.wm-heat .-pct { position: relative; z-index: 1; display: block; color: #fff; font-size: 11px; font-weight: 700; line-height: 15px; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.wm-heat .-fire { display: inline-block; font-style: normal; }
/* แถบวิ่งครั้งเดียวตอนการ์ดเข้าจอ (JS ติด -pending ไว้ก่อน สลับเป็น -animate ตอนเข้าจอ แล้วถอดทิ้งเมื่อจบ)
   ใช้ @keyframes ไม่ใช่ transition — เติมคลาสเดียวก็เริ่มวิ่งเลย ไม่ต้องรอ rAF มา "จุด" ให้
   ขยับแค่ transform/opacity ฝั่ง compositor: ไม่คิด layout ใหม่ และไม่มี animation ค้างรันบนการ์ดนับสิบใบ */
.wm-heat.-pending .-bar { transform: scaleX(0); }
.wm-heat.-pending .-pct { opacity: .45; }
.wm-heat.-animate .-bar { animation: wmHeatFill .85s cubic-bezier(.22,.61,.36,1) both; }
.wm-heat.-animate .-pct { animation: wmHeatFade .5s ease-out both; }
/* แสงกวาดผ่านรอบเดียว — วางบน .wm-heat ไม่ใช่ .-bar เพราะ .-bar กำลังถูก scaleX อยู่ */
.wm-heat.-animate::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: wmHeatSheen .85s ease-out 1;
}
.wm-heat.-animate .-fire { animation: wmHeatFire .85s ease-out 1; }
@keyframes wmHeatFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes wmHeatFade {
  from { opacity: .45; }
  to   { opacity: 1; }
}
@keyframes wmHeatSheen {
  from { opacity: .9; transform: translateX(-100%); }
  to   { opacity: 0;  transform: translateX(100%); }
}
@keyframes wmHeatFire {
  0%   { transform: scale(.65); }
  55%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .wm-heat.-pending .-bar { transform: none; }
  .wm-heat.-pending .-pct { opacity: 1; }
  .wm-heat.-animate .-bar, .wm-heat.-animate .-pct,
  .wm-heat.-animate::after, .wm-heat.-animate .-fire { animation: none; }
}
/* ── badge RTP มุมบนขวาการ์ดเกม (เฉพาะหมวดสล็อต) ──
   ปกติ = ป้ายกระจกเข้ม กลืนไปกับการ์ด / ตั้งแต่ 97% ขึ้นไป = เขียวนีออนเรืองแสง + กวาดแสง */
.wm-rtp-badge {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(10, 10, 14, .72);
  backdrop-filter: blur(2px);
  color: #d6d9e0; font-size: 9px; font-weight: 700; line-height: 1.35;
  letter-spacing: .2px; pointer-events: none;
}
.wm-rtp-badge .-label { opacity: .72; font-size: 8px; }
.wm-rtp-badge .-value { color: #fff; }
.wm-rtp-badge.-high {
  padding: 2px 7px;
  border-color: rgba(190, 255, 220, .75);
  background: linear-gradient(135deg, #00b862 0%, #17e37f 45%, #a6ffcf 100%);
  color: #042417; font-size: 10px; font-weight: 900;
  /* เงาคงที่ (ค่ากลางของ pulse เดิม) — ของเดิม animate box-shadow แบบ infinite
     ซึ่งบังคับ repaint ทุกเฟรมตลอดเวลา และป้ายนี้เกาะการ์ดเกมทุกใบที่ RTP สูง */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .28), 0 3px 12px rgba(0, 230, 130, .62), 0 0 22px rgba(0, 230, 130, .4);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
  overflow: hidden;
}
.wm-rtp-badge.-high .-label { opacity: .85; color: #04331f; }
.wm-rtp-badge.-high .-value { color: #04241a; }
.wm-rtp-badge.-high i { font-size: 9px; color: #063; }
/* แถบแสงกวาดผ่าน — ทำให้ป้ายค่าสูงสะดุดตากว่าค่าปกติชัดเจน */
.wm-rtp-badge.-high::after {
  content: ''; position: absolute; inset: 0 auto 0 -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .85), transparent);
  transform: translateX(0) skewX(-20deg);
  animation: wmRtpShine 2.6s ease-in-out infinite;
  will-change: transform;
}
@keyframes wmRtpShine {
  0%   { transform: translateX(0) skewX(-20deg); }
  55%  { transform: translateX(422%) skewX(-20deg); }
  100% { transform: translateX(422%) skewX(-20deg); }
}
@media (prefers-reduced-motion: reduce) {
  .wm-rtp-badge.-high::after { display: none; }
}

.wm-provider-name, .wm-game-name {
  margin-top: 5px; color: #fafafa; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wm-provider-open:hover .wm-provider-name, .wm-game-card:hover .wm-game-name { color: #ecbd7b; }

.wm-game-head { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.wm-game-head .-title { margin: 0; color: #ecbd7b; font-size: 18px; }
.wm-back-btn { background: #272727; color: #ecbd7b; border: 1px solid #3b3b3c; border-radius: 5px; padding: 6px 14px; cursor: pointer; font-family: inherit; }
.wm-back-btn:hover { border-color: #ecbd7b; }
.wm-empty { text-align: center; color: #9d9d9d; padding: 26px 10px; width: 100%; }

/* หมวดหมู่จัดวางตาม CSS เดิมของ wm356 ทั้งหมด — ที่นี่แค่เว้นระยะใต้แถบหมวด */
.wm-lobby-core .-nav-menu-container { margin-bottom: 20px; }

/* template ตั้ง opacity:0 ให้ [data-animatable] แล้วรอ JS ของเขาเติมคลาส animated
   ธีมนี้ไม่ได้โหลด JS ตัวนั้น จึงต้องบังคับให้มองเห็น */
[data-animatable] { opacity: 1 !important; }

/* Mobile */
@media (max-width: 860px) {
  .wm-lobby-core { padding: 0 10px; }
  .wm-lobby-core .-game-title { font-size: 19px; }
  .wm-lobby-core .-game-search-inner { flex: 0 0 140px; }
  #wmProviderArea > .nav-item, #wmGameGrid > .nav-item {
    flex: 0 0 calc((100% - 2 * 10px) / 3); max-width: calc((100% - 2 * 10px) / 3);
  }
  #wmProviderArea, #wmGameGrid { gap: 14px 10px; }
  .wm-provider-name, .wm-game-name { font-size: 12px; }
  /* การ์ดมือถือกว้างแค่ ~110px — ย่อป้ายและตัดไอคอนออก ไม่ให้กินพื้นที่ภาพเกม */
  .wm-rtp-badge { top: 4px; right: 4px; gap: 2px; padding: 1px 4px; font-size: 8px; }
  .wm-rtp-badge .-label { font-size: 6.5px; }
  .wm-rtp-badge.-high { padding: 1px 5px; font-size: 8.5px; }
  .wm-rtp-badge.-high i { display: none; }
}

/* ── SweetAlert → core UI wm356 (กล่อง x-modal + ไอคอน ic-alert + ปุ่ม template) ── */
.wm-swal-popup {
  background: #1e1e1e !important;
  border: 1px solid rgba(236, 189, 123, .28);
  border-radius: 14px !important;
  color: #fafafa !important;
  font-family: 'Kanit', 'FC Iconic Text', sans-serif !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .65) !important;
  padding: 20px 22px 18px;
}
.wm-swal-title { color: #ecbd7b !important; font-size: 19px !important; font-weight: 600 !important; }
.wm-swal-text { color: #cfcfcf !important; font-size: 14px !important; line-height: 1.65; }

/* ไอคอน: แทนวงวาดของ SweetAlert ด้วยรูป ic-alert ของ template */
.wm-swal-icon { border: 0 !important; background-position: center; background-size: contain; background-repeat: no-repeat; width: 64px !important; height: 64px !important; margin: 6px auto 2px !important; }
.wm-swal-icon * { display: none !important; }
.wm-swal-icon.swal2-success { background-image: url('/wm356/build/ext/ic-alert-success.png'); }
.wm-swal-icon.swal2-error,
.wm-swal-icon.swal2-warning { background-image: url('/wm356/build/ext/ic-alert-failed.png'); }
.wm-swal-icon.swal2-info,
.wm-swal-icon.swal2-question { background-image: url('/wm356/build/ext/ic-gift.png'); }

.wm-swal-actions { gap: 10px; margin-top: 16px !important; }
.wm-swal-btn {
  min-width: 120px; padding: 10px 22px !important; border-radius: 6px !important;
  font-family: inherit !important; font-size: 15px !important; font-weight: 600 !important;
  cursor: pointer; border: none;
}
/* ปุ่มยืนยัน: ทอง radial แบบปุ่ม -submit ของ template (กันเคส template CSS โหลดไม่ทัน) */
.wm-swal-btn.btn-primary {
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
  color: #241a06 !important;
}
.wm-swal-cancel {
  background: #333 !important; color: #fafafa !important; border: 1px solid #3b3b3c !important;
}
.wm-swal-cancel:hover { border-color: #ecbd7b !important; color: #ecbd7b !important; }
.wm-swal-close { color: #9d9d9d !important; }
.wm-swal-close:hover { color: #ecbd7b !important; }
.wm-swal-popup .swal2-loader { border-color: #ecbd7b transparent #ecbd7b transparent !important; }
.wm-swal-popup .swal2-timer-progress-bar { background: rgba(236, 189, 123, .6) !important; }

/* ── กงล้อ (wheel fortune) ── */
.wm-wheel-wrap { max-width: 420px; margin: 0 auto; text-align: center; }
/* ฉากหลังกงล้อ (ตั้งรูปได้ใน BO) — คลุมด้วยเลเยอร์มืดให้ตัวหนังสืออ่านออกเหมือน member เดิม */
.wm-wheel-wrap.-has-bg {
  background: linear-gradient(rgba(17, 11, 28, .6) 0%, rgba(17, 11, 28, .78) 55%, rgba(17, 11, 28, .94) 100%), var(--wheel-bg) center 38% / cover no-repeat;
  border-radius: 12px; padding: 12px 10px 14px;
}
.wm-wheel-sub { color: #c9b58d; font-size: 13px; margin-bottom: 6px; }
.wm-wheel-diamond { color: #fafafa; font-size: 14px; margin-bottom: 12px; }
.wm-wheel-diamond b { color: #6fa0ff; }
.wm-wheel-cost { color: #9d9d9d; font-size: 12px; }
/* เวทีกงล้อ = จานหมุน + กรอบวงล้อ (wheel-frame.png: วงแหวน+เข็มชี้ อยู่กึ่งกลางภาพ 350x450)
   ภาพรางวัลเป็นรูปลิ่ม 116x150 ปลายแหลมชี้เข้าศูนย์กลาง จึงต้องวางเต็มช่องให้ประกอบกันเป็นวงล้อ */
.wm-wheel-stage {
  --wheel-d: min(320px, 84vw);
  position: relative; width: var(--wheel-d); height: var(--wheel-d);
  /* กรอบสูงกว่าจาน 1.29 เท่า → เผื่อที่ให้เข็มด้านบน/เงาด้านล่าง */
  margin: calc(var(--wheel-d) * .15) auto calc(var(--wheel-d) * .17);
}
.wm-wheel-stage::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: calc(var(--wheel-d) * 1.003); height: calc(var(--wheel-d) * 1.29);
  transform: translate(-50%, -50%);
  background: url('./wheel-frame.png') center / 100% 100% no-repeat;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .45));
  z-index: 3; pointer-events: none;
}
.wm-wheel-pointer { display: none; }
.wm-wheel-disc {
  position: relative; width: 100%; height: 100%; border-radius: 50%;
  background: #3f0508;
  box-shadow: inset 0 0 34px rgba(0, 0, 0, .55);
  overflow: hidden;
}
.wm-wheel-seg { position: absolute; inset: 0; pointer-events: none; }
/* บนสุดของลิ่มอยู่ที่ 7% จากขอบจาน (มุดใต้วงแหวน) ปลายล่างจบพอดีที่จุดศูนย์กลาง */
.wm-wheel-seg .-seg-inner {
  position: absolute; left: 50%; top: 7%; width: 33%; height: 43%;
  transform: translateX(-50%);
  display: flex; align-items: flex-start; justify-content: center;
}
.wm-wheel-seg img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* ช่องเยอะกว่าที่ภาพลิ่มออกแบบไว้ (>8 ช่อง) — บีบด้านกว้างแทนการย่อทั้งรูป ลิ่มจะได้ยาวจรดขอบเหมือนเดิม */
.wm-wheel-seg.-squeeze img { object-fit: fill; }
.wm-wheel-seg span {
  color: #f2cf7f; font-size: calc(var(--wheel-d) * .036); font-weight: 700; line-height: 1.15;
  padding-top: 15%; text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
/* ดุมกลาง = ปุ่มหมุน ทับปลายลิ่มทั้งหมด (วงทองรอบนอกแทนดุมของ member เดิม) */
.wm-wheel-spin-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 4;
  width: 23%; height: 23%; border-radius: 50%; border: 0;
  background: radial-gradient(72% 72% at 38% 26%, #fff6cd 0, #ffd75e 42%, #e6a51d 72%, #b9770d 100%);
  color: #4a1206; font-family: inherit; font-size: calc(var(--wheel-d) * .05); font-weight: 800; cursor: pointer;
  box-shadow:
    0 0 0 calc(var(--wheel-d) * .03) #e8a91c,
    0 0 0 calc(var(--wheel-d) * .035) rgba(120, 66, 6, .55),
    0 6px 14px rgba(0, 0, 0, .5);
}
.wm-wheel-spin-btn:disabled { opacity: .7; cursor: wait; }
.wm-wheel-result { min-height: 30px; margin-bottom: 8px; }
.wm-wheel-prize {
  display: inline-flex; align-items: center; gap: 10px;
  background: #272727; border: 1px solid #3b3b3c; border-radius: 8px; padding: 8px 16px;
}
.wm-wheel-prize.-win { border-color: #ecbd7b; box-shadow: 0 0 14px rgba(236, 189, 123, .35); }
.wm-wheel-prize img { width: 34px; height: 34px; object-fit: contain; }
.wm-wheel-prize b { color: #ecbd7b; }
.wm-wheel-prize span { color: #6ee7d1; font-weight: 700; }
/* ── เวทีกล่องสุ่ม (ซองแดง mystery-box.svg) ──
   สถานะคุมด้วยคลาสบน .wm-box-stage: ว่าง = ลอยนิ่ง ๆ, -shake = กำลังเปิด, -open = เปิดสำเร็จ */
.wm-box-stage {
  position: relative; width: 170px; height: 176px; margin: 4px auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.wm-box-stage .-box {
  position: relative; z-index: 3; width: 118px; height: 141px; object-fit: contain; cursor: pointer;
  transform-origin: 50% 85%;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .55)) drop-shadow(0 0 10px rgba(255, 170, 110, .35));
  animation: wmBoxFloat 3.2s ease-in-out infinite;
}
.wm-box-stage.-disabled .-box { cursor: default; filter: grayscale(.7) opacity(.55); animation: none; }
.wm-box-stage.-disabled .-halo { display: none; }
.wm-box-stage .-halo {
  position: absolute; z-index: 1; width: 158px; height: 158px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 196, 120, .38) 0%, rgba(255, 110, 70, .16) 46%, rgba(255, 110, 70, 0) 70%);
  animation: wmBoxHalo 3.2s ease-in-out infinite;
}
.wm-box-stage .-ring,
.wm-box-stage .-ring2 {
  position: absolute; z-index: 4; width: 110px; height: 110px; border-radius: 50%;
  border: 2px solid rgba(255, 216, 145, .9); opacity: 0; pointer-events: none;
}
@keyframes wmBoxFloat {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-9px) rotate(1.5deg); }
}
@keyframes wmBoxHalo {
  0%, 100% { transform: scale(.9); opacity: .6; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* กำลังเปิด: สั่น */
.wm-box-stage.-shake .-box { animation: wmBoxShake .5s cubic-bezier(.36, .07, .19, .97) infinite; }
@keyframes wmBoxShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  15% { transform: translate(-4px, 2px) rotate(-8deg); }
  30% { transform: translate(4px, -2px) rotate(8deg); }
  45% { transform: translate(-5px, 2px) rotate(-10deg); }
  60% { transform: translate(5px, -3px) rotate(10deg); }
  80% { transform: translate(-3px, 1px) rotate(-5deg); }
}

/* เปิดสำเร็จ: เด้ง + วงแหวนแสง + ประกายกระจาย */
.wm-box-stage.-open .-box { animation: wmBoxPop .85s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes wmBoxPop {
  0% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.3) rotate(-5deg); }
  55% { transform: scale(1.12) rotate(4deg); }
  100% { transform: scale(1.2) rotate(0deg); }
}
.wm-box-stage.-open .-ring { animation: wmBoxRing .85s ease-out both; }
.wm-box-stage.-open .-ring2 { animation: wmBoxRing .85s ease-out .16s both; }
@keyframes wmBoxRing {
  0% { opacity: .95; transform: scale(.35); }
  100% { opacity: 0; transform: scale(2.4); }
}
.wm-box-stage.-open .-halo { animation: wmBoxHaloBurst .85s ease-out both; }
@keyframes wmBoxHaloBurst {
  0% { transform: scale(.7); opacity: 1; }
  45% { transform: scale(1.5); opacity: .9; }
  100% { transform: scale(1.15); opacity: .55; }
}
.wm-box-stage .-sparks { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.wm-box-stage .-sparks i {
  position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 2px; opacity: 0;
  background: linear-gradient(180deg, #fff4cd, #f5b942);
}
.wm-box-stage.-open .-sparks i { animation: wmBoxSpark .9s cubic-bezier(.15, .7, .3, 1) both; }
@keyframes wmBoxSpark {
  0% { opacity: 0; transform: rotate(var(--a, 0deg)) translateX(6px) scale(.3); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a, 0deg)) translateX(96px) scale(1.05); }
}
.wm-box-stage .-sparks i:nth-child(1) { --a: 0deg; animation-delay: .02s; }
.wm-box-stage .-sparks i:nth-child(2) { --a: 36deg; animation-delay: .07s; }
.wm-box-stage .-sparks i:nth-child(3) { --a: 72deg; animation-delay: .04s; }
.wm-box-stage .-sparks i:nth-child(4) { --a: 108deg; animation-delay: .09s; }
.wm-box-stage .-sparks i:nth-child(5) { --a: 144deg; animation-delay: .01s; }
.wm-box-stage .-sparks i:nth-child(6) { --a: 180deg; animation-delay: .06s; }
.wm-box-stage .-sparks i:nth-child(7) { --a: 216deg; animation-delay: .11s; }
.wm-box-stage .-sparks i:nth-child(8) { --a: 252deg; animation-delay: .03s; }
.wm-box-stage .-sparks i:nth-child(9) { --a: 288deg; animation-delay: .08s; }
.wm-box-stage .-sparks i:nth-child(10) { --a: 324deg; animation-delay: .05s; }

.wm-wheel-prize.-reveal { animation: wmPrizeIn .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes wmPrizeIn {
  0% { opacity: 0; transform: translateY(10px) scale(.85); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .wm-box-stage .-box,
  .wm-box-stage .-halo,
  .wm-box-stage.-shake .-box,
  .wm-box-stage.-open .-box,
  .wm-box-stage.-open .-ring,
  .wm-box-stage.-open .-ring2,
  .wm-box-stage.-open .-sparks i,
  .wm-wheel-prize.-reveal { animation: none; }
}

.wm-wheel-history-head { color: #e0c587; font-size: 13px; font-weight: 600; margin: 12px 0 8px; text-align: left; }
.wm-wheel-history { max-height: 180px; overflow-y: auto; text-align: left; }

/* ── แลกรางวัล (points) ── */
.wm-reward-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; margin: 12px 0;
}
.wm-reward-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: #272727; border: 1px solid #3b3b3c; border-radius: 8px; padding: 12px 8px;
  text-align: center; transition: .15s;
}
.wm-reward-card:hover { border-color: #ecbd7b; }
.wm-reward-card.-locked { opacity: .55; }
.wm-reward-card img { width: 52px; height: 52px; object-fit: contain; }
.wm-reward-card b { color: #fafafa; font-size: 13px; line-height: 1.25; }
.wm-reward-card small { color: #9d9d9d; font-size: 11px; }
/* ปุ่มแลกรางวัล — เคยยืมคลาส .wm-copy-btn จึงโดน handler คัดลอกเปลี่ยนป้ายเป็น "คัดลอกแล้ว"
   ตอนนี้แยกสไตล์มาไว้ที่นี่ ไม่ต้องพึ่ง .wm-copy-btn แล้ว */
.wm-redeem-btn {
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
  color: #241a06; border: none; border-radius: 6px; padding: 5px 12px; font-size: 12px;
  cursor: pointer; font-family: inherit; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px; transition: transform .15s, filter .15s;
}
.wm-redeem-btn:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); }
.wm-redeem-btn:active:not(:disabled) { transform: scale(.95); }
.wm-reward-card .wm-redeem-btn { margin-top: 4px; padding: 6px 12px; font-size: 12px; }
.wm-reward-card .wm-redeem-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── aff / claim ── */
.wm-aff-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.wm-aff-stat {
  background: #272727; border: 1px solid #3b3b3c; border-radius: 8px; padding: 9px 12px;
  display: flex; flex-direction: column; gap: 2px; text-align: left;
}
.wm-aff-stat span { color: #9d9d9d; font-size: 11px; }
.wm-aff-stat b { color: #fafafa; font-size: 16px; }
.wm-aff-stat b.-gold { color: #ecbd7b; }
.wm-aff-list { max-height: 220px; overflow-y: auto; margin-top: 4px; }
.wm-claim-box { background: #272727; border: 1px solid #3b3b3c; border-radius: 8px; padding: 4px 14px; margin-bottom: 12px; }
.wm-claim-box .wm-account-row b.-gold { color: #ecbd7b; }

/* ── Sticky footer mobile (แบบ toy777) ──
   ไม่มี animation วน — แถบนี้ค้างอยู่ทุกหน้าจอตลอดเวลา (นโยบายอนิเมชันของธีม)
   ทุก transition ใช้ transform/opacity เท่านั้น */
.wm-sticky-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  display: none; align-items: flex-end; justify-content: space-around;
  padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background:
    radial-gradient(120% 190% at 50% 0%, rgba(236, 189, 123, .12) 0%, rgba(236, 189, 123, 0) 46%),
    linear-gradient(180deg, #1e1e26 0%, #121218 62%, #0d0d12 100%);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .05);
}
/* เส้นทองบนสุด: ไล่จางหัวท้าย เข้มตรงกลางใต้ปุ่มกิจกรรม (ดูแพงกว่าเส้นทึบ 1px) */
.wm-sticky-nav::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgba(236, 189, 123, 0) 0%, rgba(236, 189, 123, .55) 50%, rgba(236, 189, 123, 0) 100%);
  border-radius: inherit;
}
.wm-sticky-item {
  position: relative;
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: 0; color: #9d9d9d; font-family: inherit; font-size: 11px;
  cursor: pointer; padding: 4px 0 2px; text-decoration: none;
  transition: color .16s ease, transform .16s ease;
}
.wm-sticky-item:hover { color: #ecbd7b; text-decoration: none; }
.wm-sticky-item:active { transform: scale(.94); }   /* มือถือไม่มี hover — ต้องมีจังหวะตอบรับตอนกด */
.wm-sticky-item i { font-size: 17px; }
/* ช่องติดต่อไลน์ใช้ไอคอน png (สูงเท่าไอคอน fa ตัวอื่นพอดี) */
.wm-sticky-item .-ic-img { width: 21px; height: 21px; object-fit: contain; display: block; }
.wm-sticky-item.-active { color: #ecbd7b; }
/* ขีดบอกตำแหน่งปัจจุบัน — เดิมเปลี่ยนแค่สีตัวอักษร มองไม่ค่อยออกว่าอยู่เมนูไหน */
.wm-sticky-item:not(.-center)::after {
  content: ''; position: absolute; top: 0; left: 50%; width: 18px; height: 2px; border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #d8a75a, #f4d79a);
  transform: translateX(-50%) scaleX(0); transform-origin: center;
  transition: transform .18s ease;
}
.wm-sticky-item:not(.-center).-active::after { transform: translateX(-50%) scaleX(1); }

/* ปุ่มกิจกรรมตรงกลาง: วงกลมทองยกลอยเหนือแถบ + วงแหวนสีพื้นหลังคั่นให้ดูเป็นปุ่มลอย */
.wm-sticky-item.-center { position: relative; margin-top: -24px; }
.wm-sticky-item.-center .-bubble {
  position: relative;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background:
    radial-gradient(72% 72% at 50% 26%, #fff3d2 0%, #f2cf7f 32%, #d8a75a 62%, #9b7a3c 100%),
    linear-gradient(180deg, #f4d79a 0%, #c4a55f 55%, #8e763e 100%);
  color: #2b1e07; font-size: 23px;
  border: 3px solid #12121a;   /* วงแหวนสีเดียวกับพื้นแถบ = เอฟเฟกต์ปุ่มเจาะทะลุแถบ */
  box-shadow: 0 6px 18px rgba(236, 189, 123, .42), inset 0 2px 3px rgba(255, 255, 255, .55), inset 0 -3px 6px rgba(120, 84, 26, .45);
  transition: transform .16s ease, box-shadow .16s ease;
}
.wm-sticky-item.-center:active .-bubble { transform: translateY(1px) scale(.96); }
.wm-sticky-item.-center span:last-child { color: #ecbd7b; font-weight: 600; }
/* จุดแดงเมื่อมีของให้เก็บ (ภารกิจ/หมุนฟรีค้างอยู่) — ตั้งจาก renderMissions() */
.wm-sticky-item.-center .-dot {
  position: absolute; top: -1px; right: -1px; width: 13px; height: 13px; border-radius: 50%;
  background: #ef4444; border: 2px solid #12121a; display: none;
}
.wm-sticky-item.-center.-has-reward .-dot { display: block; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .wm-sticky-nav { display: flex; }
  body { padding-bottom: 76px; }
  .wm-mobile-cta { display: flex; }
  .wm-game-head .-title { font-size: 16px; }
}

@media (max-width: 576px) {
  .wm-site-logo { max-height: 44px; }
}

/* ── Footer: ข้อมูลจากธีม pop777 เดิม จัดสไตล์ในโทน wm356 (ไม่ใช้ CSS เดิม) ── */
.wm-pop777-footer-wrap {
  max-width: 1100px; margin: 40px auto 24px; padding: 0 16px;
  color: #cfcfcf; font-size: 14px;
}
.wm-pop777-footer-wrap h2,
.wm-pop777-footer-wrap h3 { color: #ecbd7b; font-size: 16px; margin: 16px 0 8px; line-height: 1.4; }
.wm-pop777-footer-wrap h3 span { display: block; color: #b9a67f; font-size: 12px; font-weight: 500; }
.wm-pop777-footer-wrap p,
.wm-pop777-footer-wrap li { line-height: 1.75; color: #b9b9b9; }
.wm-pop777-footer-wrap ul { padding-left: 18px; margin: 6px 0; }
.wm-pop777-footer-wrap a { color: #e0c587; }
.wm-pop777-footer-wrap section { border-top: 1px solid #2a2a2a; padding: 16px 0; }
.wm-pop777-footer-wrap img { max-width: 34px; max-height: 34px; object-fit: contain; display: inline-block; }
/* ไอคอนธนาคาร/ช่องทางจ่ายใน footer เป็นแผ่นสีเต็มรูป — ลบมุมให้เข้าชุดกระเบื้องแก้ว */
.wm-pop777-footer-wrap .trust-payment-grid img { border-radius: 8px; }
.wm-pop777-footer-wrap .trust-payment-grid,
.wm-pop777-footer-wrap .trust-socials,
.wm-pop777-footer-wrap .trust-badges,
.wm-pop777-footer-wrap .trust-license-badges,
.wm-pop777-footer-wrap .trust-security-badges {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0;
}
.wm-pop777-footer-wrap .trust-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wm-pop777-footer-wrap .bank-text-badge {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  color: #e9284e; font-size: 9px; font-weight: 900;
}
.wm-pop777-footer-wrap button {
  background: #1e1e1e; border: 1px solid #333; border-radius: 6px;
  color: #cfcfcf; padding: 6px 12px; cursor: pointer; font-family: inherit; font-size: 13px;
}
.wm-pop777-footer-wrap button:hover { border-color: #ecbd7b; color: #ecbd7b; }
.wm-pop777-footer-wrap nav { display: flex; flex-wrap: wrap; gap: 8px; }
.wm-pop777-footer-wrap .trust-copyright { text-align: center; color: #8a8a8a; font-size: 12px; padding-top: 10px; }

/* บทความแนะนำ (member-keyword-*) */
.wm-pop777-footer-wrap .member-keyword-section { border-top: 1px solid #2a2a2a; }
.wm-pop777-footer-wrap .member-keyword-head span {
  display: inline-block; color: #241a06; font-size: 11px; font-weight: 700;
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
  border-radius: 999px; padding: 3px 12px; margin-bottom: 8px;
}
.wm-pop777-footer-wrap .member-keyword-head h2 { margin: 0 0 10px; font-size: 17px; }
.wm-pop777-footer-wrap .member-keyword-content {
  position: relative; max-height: 210px; overflow: hidden; cursor: pointer;
}
.wm-pop777-footer-wrap .member-keyword-content.-expanded { max-height: none; cursor: default; }
.wm-pop777-footer-wrap .member-keyword-content::after {
  content: "แตะเพื่ออ่านต่อ"; position: absolute; left: 0; right: 0; bottom: 0; height: 84px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px;
  color: #e0c587; font-size: 12px;
  background: linear-gradient(180deg, rgba(15,15,15,0), #0f0f0f 78%);
}
.wm-pop777-footer-wrap .member-keyword-content.-expanded::after { display: none; }
.wm-pop777-footer-wrap .member-keyword-table-wrap { overflow-x: auto; margin: 10px 0; }
.wm-pop777-footer-wrap .member-keyword-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 420px; }
.wm-pop777-footer-wrap .member-keyword-table th,
.wm-pop777-footer-wrap .member-keyword-table td { border: 1px solid #2c2c2c; padding: 8px 10px; text-align: left; }
.wm-pop777-footer-wrap .member-keyword-table th { background: #1a1a1a; color: #ecbd7b; }
.wm-pop777-footer-wrap .member-keyword-faq { border-bottom: 1px solid #2a2a2a; padding: 8px 0; }
.wm-pop777-footer-wrap .member-keyword-faq summary {
  cursor: pointer; color: #e0c587; font-weight: 600; list-style: none; padding-right: 20px; position: relative;
}
.wm-pop777-footer-wrap .member-keyword-faq summary::-webkit-details-marker { display: none; }
.wm-pop777-footer-wrap .member-keyword-faq summary::after { content: "+"; position: absolute; right: 0; color: #ecbd7b; }
.wm-pop777-footer-wrap .member-keyword-faq[open] summary::after { content: "−"; }
.wm-pop777-footer-wrap .member-keyword-toggle { margin-top: 10px; }

@media (max-width: 576px) {
  .wm-pop777-footer-wrap .trust-info-grid { grid-template-columns: 1fr; }
}

/* ═══ RESTORE: CSS ส่วน modal/component ที่หายไปตอนสไปซ์ไฟล์ ═══ */

/* ── ระบบ modal (bridge เขียนเอง ไม่ได้ใช้ Bootstrap JS/CSS) ── */
.x-modal { display: none; position: fixed; inset: 0; z-index: 1050; overflow-x: hidden; overflow-y: auto; outline: 0; padding: 16px 8px; }
.x-modal.wm-open { display: block; }
.wm-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); z-index: 1040; }

/* ── เปิด-ปิดโมดัล: fade + ยกขึ้นเล็กน้อย ──
   transition ใช้กับ display ไม่ได้ จึงใช้ @keyframes ทั้งขาเข้าและขาออก
   ขาออกต้องพึ่ง JS: closeModal() ติด -closing แล้วรออนิเมชันจบก่อนค่อย display:none
   (คลาส -closing มาหลัง .wm-open ในไฟล์ specificity เท่ากัน ตัวหลังจึงชนะ)
   ขยับแค่ opacity/transform — โมดัลเปิดทีละใบ ไม่ใช่ของที่มีหลายสิบชิ้นบนจอ */
.x-modal.wm-open .modal-dialog { animation: wmModalIn .2s cubic-bezier(.2, .8, .3, 1) both; }
.wm-backdrop { animation: wmBackdropIn .2s ease-out both; }
.x-modal.-closing { pointer-events: none; }   /* กันกดโดนโมดัลที่กำลังจางหาย */
.x-modal.-closing .modal-dialog { animation: wmModalOut .18s ease-in both; }
.wm-backdrop.-closing { animation: wmBackdropOut .18s ease-in both; }
@keyframes wmModalIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes wmModalOut {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(6px) scale(.985); }
}
@keyframes wmBackdropIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes wmBackdropOut { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .x-modal.wm-open .modal-dialog, .x-modal.-closing .modal-dialog,
  .wm-backdrop, .wm-backdrop.-closing { animation: none; }
}
.x-modal .modal-dialog { position: relative; z-index: 1060; width: 100%; max-width: 460px; margin: 0 auto; }
.x-modal .modal-content {
  background: #1a1a1a; border: 1px solid rgba(236, 189, 123, .28); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .65); overflow: hidden; position: relative;
}
.x-modal .modal-header { padding: 14px 46px; border-bottom: 1px solid #2a2a2a; }
.x-modal .x-title-modal { margin: 0; color: #fafafa; font-size: 18px; font-weight: 700; text-align: center; }
.x-modal .modal-body { padding: 16px; }
.x-modal .close {
  position: absolute; top: 10px; right: 12px; z-index: 3;
  background: none; border: 0; color: #9d9d9d; font-size: 20px; cursor: pointer; padding: 4px 8px;
}
.x-modal .close:hover { color: #ecbd7b; }
body.wm-modal-open { overflow: hidden; }
.x-modal .-modal-full-page .modal-content { max-width: 100%; }

/* ── ฟอร์มใน modal ── */
.wm-form-wrap { max-width: 420px; margin: 0 auto; }
.wm-modal-logo img { max-height: 68px; margin-bottom: 10px; }
.wm-label { display: block; color: #e0c587; font-size: 13px; margin-bottom: 6px; }
.form-group { margin-bottom: 12px; }
.x-form-control, .form-control {
  width: 100%; background: #272727; border: 1px solid #3b3b3c; border-radius: 8px;
  color: #fafafa; padding: 11px 14px; font-size: 15px; font-family: inherit; outline: none;
}
.x-form-control:focus, .form-control:focus { border-color: #ecbd7b; }
.x-form-control::placeholder { color: #7a7a7a; }
.wm-divider { display: flex; align-items: center; gap: 10px; color: #9d9d9d; font-size: 12px; margin: 14px 0 10px; }
.wm-divider::before, .wm-divider::after { content: ""; height: 1px; flex: 1; background: #333; }
.wm-btn-secondary { background: #333; color: #fafafa; border: 1px solid #3b3b3c; }
.wm-btn-secondary:hover { border-color: #ecbd7b; color: #ecbd7b; }
.wm-line-login {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #06c755; color: #fff; border-radius: 8px; padding: 11px; margin-top: 10px;
  text-decoration: none; font-weight: 600;
}
.wm-line-login .-badge { background: #fff; color: #06c755; border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 700; }
.wm-hint { color: #9d9d9d; font-size: 12px; margin-bottom: 8px; text-align: center; }
.wm-empty { text-align: center; color: #9d9d9d; padding: 26px 10px; width: 100%; }

/* ── ฝากเงิน: แท็บช่องทาง / บัญชี / จำนวนเงิน ── */
.wm-deposit-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.wm-dep-tab {
  flex: 1 1 auto; min-width: 104px; padding: 9px 10px;
  background: #1e1e1e; color: #cfcfcf; border: 1px solid #333; border-radius: 8px;
  cursor: pointer; font-family: inherit; font-size: 13px; white-space: nowrap;
}
.wm-dep-tab:hover { border-color: rgba(236, 189, 123, .6); }
.wm-dep-tab.-active {
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
  color: #241a06; border-color: transparent; font-weight: 600;
}
.wm-bank-card {
  /* การ์ดแก้ว: ไล่เฉดขาวโปร่ง + ring บาง + ไฮไลต์ขอบบน — แทนกล่องทึบขอบเทาหนาแบบเดิม */
  background: linear-gradient(165deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03) 55%, rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 10px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.wm-bank-card .-bank-name { display: flex; align-items: center; color: #ecbd7b; font-weight: 600; margin-bottom: 4px; }
.wm-bank-card .-acc-number { font-size: 20px; font-weight: 700; letter-spacing: 1px; color: #fff; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wm-bank-card .-acc-name { color: #c9b58d; font-size: 13px; margin-top: 2px; }
.wm-copy-btn {
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
  color: #241a06; border: none; border-radius: 6px; padding: 5px 12px; font-size: 12px;
  cursor: pointer; font-family: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: 5px;
}
.wm-slip-upload { margin-top: 12px; }
.wm-quick-amounts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.wm-qbtn {
  flex: 1 1 calc(33% - 8px); padding: 9px 4px;
  background: #272727; color: #ecbd7b; border: 1px solid #3b3b3c; border-radius: 8px;
  cursor: pointer; font-family: inherit; font-weight: 600;
}
.wm-qbtn:hover { border-color: #ecbd7b; }
.wm-gateway-form .wm-balance-line { text-align: center; }
.wm-gateway-form .wm-balance-line b { color: #ecbd7b; font-size: 16px; }

/* ── ถอนเงิน ── */
.wm-balance-line { color: #fafafa; margin-bottom: 10px; }
.wm-balance-line b { color: #6ee7d1; font-size: 20px; }
.wm-mini-reload { background: none; border: none; color: #ecbd7b; cursor: pointer; }

/* ── ข้อมูลบัญชี + เมนู ── */
.wm-account-box {
  background: linear-gradient(165deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .10); border-radius: 14px;
  padding: 6px 16px; margin-bottom: 14px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.wm-account-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 14px; }
.wm-account-row:last-child { border-bottom: none; }
.wm-account-row span { color: #9d9d9d; }
.wm-account-row b { color: #fafafa; text-align: right; word-break: break-all; display: flex; align-items: center; justify-content: flex-end; }
.wm-account-menu { display: flex; flex-direction: column; gap: 8px; }
.wm-account-menu.-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wm-account-menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: #1e1e1e; border: 1px solid #333; border-radius: 10px;
  color: #fafafa; padding: 11px 14px; cursor: pointer; font-family: inherit; font-size: 14px;
  transition: .15s; text-align: left;
}
.wm-account-menu-item:hover { border-color: #ecbd7b; color: #ecbd7b; }
.wm-account-menu-item.-logout { color: #f26869; }
.wm-account-menu-item img { width: 30px; height: 30px; object-fit: contain; }
.wm-account-menu.-grid2 .wm-account-menu-item { flex-direction: column; gap: 6px; padding: 12px 8px; text-align: center; font-size: 13px; }
.wm-account-menu.-grid2 .wm-account-menu-item img { width: 34px; height: 34px; }
.wm-account-menu.-grid2 .wm-account-menu-item.-logout { grid-column: 1 / -1; flex-direction: row; justify-content: center; }

/* ── ประวัติ ── */
.wm-history-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.wm-history-tab {
  flex: 1; padding: 9px; background: #1e1e1e; color: #cfcfcf;
  border: 1px solid #333; border-radius: 8px; cursor: pointer; font-family: inherit;
}
.wm-history-tab.-active {
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
  color: #241a06; border-color: transparent; font-weight: 600;
}
/* คอลัมน์กลาง (เวลา) เป็นตัวเดียวที่ยอมหด — ของเดิมเป็น `1fr auto auto`
   ซึ่งคอลัมน์ auto ดันป้ายสถานะทะลุขอบออกไปได้เมื่อกล่องแคบ */
.wm-history-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center;
  background: #272727; border: 1px solid #333; border-left: 3px solid #9d9d9d;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; font-size: 13px;
}
.wm-history-row .-amount { font-weight: 700; color: #fff; white-space: nowrap; }
.wm-history-row .-time {
  color: #9d9d9d; font-size: 12px; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* ป้ายสถานะ — สีมาจากคลาสสถานะบนแถว (ดู ST_DEP/ST_WD ใน wm356-app.js)
   ใช้ currentColor ทั้งจุดนำและเส้นขอบ เพิ่มสถานะใหม่จึงตั้งแค่ color/background */
.wm-history-row .-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid; font-size: 11px; font-weight: 700; line-height: 1.55;
  white-space: nowrap; justify-self: end;
}
.wm-history-row .-status::before {
  content: ''; flex: 0 0 6px; width: 6px; height: 6px;
  border-radius: 50%; background: currentColor;
}
.wm-history-row.-success { border-left-color: #4cab89; }
.wm-history-row.-success .-status { color: #6ee7d1; background: rgba(76, 171, 137, .16); border-color: rgba(76, 171, 137, .5); }
.wm-history-row.-pending { border-left-color: #ecbd7b; }
.wm-history-row.-pending .-status { color: #ecbd7b; background: rgba(236, 189, 123, .14); border-color: rgba(236, 189, 123, .45); }
.wm-history-row.-fail { border-left-color: #f22662; }
.wm-history-row.-fail .-status { color: #f26869; background: rgba(242, 38, 98, .14); border-color: rgba(242, 38, 98, .45); }
/* ยกเลิก = จบแล้วแต่ไม่ใช่ความผิดพลาด ใช้โทนเทาไม่ให้ตกใจเท่าสีแดง */
.wm-history-row.-cancel { border-left-color: #9d9d9d; }
.wm-history-row.-cancel .-status { color: #b8b8c2; background: rgba(157, 157, 157, .14); border-color: rgba(157, 157, 157, .42); }
/* คืนเครดิต = เงินกลับเข้ากระเป๋าแล้ว ต้องอ่านออกว่าไม่ได้เสียเงิน จึงแยกโทนน้ำเงิน */
.wm-history-row.-refund { border-left-color: #2f6bff; }
.wm-history-row.-refund .-status { color: #8fb8ff; background: rgba(47, 107, 255, .16); border-color: rgba(47, 107, 255, .5); }
.wm-history-row.-unknown .-status { color: #cfcfcf; background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .22); }
/* จอแคบ: เวลากับป้ายลงมาอยู่บรรทัดล่าง ไม่ให้ป้ายบีบจนตัวเลขเงินหด */
@media (max-width: 400px) {
  .wm-history-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding: 9px 11px; }
  .wm-history-row .-amount { grid-column: 1 / -1; }
  .wm-history-row .-time { text-align: left; }
}

/* ── โปรโมชั่น ──
   คอลัมน์ปรับตามความกว้างจริงของโมดัล (auto-fill) ไม่ผูกกับ breakpoint ของจอ
   เพราะโมดัลนี้กว้างเต็มจอบนมือถือ แต่ถูกจำกัดที่ 600px บน PC (.-modal-medium) */
/* min() กันล้นบนจอแคบมาก (คอลัมน์ขั้นต่ำต้องไม่กว้างกว่าตัวคอนเทนเนอร์เอง) */
#wmPromotionList { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; align-items: start; }
#wmPromotionList .wm-empty { grid-column: 1 / -1; }
.wm-promo-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #1e1e1e; border: 1px solid #333; border-radius: 10px; text-align: center;
}
/* แบนเนอร์ 12:5 — cover เพื่อไม่ให้เหลือขอบดำเมื่อการ์ดกว้างต่างกัน
   (รูปโปรของเราวางข้อความไว้กลางภาพ จึงไม่โดนครอปทิ้ง) */
.wm-promo-card .-img { display: block; width: 100%; height: auto; aspect-ratio: 12 / 5; object-fit: cover; }
.wm-promo-card .-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.wm-promo-card .-title { color: #ecbd7b; font-weight: 600; }
.wm-promo-card .-detail { color: #cfcfcf; font-size: 13px; white-space: pre-line; }
/* ป้ายล็อกหมวดเกม — ต้องเด่นกว่ารายละเอียด เพราะเป็นเงื่อนไขที่ลูกค้าต้องรู้ "ก่อน" กดรับ */
.wm-promo-card .-gamelock {
  align-self: center; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px;
  color: #f2cf7f; background: rgba(236, 189, 123, .12); border: 1px solid rgba(236, 189, 123, .3);
}
.wm-promo-card .wm-promo-apply { margin-top: auto; }
/* เบราว์เซอร์เก่าที่ยังไม่รู้จัก aspect-ratio ให้ล็อกความสูงไว้ไม่ให้รูปยืดเต็มจอ */
@supports not (aspect-ratio: 12 / 5) {
  .wm-promo-card .-img { max-height: 220px; }
}

/* ── เมนู hamburger ── */
.wm-menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.wm-menu-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: #1e1e1e; border: 1px solid #333; border-radius: 10px;
  color: #fafafa; padding: 14px 8px; cursor: pointer; font-family: inherit;
  text-decoration: none; font-size: 13px; transition: .15s;
}
.wm-menu-item:hover { border-color: #ecbd7b; color: #ecbd7b; text-decoration: none; }
.wm-menu-item img { width: 40px; height: 40px; object-fit: contain; }

/* ── Loading overlay ── */
.wm-loading {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(15, 15, 15, .82); align-items: center; justify-content: center;
}
.wm-loading.show { display: flex; }
.wm-loading .x-dice-container { margin: 0 auto; }

@media (max-width: 576px) {
  .x-modal { padding: 10px 6px; }
  .x-modal .modal-body { padding: 12px; }
  .wm-menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wm-qbtn { flex: 1 1 calc(33% - 8px); }
}

/* หัวข้อรองใน modal (แทน x-title-register-modal-v3 ของ template) */
.wm-modal-subtitle { color: #c9b58d; font-size: 14px; text-align: center; margin-bottom: 14px; }

/* template ตั้ง #loginModal/#registerModal .btn.-submit เป็นปุ่มลอยติดขอบล่าง + สีแซลมอน
   (specificity สูงเพราะใช้ ID) → บังคับกลับเป็นปุ่มในโฟลว์ปกติโทนทองของธีม */
#loginModal .btn.-submit,
#registerModal .btn.-submit,
.x-modal .btn.-submit,
.x-modal .btn-primary {
  position: static !important; inset: auto !important;
  width: 100% !important; max-width: 100% !important; margin: 6px 0 0 !important;
  border-radius: 8px !important;
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%) !important;
  color: #241a06 !important; box-shadow: none !important;
}

/* ── ฝากเงิน: แนบสลิป (flow เดียวกับ member เดิม — เลือกรูปแล้วส่งอัตโนมัติ) ── */
.wm-slip { margin-top: 14px; border-top: 1px solid #2a2a2a; padding-top: 14px; }
.wm-slip-head { color: #ecbd7b; font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.wm-slip-head small { color: #9d9d9d; font-weight: 400; font-size: 12px; margin-left: 4px; }
.wm-slip-drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 2px dashed rgba(236, 189, 123, .45); border-radius: 12px;
  background: rgba(236, 189, 123, .06); padding: 22px 14px; cursor: pointer;
  text-align: center; transition: .18s; margin-bottom: 10px;
}
.wm-slip-drop:hover { border-color: #ecbd7b; background: rgba(236, 189, 123, .12); }
.wm-slip-drop i { font-size: 30px; color: #ecbd7b; }
.wm-slip-drop strong { color: #fafafa; font-size: 15px; }
.wm-slip-drop small { color: #9d9d9d; font-size: 12px; }
.wm-slip-drop.-has-file { padding: 12px; }
.wm-slip-result {
  display: flex; align-items: center; gap: 12px;
  background: #272727; border: 1px solid #3b3b3c; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
}
.wm-slip-result img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #111; }
.wm-slip-result .-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wm-slip-result b { color: #fafafa; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-slip-result span { color: #ecbd7b; font-size: 12px; }
.wm-slip-result span.-ok { color: #6ee7d1; }
.wm-slip-result span.-fail { color: #f26869; }
.wm-slip-help { color: #9d9d9d; font-size: 12px; margin-top: 8px; text-align: center; }

/* modal ฝากเงิน: บีบความสูงให้พอดีจอ ปุ่มไม่หลุดไปไกล */
#depositModal .modal-content { max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
#depositModal .modal-body { overflow-y: auto; }

/* มือถือ: ไม่ให้โมดัลฝากกินเต็มจอ เหลือขอบบน-ล่างให้เห็นว่าเป็นกล่องลอย
   dialog เป็น modal-dialog-centered (flex + align-items:center) อยู่แล้ว
   จึงคุมแค่ความสูงสูงสุดของ content — ที่เหลือถูกจัดกึ่งกลางให้เอง ขอบบน/ล่างเท่ากัน
   หัก 150px = ขอบบน-ล่างที่อยากเห็น + เผื่อ sticky nav (67px) ไม่ให้โมดัลทับแถบเมนู */
@media (max-width: 576px) {
  #depositModal .modal-content { max-height: calc(100vh - 150px); }
}

/* ── Notification toast (realtime) — โทนธีม wm356 ── */
/* toast เกาะมุมขวาบนใต้ header (สูง 60px) ทุกขนาดจอ — กล่องเล็ก ไม่กินพื้นที่กลางจอ */
.wm-toast-stack {
  position: fixed; top: 68px; right: 12px; left: auto; bottom: auto; z-index: 3000;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  width: min(300px, calc(100vw - 24px)); pointer-events: none;
}
.wm-toast {
  position: relative; display: flex; align-items: flex-start; gap: 10px; width: 100%;
  background: linear-gradient(135deg, #23231d 0%, #16161a 100%);
  border: 1px solid rgba(236, 189, 123, .38); border-radius: 10px;
  padding: 10px 30px 10px 10px; overflow: hidden; pointer-events: auto;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
  opacity: 0; transform: translateX(28px) scale(.97);
  transition: opacity .3s ease, transform .3s cubic-bezier(.2, .8, .3, 1);
}
.wm-toast.-in { opacity: 1; transform: translateX(0) scale(1); }
.wm-toast.-out { opacity: 0; transform: translateX(28px) scale(.97); }
.wm-toast.-clickable { cursor: pointer; }
.wm-toast.-clickable:hover { border-color: #ecbd7b; }
.wm-toast .-ic {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px; color: #241a06;
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
}
.wm-toast .-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wm-toast .-title { color: #f2cf7f; font-size: 13px; font-weight: 700; }
.wm-toast .-text { color: #cfcfcf; font-size: 11.5px; line-height: 1.45; word-break: break-word; }
.wm-toast .-amount { color: #6ee7d1; font-size: 13.5px; font-weight: 700; margin-top: 1px; }
.wm-toast .-close {
  position: absolute; top: 5px; right: 5px; width: 20px; height: 20px;
  background: none; border: 0; color: #7d7d7d; cursor: pointer; font-size: 11px; border-radius: 50%;
}
.wm-toast .-close:hover { color: #ecbd7b; background: rgba(255, 255, 255, .06); }
.wm-toast .-bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; transform-origin: left;
  background: linear-gradient(90deg, #f2cf7f, #8e763e);
  animation: wmToastBar 6.5s linear forwards;
}
@keyframes wmToastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* โทนตามชนิดแจ้งเตือน */
.wm-toast.-money .-ic { background: radial-gradient(150% 100% at 50% 0, #4cab89 0, #225442 100%); color: #eafff5; }
.wm-toast.-money .-bar { background: linear-gradient(90deg, #6ee7d1, #225442); }
.wm-toast.-success .-ic { background: radial-gradient(150% 100% at 50% 0, #4cab89 0, #225442 100%); color: #eafff5; }
.wm-toast.-reward .-ic { background: linear-gradient(180deg, #a970ff, #5b2ea6); color: #fff; }
.wm-toast.-reward .-bar { background: linear-gradient(90deg, #c9a4ff, #5b2ea6); }
.wm-toast.-warning { border-color: rgba(242, 38, 98, .5); }
.wm-toast.-warning .-ic { background: linear-gradient(180deg, #f22662, #a3123f); color: #fff; }
.wm-toast.-warning .-title { color: #f79ab3; }
.wm-toast.-warning .-bar { background: linear-gradient(90deg, #f22662, #7d0d2e); }

/* มือถือ: ยังเกาะขวาบนเหมือนเดิม แค่ย่อลงอีกนิด (ของเดิมเต็มความกว้างชิดล่าง เลยดูใหญ่/อยู่กลางจอ) */
@media (max-width: 860px) {
  .wm-toast-stack { top: 64px; right: 8px; left: auto; bottom: auto; width: min(268px, calc(100vw - 16px)); gap: 7px; }
  .wm-toast { padding: 9px 26px 9px 9px; gap: 8px; }
  .wm-toast .-ic { flex-basis: 28px; width: 28px; height: 28px; font-size: 13px; }
  .wm-toast .-title { font-size: 12px; }
  .wm-toast .-text { font-size: 11px; line-height: 1.4; }
  .wm-toast .-amount { font-size: 12.5px; }
}

/* ══════════════════════════════════════════════════════════
   หน้ารองในธีม wm356 (terms / privacy / responsible-gaming / ranking)
   เปลือก nav+footer มาจาก wm356_static_header()/wm356_static_footer() ใน boot.php
   ใช้โทนเดียวกับโมดัลของธีม: พื้น #1e1e1e ขอบ #3b3b3c หัวข้อทอง #ecbd7b
   ══════════════════════════════════════════════════════════ */
.wm-static-body {
  background: #0f0f0f; color: #cfcfcf; font-family: 'Kanit', 'FC Iconic Text', sans-serif;
  min-height: 100vh;
}
/* ปุ่มย้อนกลับ (ตำแหน่งเดียวกับ hamburger ของหน้าแรก) */
.wm-static-back {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid rgba(236, 189, 123, .32); border-radius: 8px;
  color: #ecbd7b; font-size: 15px; text-decoration: none;
}
.wm-static-back:hover { color: #241a06; border-color: transparent; background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%); }

.wm-static-wrap { max-width: 1000px; margin: 0 auto; padding: 22px 16px 34px; }
/* #loading เป็นของธีมเดิม (สไตล์อยู่ใน member/style.css ซึ่งหน้านี้ไม่ได้โหลด) ไม่งั้นจะโผล่เป็นบล็อกเปล่า */
.wm-static-body #loading { display: none !important; }

/* หัวเรื่องหน้า — แถบทองบาง ๆ ด้านซ้ายแบบหัวข้อของ template */
.wm-static-wrap h1 {
  position: relative; color: #ecbd7b; font-size: 26px; font-weight: 600;
  margin: 0 0 10px; padding-left: 14px; line-height: 1.35;
}
.wm-static-wrap h1::before {
  content: ''; position: absolute; left: 0; top: .18em; bottom: .18em; width: 4px; border-radius: 3px;
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
}
.wm-static-wrap h2 { color: #f2cf7f; font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.wm-static-wrap h3 { color: #e0c587; font-size: 15px; font-weight: 600; margin: 14px 0 6px; }
.wm-static-wrap p, .wm-static-wrap li { color: #b9b9b9; line-height: 1.85; font-size: 14.5px; }
.wm-static-wrap ul, .wm-static-wrap ol { padding-left: 20px; margin: 6px 0; }
.wm-static-wrap a { color: #e0c587; }
.wm-static-wrap small { color: #8a8a8a; font-size: 12px; }

/* การ์ดเนื้อหา */
.wm-static-wrap section {
  background: #1e1e1e; border: 1px solid #3b3b3c; border-radius: 14px;
  padding: 18px 20px; margin-bottom: 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
}
.wm-static-wrap section > h1 { margin-top: 0; }
/* hero: ไล่เฉดทองจาง ๆ ให้ต่างจากการ์ดเนื้อหา */
.wm-static-wrap .terms-hero {
  background:
    radial-gradient(120% 100% at 0 0, rgba(236, 189, 123, .10), transparent 60%),
    #1e1e1e;
  border-color: rgba(236, 189, 123, .3);
}
.wm-static-wrap article {
  background: transparent; border: 0; border-top: 1px solid #313131; border-radius: 0;
  padding: 14px 0; margin: 0;
}
.wm-static-wrap article:first-of-type { border-top: 0; padding-top: 0; }
.wm-static-wrap article:last-child { padding-bottom: 0; }

/* ปุ่มกลับหน้าหลักในตัวหน้า */
.wm-static-wrap .terms-back, .wm-static-wrap .back-home-btn {
  display: inline-flex; align-items: center; gap: 8px; color: #ecbd7b;
  border: 1px solid rgba(236, 189, 123, .35); border-radius: 8px; padding: 7px 14px;
  text-decoration: none; font-size: 14px; margin-bottom: 12px;
}
.wm-static-wrap .terms-back:hover, .wm-static-wrap .back-home-btn:hover {
  border-color: transparent; color: #241a06;
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
}

.wm-static-wrap table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.wm-static-wrap th, .wm-static-wrap td { border: 1px solid #3b3b3c; padding: 9px 11px; text-align: left; }
.wm-static-wrap th { background: #272727; color: #ecbd7b; font-weight: 600; }

/* แถบลิงก์กฎหมาย ใต้ footer หลัก */
.wm-static-footer {
  border-top: 1px solid #262626; padding: 18px 16px 26px; text-align: center; color: #8a8a8a; font-size: 12px;
}
.wm-static-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-bottom: 10px; }
.wm-static-footer a { color: #cfcfcf; text-decoration: none; font-size: 13px; }
.wm-static-footer a:hover { color: #ecbd7b; }

/* ── ranking: ให้กลืนกับเปลือกหน้ารอง (ไฟล์มี <style> ของตัวเองสำหรับธีมเดิม) ── */
.wm-static-body .member-ranking-page { min-height: 0; padding: 0; background: none; }
/* hero/grid ของ ranking เป็น <section> จึงโดนกฎการ์ดด้านบนครอบอีกชั้น — ถอดออก
   (การ์ดจริงคือ .member-ranking-card ที่อยู่ข้างใน) */
.wm-static-wrap .member-ranking-hero,
.wm-static-wrap .member-ranking-grid {
  background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0;
}
.wm-static-body .member-ranking-shell { width: 100%; }
.wm-static-body .member-ranking-topbar { margin-bottom: 12px; }
.wm-static-body .member-ranking-back {
  border-color: rgba(236, 189, 123, .35); border-radius: 8px; color: #ecbd7b; background: transparent;
  padding: 7px 14px; text-decoration: none;
}
.wm-static-body .member-ranking-back:hover {
  border-color: transparent; color: #241a06;
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
}
.wm-static-body .member-ranking-card {
  background: #1e1e1e; border: 1px solid #3b3b3c; border-radius: 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
}
.wm-static-body .member-ranking-summary {
  background:
    radial-gradient(120% 100% at 0 0, rgba(236, 189, 123, .10), transparent 60%),
    #1e1e1e;
  border-color: rgba(236, 189, 123, .3);
}
.wm-static-body .member-ranking-summary h1 { color: #ecbd7b; padding-left: 0; }
.wm-static-body .member-ranking-summary h1::before { content: none; }
.wm-static-body .member-ranking-stat,
.wm-static-body .member-ranking-row,
.wm-static-body .member-ranking-benefit-metrics span,
.wm-static-body .member-ranking-tabs button { background: #272727; border-color: #3b3b3c; }
.wm-static-body .member-ranking-row.is-current-member {
  border-color: rgba(236, 189, 123, .7); background: rgba(236, 189, 123, .14);
}
.wm-static-body .member-ranking-your-rank strong,
.wm-static-body .member-ranking-row-rank,
.wm-static-body .member-ranking-benefit-item b { color: #ecbd7b; }
.wm-static-body .member-ranking-progress-fill { background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%); }
.wm-static-body .member-ranking-tabs button.active {
  color: #241a06; border-color: transparent;
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
}
.wm-static-body .member-ranking-section-head h2,
.wm-static-body .member-ranking-benefits h2,
.wm-static-body .member-ranking-rules h2 { color: #f2cf7f; padding-left: 0; }
.wm-static-body .member-ranking-benefit-item { border-top-color: #313131; }

@media (max-width: 576px) {
  .wm-static-wrap { padding: 16px 12px 24px; }
  .wm-static-wrap section { padding: 15px 14px; border-radius: 12px; }
  .wm-static-wrap h1 { font-size: 20px; }
  .wm-static-wrap h2 { font-size: 16px; }
}

/* ── Header chip: จัดอันดับ + เพชร (ข้างยอดเครดิต) ── */
.wm-top-chip {
  display: inline-flex; align-items: center; gap: 6px; margin-right: 8px;
  height: 34px; padding: 0 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(236, 189, 123, .3);
  color: #f2cf7f; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.wm-top-chip:hover { border-color: #ecbd7b; color: #ecbd7b; text-decoration: none; }
.wm-top-chip img { width: 20px; height: 20px; object-fit: contain; }
.wm-top-chip .-gem { font-size: 13px; }
.wm-top-chip.-diamond b { color: #8fd0ff; }

/* ── Big Win (แถวเลื่อนอัตโนมัติ) ── */
.wm-bigwin { margin-bottom: 16px; overflow: hidden; }
.wm-bigwin-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.wm-bigwin-head h2 { margin: 0; color: #fafafa; font-size: 17px; font-weight: 700; }
.wm-bigwin-head .-live {
  display: inline-flex; align-items: center; gap: 5px; color: #fff; font-size: 11px; font-weight: 700;
  background: linear-gradient(180deg, #f22662, #a3123f); border-radius: 999px; padding: 3px 10px;
}
.wm-bigwin-head .-live i { font-size: 7px; animation: wmBlink 1.2s ease-in-out infinite; }
@keyframes wmBlink { 50% { opacity: .25; } }
/* วนไม่มีรอยต่อ: ระยะเลื่อนต้องเท่ากับ "ความกว้างชุดแรก + gap" พอดี
   -50% ของ track ไม่เท่ากับค่านั้น (เพราะ gap ระหว่างชุดหายไปครึ่งหนึ่ง) จึงกระตุกทุกรอบ
   ค่า --wm-bw-shift วัดจริงด้วย JS (tuneBigwin) */
.wm-bigwin-track {
  display: flex; gap: 10px; width: max-content; will-change: transform;
  animation: wmBigwinRun 42s linear infinite;
}
.wm-bigwin:hover .wm-bigwin-track { animation-play-state: paused; }
@keyframes wmBigwinRun {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--wm-bw-shift, 50%)), 0, 0); }
}
/* การ์ด Big Win — เน้น "ยอดที่ชนะ" เป็นพระเอก
   ทั้งหมดใช้ border/gradient ล้วน ไม่มี box-shadow/blur/filter เพราะการ์ดวิ่งตลอดเวลา
   เงาหรือเบลอบนสิ่งที่ animate อยู่ = repaint ทุกเฟรม เครื่องอ่อน ๆ จะกระตุกทันที */
.wm-bigwin-card {
  position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: linear-gradient(135deg, #241f16 0%, #17171c 55%, #131317 100%);
  border: 1px solid rgba(236, 189, 123, .26); border-radius: 12px;
  padding: 9px 14px 9px 9px; overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
/* แถบทองบาง ๆ ด้านซ้าย แทนการใส่เงา */
.wm-bigwin-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #e0c587, #8e763e);
}
.wm-bigwin-card:hover { border-color: rgba(236, 189, 123, .75); transform: translateY(-1px); }

.wm-bigwin-card .-thumb {
  width: 46px; height: 46px; border-radius: 9px; object-fit: cover; background: #101014;
  border: 1px solid rgba(236, 189, 123, .22);
}
.wm-bigwin-card .-info { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }

.wm-bigwin-card .-user {
  display: flex; align-items: center; gap: 5px;
  color: #e8e8ea; font-size: 11.5px; font-weight: 500;
}
.wm-bigwin-card .-rank {
  color: #241a06; border-radius: 4px; padding: 1px 5px; font-size: 9.5px; font-weight: 700;
  background: linear-gradient(180deg, #f0dcae, #c4a55f); line-height: 1.35;
}
.wm-bigwin-card .-game {
  color: #8e8e98; font-size: 10.5px; max-width: 132px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* ยอดชนะ: ตัวใหญ่สุดในการ์ด + ตัวคูณเป็นชิปเล็กต่อท้ายบรรทัดเดียวกัน */
.wm-bigwin-card .-amount {
  display: inline-flex; align-items: baseline; gap: 6px;
  color: #6ee7d1; font-size: 15px; font-weight: 700; letter-spacing: .2px; margin-top: 1px;
}
.wm-bigwin-card .-mult {
  align-self: flex-start; color: #f2cf7f; font-size: 10px; font-weight: 700;
  border: 1px solid rgba(236, 189, 123, .38); border-radius: 999px; padding: 0 6px; line-height: 15px;
}

/* ── เกมที่เล่นล่าสุด ── */
.wm-recent { margin-bottom: 16px; }
.wm-recent-head { color: #ecbd7b; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.wm-recent-track {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.wm-recent-track::-webkit-scrollbar { display: none; }
.wm-recent-card { flex: 0 0 92px; text-decoration: none; }
.wm-recent-card img {
  width: 92px; height: 92px; border-radius: 10px; object-fit: cover; display: block;
  border: 1px solid rgba(236, 189, 123, .24); background: #16161a;
}
.wm-recent-card:hover img { border-color: #ecbd7b; }
.wm-recent-card span {
  display: block; margin-top: 4px; color: #cfcfcf; font-size: 11px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* ── ปุ่มหมวดหวย/ไก่ชน: แผ่นป้ายเป็น SVG (พื้นเปล่า) + ภาพจริงวางทับด้วย CSS ──
   ทำแบบนี้เพราะ SVG ที่โหลดผ่าน <img> อ้างไฟล์ภาพภายนอกไม่ได้ (เบราว์เซอร์บล็อก)
   ส่วนการฝัง base64 ทำให้ไฟล์บวมหลายสิบ KB ต่อรูป — ไม่คุ้มกับหน้าที่ต้องเบา */
.x-category-button.-category-lotto[data-cat-art],
.x-category-button.-category-sport[data-cat-art],
.x-category-button[data-cat-art] { position: relative; }
.x-category-button[data-cat-art]::after {
  content: ''; position: absolute; left: 4%; top: 50%; transform: translateY(-50%);
  width: 30%; aspect-ratio: 1 / 1; pointer-events: none; z-index: 1;
  background: var(--wm-cat-art) center / contain no-repeat;
}
.x-category-button[data-cat-art="huay"] { --wm-cat-art: url('/wm356/build/web/ezl-wm-356/img/ic-menu-huay.png?v=3'); }
.x-category-button[data-cat-art="cock"] { --wm-cat-art: url('/wm356/build/web/ezl-wm-356/img/ic-menu-cock.png?v=3'); }

/* ── ปุ่มสลับภาษา TH/EN บน topnav ── */
.wm-lang { position: relative; flex: none; margin-right: 8px; }
.wm-lang-current {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px;
  border: 1px solid rgba(236, 189, 123, .3); border-radius: 999px;
  background: rgba(255, 255, 255, .06); color: #f2cf7f;
  font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.wm-lang-current:hover { border-color: #ecbd7b; }
.wm-lang-current i { font-size: 9px; }
.wm-lang-flag { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.wm-lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 1036; display: none;
  min-width: 128px; padding: 5px; border: 1px solid rgba(236, 189, 123, .35);
  border-radius: 10px; background: #1e1e1e; box-shadow: 0 12px 26px rgba(0, 0, 0, .6);
}
.wm-lang.is-open .wm-lang-menu, .wm-lang-menu.is-open { display: block; }
.wm-lang-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 9px;
  border: 0; border-radius: 7px; background: transparent; color: #cfcfcf;
  font-family: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.wm-lang-opt:hover { background: rgba(236, 189, 123, .1); }
.wm-lang-opt.active { color: #ecbd7b; background: rgba(236, 189, 123, .14); }
@media (max-width: 576px) {
  .wm-lang-current { height: 30px; padding: 0 7px; font-size: 11px; gap: 4px; }
  .wm-lang-current span { display: none; }
  .wm-lang-current i { display: none; }
  .wm-lang { margin-right: 6px; }
}

/* ── ไอคอนบัญชีบน header (แทนรูป avatar ของ template) ── */
.wm-profile-icon {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 999px; border: 1px solid rgba(236, 189, 123, .38);
  background: rgba(236, 189, 123, .1); color: #ecbd7b; font-size: 16px;
}
.-btn-wrapper:hover .wm-profile-icon {
  border-color: transparent; color: #241a06;
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
}

@media (max-width: 860px) {
  .wm-top-chip { height: 30px; padding: 0 8px; font-size: 12px; margin-right: 6px; }
  .wm-top-chip img { width: 17px; height: 17px; }
  .wm-bigwin-head h2 { font-size: 15px; }
  .wm-recent-card { flex-basis: 78px; }
  .wm-recent-card img { width: 78px; height: 78px; }
}

/* ══ header มือถือ: ของเดิมยัด 7 อย่างใน 341px จนทุกชิ้นถูกบีบเหลือ ~13px อ่านไม่ออก
   ตัดตัวที่ "มีอยู่แล้วในเมนู hamburger" ออก แล้วคืนพื้นที่ให้ยอดเครดิต
   คงไว้: ☰ · โลโก้ · ป้ายแรงค์(ไอคอนล้วน) · กระดิ่ง · ยอดเครดิต · ไอคอนบัญชี ══ */
@media (max-width: 576px) {
  /* ซ่อนเฉพาะชิปเพชร (ดูได้ในเมนูแลกรางวัล) — ปุ่ม LINE ต้องอยู่ เป็นช่องทางติดต่อแอดมิน */
  .x-header .wm-top-chip.-diamond { display: none !important; }
  .x-header .x-header-btn-support { flex: none; margin-right: 8px; }

  /* ป้ายแรงค์เป็นไอคอนล้วนอยู่แล้ว (ดูบล็อก "#2 Header: ไอคอน rank อย่างเดียว")
     ที่นี่แค่กันไม่ให้ flex บีบจนไอคอนแบน */
  .x-header .wm-top-rank { flex: none; margin-right: 6px; }

  /* ห้ามให้ flex บีบ 3 ชิ้นที่เหลือ */
  .x-header .wm-notify-bell,
  .x-header .-profile-outer-container,
  .x-header .wm-profile-icon { flex: none; }
  .x-header .-balance-container { min-width: 0; }
  .x-header #headerBrand { flex: 0 1 auto; min-width: 56px; }
}

/* ══ ปุ่ม "สมัครสมาชิก" บน header (guest)
   template ซ่อนไว้ด้วย `.x-header .btn.-btn-header-register{display:none}` (style.css)
   เปิดกลับมาทั้ง pc/mobile + ทำเป็นปุ่มทอง (CTA หลัก) คู่กับปุ่มเข้าสู่ระบบสีเขียว ══ */
.x-header .btn.-btn-header-register {
  display: flex;
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
  border: 1px solid #8e763e; color: #241a06; font-weight: 700; white-space: nowrap;
}
.x-header .btn.-btn-header-register:hover,
.x-header .btn.-btn-header-register:focus {
  background: radial-gradient(81.82% 100% at 50% 0, #f0dcaa 0, #d8bb76 39.06%, #a4884a 100%);
  border-color: #a4884a; color: #241a06;
}
/* จอเล็ก: ตัดปุ่ม LINE ในแถบบนของ guest ออก (มีในเมนู ☰ และแถบล่างอยู่แล้ว)
   แล้วย่อปุ่มคู่ลง เพื่อให้ ☰+โลโก้+ภาษา+2 ปุ่ม อยู่ในบรรทัดเดียวโดยไม่เบียดกัน */
@media (max-width: 575.98px) {
  .x-header .x-header-btn-support.-in-anon { display: none; }
  .x-header .btn.-btn-header-register,
  .x-header .btn.-btn-header-login { width: 82px; font-size: .72rem; }
  /* 82px x2 + ระยะห่าง ยังพอดีจอ 320px (เทสแล้วขอบขวาเหลือ 16px ไม่ล้นแนวนอน) */
  #headerContent .-btn-header-register { margin-right: 6px !important; }
}

/* ── ป้ายระดับสมาชิก (rank) บน header — โทนเดียวกับธีมเดิม ── */
.wm-top-chip.-rank b { font-size: 12px; text-transform: capitalize; }
.wm-top-chip.rank-bronze { border-color: #b0794a; color: #d9a273; }
.wm-top-chip.rank-bronze b { color: #d9a273; }
.wm-top-chip.rank-silver { border-color: #9fb2c4; color: #d3dde6; }
.wm-top-chip.rank-silver b { color: #d3dde6; }
.wm-top-chip.rank-gold { border-color: #e0c587; color: #f2cf7f; }
.wm-top-chip.rank-gold b { color: #f2cf7f; }
.wm-top-chip.rank-platinum { border-color: #7fd3e0; color: #a9e8f2; }
.wm-top-chip.rank-platinum b { color: #a9e8f2; }
.wm-top-chip.rank-diamond { border-color: #6fa0ff; color: #8fd0ff; }
.wm-top-chip.rank-diamond b { color: #8fd0ff; }

/* ── Big Win: สลิปรายละเอียด (กดการ์ดแล้วดูก่อน ค่อยกดเล่น) ── */
.wm-bw-detail { text-align: center; }
.wm-bw-celebrate { color: #f2cf7f; font-size: 14px; margin-bottom: 12px; }
.wm-bw-game { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; }
.wm-bw-game img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #101014; }
.wm-bw-game div { text-align: left; display: flex; flex-direction: column; }
.wm-bw-game b { color: #fafafa; font-size: 15px; }
.wm-bw-game span { color: #9d9d9d; font-size: 12px; }
.wm-bw-profit {
  background: rgba(76, 171, 137, .12); border: 1px solid rgba(76, 171, 137, .4);
  border-radius: 12px; padding: 12px; margin-bottom: 12px;
}
.wm-bw-profit small { display: block; color: #9d9d9d; font-size: 12px; }
.wm-bw-profit b { color: #6ee7d1; font-size: 26px; font-weight: 700; }
.wm-bw-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px;
}
.wm-bw-stats div {
  background: #272727; border: 1px solid #3b3b3c; border-radius: 8px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 2px; text-align: left;
}
.wm-bw-stats span { color: #9d9d9d; font-size: 11px; }
.wm-bw-stats b { color: #fafafa; font-size: 13px; word-break: break-all; }

/* ── แท็บ สมัคร/เข้าสู่ระบบ ในโมดัล (โครง core wm356) ── */
.x-modal-account-security-tabs {
  display: flex; border-bottom: 1px solid #2a2a2a; background: #141418;
}
.x-modal-account-security-tabs .-btn {
  position: relative; flex: 1; padding: 16px 10px; border: 0; background: transparent;
  color: #8f8f8f; font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.x-modal-account-security-tabs .-btn:hover { color: #cfcfcf; }
.x-modal-account-security-tabs .-btn.-active { color: #fafafa; background: #1f1f24; }
.x-modal-account-security-tabs .-btn.-active::after {
  content: ""; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, #ecbd7b, transparent);
}
.x-modal-account-security-tabs .-ic-badge {
  position: absolute; top: -2px; left: 50%; transform: translateX(-50%);
  width: 62px; height: auto; pointer-events: none;
}
.x-modal .close.-in-tab { top: 14px; right: 14px; font-size: 22px; color: #fafafa; }

/* หัวข้อ/คำอธิบายในโมดัลสมัคร-เข้าสู่ระบบ */
.x-title-register-modal-v3 {
  color: #f2cf7f; font-size: 19px; font-weight: 700; text-align: center; margin: 6px 0 4px;
}
.x-register-tab-container .wm-modal-subtitle { margin-bottom: 16px; font-size: 13px; }
.x-form-control.-phone { text-align: center; font-size: 18px; letter-spacing: 1px; padding: 14px; border-radius: 10px; }
.wm-terms-note { color: #9d9d9d; font-size: 12px; text-align: center; margin: 10px 0 8px; }
.wm-terms-note a { color: #e0c587; text-decoration: underline; }

/* ปุ่มเข้าสู่ระบบด้วยไลน์ */
.wm-line-login img { width: 22px; height: 22px; object-fit: contain; }

/* ── FIX: ปุ่มติดต่อใน footer ให้ขนาดเท่ากันและไอคอนไม่หาย ── */
.wm-pop777-footer-wrap .trust-socials button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border-radius: 10px; background: #1e1e1e; border: 1px solid #333;
}
.wm-pop777-footer-wrap .trust-socials button:hover { border-color: #ecbd7b; }
.wm-pop777-footer-wrap .trust-socials button img {
  width: 26px !important; height: 26px !important; max-width: 26px; max-height: 26px; object-fit: contain;
}

/* ── FIX มือถือ: หมวดหมู่ 3 ต่อแถว / การ์ดค่าย-เกม 3 ต่อแถว ──
   template ตั้ง .navbar-nav เป็น flex-direction:column บนจอเล็ก จึงต้อง override ให้ชัด */
@media (max-width: 860px) {
  .wm-lobby-core .-menu-parent {
    flex-direction: row !important; flex-wrap: wrap !important;
    overflow: visible !important; justify-content: center; gap: 8px;
  }
  .wm-lobby-core .-list-parent {
    flex: 0 0 calc((100% - 2 * 8px) / 3) !important;
    max-width: calc((100% - 2 * 8px) / 3) !important;
    padding-left: 0 !important; padding-right: 0 !important;
  }
  #wmProviderArea, #wmGameGrid {
    flex-direction: row !important; flex-wrap: wrap !important; overflow: visible !important;
  }
  #wmProviderArea > .nav-item, #wmGameGrid > .nav-item {
    flex: 0 0 calc((100% - 2 * 10px) / 3) !important;
    max-width: calc((100% - 2 * 10px) / 3) !important;
  }
}

/* FIX: .wm-lobby-core เป็น flex item ของ .x-index-content-main-container (display:flex)
   จึงไม่ยอมหดตามพ่อ (กว้าง 1280 ในพ่อ 422 บนมือถือ) ทำให้ % ของลูกคำนวณผิดทั้งหมด */
.wm-lobby-core { width: 100%; min-width: 0; }
.wm-lobby-core .-nav-menu-container,
.wm-lobby-core .x-category-total-game,
.wm-lobby-core .x-category-total-game .container-fluid,
.wm-lobby-core .nav-menu,
.wm-lobby-core .-menu-parent,
.wm-lobby-core .-games-list-container,
.wm-lobby-core .-games-list-wrapper { min-width: 0; max-width: 100%; }

/* ── แผงกิจกรรม (แตกจากปุ่มกลาง sticky footer) ── */
.wm-activity-sheet {
  position: fixed; inset: 0; z-index: 1040; display: none;
  background: rgba(0, 0, 0, .6);
}
.wm-activity-sheet.show { display: block; animation: wmBackdropIn .22s ease-out both; }
/* ขาปิดต้องพึ่ง JS เหมือน modal/popup — display ทรานซิชันไม่ได้
   closeActivitySheet() ติด -closing แล้วรออนิเมชันจบก่อนถอด show */
.wm-activity-sheet.-closing { pointer-events: none; animation: wmBackdropOut .2s ease-in both; }
.wm-activity-sheet .-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, #1c1c22 0%, #141418 100%);
  border-top: 1px solid rgba(236, 189, 123, .35);
  border-radius: 18px 18px 0 0;
  padding: 10px 14px calc(88px + env(safe-area-inset-bottom));
  box-shadow: 0 -14px 34px rgba(0, 0, 0, .6);
  animation: wmSheetUp .26s cubic-bezier(.2, .8, .3, 1);
}
.wm-activity-sheet.-closing .-panel { animation: wmSheetDown .22s ease-in both; }
@keyframes wmSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes wmSheetDown { from { transform: translateY(0); } to { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) {
  .wm-activity-sheet.show, .wm-activity-sheet.-closing,
  .wm-activity-sheet .-panel, .wm-activity-sheet.-closing .-panel { animation: none; }
}
.wm-activity-sheet .-grab {
  width: 42px; height: 4px; border-radius: 3px; background: #4a4a55; margin: 2px auto 10px;
}
.wm-activity-sheet .-title { color: #ecbd7b; font-size: 15px; font-weight: 700; text-align: center; margin-bottom: 12px; }
.wm-activity-sheet .-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wm-activity-sheet .-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: #232329; border: 1px solid #35353f; border-radius: 12px;
  padding: 14px 6px; cursor: pointer; font-family: inherit; color: #fafafa; font-size: 13px;
}
.wm-activity-sheet .-item:hover, .wm-activity-sheet .-item:active { border-color: #ecbd7b; color: #ecbd7b; }
.wm-activity-sheet .-item img { width: 40px; height: 40px; object-fit: contain; }
/* ปุ่มกลางตอนเปิดแผง */
.wm-sticky-item.-center.-active .-bubble { box-shadow: 0 0 0 3px rgba(236, 189, 123, .35), 0 4px 14px rgba(236, 189, 123, .5); }

/* ══ Game Frame (iframe เต็มจอ) ══ */
body.wm-gameframe-open { overflow: hidden !important; }
.wm-gameframe {
  position: fixed; inset: 0; z-index: 20000; display: none;
  flex-direction: column; background: #0d0d10;
}
.wm-gameframe.-show { display: flex; }
.wm-gameframe-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: linear-gradient(180deg, #23232b, #16161c);
  border-bottom: 1px solid rgba(236, 189, 123, .25);
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
}
.wm-gameframe-bar .-title {
  flex: 1 1 auto; min-width: 0; color: #fff; font-size: .95rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.wm-gameframe-bar .-actions { display: flex; align-items: center; gap: 8px; }
.wm-gameframe-bar .-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer;
  border-radius: 8px; padding: 7px 12px; font-size: .85rem; font-weight: 600;
  background: rgba(255, 255, 255, .1); color: #fff; transition: filter .15s;
}
.wm-gameframe-bar .-btn:hover { filter: brightness(1.2); }
.wm-gameframe-bar .-btn.-deposit {
  background: linear-gradient(180deg, #ecbd7b, #b07a4a); color: #1a1a1a;
}
.wm-gameframe-bar .-btn.-newtab { padding: 7px 10px; }
.wm-gameframe-body { flex: 1 1 auto; position: relative; min-height: 0; }
.wm-gameframe-body iframe { width: 100%; height: 100%; border: 0; display: block; background: #0d0d10; }
.wm-gameframe-loading {
  position: absolute; inset: 0; z-index: 2; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: #0d0d10;
}
.wm-gameframe-loading.-show { display: flex; }
.wm-gameframe-loading .-text { color: #ecbd7b; font-size: .9rem; letter-spacing: .5px; }
@media (max-width: 575px) {
  .wm-gameframe-bar .-btn span { display: none; }
  .wm-gameframe-bar .-btn.-back span { display: inline; }
}
.wm-gf-spinner {
  width: 54px; height: 54px; border-radius: 50%;
  border: 4px solid rgba(236, 189, 123, .2); border-top-color: #ecbd7b;
  animation: wmGfSpin .8s linear infinite;
}
@keyframes wmGfSpin { to { transform: rotate(360deg); } }

/* ══ #2 Header: ไอคอน rank อย่างเดียว (ไม่เอาข้อความ) ══ */
.wm-top-rank .-rank-name, #wmTopRankName { display: none !important; }
.wm-top-rank {
  display: inline-flex !important; align-items: center; justify-content: center;
  padding: 0 !important; background: transparent !important; border: 0 !important;
  min-width: 0 !important; width: auto !important;
}
.wm-top-rank .-rank-icon {
  width: 30px; height: 30px; object-fit: contain; display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5));
}
@media (max-width: 575px) { .wm-top-rank .-rank-icon { width: 26px; height: 26px; } }

/* ══ #4 บทความแนะนำ: ตัดตัวขยายซ้ำ (เหลือปุ่มเดียว) + ย่อกลับได้ ══ */
/* เอาข้อความ "แตะเพื่ออ่านต่อ" ออก เหลือแค่เงาไล่สี ใช้ปุ่มด้านล่างตัวเดียว */
.wm-pop777-footer-wrap .member-keyword-content::after { content: "" !important; height: 70px; pointer-events: none; }
.wm-pop777-footer-wrap .member-keyword-content { cursor: default !important; }
.wm-pop777-footer-wrap .member-keyword-toggle {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; max-width: 260px; margin: 12px auto 0; padding: 9px 18px;
  border: 1px solid rgba(224, 197, 135, .45); border-radius: 999px;
  background: rgba(224, 197, 135, .08); color: #e0c587;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s;
}
.wm-pop777-footer-wrap .member-keyword-toggle:hover {
  background: rgba(224, 197, 135, .18); border-color: rgba(224, 197, 135, .8);
}
.wm-pop777-footer-wrap .member-keyword-toggle i { transition: transform .2s; }
.wm-pop777-footer-wrap .member-keyword-toggle[aria-expanded="true"] i { transform: rotate(180deg); }

/* ══ #6 จอแคบ (<404px): ปุ่มค้นหาต้องอยู่บรรทัดเดียวกับช่องค้นหา ══ */
.-game-search-inner .x-search-component.-v2 {
  display: flex !important; flex-wrap: nowrap !important; align-items: stretch; width: 100%;
}
.-game-search-inner .x-search-component.-v2 .-form-search-input {
  flex: 1 1 auto !important; min-width: 0 !important; width: auto !important;
}
.-game-search-inner .x-search-component.-v2 .input-group-prepend {
  flex: 0 0 auto !important; display: flex !important; margin: 0 !important;
}
/* มือถือ: หัวข้อ "เกมยอดนิยม" กับช่องค้นหาอยู่บรรทัดเดียวกัน */
@media (max-width: 767px) {
  .-game-title-wrapper {
    display: flex !important; flex-wrap: nowrap !important;
    align-items: center; gap: 8px; width: 100%;
  }
  .-game-title-inner { flex: 0 1 auto; min-width: 0; }
  .-game-title-inner .-game-title {
    margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.05rem;
  }
  .-game-search-inner { flex: 1 1 auto; min-width: 0; margin: 0 !important; }
  /* padding-right เผื่อที่ให้ไอคอนแว่นขยายที่วางทับอยู่มุมขวาในช่อง */
  .-game-search-inner .x-search-component.-v2 .-form-search-input {
    font-size: 13px; padding-left: 12px; padding-right: 38px; height: 38px;
  }
  .-game-search-inner .x-search-component.-v2 .-btn-search { padding: 0; }
}
@media (max-width: 400px) {
  .-game-title-inner .-game-title { font-size: .95rem; }
  .-game-title-inner .-sub-title { display: none; }
}

.wm-bank-picker { display: none !important; }

/* ══════════════════════════════════════════════════════════
   สมัครสมาชิกแบบเป็นขั้น + ตัวเลือกธนาคารที่มีโลโก้
   <select> แสดงรูปในตัวเลือกไม่ได้ทุกเบราว์เซอร์ จึงทำ listbox เอง
   ══════════════════════════════════════════════════════════ */
.wm-reg-head {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 34px; margin-bottom: 14px;
}
.wm-reg-head .-back {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid rgba(236, 189, 123, .3); border-radius: 8px;
  background: rgba(255, 255, 255, .05); color: #ecbd7b; font-size: 14px; cursor: pointer;
}
.wm-reg-head .-back:hover { border-color: #ecbd7b; }
.wm-reg-head .-title { color: #fafafa; font-size: 16px; font-weight: 600; }
.wm-reg-head .-dots { position: absolute; right: 0; display: flex; gap: 6px; }
.wm-reg-head .-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #3b3b3c; transition: background .2s ease;
}
.wm-reg-head .-dot.-done { background: rgba(236, 189, 123, .45); }
.wm-reg-head .-dot.-active { background: #ecbd7b; box-shadow: 0 0 0 3px rgba(236, 189, 123, .18); }

.wm-reg-step { display: none; }
.wm-reg-step.-active { display: block; animation: wmRegIn .18s ease; }
@keyframes wmRegIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
/* ชื่อ+นามสกุล อยู่บรรทัดเดียวกัน — ประหยัดความสูงไปอีกแถว */
.wm-reg-name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wm-reg-name-row .form-group { margin-bottom: 0; }

/* ── ตัวเลือกธนาคาร ── */
.wm-bankpick { position: relative; }
.wm-bankpick .-trigger {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fafafa; font-family: inherit; text-align: left; cursor: pointer;
}
.wm-bankpick.-open .-trigger, .wm-bankpick .-trigger:hover { border-color: #ecbd7b; }
/* โลโก้ในตัวเลือก: กระเบื้องแก้วขนาด 34px (ระยะห่างใช้ gap ของ flex ไม่ใช้ margin) */
.wm-bankpick .wm-bank-ic { width: 34px; height: 34px; border-radius: 9px; margin-right: 0; }
.wm-bankpick .-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.wm-bankpick .-txt b { color: #fafafa; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-bankpick .-txt small { color: #8e8e98; font-size: 11px; letter-spacing: .3px; }
.wm-bankpick .-caret { flex: none; color: #ecbd7b; font-size: 12px; transition: transform .18s ease; }
.wm-bankpick.-open .-caret { transform: rotate(180deg); }

.wm-bankpick .-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5;
  max-height: 244px; overflow-y: auto; padding: 6px;
  border: 1px solid rgba(236, 189, 123, .35); border-radius: 12px;
  background: rgba(26, 26, 31, .88);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .6);
}
.wm-bankpick .-panel[hidden] { display: none; }
.wm-bankpick .-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border: 1px solid transparent; border-radius: 9px; background: transparent;
  color: inherit; font-family: inherit; text-align: left; cursor: pointer;
}
.wm-bankpick .-opt:hover { background: rgba(236, 189, 123, .09); }
.wm-bankpick .-opt.-selected { border-color: rgba(236, 189, 123, .55); background: rgba(236, 189, 123, .13); }
/* จับที่ .-txt เท่านั้น — ห้ามจับ span ลอยๆ เพราะจะไปทับ span.wm-bank-ic (กระเบื้องแก้ว) ให้ยืดเต็มแถว */
.wm-bankpick .-opt .-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.wm-bankpick .-opt .-txt b { color: #fafafa; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-bankpick .-opt .-txt small { color: #8e8e98; font-size: 10.5px; letter-spacing: .3px; }
.wm-bankpick .-opt .-tick { flex: none; color: #ecbd7b; font-size: 12px; opacity: 0; }
.wm-bankpick .-opt.-selected .-tick { opacity: 1; }

/* ══ ฝาก USDT ในโมดัล (แท็บ Crypto) ══ */
.wm-crypto-label { color: #e0c587; font-size: 13px; font-weight: 600; margin: 4px 0 8px; }
.wm-crypto-chains { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 14px; }
.wm-crypto-chain {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 6px;
  border: 1px solid #3b3b3c; border-radius: 10px; background: #16161a;
  color: #cfcfcf; font-family: inherit; cursor: pointer;
}
.wm-crypto-chain b { color: #fafafa; font-size: 13px; }
.wm-crypto-chain small { color: #8e8e98; font-size: 10px; text-align: center; line-height: 1.25; }
.wm-crypto-chain.-active {
  border-color: #ecbd7b; background: rgba(236, 189, 123, .12);
}
.wm-crypto-chain.-active b { color: #ecbd7b; }
.wm-crypto-note {
  color: #9d9d9d; font-size: 11.5px; line-height: 1.6; margin: 10px 0;
  padding: 9px 11px; border: 1px solid #313131; border-radius: 9px; background: rgba(255, 255, 255, .03);
}
.wm-crypto-note i { color: #ecbd7b; margin-right: 4px; }
.wm-crypto-note b { color: #f2cf7f; }

.wm-crypto-order {
  border: 1px solid rgba(236, 189, 123, .3); border-radius: 12px; padding: 14px; background: #1a1a1f;
}
.wm-crypto-order .-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: #8e8e98; font-size: 12px; padding-bottom: 10px; border-bottom: 1px solid #2f2f2f;
}
.wm-crypto-order .-head b { color: #cfcfcf; font-weight: 500; }
.wm-crypto-order .-amount {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0 6px;
}
.wm-crypto-order .-amount small { color: #8e8e98; font-size: 11.5px; }
.wm-crypto-order .-amount b { color: #6ee7d1; font-size: 26px; font-weight: 700; letter-spacing: .5px; }
.wm-crypto-order .-amount b span { color: #9d9d9d; font-size: 14px; font-weight: 500; }
.wm-crypto-order .-rate { color: #9d9d9d; font-size: 12px; text-align: center; margin-bottom: 12px; }

.wm-crypto-order .-addr-row { display: flex; gap: 12px; align-items: center; }
.wm-crypto-order .-qr {
  flex: none; width: 120px; height: 120px; display: grid; place-items: center;
  background: #fff; border-radius: 10px; padding: 8px;
}
.wm-crypto-order .-qr img, .wm-crypto-order .-qr canvas { display: block; }
.wm-crypto-order .-addr { flex: 1; min-width: 0; }
.wm-crypto-order .-addr small { display: block; color: #8e8e98; font-size: 11.5px; margin-bottom: 4px; }
.wm-crypto-order .-addr code {
  display: block; color: #f2e3c6; font-size: 11.5px; line-height: 1.5; word-break: break-all;
  background: rgba(255, 255, 255, .05); border-radius: 8px; padding: 7px 9px; margin-bottom: 7px;
}
.wm-crypto-order .-status {
  display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px;
  padding: 9px; border-radius: 9px; background: rgba(255, 255, 255, .05);
  color: #cfcfcf; font-size: 13px; font-weight: 500;
}
.wm-crypto-order .-status.-wait { background: rgba(236, 189, 123, .14); color: #f2cf7f; }
.wm-crypto-order .-status.-ok { background: rgba(110, 231, 209, .14); color: #6ee7d1; }
.wm-crypto-order .-timer { color: #9d9d9d; font-size: 12.5px; text-align: center; margin-top: 8px; }
.wm-crypto-order .-timer b { color: #ecbd7b; font-size: 15px; }
.wm-crypto-order .btn.-cancel {
  margin-top: 12px; border: 1px solid #3b3b3c; border-radius: 8px; background: transparent;
  color: #cfcfcf; font-family: inherit; padding: 9px;
}
.wm-crypto-order .btn.-cancel:hover { border-color: #f22662; color: #f79ab3; }

@media (max-width: 420px) {
  .wm-crypto-order .-addr-row { flex-direction: column; }
  .wm-crypto-order .-qr { width: 132px; height: 132px; }
  .wm-crypto-order .-addr { width: 100%; }
}

/* ช่องเลขบัญชีตอนล็อก (ทรูวอลเล็ท) */
#wmRegAccNo.-locked {
  background: rgba(255, 255, 255, .05) !important; color: #bdbdbd !important;
  cursor: not-allowed; opacity: .85;
}
.wm-acc-hint { color: #ecbd7b; font-size: 11px; font-weight: 400; margin-left: 4px; }

/* กันโมดัลสมัครล้นจอบนมือถือ */
#registerModal .modal-dialog { max-width: 440px; width: calc(100% - 20px); margin: 0 auto; }
#registerModal .-modal-body { max-height: calc(100vh - 150px); overflow-y: auto; overflow-x: hidden; }
#registerModal .wm-form-wrap, #registerModal .form-group { max-width: 100%; min-width: 0; }
#registerModal .form-control { max-width: 100%; box-sizing: border-box; }
/* ช่องว่างสำหรับ Turnstile — จองพื้นที่เฉพาะตอนที่ JS เปิดใช้งานจริง */
#wmRegTurnstileWrap[style*="block"] { min-height: 70px; }
#wmRegTurnstile { display: flex; justify-content: center; transform-origin: center; }
@media (max-width: 400px) {
  #wmRegTurnstile { transform: scale(.86); }
  #registerModal .-modal-body { padding-left: 12px; padding-right: 12px; }
}

/* ══ #7 บัญชีของฉัน: 2 คอลัมน์ (เมนูซ้าย / ผลลัพธ์ขวา) ══ */
.wm-account-split { display: block; }
.wm-account-col-right { display: none; }

@media (min-width: 992px) {
  /* ขยายโมดัลบัญชีให้กว้างพอสำหรับ 2 คอลัมน์ */
  #accountModal .modal-dialog { max-width: 900px; }
  .wm-account-split {
    display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start;
  }
  .wm-account-col-left { min-width: 0; }
  .wm-account-col-right {
    display: flex; flex-direction: column; min-width: 0; min-height: 420px;
    background: rgba(255, 255, 255, .03); border: 1px solid rgba(236, 189, 123, .2);
    border-radius: 12px; overflow: hidden;
  }
  /* เมนูซ้ายเรียงแนวตั้ง อ่านง่ายกว่าแบบ 2 ช่อง */
  .wm-account-split .wm-account-menu.-grid2 { grid-template-columns: 1fr; }
  .wm-account-split .wm-account-menu-item { justify-content: flex-start; text-align: left; }
  .wm-account-split .wm-account-menu-item.-active {
    background: linear-gradient(90deg, rgba(236, 189, 123, .22), rgba(236, 189, 123, .05));
    border-color: rgba(236, 189, 123, .6);
  }
  .wm-account-pane-head {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    border-bottom: 1px solid rgba(236, 189, 123, .2); background: rgba(0, 0, 0, .25);
  }
  .wm-account-pane-head .-back { display: none; }
  .wm-account-pane-head .-title { margin: 0; font-size: 1rem; color: #ecbd7b; font-weight: 600; }
  .wm-account-pane-body { flex: 1 1 auto; padding: 16px; overflow-y: auto; max-height: 62vh; }
  .wm-account-pane-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; height: 100%; min-height: 320px; color: #7a7a86; text-align: center;
  }
  .wm-account-pane-empty i { font-size: 34px; color: rgba(236, 189, 123, .45); }
  .wm-account-pane-empty p { margin: 0; font-size: .9rem; line-height: 1.6; }
  /* เนื้อหาที่ยืมมาต้องไม่ล้นคอลัมน์ */
  .wm-account-pane-body > * { max-width: 100%; }
  .wm-account-pane-body .x-bill-history-container { max-height: none; }
}

/* ══ #7 (แก้รอบ 2) ข้อมูลบัญชีย้ายไปคอลัมน์ขวา เป็นเมนูแรก ══ */
/* มือถือ: แสดงข้อมูลบัญชีก่อน แล้วค่อยเมนู (เหมือนเดิมทุกอย่าง) */
@media (max-width: 991.98px) {
  .wm-account-split { display: flex; flex-direction: column; }
  .wm-account-col-right { display: block; order: 0; background: none; border: 0; }
  .wm-account-col-left { order: 1; }
  .wm-account-pane-head { display: none; }
  .wm-account-pane-body { padding: 0; }
  /* มือถือไม่ต้องมีเมนู "ข้อมูลบัญชี" เพราะข้อมูลโชว์อยู่ด้านบนแล้ว */
  .wm-account-menu-item[data-pane="info"] { display: none; }
}

@media (min-width: 992px) {
  /* เมนูซ้ายเป็นปุ่มใหญ่แนวตั้ง ตามตัวอย่าง */
  .wm-account-split .wm-account-menu.-grid2 { gap: 10px; }
  .wm-account-split .wm-account-menu-item {
    padding: 14px 16px; gap: 12px; border-radius: 12px; font-size: .95rem; font-weight: 600;
  }
  .wm-account-split .wm-account-menu-item img { width: 32px; height: 32px; flex: 0 0 32px; }
  .wm-account-split .wm-account-menu-item.-active {
    background: linear-gradient(90deg, rgba(236, 189, 123, .28), rgba(236, 189, 123, .06));
    border-color: rgba(236, 189, 123, .75); color: #ffe9c4;
  }
  /* หน้าเริ่มต้นในคอลัมน์ขวา */
  #wmAccountInfoPane .wm-account-box { margin-bottom: 14px; }
  #wmAccountInfoPane .wm-account-cta { margin-top: 0; }
}

/* ══ เงื่อนไขเทิร์นก่อนถอน ══ */
.wm-turnover {
  margin: 12px 0; padding: 12px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(236, 189, 123, .28);
}
.wm-turnover.-done { border-color: rgba(76, 171, 137, .5); background: rgba(76, 171, 137, .08); }
.wm-turnover .-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wm-turnover .-row + .-row { margin-top: 5px; }
.wm-turnover .-row span { font-size: 12.5px; color: #b9b9c4; }
.wm-turnover .-row b { font-size: 13.5px; color: #f2e3c6; }
.wm-turnover .-head span { color: #ecbd7b; font-weight: 600; }
.wm-turnover .-head b { color: #ecbd7b; font-size: 15px; }
.wm-turnover.-done .-foot span, .wm-turnover.-done .-foot b { color: #6fd6ae; }
.wm-turnover .-bar {
  height: 6px; border-radius: 999px; margin: 8px 0 6px; overflow: hidden;
  background: rgba(0, 0, 0, .45);
}
.wm-turnover .-bar > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #ecbd7b, #b07a4a); transition: width .35s ease;
}
.wm-turnover.-done .-bar > span { background: linear-gradient(90deg, #4cab89, #6fd6ae); }

/* ══ การ์ดเกม: ปุ่ม "เข้าเล่น" ต้องกดได้บนมือถือ ══
   core wm356 ซ่อน .-overlay ไว้ (visibility:hidden) แล้วโชว์ตอน :hover
   ซึ่งบนอุปกรณ์สัมผัสไม่มีวันเกิด ปุ่มจึงกดไม่ได้เลย */
.wm-game-card { cursor: pointer; }

/* อุปกรณ์สัมผัส (มือถือ/แท็บเล็ต): ไม่ต้องมีปุ่ม "เข้าเล่น" มาบังรูปเกม
   แตะที่การ์ดได้ทั้งใบอยู่แล้ว (handler .wm-game-card ใน wm356-app.js) */
@media (hover: none), (pointer: coarse) {
  .wm-game-card .-overlay { display: none !important; }
  /* ฟีดแบ็กตอนแตะ แทนปุ่ม */
  .wm-game-card:active .-inner-wrapper { transform: scale(.96); }
  .wm-game-card .-inner-wrapper { transition: transform .12s ease; }
}

/* ══ หมวดที่ยังไม่เปิดให้บริการ (หวย/ไก่ชน) ══ */
.wm-cat-pending {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 44px 20px; text-align: center;
  border: 1px dashed rgba(236, 189, 123, .35); border-radius: 14px;
  background: rgba(255, 255, 255, .03);
}
.wm-cat-pending i { font-size: 34px; color: rgba(236, 189, 123, .6); }
.wm-cat-pending h4 { margin: 0; color: #ecbd7b; font-size: 1.1rem; font-weight: 700; }
.wm-cat-pending p { margin: 0; color: #9a9aa6; font-size: .88rem; line-height: 1.7; }

/* ══════════════════════════════════════════════════════════
   ลำดับชั้นการแสดงผล (z-index) — รวมไว้ที่เดียว
   ต่ำ → สูง:
     1030  แถบเมนูล่าง (sticky nav)
     1035  วิดเจ็ตลอย: แชท / ปุ่มติดตั้งแอพ / กระดิ่งแจ้งเตือน (เหนือ nav แต่ต่ำกว่าโมดัล)
     1040  ฉากหลังโมดัล      1050 โมดัล
     2000  loading            3000 การแจ้งเตือน
    10000  iframe เกม
    20040  ฉากหลังโมดัล / 20050 โมดัล  (ตอนเปิดเกมอยู่ — ต้องลอยเหนือ iframe)
    20100  loading (ตอนเปิดเกมอยู่)
    20200  Swal (กล่องแจ้งเตือน/ยืนยัน) — เหนือทุกอย่างเสมอ
    20300  toast แจ้งเตือน realtime — บนสุด ไม่ให้อะไรมาบัง
   ══════════════════════════════════════════════════════════ */
.wm-gameframe { z-index: 10000; }

/* เปิดเกมอยู่: โมดัลต้องลอยทับ iframe ไม่ใช่มุดอยู่ข้างหลัง */
body.wm-gameframe-open .wm-backdrop { z-index: 20040; }
body.wm-gameframe-open .x-modal { z-index: 20050; }
body.wm-gameframe-open .wm-loading { z-index: 20100; }

/* Swal และ toast อยู่บนสุดเสมอ ไม่ว่าจะเปิดเกมหรือไม่ */
.swal2-container { z-index: 20200 !important; }
.wm-toast-stack { z-index: 20300 !important; }

/* ปุ่มฝากบนแถบเกม: เป็นข้อความเสมอ ไม่ย่อเหลือแต่ไอคอน */
.wm-gameframe-bar .-btn.-deposit span { display: inline !important; font-weight: 700; }
.wm-gameframe-bar .-btn.-deposit { padding: 7px 16px; white-space: nowrap; }

/* ══════════════════════════════════════════════════════════
   วิดเจ็ตลอย 3 ตัวที่ยกมาจากธีมเดิม (สกินให้เข้าธีม wm356)
     ซ้ายล่าง  #pwaInstallButton   — js/pwa.js
     ขวาล่าง   .p7chat-*           — js/chat-widget.js
     บน topnav .wm-notify-*        — theme-wm356/assets/wm356-notify.js
   สองตัวแรกฉีด <style> ของตัวเองตอนรันไทม์ (ลงท้าย <head> → มาทีหลังไฟล์นี้)
   จึงต้องเพิ่ม specificity ด้วย body นำหน้า ไม่งั้นทับไม่ลง
   ══════════════════════════════════════════════════════════ */

/* ── กระดิ่งแจ้งเตือนบน topnav ── */
.wm-notify-bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  /* flex: none — อยู่ใน flex container ของ header ถ้าไม่ล็อกจะโดนบีบจนกระดิ่งแบน */
  flex: none; width: 34px; height: 34px; margin-right: 8px; padding: 0;
  border: 1px solid rgba(236, 189, 123, .3); border-radius: 999px;
  background: rgba(255, 255, 255, .06); color: #f2cf7f; font-size: 15px; cursor: pointer;
}
.wm-notify-bell:hover { border-color: #ecbd7b; color: #ecbd7b; }
.wm-notify-bell .-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: #f22662; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
}
.wm-notify-bell .-badge[hidden] { display: none; }

.wm-notify-panel {
  position: fixed; z-index: 1035; display: none;
  max-height: 430px; overflow: hidden;
  background: #1e1e1e; border: 1px solid #3b3b3c; border-radius: 14px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .55); color: #cfcfcf;
}
.wm-notify-panel.show { display: block; }
.wm-notify-panel .-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid #3b3b3c; color: #ecbd7b; font-weight: 600;
}
.wm-notify-panel .-actions { display: flex; gap: 10px; }
.wm-notify-panel .-act {
  border: 0; background: transparent; color: #c9b58d; font-family: inherit;
  font-size: 12px; font-weight: 600; cursor: pointer; padding: 0;
}
.wm-notify-panel .-act:hover { color: #ecbd7b; }
.wm-notify-panel .-list { max-height: 360px; overflow-y: auto; }
.wm-notify-panel .-item {
  display: block; width: 100%; text-align: left; padding: 12px 14px;
  border: 0; border-bottom: 1px solid #2b2b2b; background: transparent;
  color: inherit; font-family: inherit; cursor: pointer;
}
.wm-notify-panel .-item:hover { background: rgba(236, 189, 123, .07); }
.wm-notify-panel .-item.-unread { background: rgba(236, 189, 123, .12); }
.wm-notify-panel .-item b { display: block; color: #fafafa; font-size: 14px; margin-bottom: 3px; }
.wm-notify-panel .-item span { display: block; color: #9d9d9d; font-size: 12px; line-height: 1.5; }
.wm-notify-panel .-empty { padding: 22px 14px; text-align: center; color: #8a8a8a; font-size: 13px; }

/* แถบขออนุญาตแจ้งเตือน (บนสุดกลางจอ) */
.wm-notify-prompt {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 1035;
  width: min(560px, calc(100vw - 20px)); display: none; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid rgba(236, 189, 123, .45); border-radius: 12px;
  background: rgba(30, 30, 30, .98); color: #cfcfcf;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
}
.wm-notify-prompt.show { display: flex; }
.wm-notify-prompt .-text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; }
.wm-notify-prompt .-text b { display: block; color: #ecbd7b; font-size: 14px; margin-bottom: 2px; }
.wm-notify-prompt .-ok {
  border: 0; border-radius: 999px; padding: 8px 14px; white-space: nowrap; cursor: pointer;
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
  color: #241a06; font-family: inherit; font-weight: 700;
}
.wm-notify-prompt .-x {
  width: 30px; height: 30px; flex: none; border: 1px solid #3b3b3c; border-radius: 999px;
  background: rgba(255, 255, 255, .06); color: #cfcfcf; font-size: 18px; line-height: 1; cursor: pointer;
}
.wm-notify-prompt .-x:hover { color: #ecbd7b; border-color: #ecbd7b; }

/* ── แชทสาธารณะ (ขวาล่าง) — ตั้งตัวแปรสีที่ chat-widget.js อ่านให้เป็นโทนธีม ── */
.p7chat-root {
  --accent: #ecbd7b;
  --accent-grad: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
  --bg-primary: #171717;
  --bg-secondary: #1e1e1e;
  --border: #3b3b3c;
  --text-primary: #e6e6e6;
}
/* z-index ต้องมี body นำหน้า — chat-widget.js ฉีด .p7chat-root{z-index:190} ทีหลังไฟล์นี้
   specificity เท่ากันจะแพ้ ทำให้แชทมุดใต้ sticky nav (1030) */
body .p7chat-root { z-index: 1035; }
body .p7chat-toggle,
body .p7chat-dock { color: #241a06; }
body .p7chat-panel { border-radius: 14px; }
body .p7chat-head { color: #241a06; }
body .p7chat-input:focus { border-color: #ecbd7b; }
body .p7chat-msg .u { color: #ecbd7b; }

/* ── ปุ่มแชท (dock) ให้เข้าธีม + เพรียวลง ──
   chat-widget.js ทำ dock เป็นแท็บเหลืองสดหนา 34×58 ที่ขอบ และ append ที่ <body>
   จึงไม่ได้ --accent-grad ของ .p7chat-root → ตกไปใช้เหลืองดีฟอลต์ที่แปลกแยกจากธีม
   ปรับเป็นปุ่มทองธีมทรงกะทัดรัด (gradient เดียวกับปุ่มติดตั้งแอพ/หัวแชท) เลิกขยายกว้างตอน hover */
body .p7chat-dock {
  z-index: 1034;
  right: 6px; bottom: 108px;   /* ชิดใต้ปุ่มทัวร์นาเมนต์ (bottom:156 ตัวสูง 76 → ยอด 156; แชทยอด 152 = ห่าง ~4px) */
  width: 44px; height: 44px; padding: 0;
  border-radius: 13px;
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
  border: 1px solid rgba(236, 189, 123, .5);
  color: #241a06;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .28);
  font-size: 17px;
}
body .p7chat-dock:hover { width: 44px; filter: brightness(1.06); }
body .p7chat-dock .dot { top: -3px; left: -3px; width: 12px; height: 12px; border-color: #171717; }
@media (max-width: 860px) {
  body .p7chat-dock { width: 42px; height: 42px; right: 6px; bottom: 112px; font-size: 16px; }
}

/* ── ปุ่มติดตั้งแอพ (ซ้ายล่าง) — pwa.js ให้สีเขียว เปลี่ยนเป็นทองของธีม ── */
body #pwaInstallButton {
  z-index: 1035;
  background: radial-gradient(81.82% 100% at 50% 0, #e0c587 0, #c4a55f 39.06%, #8e763e 100%);
  color: #241a06;
  border: 1px solid rgba(236, 189, 123, .5);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
}

/* ── ปุ่มทัวร์นาเมนต์ลอยขอบขวา ──
   ปุ่มเดียวบนจอ ใช้ idle bob แบบ transform ล้วน (ตามกติกาอนิเมชันธีม)
   ไอคอน GIF อนิเมตในตัวอยู่แล้ว จึงไม่เพิ่ม animation ที่ตัวรูป */
.wm-tournament-fab {
  /* จัดกลุ่มมุมขวาล่างเหนือปุ่มแชท — แชท (dock) ถูก restyle เป็นปุ่มทอง 44×44 ที่ right:6 bottom:98 (ยอด ~142px)
     วางทัวร์นาเมนต์เหนือแชท ห่าง ~14px แนวขวาตรงกัน · z-index ต่ำกว่าแชท(1035)/โมดัล(1050) ให้ถูกทับเมื่อกางแชท */
  position: fixed; right: 6px; bottom: 156px; z-index: 1033;
  width: 76px; height: 76px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5));
  -webkit-tap-highlight-color: transparent;
  animation: wmTourBob 2.8s ease-in-out infinite;
}
.wm-tournament-fab img {
  width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none;
  transition: transform .18s ease;
}
.wm-tournament-fab:hover img { transform: scale(1.08); }
.wm-tournament-fab:active img { transform: scale(.94); }
.wm-tournament-fab:focus-visible { outline: 2px solid #ecbd7b; outline-offset: 4px; border-radius: 12px; }
/* ระหว่างขอลิงก์: หรี่ลง + วงแหวนหมุนซ้อน (transform ล้วน) */
.wm-tournament-fab.-loading { pointer-events: none; }
.wm-tournament-fab.-loading img { opacity: .45; }
.wm-tournament-fab.-loading::after {
  content: ''; position: absolute; width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(236, 189, 123, .35); border-top-color: #ecbd7b;
  animation: wmTourSpin .7s linear infinite;
}
@keyframes wmTourSpin { to { transform: rotate(360deg); } }
@keyframes wmTourBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@media (max-width: 860px) {
  /* เล็กลง + จัดกลุ่มเหนือ dock แชทมือถือ (dock อยู่ที่ bottom:94px สูง 58px = ยอด ~152px) */
  .wm-tournament-fab { width: 58px; height: 58px; right: 6px; bottom: 158px; }
}
@media (prefers-reduced-motion: reduce) {
  .wm-tournament-fab { animation: none; }
}

/* เปิดเกมอยู่: ซ่อนวิดเจ็ตลอยทั้งหมด ไม่ให้ทับจอเกม
   (สคริปต์เช็ค isMemberGameFrameActive() อยู่แล้ว ตรงนี้กันเหนียวสำหรับส่วนที่ CSS คุมได้) */
body.wm-gameframe-open .p7chat-root,
body.wm-gameframe-open .p7chat-dock,
body.wm-gameframe-open #pwaInstallButton,
body.wm-gameframe-open .wm-tournament-fab,
body.wm-gameframe-open .wm-notify-panel,
body.wm-gameframe-open .wm-notify-prompt { display: none !important; }

@media (max-width: 860px) {
  /* เว้นให้พ้น sticky nav (สูง ~67px + safe area) — ตำแหน่ง dock คุมที่บล็อกปุ่มแชทด้านบนแล้ว (bottom:112) */
  body .p7chat-root { bottom: 88px; right: 10px; }
}
@media (max-width: 420px) {
  .wm-notify-bell { width: 32px; height: 32px; margin-right: 6px; font-size: 14px; }
  .wm-notify-prompt { top: 8px; align-items: flex-start; }
}

/* ══ คืนยอดเสีย / คอมมิชชั่น — โครงเดียวกับ member เดิม ══ */
.wm-reward-desc {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 12px; margin-bottom: 12px; border-radius: 10px;
  background: rgba(236, 189, 123, .09); border: 1px solid rgba(236, 189, 123, .22);
  color: #d9c9a8; font-size: 12.5px; line-height: 1.65;
}
.wm-reward-desc i { color: #ecbd7b; margin-top: 3px; flex: 0 0 auto; }
.wm-reward-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px;
}
.wm-reward-summary > div {
  padding: 10px 8px; text-align: center; border-radius: 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07);
}
.wm-reward-summary small { display: block; color: #9a9aa6; font-size: 11px; margin-bottom: 5px; }
.wm-reward-summary b { color: #ecbd7b; font-size: 15px; font-weight: 700; }
.wm-reward-notice {
  padding: 11px 12px; border-radius: 10px; text-align: center;
  background: rgba(255, 255, 255, .04); color: #b9b9c4; font-size: 12.5px;
}
.wm-reward-breakdown { margin-bottom: 14px; }
.wm-reward-breakdown .-title {
  display: flex; align-items: center; gap: 7px;
  color: #ecbd7b; font-size: 13px; font-weight: 600; margin-bottom: 8px;
}
.wm-reward-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 11px; border-radius: 8px; margin-bottom: 6px;
  background: rgba(255, 255, 255, .035);
}
.wm-reward-row span { color: #b9b9c4; font-size: 12.5px; }
.wm-reward-row b { color: #f2e3c6; font-size: 13px; }
.btn.-submit.-claimed { opacity: .6; cursor: not-allowed; }
.btn.-ghost {
  margin-top: 10px; border: 1px solid rgba(236, 189, 123, .4);
  background: transparent; color: #ecbd7b; border-radius: 10px; padding: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn.-ghost:hover { background: rgba(236, 189, 123, .12); }
@media (max-width: 380px) {
  .wm-reward-summary { grid-template-columns: 1fr; }
}

/* ── ฝากวอลเล็ท: flow ต้นทาง (chip เล็กสีส้ม) → ลูกศร → ปลายทาง (การ์ดเดิม) (2026-08-13) ── */
.wm-wallet-flow-from {
  background: rgba(255, 152, 0, 0.08);
  border: 1px solid rgba(255, 152, 0, 0.45);
  border-radius: 10px;
  margin-bottom: 2px;
  padding: 8px 12px;
}
.wm-wallet-flow-from .-label {
  color: #ffb74d; font-size: 11.5px; font-weight: 700; margin-bottom: 5px;
}
.wm-wallet-flow-from .-chip {
  align-items: center; display: flex; flex-wrap: wrap; gap: 8px;
}
.wm-wallet-flow-from .-chip b {
  color: #fff; font-size: 15px; letter-spacing: 0.3px;
}
.wm-wallet-flow-from .-chip span {
  color: #999; font-size: 12px;
}
.wm-wallet-flow-arrow {
  align-items: center; color: #ecbd7b; display: flex; font-size: 12px;
  font-weight: 700; gap: 6px; justify-content: center; margin: 6px 0;
}
.wm-wallet-flow-arrow i {
  animation: wmFlowDown 1.2s ease-in-out infinite;
}
@keyframes wmFlowDown {
  0%, 100% { opacity: 0.6; transform: translateY(-2px); }
  50% { opacity: 1; transform: translateY(2px); }
}
@media (prefers-reduced-motion: reduce) {
  .wm-wallet-flow-arrow i { animation: none; }
}

.wm-deposit-contact {
  align-items: center; display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px;
  color: #aaa; font-size: 13px;
}
.wm-deposit-contact-btn {
  align-items: center; display: inline-flex; gap: 6px;
  background: #06c755; border: 0; border-radius: 999px;
  color: #fff; cursor: pointer; font-size: 13px; font-weight: 700;
  line-height: 1; padding: 8px 14px;
}
.wm-deposit-contact-btn:hover { background: #05b34c; }
.wm-deposit-contact-btn img { border-radius: 4px; display: block; }

/* ── ตรวจชื่อบัญชีจากเลขบัญชีตอนสมัคร ── */
.wm-acc-check-btn {
  width: 100%; margin-top: 8px; padding: 9px 12px; font-size: 14px; font-weight: 500;
  color: #241c07; border: 0; border-radius: 8px;
  background: linear-gradient(180deg, #f4d99b 0%, #d9ad60 100%);
}
.wm-acc-check-btn:disabled { opacity: .6; cursor: not-allowed; }
.wm-acc-check-btn i { margin-right: 4px; }
.wm-acc-check-status { margin-top: 8px; font-size: 13px; line-height: 1.35; word-break: break-word; }
.wm-acc-check-status.-ok { color: #57c98a; }
.wm-acc-check-status.-warn { color: #ecbd7b; }
.wm-acc-check-status.-muted { color: #9d9d9d; }
#wmRegFname.-locked, #wmRegLname.-locked {
  background: rgba(255, 255, 255, .05) !important; color: #bdbdbd !important;
  cursor: not-allowed; opacity: .85;
}

/* ---------- บล็อกบทความล่าสุดบนหน้าแรก (.art-home — ระบบบทความ /_article) ----------
   ซ้ำกับอีกธีมโดยตั้งใจ (หน้าแรกไม่โหลด style-article.css) — แก้ที่นี่ต้องแก้ wm356-app.css / style-deferred.css คู่กัน */
.art-home { width: min(1180px, calc(100% - 28px)); margin: 28px auto 8px; color: #eef0f4; }
.art-home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.art-home-head h2 { margin: 0; font-size: clamp(18px, 2.2vw, 24px); color: #fff; padding-left: 12px; border-left: 4px solid #d4af37; line-height: 1.3; }
.art-home-more { color: #e0c587; text-decoration: none; font-size: 14px; white-space: nowrap; }
.art-home-more:hover { color: #f2cf7f; }
.art-home .art-cards { display: grid; gap: 16px; }
.art-home .art-cards-grid.art-cols-1 { grid-template-columns: 1fr; }
.art-home .art-cards-grid.art-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.art-home .art-cards-grid.art-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.art-home .art-cards-scroll { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; scrollbar-width: none; }
.art-home .art-cards-scroll::-webkit-scrollbar { display: none; }
.art-home .art-cards-scroll .art-card { flex: 0 0 min(78vw, 320px); scroll-snap-align: start; }
.art-home .art-cards-list { grid-template-columns: 1fr; }
.art-home .art-cards-list .art-card { display: grid; grid-template-columns: 140px minmax(0, 1fr); }
.art-home .art-cards-list .art-card-cover { aspect-ratio: 4 / 3; height: 100%; }
.art-home .art-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; border: 1px solid rgba(212, 175, 55, .26); background: rgba(18, 21, 29, .78); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .7); transition: transform .18s ease, border-color .18s ease; }
.art-home .art-card:hover { transform: translateY(-2px); border-color: rgba(212, 175, 55, .5); }
.art-home .art-card-cover { position: relative; display: block; aspect-ratio: 16 / 9; background: #151a26; overflow: hidden; }
.art-home .art-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-home .art-card-cover-empty { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(212, 175, 55, .45); font-size: 30px; }
.art-home .art-badge { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: rgba(0, 0, 0, .62); color: #fff; }
.art-home .art-badge-member { left: auto; right: 10px; background: rgba(31, 79, 216, .85); }
.art-home .art-badge-pin { background: rgba(212, 175, 55, .92); color: #201806; }
.art-home .art-card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.art-home .art-chip { align-self: flex-start; display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(212, 175, 55, .26); background: rgba(212, 175, 55, .08); color: #e0c587 !important; font-size: 12px; text-decoration: none !important; line-height: 1.2; }
.art-home .art-card-title { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-home .art-card-title a { color: #fff; text-decoration: none; }
.art-home .art-card-title a:hover { color: #f2cf7f; }
.art-home .art-card-excerpt { margin: 0; color: #a4acbb; font-size: 13.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-home .art-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: auto; padding-top: 2px; font-size: 12px; color: #a4acbb; }
.art-home .art-meta i { margin-right: 3px; color: #e0c587; }
@media (max-width: 860px) {
  .art-home { margin-top: 20px; }
  .art-home .art-cards-grid.art-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art-home .art-cards { gap: 12px; }
}
@media (max-width: 480px) { .art-home .art-cards-grid.art-cols-2, .art-home .art-cards-grid.art-cols-3 { grid-template-columns: 1fr; } .art-home .art-cards-list .art-card { grid-template-columns: 110px minmax(0, 1fr); } }
/* wm356: หน้าแรกเป็นธีมมืดอยู่แล้ว ให้บล็อกกว้างเท่าเนื้อหา */
.wm-lobby-core ~ .art-home, body.-home .art-home { max-width: 1200px; }

/* ── แถวเกมแนวนอนบนหน้าแรก ──────────────────────────────────────────────
   เลื่อนข้างแถวเดียว (สูงราว 175px) ตั้งใจให้ไม่ทำให้หน้ายาวขึ้นมาก
   ไม่มี animation วน — อยู่บนหน้าแรกตลอด (นโยบายอนิเมชันของธีม) */
.wm-rail { margin: 12px 0 0; }
.wm-rail-head {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px 8px;
}
.wm-rail-head .-title {
  margin: 0; font-size: 15px; font-weight: 600; color: #f2e6cf;
  display: flex; align-items: center; gap: 7px;
}
.wm-rail-head .-title i { color: #ecbd7b; font-size: 14px; }
.wm-rail-head .-more {
  margin-left: auto; flex: 0 0 auto; cursor: pointer; font-family: inherit;
  background: none; border: 0; padding: 4px 2px;
  font-size: 12px; color: #ecbd7b;
}
.wm-rail-head .-more i { font-size: 10px; margin-left: 2px; }

.wm-rail-track {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 14px 4px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* ถ้าไม่ตั้ง scroll-padding เบราว์เซอร์จะ snap ขอบการ์ดใบแรกชิดขอบ scrollport
     = เลื่อนกินระยะ padding ซ้ายไป ทำให้การ์ดใบแรกแนบขอบจอตั้งแต่โหลด */
  scroll-padding-left: 14px;
}
.wm-rail-track::-webkit-scrollbar { display: none; }

.wm-rail-card {
  flex: 0 0 auto; width: 104px; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 5px;
  padding: 0; border: 0; background: none; cursor: pointer;
  font-family: inherit; text-align: left; color: #e6e2d8;
  transition: transform .16s ease;
}
.wm-rail-card .-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 3 / 4;
  border-radius: 10px; overflow: hidden;
  background: #16161c; border: 1px solid rgba(236, 189, 123, .22);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .45);
}
.wm-rail-card .-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* ปุ่มเล่นจาง ๆ มุมล่างขวา — มือถือไม่มี hover จึงต้องเห็นตลอดว่ากดได้ */
.wm-rail-card .-play {
  position: absolute; right: 5px; bottom: 5px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #f4d79a 0%, #c4a55f 100%);
  color: #241a06; font-size: 9px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}
.wm-rail-card .-name {
  font-size: 11.5px; line-height: 1.3; color: #e6e2d8;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wm-rail-card .-provider {
  font-size: 10.5px; color: #8d8a83;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wm-rail-card:active { transform: scale(.96); }
.wm-rail-card:hover .-thumb { border-color: rgba(236, 189, 123, .6); }
.wm-rail-card:focus-visible .-thumb { outline: 2px solid #ecbd7b; outline-offset: 2px; }

@media (min-width: 768px) {
  .wm-rail { max-width: 1480px; margin-left: auto; margin-right: auto; }
  .wm-rail-card { width: 124px; }
  .wm-rail-head { padding-left: clamp(22px, 3vw, 48px); padding-right: clamp(22px, 3vw, 48px); }
  .wm-rail-track {
    padding-left: clamp(22px, 3vw, 48px); padding-right: clamp(22px, 3vw, 48px);
    scroll-padding-left: clamp(22px, 3vw, 48px);
  }
}

/* ── พับรายการค่าย ──────────────────────────────────────────────────────
   84 ค่าย = 28 แถวบนมือถือ (~4,700px) หน้าแรกเลยยาวเกินจำเป็น
   ซ่อนด้วยคลาส ไม่ได้ลบออกจาก DOM — ค้นหายังเจอครบและ SEO ไม่เสีย */
#wmProviderArea > .nav-item.-collapsed-hide,
#wmProviderArea > .nav-item.-search-hide { display: none; }
/* จุดสังเกตท้ายรายการ — ไม่มีหน้าตา มีไว้ให้ IntersectionObserver จับว่าเลื่อนมาถึงแล้ว */
.wm-provider-sentinel { width: 100%; height: 1px; }

/* ── ภารกิจ: หมุนกงล้อฟรี ───────────────────────────────────────────────
   วางใต้แถบกิจกรรม ใช้โทนเดียวกับ .wm-activity-pill (ดำ-ทอง ขอบ 1px)
   ไม่ใส่ animation วน เพราะแถบนี้ค้างบนหน้าแรกตลอด — ดูนโยบายอนิเมชันของธีม
   (แสงกวาดของ activity-pill มีได้เพราะเป็น transform และคุมจำนวนไว้แล้ว) */
.wm-mission {
  position: relative;
  margin: 8px 12px 0;
  padding: 9px 11px 10px;
  background:
    radial-gradient(120% 150% at 8% 0%, rgba(236, 189, 123, .13) 0%, rgba(236, 189, 123, 0) 55%),
    linear-gradient(180deg, #1c1c23 0%, #101014 100%);
  border: 1px solid rgba(236, 189, 123, .26);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 3px 12px rgba(0, 0, 0, .5);
}
.wm-mission[hidden] { display: none; }

/* หัวแถบ: ไม่มีเส้นคั่นแล้ว (ประหยัดความสูง) ใช้ระยะห่างแทน */
.wm-mission-head {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 8px;
}
/* วงกลมเรืองทองหลังไอคอนเป้า — โทนเดียวกับปุ่มทองของธีม */
.wm-mission-icon {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 42%, rgba(236, 189, 123, .26) 0%, rgba(236, 189, 123, .07) 62%, rgba(236, 189, 123, 0) 100%);
  border: 1px solid rgba(236, 189, 123, .3);
}
/* ไฟล์ไอคอนถูกจัดให้ "จุดศูนย์ถ่วงของภาพ" อยู่กลางผืนผ้าใบแล้ว (จัตุรัส 120x120)
   จึงวางกลางวงกลมได้ตรง ๆ ไม่ต้องขยับด้วยค่าคงที่
   ถ้าเปลี่ยนไฟล์ไอคอนใหม่ ต้องจัดกึ่งกลางแบบเดียวกันก่อน ไม่งั้นจะดูเบี้ยวอีก */
.wm-mission-icon img { display: block; width: 34px; height: 34px; object-fit: contain; }
.wm-mission-title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.wm-mission-title b { font-size: 14px; color: #f2e6cf; }
.wm-mission-title small { font-size: 11.5px; color: #ecbd7b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wm-mission-cta {
  margin-left: auto; flex: 0 0 auto;
  padding: 6px 16px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: #23180a;
  background: linear-gradient(180deg, #f4d79a 0%, #d8a75a 100%);
  border: 1px solid #f0d19a;
  transition: transform .18s, box-shadow .18s;
}
.wm-mission-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(216, 167, 90, .35); }
.wm-mission-cta:focus-visible { outline: 2px solid #ecbd7b; outline-offset: 2px; }

/* ภารกิจเป็น "ชิป" เรียงต่อกันแล้วขึ้นบรรทัดใหม่เอง
   ของเดิมเป็นแถวละรายการ 3 ภารกิจ = 3 บรรทัดเต็มความกว้าง กินความสูงเกินความจำเป็น */
.wm-mission-list { display: flex; flex-wrap: wrap; gap: 6px; }
.wm-mission-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px;
  font-size: 12px; color: #ded9cf;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .09);
  max-width: 100%;
}
.wm-mission-item i { flex: 0 0 auto; color: #ecbd7b; font-size: 11px; }
.wm-mission-item .-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-mission-item .-reward {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 600; color: #f4d79a;
}
.wm-mission-item.-done {
  color: #8d8a83; background: rgba(255, 255, 255, .028); border-color: rgba(255, 255, 255, .07);
}
.wm-mission-item.-done i { color: #5f9e7f; }
.wm-mission-item.-done .-reward { color: #7f7c76; font-weight: 500; }

@media (min-width: 768px) {
  .wm-mission { margin-left: auto; margin-right: auto; max-width: 720px; }
}

/* แถวแต้มในแถบภารกิจ — เดิมแต้มเห็นได้เฉพาะในโมดัล ต้องกดเข้าไปถึงจะรู้ว่ามีเท่าไหร่ */
/* บรรทัดเดียวเสมอ (nowrap) — ข้อความกลางยุบ/ตัดเองเมื่อจอแคบ
   ของเดิม wrap ทำให้ปุ่มตกไปอีกบรรทัดแล้วแถบสูงขึ้นฟรี ๆ */
.wm-mission-points {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px; color: #d6d2c8;
}
.wm-mission-points[hidden] { display: none; }
.wm-mission-points .-bal { flex: 0 0 auto; color: #d6d2c8; }
.wm-mission-points .-bal b { color: #f4d79a; font-size: 13.5px; }
.wm-mission-points .-use { flex: 1 1 auto; min-width: 0; color: #8d8a83; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-mission-link {
  flex: 0 0 auto; cursor: pointer; font-family: inherit;
  font-size: 11.5px; font-weight: 600; color: #ecbd7b;
  padding: 4px 11px; border-radius: 999px;
  background: rgba(236, 189, 123, .1);
  border: 1px solid rgba(236, 189, 123, .32);
  transition: background-color .18s, border-color .18s;
}
.wm-mission-link:hover { background: rgba(236, 189, 123, .2); border-color: rgba(236, 189, 123, .55); }
.wm-mission-link:focus-visible { outline: 2px solid #ecbd7b; outline-offset: 2px; }

@media (max-width: 420px) {
  /* จอแคบเหลือที่ไม่พอ — ซ่อนข้อความเสริมไปเลย ดีกว่าโชว์ครึ่งคำที่อ่านไม่รู้เรื่อง
     (ยอดแต้มกับปุ่มทางเข้ายังอยู่ครบ ซึ่งเป็นสองอย่างที่ลูกค้าต้องใช้จริง) */
  .wm-mission-points .-use { display: none; }
}


/* [POP777-ACCENT2-START] ─────────────────────────────────────────────────────
   ระบบสองสี: ทอง = "กดอันนี้" · ม่วง = "ของรอง"

   ปัญหาเดิม: ทองเป็นสีเน้นสีเดียวของธีม เลยถูกใช้กับทุกอย่าง — หัวข้อ ไอคอน
   ลิงก์ ปุ่มหลัก ปุ่มรอง (วัดบนหน้าแรก: ตัวอักษรทอง 122 จุด ขอบทอง 98 จุด)
   พอทุกอย่างเด่นเท่ากัน = ไม่มีอะไรเด่น

   ทำไมเป็นม่วง: สีอุ่นถูกจองความหมายไปหมดแล้ว — #6ee7d1 มิ้นต์ = เงิน/ยอดชนะ,
   #4cab89 เขียว = ฝาก, #f22662 แดง = ถอน · ม่วงเป็นโทนเย็นที่ยังว่าง และ
   /wm356/style.css เดิมก็มีม่วง #472c59 อยู่แล้ว 41 จุด จึงไม่ใช่ของแปลกปลอม

   ── แก้สีทีหลังให้แก้ 4 ตัวแปรนี้ที่เดียว ──
   ────────────────────────────────────────────────────────────────────────── */
:root {
  --accent2: #7c5cff;              /* พื้น/ขอบ/ขีด */
  --accent2-text: #9d86ff;         /* ตัวอักษร — สว่างกว่าเพราะ #7c5cff บนพื้นดำได้ contrast
                                      แค่ 4.44:1 (ไม่ผ่าน AA ของตัวอักษรปกติ) ตัวนี้ได้ 6.6:1 */
  --accent2-soft: rgba(124, 92, 255, .14);
  --accent2-line: rgba(124, 92, 255, .45);
}

/* ── ปุ่มรอง: เดิมเป็นทองอ่อน แย่งสายตากับปุ่มหลัก ─────────────────────── */
.wm-mission-link,
.wm-pop777-footer-wrap .member-keyword-toggle {
  background: var(--accent2-soft);
  border-color: var(--accent2-line);
  color: var(--accent2-text);
}
.wm-mission-link:hover,
.wm-pop777-footer-wrap .member-keyword-toggle:hover {
  background: rgba(124, 92, 255, .24);
  border-color: var(--accent2);
  color: #b9a8ff;
}
.wm-mission-link:focus-visible { outline-color: var(--accent2); }

/* ── หัวข้อแถวเกม + ปุ่ม "ดูทั้งหมด" ──────────────────────────────────── */
.wm-rail-head .-title i { color: var(--accent2-text); }
.wm-rail-head .-more { color: var(--accent2-text); }

/* ── เมนูแถบล่างที่เลือกอยู่ (ปุ่มกลาง "กิจกรรม" ยังทองเพราะเป็น CTA) ──── */
.wm-sticky-item.-active { color: var(--accent2-text); }
.wm-sticky-item.-active:not(.-center)::after { background: linear-gradient(90deg, #6d4dff, #a892ff); }

/* ── หัวข้อเนื้อหาท้ายหน้า ───────────────────────────────────────────────
   เดิมหัวข้อ 20 อันเป็นทองทั้งบรรทัด กลายเป็นกำแพงสีทองอ่านยาก
   เปลี่ยนตัวอักษรเป็นขาว แล้วใช้ขีดม่วงสั้นนำหน้าแทน */
.wm-pop777-footer-wrap h2,
.wm-pop777-footer-wrap h3 {
  color: #fafafa;
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.wm-pop777-footer-wrap h2::before,
.wm-pop777-footer-wrap h3::before {
  content: "";
  flex: 0 0 auto;
  width: 3px;
  align-self: stretch;
  min-height: 1em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent2), #4a35a8);
}
.wm-pop777-footer-wrap h3 span { color: #9a9a9a; }

/* ลิงก์ในเนื้อหา: เทาจนกว่าจะชี้ (เดิมทองทุกอันปนกับหัวข้อจนแยกไม่ออก) */
.wm-pop777-footer-wrap a {
  color: #d8d8d8;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent2-line);
}
.wm-pop777-footer-wrap a:hover { color: var(--accent2-text); text-decoration-color: var(--accent2); }
/* [POP777-ACCENT2-END] */
