/*
 * TermGame demo storefront kit — ใช้ร่วมกันทั้ง 9 เดโม (demo/{tier}[-topup|-full]/)
 * แต่ละหน้ากำหนดแค่ window.STORE_CONFIG แล้วให้ storefront.js วาดหน้าให้
 *
 * โทเคนสี 3 ชั้น:
 *   1) skin (html[data-skin])  = บุคลิกของแพ็กเกจ: clean (Starter) / playful (Standard) / cyber (Pro)
 *   2) โหมด (html.dark)          = สว่าง/มืด ของแต่ละ skin (ทุก skin มีครบทั้งสองโหมด)
 *   3) สีหลัก (--p/--pl/--p2)    = ตั้งจาก JS ตามจานสีที่แพ็กเกจเปิดให้เลือก
 */

/* ---------- 1. Skin + Mode tokens ---------- */
:root {
  --p: 37 99 235; --pl: 96 165 250; --p2: 6 182 212;
  --font: 'Prompt', system-ui, sans-serif;
  --font-display: var(--font);
  --r: 14px; --r-lg: 22px; --rb: 10px;
  --nav-h: 68px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* clean — Starter: เรียบ สะอาด อ่านง่าย (เทาเย็น) */
html[data-skin="clean"] {
  --bg: #f6f7f9; --bg2: #ffffff; --surface: #ffffff; --surface2: #f1f3f6;
  --line: #e4e7ec; --text: #101828; --muted: #5d6679;
  --shadow: 0 1px 2px rgb(16 24 40 / .05);
  --shadow-hover: 0 10px 24px -14px rgb(16 24 40 / .22);
}
html.dark[data-skin="clean"] {
  --bg: #0d0f13; --bg2: #121419; --surface: #15181e; --surface2: #1c2028;
  --line: #272c35; --text: #eceef2; --muted: #9aa1ad;
  --shadow: 0 1px 2px rgb(0 0 0 / .4);
  --shadow-hover: 0 12px 28px -16px rgb(0 0 0 / .8);
}

/* playful — Standard: มน อบอุ่น ปุ่มนูนแบบบล็อก (เทาอุ่น) */
html[data-skin="playful"] {
  --font: 'Kanit', system-ui, sans-serif;
  --r: 20px; --r-lg: 26px; --rb: 14px;
  --bg: #f7f6f2; --bg2: #ffffff; --surface: #ffffff; --surface2: #f2f0ea;
  --line: #e7e3da; --text: #1f1d1a; --muted: #6b665d;
  --shadow: 0 2px 0 rgb(31 29 26 / .05);
  --shadow-hover: 0 14px 28px -18px rgb(31 29 26 / .28);
}
html.dark[data-skin="playful"] {
  --bg: #141311; --bg2: #191815; --surface: #1d1c19; --surface2: #262420;
  --line: #35322c; --text: #f3f1ec; --muted: #aba59a;
  --shadow: 0 2px 0 rgb(0 0 0 / .3);
  --shadow-hover: 0 14px 28px -18px rgb(0 0 0 / .85);
}

/* cyber — Pro: สาย E-Sports ขอบคม ตัวหนังสือ display (กราไฟต์) */
html[data-skin="cyber"] {
  --font: 'Kanit', system-ui, sans-serif;
  --font-display: 'Orbitron', 'Kanit', sans-serif;
  --r: 12px; --r-lg: 18px; --rb: 10px;
  --bg: #eff1f4; --bg2: #f7f8fa; --surface: #ffffff; --surface2: #f1f3f6;
  --line: #dadee5; --text: #0b0d12; --muted: #555d6b;
  --shadow: 0 1px 2px rgb(11 13 18 / .06);
  --shadow-hover: 0 14px 30px -18px rgb(11 13 18 / .3);
}
html.dark[data-skin="cyber"] {
  --bg: #0b0c0f; --bg2: #0f1014; --surface: #14161b; --surface2: #1b1e24;
  --line: #262a32; --text: #e9ebef; --muted: #8e95a2;
  --shadow: 0 1px 2px rgb(0 0 0 / .5);
  --shadow-hover: 0 16px 32px -18px rgb(0 0 0 / .9);
}

/* สีหลักสำหรับ "ตัวอักษร" — โหมดมืดใช้เฉดอ่อนเพื่อให้อ่านออกบนพื้นเข้ม */
html { --pt: rgb(var(--p)); color-scheme: light; }
html.dark { --pt: rgb(var(--pl)); color-scheme: dark; }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
::selection { background: rgb(var(--p) / .25); }
:focus-visible { outline: 2px solid rgb(var(--p)); outline-offset: 2px; border-radius: 6px; }
body.no-scroll { overflow: hidden; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

.muted { color: var(--muted); }
.pt { color: var(--pt); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.bold { font-weight: 700; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 26px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.num { font-variant-numeric: tabular-nums; }
.display { font-family: var(--font-display); letter-spacing: .01em; }
.hl { color: var(--pt); }
.line-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--rb); border: 1px solid transparent;
  font-weight: 600; font-size: 14px; white-space: nowrap; line-height: 1;
  transition: transform .15s var(--ease), background-color .2s, border-color .2s, box-shadow .2s, filter .2s, color .2s;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-busy { opacity: .6; pointer-events: none; }
.btn-primary { background: rgb(var(--p)); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface2); border-color: rgb(var(--p) / .45); }
.btn-soft { background: rgb(var(--p) / .12); color: var(--pt); }
.btn-soft:hover { background: rgb(var(--p) / .2); }
.btn-white { background: #fff; color: #0f172a; }
.btn-white:hover { background: #f1f5f9; }
.btn-glass { background: rgb(255 255 255 / .12); color: #fff; border-color: rgb(255 255 255 / .25); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgb(255 255 255 / .22); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn .spin { display: none; }
.btn.is-busy .spin { display: inline-block; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--rb); display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: .2s;
}
.icon-btn:hover { color: var(--pt); border-color: rgb(var(--p) / .45); }

/* playful: ปุ่มนูนแบบบล็อก */
html[data-skin="playful"] .btn-primary { box-shadow: 0 4px 0 color-mix(in srgb, rgb(var(--p)) 62%, #000); }
html[data-skin="playful"] .btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, rgb(var(--p)) 62%, #000); }
html[data-skin="playful"] .btn-ghost { box-shadow: 0 3px 0 var(--line); }
html[data-skin="playful"] .btn { font-weight: 700; }
/* cyber: ปุ่มตัวพิมพ์แน่น ขอบคม */
html[data-skin="cyber"] .btn { letter-spacing: .01em; }
html[data-skin="cyber"] .btn-primary:hover { filter: brightness(1.1); }

/* ---------- 4. Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; line-height: 1.4; white-space: nowrap;
}
.badge-p { background: rgb(var(--p) / .14); color: var(--pt); }
.badge-solid { background: rgb(var(--p)); color: #fff; }
.badge-hot { background: #ef4444; color: #fff; }
.badge-green { background: rgb(16 185 129 / .14); color: #059669; }
.badge-amber { background: rgb(245 158 11 / .16); color: #b45309; }
.badge-red { background: rgb(239 68 68 / .14); color: #dc2626; }
.badge-slate { background: var(--surface2); color: var(--muted); }
html.dark .badge-green { color: #34d399; }
html.dark .badge-amber { color: #fbbf24; }
html.dark .badge-red { color: #f87171; }
.badge-img { background: rgb(0 0 0 / .55); color: #fff; backdrop-filter: blur(6px); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13.5px; font-weight: 600;
  white-space: nowrap; transition: .2s;
}
.chip:hover { color: var(--text); border-color: rgb(var(--p) / .4); }
.chip.on { background: rgb(var(--p)); color: #fff; border-color: rgb(var(--p)); }

/* ---------- 5. Cards & sections ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
html[data-skin="cyber"] .card { transition: border-color .25s, box-shadow .25s; }
.section { padding: 72px 0; scroll-margin-top: calc(var(--nav-h) + 8px); }
.section.alt { background: var(--bg2); border-block: 1px solid var(--line); }
html[data-skin="playful"] .section.alt { background: transparent; border: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--pt); margin-bottom: 8px;
}
html[data-skin="cyber"] .eyebrow { font-family: var(--font-display); font-size: 11px; letter-spacing: .18em; }
.eyebrow::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.section-head.center .eyebrow::after { content: ''; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.section-title { font-size: clamp(24px, 3.2vw, 34px); font-weight: 700; }
html[data-skin="playful"] .section-title { font-weight: 800; }
.section-sub { color: var(--muted); margin-top: 6px; max-width: 560px; }

/* ---------- 6. Demo bar ---------- */
.demo-bar {
  background: #0b1020; color: #cbd5e1; font-size: 12.5px; position: relative; z-index: 60;
  border-bottom: 1px solid rgb(255 255 255 / .06);
}
.demo-bar .container { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.demo-bar b { color: #fff; }
.demo-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.demo-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgb(34 197 94 / .2); }
.demo-modes { display: flex; gap: 4px; margin: 0 auto; background: rgb(255 255 255 / .06); padding: 3px; border-radius: 999px; }
.demo-modes a { padding: 3px 12px; border-radius: 999px; color: #94a3b8; white-space: nowrap; font-weight: 600; transition: .2s; }
.demo-modes a:hover { color: #fff; }
.demo-modes a.on { background: #fff; color: #0b1020; }
.demo-links { display: flex; align-items: center; gap: 4px; }
.demo-links button, .demo-links a { color: #cbd5e1; padding: 4px 8px; border-radius: 8px; white-space: nowrap; font-weight: 600; }
.demo-links button:hover, .demo-links a:hover { color: #fff; background: rgb(255 255 255 / .08); }
@media (max-width: 899px) {
  .demo-bar .container { flex-wrap: wrap; padding-block: 6px; row-gap: 6px; }
  .demo-modes { order: 3; width: 100%; justify-content: center; margin: 0; overflow-x: auto; }
  .demo-links { margin-left: auto; }
  .demo-links .hide-sm { display: none; }
}

/* ---------- 7. Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s;
}
.nav.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -20px rgb(0 0 0 / .5); }
.nav .container { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 17px;
  background: rgb(var(--p));
}
html[data-skin="playful"] .brand-mark { border-radius: 13px; transform: rotate(-6deg); }
html[data-skin="cyber"] .brand-mark { border-radius: 10px; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: .02em; line-height: 1; }
html[data-skin="cyber"] .brand-name { font-family: var(--font-display); font-size: 17px; letter-spacing: .08em; }
.brand-name small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .16em; margin-top: 4px; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.nav-links a {
  padding: 8px 14px; border-radius: var(--rb); font-weight: 500; font-size: 14.5px; color: var(--muted); transition: .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); }
.nav-links a.on { color: var(--pt); background: rgb(var(--p) / .1); font-weight: 600; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ปุ่มธีม — เห็นสีปัจจุบันชัด ๆ */
.theme-wrap { position: relative; }
.theme-btn {
  height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px 0 6px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: 13.5px; transition: .2s;
}
.theme-btn:hover { border-color: rgb(var(--p) / .5); }
.theme-btn .swatch-dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px;
  background: rgb(var(--p));
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / .3);
}
.theme-hint {
  position: absolute; top: calc(100% + 10px); right: 0; width: 210px; padding: 10px 12px; border-radius: 12px;
  background: rgb(var(--p)); color: #fff; font-size: 12.5px; font-weight: 600; box-shadow: 0 12px 30px -14px rgb(0 0 0 / .5);
  animation: hintIn .4s var(--ease); z-index: 5;
}
.theme-hint::before { content: ''; position: absolute; top: -6px; right: 22px; width: 12px; height: 12px; background: inherit; transform: rotate(45deg); }
@keyframes hintIn { from { opacity: 0; transform: translateY(-6px); } }

.popover {
  position: absolute; top: calc(100% + 10px); right: 0; width: 320px; z-index: 70;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / .45); animation: popIn .18s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.pop-title { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 0 0 8px; display: flex; justify-content: space-between; }
.pop-title + * { margin-bottom: 16px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--line); }
.seg button { height: 36px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: .2s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .15); }
html.dark .seg button.on { background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); }
.seg button.on i { color: var(--pt); }

.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.swatch {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px; border-radius: 12px;
  border: 1px solid transparent; font-size: 11.5px; font-weight: 600; color: var(--muted); transition: .2s;
}
.swatch:hover { background: var(--surface2); color: var(--text); }
.swatch.on { border-color: rgb(var(--sw)); background: rgb(var(--sw) / .08); color: var(--text); }
.sw-circle {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px;
  background: rgb(var(--sw));
}
.sw-circle i { opacity: 0; transform: scale(.4); transition: .2s; }
.swatch.on .sw-circle { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px rgb(var(--sw)); }
.swatch.on .sw-circle i { opacity: 1; transform: none; }
.lock-note {
  display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface2);
  border: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); line-height: 1.5;
}
.lock-note i { color: var(--pt); margin-top: 3px; }

/* เครดิต */
.credit {
  height: 40px; display: inline-flex; align-items: center; gap: 0; border-radius: 999px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; transition: .2s;
}
.credit:hover { border-color: rgb(var(--p) / .5); }
.credit .bal { display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; }
.credit .bal i { color: var(--pt); }
.credit .add {
  height: 100%; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px 0 12px;
  background: rgb(var(--p)); color: #fff; font-size: 13px;
}
.credit.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.08); box-shadow: 0 0 0 6px rgb(var(--p) / .2); } }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff;
  background: rgb(var(--p)); border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line); flex-shrink: 0;
}
.menu { width: 270px; padding: 8px; }
.menu-head { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu a, .menu button.mi {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--text); text-align: left; transition: .15s;
}
.menu a:hover, .menu button.mi:hover { background: var(--surface2); }
.menu .mi i { width: 18px; text-align: center; color: var(--muted); }
.menu .mi .badge { margin-left: auto; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

.hamburger { display: none; }
.only-mobile { display: none !important; }
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .hamburger { display: inline-flex; }
  .theme-btn .lbl { display: none; }
  .theme-btn { padding: 0 6px; }
}
@media (max-width: 639px) {
  .hide-sm { display: none !important; }
  .only-mobile { display: inline-flex !important; }
  .credit .add .lbl { display: none; }
  .credit .add { padding: 0 12px; }
  .brand-name small { display: none; }
  .nav .container { gap: 10px; }
  .nav-actions { gap: 6px; }
}

/* ---------- 8. Drawer (มือถือ + ประวัติ) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 90; background: rgb(3 6 15 / .55); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95; width: min(420px, 100%);
  background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column;
  transform: translateX(102%); transition: transform .3s var(--ease); box-shadow: -20px 0 60px -30px rgb(0 0 0 / .6);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head #drawer-title { display: flex; align-items: center; gap: 10px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; }
.drawer-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.drawer-nav a:hover { background: var(--surface2); }
.drawer-nav a i { width: 20px; text-align: center; color: var(--pt); }

/* ---------- 9. Hero slider ---------- */
.hero { padding-top: 20px; }
.slider {
  position: relative; height: clamp(440px, 64vh, 580px); border-radius: var(--r-lg); overflow: hidden;
  background: #0b1020; isolation: isolate; box-shadow: var(--shadow);
}
html[data-skin="cyber"] .slider { border: 1px solid var(--line); }
html[data-skin="playful"] .slider { border: 4px solid var(--surface); }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility .8s; }
.slide.on { opacity: 1; visibility: visible; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 7s linear; }
.slide.on img { transform: scale(1); }
.slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(8 9 12 / .86) 0%, rgb(8 9 12 / .55) 50%, rgb(8 9 12 / .1) 100%);
}
.slide-body {
  position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(24px, 6vw, 72px); max-width: 720px; color: #fff;
}
.slide-body > * { opacity: 0; transform: translateY(14px); transition: .6s var(--ease); }
.slide.on .slide-body > * { opacity: 1; transform: none; }
.slide.on .slide-body > *:nth-child(2) { transition-delay: .08s; }
.slide.on .slide-body > *:nth-child(3) { transition-delay: .16s; }
.slide.on .slide-body > *:nth-child(4) { transition-delay: .24s; }
.slide-tag {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .22); font-size: 12.5px; font-weight: 600; margin-bottom: 18px;
  backdrop-filter: blur(6px);
}
.slide-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--pl)); }
.slide h1, .slide h2 { font-size: clamp(30px, 5vw, 54px); font-weight: 800; line-height: 1.15; margin-bottom: 14px; text-wrap: balance; }
.slide h1 .hl, .slide h2 .hl { color: rgb(var(--pl)); }
.slide p { color: #cbd5e1; font-size: clamp(15px, 1.6vw, 17px); max-width: 520px; margin-bottom: 26px; }
.slide .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.slider-ctrl { position: absolute; z-index: 5; right: 20px; bottom: 20px; display: flex; gap: 8px; }
.slider-ctrl button {
  width: 42px; height: 42px; border-radius: 12px; color: #fff; background: rgb(255 255 255 / .1);
  border: 1px solid rgb(255 255 255 / .2); backdrop-filter: blur(8px); transition: .2s;
}
.slider-ctrl button:hover { background: rgb(255 255 255 / .22); }
.dots { position: absolute; z-index: 5; left: clamp(24px, 6vw, 72px); bottom: 30px; display: flex; gap: 6px; }
.dots button { width: 10px; height: 6px; border-radius: 6px; background: rgb(255 255 255 / .35); transition: .3s var(--ease); }
.dots button.on { width: 30px; background: rgb(var(--pl)); }
@media (max-width: 639px) {
  .slide::after { background: linear-gradient(0deg, rgb(8 9 12 / .9) 15%, rgb(8 9 12 / .45) 70%, rgb(8 9 12 / .2) 100%); }
  .slide-body { justify-content: flex-end; padding-bottom: 80px; }
  .slider-ctrl { display: none; }
}

/* ---------- 10. Stats strip + live ticker ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.stat { padding: 18px; display: flex; align-items: center; gap: 14px; }
.stat-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; background: rgb(var(--p) / .12); color: var(--pt); flex-shrink: 0; }
.stat b { display: block; font-size: 22px; font-weight: 800; line-height: 1.1; }
html[data-skin="cyber"] .stat b { font-family: var(--font-display); font-size: 19px; }
.stat span { font-size: 13px; color: var(--muted); }
@media (max-width: 899px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .stat { padding: 14px; gap: 10px; } .stat-ic { width: 40px; height: 40px; font-size: 16px; } .stat b { font-size: 18px; } }

.ticker { margin-top: 14px; display: flex; align-items: center; overflow: hidden; border-radius: var(--r); }
.ticker-label {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; height: 46px;
  background: rgb(var(--p)); color: #fff; font-weight: 700; font-size: 13px;
}
.ticker-label .live { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.ticker-track { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-row { display: flex; gap: 34px; width: max-content; animation: marquee 40s linear infinite; padding-left: 20px; }
.ticker:hover .ticker-row { animation-play-state: paused; }
.ticker-row span { font-size: 13.5px; white-space: nowrap; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.ticker-row b { color: var(--text); font-weight: 600; }
.ticker-row img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 11. Toolbar ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; flex: 1; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.search { position: relative; width: 260px; max-width: 100%; }
.search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }
.search .input { padding-left: 38px; height: 40px; }
.select { height: 40px; }
@media (max-width: 639px) { .search { width: 100%; } .toolbar .select { flex: 1; } }

/* ---------- 12. Product card ---------- */
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
@media (max-width: 560px) { .p-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.p-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; animation: fadeUp .4s var(--ease) both; }
.p-card:hover { transform: translateY(-3px); border-color: rgb(var(--p) / .4); box-shadow: var(--shadow-hover); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.p-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface2); cursor: pointer; }
.p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.p-card:hover .p-media img { transform: scale(1.04); }
.p-media::after { content: ''; position: absolute; inset: auto 0 0; height: 44%; background: linear-gradient(180deg, transparent, rgb(0 0 0 / .5)); pointer-events: none; }
.p-tags { position: absolute; z-index: 2; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; }
.p-stock { position: absolute; z-index: 2; left: 10px; bottom: 9px; color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.p-stock i { color: #4ade80; font-size: 8px; }
.p-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.p-title { font-size: 15.5px; font-weight: 600; margin-bottom: 4px; cursor: pointer; }
.p-title:hover { color: var(--pt); }
.p-desc { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.p-ai { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--pt); margin-bottom: 8px; }
.p-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.price { font-size: 20px; font-weight: 800; line-height: 1.1; color: var(--text); }
html[data-skin="cyber"] .price { font-family: var(--font-display); font-size: 17px; }
.price-old { font-size: 12px; color: var(--muted); text-decoration: line-through; display: block; }
@media (max-width: 560px) {
  .p-body { padding: 10px 12px 12px; }
  .p-title { font-size: 14px; }
  .p-desc { display: none; }
  .price { font-size: 16px; }
  .p-foot .btn .lbl { display: none; }
  .p-foot .btn { padding: 0 11px; }
}
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty i { font-size: 30px; margin-bottom: 10px; color: var(--pt); opacity: .7; }

/* ---------- 13. Game tiles ---------- */
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
@media (max-width: 560px) { .g-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.g-tile {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; background: #0b1020; text-align: left;
  border: 1px solid var(--line); isolation: isolate; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
  animation: fadeUp .4s var(--ease) both;
}
.g-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); z-index: -1; }
.g-tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(0 0 0 / .05) 30%, rgb(0 0 0 / .88)); }
.g-tile:hover { transform: translateY(-3px); border-color: rgb(var(--p) / .5); box-shadow: var(--shadow-hover); }
.g-tile:hover img { transform: scale(1.08); }
.g-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; color: #fff; }
.g-info b { display: block; font-size: 16px; font-weight: 700; line-height: 1.25; }
.g-info span { font-size: 12.5px; color: #cbd5e1; }
.g-cta {
  margin-top: 10px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: rgb(var(--p)); font-size: 13px; font-weight: 700; transform: translateY(6px); opacity: .92; transition: .3s var(--ease);
}
.g-tile:hover .g-cta { transform: none; opacity: 1; }
.g-tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.quota-note { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 16px; border-radius: var(--r); border: 1px dashed var(--line); color: var(--muted); font-size: 13.5px; }

/* ---------- 14. Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { padding: 22px; position: relative; }
.step-ic { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 21px; margin-bottom: 14px; background: rgb(var(--p) / .12); color: var(--pt); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 18px; right: 20px;
  font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--line);
}
.step h3 { font-size: 16.5px; margin-bottom: 6px; }
.step p { font-size: 13.5px; color: var(--muted); }
@media (max-width: 899px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* ---------- 15. Gacha ---------- */
.gacha-wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: center; }
@media (max-width: 899px) { .gacha-wrap { grid-template-columns: 1fr; } }
.gacha-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.gbox { overflow: hidden; display: flex; flex-direction: column; transition: transform .3s var(--ease), border-color .3s; }
.gbox:hover { transform: translateY(-3px); border-color: rgb(var(--p) / .45); box-shadow: var(--shadow-hover); }
.gbox-media { position: relative; aspect-ratio: 16 / 11; overflow: hidden; }
.gbox-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gbox:hover .gbox-media img { transform: scale(1.07); }
.gbox-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(0 0 0 / .6)); }
.gbox-media .badge { position: absolute; top: 10px; left: 10px; z-index: 2; }
.gbox-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.rate-bar { height: 8px; border-radius: 8px; background: var(--surface2); overflow: hidden; display: flex; }
.rate-bar span { height: 100%; }
.rarity-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); }
.rarity-legend i { font-size: 8px; }
.feature-list { display: grid; gap: 12px; margin-top: 22px; }
.feature { display: flex; gap: 14px; padding: 14px; align-items: flex-start; }
.feature .stat-ic { width: 42px; height: 42px; font-size: 17px; }
.feature h4 { font-size: 15px; margin-bottom: 2px; }
.feature p { font-size: 13px; color: var(--muted); }

/* reel */
.reel { position: relative; overflow: hidden; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line); padding: 14px 0; }
.reel::before, .reel::after { content: ''; position: absolute; z-index: 3; top: 0; bottom: 0; width: 60px; pointer-events: none; }
.reel::before { left: 0; background: linear-gradient(90deg, var(--surface2), transparent); }
.reel::after { right: 0; background: linear-gradient(-90deg, var(--surface2), transparent); }
.reel-marker { position: absolute; z-index: 4; left: 50%; top: 4px; bottom: 4px; width: 3px; transform: translateX(-50%); background: rgb(var(--p)); border-radius: 3px; }
.reel-track { display: flex; gap: 10px; will-change: transform; }
.reel-item { flex: 0 0 110px; border-radius: 12px; overflow: hidden; background: var(--surface); border: 2px solid var(--rc, var(--line)); }
.reel-item img { width: 100%; height: 76px; object-fit: cover; }
.reel-item div { padding: 6px 8px; font-size: 11px; font-weight: 700; color: var(--rc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prize { text-align: center; }
.prize-img { width: 170px; height: 170px; margin: 0 auto 14px; border-radius: 22px; overflow: hidden; border: 3px solid var(--rc); animation: prizeIn .6s var(--ease); }
.prize-img img { width: 100%; height: 100%; object-fit: cover; }
@keyframes prizeIn { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }

/* ---------- 16. Team — Standard (เรียบง่าย) ---------- */
.team-simple { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 899px) { .team-simple { grid-template-columns: repeat(2, 1fr); } }
.tm { padding: 22px 16px; text-align: center; transition: transform .3s var(--ease); }
.tm:hover { transform: translateY(-4px); }
.tm img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; border: 4px solid var(--surface); box-shadow: 0 0 0 2px rgb(var(--p) / .5); }
.tm h4 { font-size: 16px; }
.tm .role { font-size: 12.5px; color: var(--pt); font-weight: 600; margin-bottom: 12px; }

/* ---------- 17. Team — Pro (การ์ดโปรไฟล์เต็มตัว) ---------- */
.team-pro { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1023px) { .team-pro { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .team-pro { gap: 12px; } }
.tp {
  position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-lg); overflow: hidden; isolation: isolate;
  border: 1px solid var(--line); color: #fff; transition: transform .35s var(--ease), box-shadow .35s;
}
.tp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s var(--ease), filter .5s; filter: saturate(.9); }
.tp::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgb(4 7 15 / .6) 60%, rgb(4 7 15 / .96)); transition: .4s; }
.tp:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.tp:hover img { transform: scale(1.06); filter: saturate(1.1); }
.tp:hover::after { background: linear-gradient(180deg, transparent 20%, rgb(4 7 15 / .75) 50%, rgb(4 7 15 / .96)); }
.tp-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; }
.tp-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgb(0 0 0 / .5); backdrop-filter: blur(6px); font-size: 11.5px; font-weight: 600; }
.tp-status i { font-size: 8px; }
.tp-rank { font-family: var(--font-display); font-size: 11px; letter-spacing: .12em; padding: 4px 9px; border-radius: 8px; background: rgb(var(--p)); }
.tp-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; }
.tp-info h4 { font-size: 18px; font-weight: 700; }
.tp-role { font-size: 12.5px; color: rgb(var(--pl)); font-weight: 600; }
.tp-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.tp-more > div { overflow: hidden; }
.tp:hover .tp-more, .tp:focus-within .tp-more { grid-template-rows: 1fr; }
.tp-bio { font-size: 12.5px; color: #cbd5e1; margin: 8px 0 10px; }
.tp-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.tp-tags span { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: rgb(255 255 255 / .12); }
.tp-social { display: flex; gap: 6px; }
.tp-social button { width: 32px; height: 32px; border-radius: 9px; background: rgb(255 255 255 / .12); color: #fff; transition: .2s; }
.tp-social button:hover { background: rgb(var(--p)); }
.team-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.team-kpi .card { padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
@media (max-width: 720px) { .team-kpi { grid-template-columns: 1fr; } }
@media (hover: none) { .tp .tp-more { grid-template-rows: 1fr; } .tp-bio { display: none; } }

/* ---------- 18. Discord — Standard (วิดเจ็ตทางการ) ---------- */
.dc-simple { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding: 32px; overflow: hidden; position: relative; }
.dc-simple > * { position: relative; }
.dc-logo { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: #5865f2; color: #fff; font-size: 28px; margin-bottom: 16px; box-shadow: 0 10px 24px -10px #5865f2; }
.dc-frame { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #313338; height: 400px; }
.dc-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; }
html[data-skin="playful"] .btn-discord { box-shadow: 0 4px 0 #3c45a5; }
@media (max-width: 899px) { .dc-simple { grid-template-columns: 1fr; padding: 22px; } }

/* ---------- 19. Discord — Pro (แผงเซิร์ฟเวอร์แบบสด) ---------- */
.dc-pro { display: grid; grid-template-columns: 300px 1fr 240px; overflow: hidden; border-radius: var(--r-lg); min-height: 460px; }
.dc-side { background: var(--surface2); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.dc-banner { position: relative; height: 130px; overflow: hidden; }
.dc-banner img { width: 100%; height: 100%; object-fit: cover; }
.dc-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgb(0 0 0 / .55)); }
.dc-server { display: flex; align-items: center; gap: 12px; padding: 0 16px; margin-top: -26px; position: relative; z-index: 2; }
.dc-server .brand-mark { width: 54px; height: 54px; border-radius: 16px; font-size: 22px; border: 4px solid var(--surface2); }
.dc-server-name { padding-top: 22px; }
.dc-server-name b { font-weight: 700; font-size: 15px; display: block; line-height: 1.2; }
.dc-counts { display: flex; gap: 14px; padding: 12px 16px; font-size: 12.5px; color: var(--muted); }
.dc-counts i { font-size: 8px; margin-right: 5px; }
.dc-channels { padding: 6px 10px 12px; flex: 1; }
.dc-cat { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); padding: 10px 8px 4px; text-transform: uppercase; }
.dc-ch { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 500; text-align: left; transition: .15s; }
.dc-ch:hover { background: var(--surface); color: var(--text); }
.dc-ch.on { background: rgb(var(--p) / .14); color: var(--text); }
.dc-ch .unread { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.dc-main { display: flex; flex-direction: column; min-width: 0; background: var(--surface); }
.dc-main-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; }
.dc-main-head .muted { font-weight: 400; font-size: 13px; }
.dc-feed { flex: 1; padding: 12px 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; overflow: hidden; }
.dc-msg { display: flex; gap: 12px; padding: 8px; border-radius: 10px; animation: fadeUp .4s var(--ease); }
.dc-msg:hover { background: var(--surface2); }
.dc-msg img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.dc-msg b { font-size: 14px; font-weight: 600; }
.dc-msg time { font-size: 11.5px; color: var(--muted); margin-left: 6px; }
.dc-msg p { font-size: 14px; color: var(--text); opacity: .9; }
.dc-embed { margin-top: 6px; border-left: 3px solid rgb(var(--p)); background: var(--surface2); border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.dc-compose { margin: 0 18px 16px; display: flex; gap: 10px; align-items: center; padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--line); }
.dc-compose input { flex: 1; background: transparent; border: 0; outline: 0; height: 36px; font-size: 14px; min-width: 0; }
.dc-members { border-left: 1px solid var(--line); background: var(--surface2); padding: 14px 12px; overflow: hidden; }
.dc-mem { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 13.5px; }
.dc-mem:hover { background: var(--surface); }
.dc-ava { position: relative; flex-shrink: 0; }
.dc-ava img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.dc-ava i { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--surface2); }
.st-on { background: #23a55a; } .st-idle { background: #f0b232; } .st-dnd { background: #f23f43; }
.dc-mem small { display: block; font-size: 11px; color: var(--muted); line-height: 1.2; }
.dc-cta { padding: 16px; border-top: 1px solid var(--line); }
@media (max-width: 1023px) { .dc-pro { grid-template-columns: 260px 1fr; } .dc-members { display: none; } }
@media (max-width: 720px) {
  .dc-pro { grid-template-columns: 1fr; }
  .dc-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .dc-channels { display: none; }
  .dc-feed { max-height: 360px; }
}

/* ---------- 20. Ticket (Pro) ---------- */
.ticket-wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 899px) { .ticket-wrap { grid-template-columns: 1fr; } }
.tk-list { display: grid; gap: 10px; }
.tk { width: 100%; text-align: left; display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); transition: .2s; }
.tk:hover { border-color: rgb(var(--p) / .45); }
.tk-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgb(var(--p) / .12); color: var(--pt); flex-shrink: 0; }
.thread { display: grid; gap: 12px; max-height: 50vh; overflow-y: auto; padding: 4px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14px; background: var(--surface2); border: 1px solid var(--line); }
.bubble.me { margin-left: auto; background: rgb(var(--p)); color: #fff; border-color: transparent; }
.bubble small { display: block; font-size: 11px; opacity: .7; margin-top: 4px; }

/* ---------- 21. Contact (Starter) ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact { padding: 22px; display: flex; gap: 16px; align-items: center; }
.contact .stat-ic { width: 52px; height: 52px; font-size: 22px; color: #fff; }

/* ---------- 22. FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; margin: 0 auto; }
.faq details { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: border-color .2s; }
.faq details[open] { border-color: rgb(var(--p) / .45); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { color: var(--muted); transition: transform .25s; }
.faq details[open] summary i { transform: rotate(45deg); color: var(--pt); }
.faq details p { padding: 0 18px 16px; color: var(--muted); font-size: 14px; }

/* ---------- 23. Footer ---------- */
.footer { background: var(--bg2); border-top: 1px solid var(--line); padding: 56px 0 24px; margin-top: 24px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 32px; }
@media (max-width: 899px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h4 { font-size: 15px; margin-bottom: 14px; }
.foot-links { display: grid; gap: 8px; font-size: 14px; }
.foot-links a, .foot-links button { color: var(--muted); text-align: left; transition: .2s; }
.foot-links a:hover, .foot-links button:hover { color: var(--pt); }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.pay-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.pay-chip .pp { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; color: #fff; font-size: 10px; }
.foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ---------- 24. Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.label { font-size: 13px; font-weight: 600; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.label .req { color: #ef4444; }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--rb); border: 1px solid var(--line);
  background: var(--surface2); color: var(--text); font-size: 14.5px; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .75; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: rgb(var(--p)); box-shadow: 0 0 0 4px rgb(var(--p) / .15); background: var(--surface); }
.field.err .input, .field.err .select, .field.err .textarea { border-color: #ef4444; box-shadow: 0 0 0 4px rgb(239 68 68 / .12); }
.field-msg { font-size: 12.5px; color: #ef4444; display: none; }
.field.err .field-msg, .check-field.err .field-msg { display: block; }
.check-field.err .check input { outline: 2px solid #ef4444; outline-offset: 1px; }
.hint { font-size: 12.5px; color: var(--muted); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 44px; }
.input-wrap .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 8px; color: var(--muted); }
.input-wrap .eye:hover { color: var(--text); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: rgb(var(--p)); flex-shrink: 0; }
.check a { color: var(--pt); font-weight: 600; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.strength span { height: 4px; border-radius: 4px; background: var(--line); transition: .3s; }

/* ---------- 25. Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgb(3 6 15 / .6); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s;
}
.modal.open { opacity: 1; }
.modal-card {
  width: 100%; max-width: 480px; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / .6); transform: translateY(14px) scale(.98); transition: transform .25s var(--ease);
}
.modal.open .modal-card { transform: none; }
.modal-card.lg { max-width: 640px; }
.modal-card.xl { max-width: 820px; }
.modal-card.sm { max-width: 400px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; display: flex; align-items: center; gap: 10px; }
.modal-head h3 i { color: var(--pt); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface2); }
.close-x { width: 34px; height: 34px; border-radius: 10px; color: var(--muted); display: grid; place-items: center; flex-shrink: 0; }
.close-x:hover { background: var(--surface2); color: var(--text); }
@media (max-width: 560px) {
  .modal { align-items: flex-end; padding: 0; }
  .modal-card, .modal-card.lg, .modal-card.xl, .modal-card.sm { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; transform: translateY(40px); }
}
.auth-hero { text-align: center; margin-bottom: 18px; }
.auth-hero .brand-mark { margin: 0 auto 12px; width: 50px; height: 50px; font-size: 21px; border-radius: 15px; }
.auth-hero h4 { font-size: 19px; }

/* สรุปรายการ */
.summary { border-radius: 14px; border: 1px solid var(--line); background: var(--surface2); padding: 14px 16px; display: grid; gap: 8px; font-size: 14px; }
.summary .row-between span:first-child { color: var(--muted); }
.summary .total { border-top: 1px dashed var(--line); padding-top: 10px; font-weight: 700; font-size: 15.5px; }
.item-row { display: flex; gap: 14px; align-items: center; }
.item-row img { width: 76px; height: 60px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.alert i { margin-top: 3px; }
.alert-warn { background: rgb(245 158 11 / .12); color: #b45309; border: 1px solid rgb(245 158 11 / .3); }
.alert-info { background: rgb(var(--p) / .1); color: var(--pt); border: 1px solid rgb(var(--p) / .25); }
.alert-ok { background: rgb(16 185 129 / .12); color: #047857; border: 1px solid rgb(16 185 129 / .3); }
html.dark .alert-warn { color: #fbbf24; }
html.dark .alert-ok { color: #34d399; }

/* ข้อมูลไอดีที่ได้รับ */
.cred { display: grid; gap: 8px; }
.cred-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--line); }
.cred-row span { font-size: 12px; color: var(--muted); width: 74px; flex-shrink: 0; }
.cred-row code { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.success-ic { width: 72px; height: 72px; margin: 4px auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; color: #fff; background: #10b981; box-shadow: 0 0 0 8px rgb(16 185 129 / .14); animation: prizeIn .5s var(--ease); }

/* ตัวเลือกจำนวนเงิน / แพ็กเติมเกม */
.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opt {
  position: relative; padding: 12px 8px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface);
  text-align: center; font-weight: 700; transition: .15s; cursor: pointer;
}
.opt:hover { border-color: rgb(var(--p) / .5); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.opt:has(input:checked), .opt.on { border-color: rgb(var(--p)); background: rgb(var(--p) / .08); box-shadow: 0 0 0 3px rgb(var(--p) / .12); }
.opt .bonus { position: absolute; top: -8px; right: 6px; font-size: 10px; padding: 1px 6px; border-radius: 6px; background: #ef4444; color: #fff; }
.pack .amt { font-size: 15px; }
.pack .amt i { color: var(--pt); font-size: 12px; }
@media (max-width: 420px) { .opt-grid { grid-template-columns: repeat(2, 1fr); } }

.methods { display: grid; gap: 8px; }
.method { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; transition: .15s; }
.method:hover { border-color: rgb(var(--p) / .5); }
.method input { accent-color: rgb(var(--p)); width: 18px; height: 18px; }
.method:has(input:checked) { border-color: rgb(var(--p)); background: rgb(var(--p) / .06); }
.method .m-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 16px; flex-shrink: 0; }
.method b { display: block; font-size: 14px; }
.method small { color: var(--muted); font-size: 12px; }

.qr-box { display: flex; gap: 18px; align-items: center; padding: 16px; border-radius: 16px; background: var(--surface2); border: 1px solid var(--line); }
.qr { width: 156px; padding: 8px; background: #fff; border-radius: 12px; flex-shrink: 0; position: relative; box-shadow: 0 8px 20px -12px rgb(0 0 0 / .4); }
.qr svg { width: 100%; height: auto; aspect-ratio: 1; display: block; }
.qr-head { height: 26px; margin: -8px -8px 6px; border-radius: 12px 12px 0 0; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; }
@media (max-width: 480px) { .qr-box { flex-direction: column; text-align: center; } }
.drop {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; border: 1.5px dashed var(--line);
  cursor: pointer; transition: .2s; font-size: 13.5px;
}
.drop:hover { border-color: rgb(var(--p)); background: rgb(var(--p) / .05); }
.drop input { display: none; }
.drop .stat-ic { width: 40px; height: 40px; font-size: 16px; }

.progress-steps { display: grid; gap: 10px; }
.ps { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface2); font-size: 14px; color: var(--muted); transition: .3s; }
.ps .ps-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); font-size: 12px; flex-shrink: 0; }
.ps.run { color: var(--text); }
.ps.run .ps-ic { border-color: rgb(var(--p)); color: var(--pt); }
.ps.done { color: var(--text); }
.ps.done .ps-ic { background: #10b981; border-color: #10b981; color: #fff; }

/* ประวัติ */
.h-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 8px; width: 100%; text-align: left; }
button.h-item:hover { border-color: rgb(var(--p) / .45); }
.h-item img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.h-ic { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; background: rgb(var(--p) / .12); color: var(--pt); flex-shrink: 0; }

/* ---------- 26. Toast ---------- */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 200; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 20px 40px -18px rgb(0 0 0 / .5);
  animation: toastIn .3s var(--ease); border-left: 4px solid var(--tc);
}
.toast.out { animation: toastOut .25s var(--ease) forwards; }
.toast .t-ic { color: var(--tc); font-size: 18px; margin-top: 1px; }
.toast b { display: block; font-size: 14px; }
.toast p { font-size: 13px; color: var(--muted); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------- 27. AI assistant (Pro) ---------- */
.ai-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 80; height: 56px; padding: 0 20px 0 8px; border-radius: 999px;
  display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700;
  background: rgb(var(--p)); box-shadow: 0 12px 28px -12px rgb(0 0 0 / .45); transition: transform .2s;
}
.ai-fab:hover { transform: translateY(-2px); }
.ai-fab .ai-orb { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .18); font-size: 17px; position: relative; }
.ai-fab .ai-orb::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .5); animation: ring 2s infinite; }
@keyframes ring { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.ai-panel {
  position: fixed; right: 20px; bottom: 88px; z-index: 85; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 120px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / .6); transform-origin: bottom right; animation: popIn .22s var(--ease);
}
.ai-head { padding: 14px 16px; display: flex; align-items: center; gap: 12px; color: #fff; background: rgb(var(--p)); }
.ai-head .ai-orb { width: 38px; height: 38px; border-radius: 50%; background: rgb(255 255 255 / .2); display: grid; place-items: center; }
.ai-head small { display: block; font-size: 12px; opacity: .85; }
.ai-head .close-x { color: #fff; }
.ai-head .close-x:hover { background: rgb(255 255 255 / .15); color: #fff; }
.ai-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg2); }
.ai-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px 14px 14px 4px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; line-height: 1.55; animation: fadeUp .3s var(--ease); }
.ai-msg.me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: rgb(var(--p)); color: #fff; border-color: transparent; }
.ai-msg .btn { margin-top: 8px; }
.ai-mini { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 8px; border-radius: 10px; background: var(--surface2); }
.ai-mini img { width: 44px; height: 36px; border-radius: 8px; object-fit: cover; }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 30% { transform: translateY(-5px); opacity: .5; } }
.ai-quick { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 0; scrollbar-width: none; }
.ai-quick .chip { height: 30px; font-size: 12.5px; padding: 0 11px; }
.ai-form { display: flex; gap: 8px; padding: 10px 12px 12px; }
.ai-form .input { height: 42px; border-radius: 999px; }
.ai-form .btn { width: 42px; height: 42px; padding: 0; border-radius: 50%; }
@media (max-width: 560px) {
  .ai-fab { right: 14px; bottom: 14px; padding: 0 8px; }
  .ai-fab .lbl { display: none; }
  .ai-panel { right: 12px; bottom: 80px; }
}

/* ---------- 28. Comparison table (ฟีเจอร์แพ็กเกจ) ---------- */
.cmp { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cmp th, .cmp td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.cmp th:first-child, .cmp td:first-child { text-align: left; }
.cmp th { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.cmp th.cur, .cmp td.cur { background: rgb(var(--p) / .08); color: var(--text); }
.cmp th.cur { color: var(--pt); }
.cmp .fa-check { color: #10b981; }
.cmp .fa-minus { color: var(--muted); opacity: .5; }

/* ---------- 29. Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--p) / .6); }

/* ==================================================================
 * 30. หน้าแยก — /products, /products/{id}, /topup/{id}, /gacha/{id}, /help
 * ================================================================== */
#main:focus { outline: none; }
.page-top { padding: 28px 0 8px; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--pt); }
.crumbs i { font-size: 10px; opacity: .6; }
.crumbs span[aria-current] { color: var(--text); font-weight: 600; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-title { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.01em; }
html[data-skin="cyber"] .page-title { font-weight: 700; }
.page-sub { color: var(--muted); margin-top: 6px; max-width: 640px; }
.page-body { padding: 24px 0 72px; }
.section-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--pt); white-space: nowrap; }
.section-link:hover { gap: 11px; }
.section-link i { transition: transform .2s; }
.count-note { font-size: 13px; color: var(--muted); }

/* รายละเอียดสินค้า */
.pd { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 32px; align-items: start; }
@media (max-width: 899px) { .pd { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.pd-gallery { position: sticky; top: calc(var(--nav-h) + 16px); }
@media (max-width: 899px) { .pd-gallery { position: static; } }
.pd-main { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; background: var(--surface2); border: 1px solid var(--line); }
.pd-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-main .p-tags { top: 14px; left: 14px; right: 14px; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.pd-thumbs button { flex: 0 0 84px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 2px solid transparent; opacity: .7; transition: .2s; background: var(--surface2); }
.pd-thumbs button:hover { opacity: 1; }
.pd-thumbs button.on { border-color: rgb(var(--p)); opacity: 1; }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info { padding: 24px; }
.pd-info h1 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; line-height: 1.3; margin: 10px 0 12px; }
.pd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 6px 0 16px; }
.pd-price .price { font-size: 32px; }
html[data-skin="cyber"] .pd-price .price { font-size: 28px; }
.pd-price .price-old { display: inline; font-size: 15px; }
.pd-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pd-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.pd-trust { display: grid; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.pd-trust div { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.pd-trust i { color: var(--pt); width: 18px; text-align: center; margin-top: 3px; }
.pd-trust b { color: var(--text); font-weight: 600; display: block; font-size: 14px; }
.pd-desc { margin-top: 28px; padding: 24px; }
.pd-desc > h2 { font-size: 18px; margin-bottom: 14px; }
.buy-bar { display: none; }
@media (max-width: 899px) {
  .buy-bar {
    display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -10px 30px -20px rgb(0 0 0 / .5);
  }
  .buy-bar .grow b { display: block; font-size: 18px; }
  body.has-buy-bar .footer { padding-bottom: 96px; }
  body.has-buy-bar .ai-fab { bottom: 84px; }
}

/* เนื้อหาจาก editor */
.prose { font-size: 15px; line-height: 1.75; color: var(--text); overflow-wrap: anywhere; }
.prose > * + * { margin-top: .9em; }
.prose h2 { font-size: 1.3em; font-weight: 700; margin-top: 1.4em; }
.prose h3 { font-size: 1.12em; font-weight: 700; margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose a { color: var(--pt); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 12px; height: auto; margin: 1em 0; }
.prose blockquote { margin: 1em 0; padding: 10px 16px; border-left: 3px solid rgb(var(--p)); background: var(--surface2); border-radius: 0 10px 10px 0; color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { background: var(--surface2); }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; }
.perks i { color: #10b981; margin-top: 5px; }

/* หน้าเติมเกม */
.gp { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 28px; align-items: start; }
@media (max-width: 899px) { .gp { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.gp-card { overflow: hidden; position: sticky; top: calc(var(--nav-h) + 16px); }
@media (max-width: 899px) { .gp-card { position: static; } }
.gp-cover { aspect-ratio: 16 / 10; background: var(--surface2); }
.gp-cover img { width: 100%; height: 100%; object-fit: cover; }
.gp-card .gp-body { padding: 20px; }
.gp-card h1 { font-size: 22px; margin-bottom: 6px; }
.gp-steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; counter-reset: gs; }
.gp-steps li { display: flex; gap: 12px; font-size: 13.5px; color: var(--muted); align-items: flex-start; }
.gp-steps li::before { counter-increment: gs; content: counter(gs); flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgb(var(--p) / .12); color: var(--pt); }
.gp-form { padding: 24px; }
.gp-form h2 { font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.gp-form h2 .n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; background: rgb(var(--p)); color: #fff; }
.gp-form .step-block + .step-block { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pack-grid .opt { text-align: left; padding: 12px 14px; }
.pack-grid .opt b { display: block; font-size: 14.5px; }
.pack-grid .opt .pp { display: block; margin-top: 4px; font-size: 15px; font-weight: 800; color: var(--pt); }

/* หน้ากล่องสุ่ม */
.gx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 899px) { .gx { grid-template-columns: minmax(0, 1fr); } }
.gx-cover { aspect-ratio: 16 / 11; border-radius: var(--r-lg); overflow: hidden; background: var(--surface2); border: 1px solid var(--line); }
.gx-cover img { width: 100%; height: 100%; object-fit: cover; }
.gx-info { padding: 24px; }
.gx-info h1 { font-size: clamp(22px, 2.6vw, 28px); margin: 8px 0 10px; }
.prize-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.prize-card { border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.prize-card .pc-img { aspect-ratio: 4 / 3; background: var(--surface2); display: grid; place-items: center; color: var(--muted); font-size: 26px; border-bottom: 3px solid var(--rc, var(--line)); }
.prize-card .pc-img img { width: 100%; height: 100%; object-fit: cover; }
.prize-card .pc-body { padding: 10px 12px; }
.prize-card b { display: block; font-size: 13.5px; line-height: 1.35; }
.prize-card small { font-size: 12px; font-weight: 700; color: var(--rc); }
.result-card { margin-top: 18px; padding: 20px; text-align: center; border: 2px solid var(--rc, var(--line)); }

/* ไม่พบหน้า */
.nf { text-align: center; padding: 80px 16px; }
.nf .code { font-size: 64px; font-weight: 800; color: var(--pt); line-height: 1; font-family: var(--font-display); }
.nf h1 { font-size: 22px; margin: 12px 0 6px; }
.nf p { color: var(--muted); margin-bottom: 20px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.sk { border-radius: var(--r); background: linear-gradient(90deg, var(--surface2) 25%, var(--surface) 37%, var(--surface2) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ลิงก์ที่ห่อการ์ด (หน้าแยก) */
a.p-media, a.gbox-media, a.g-tile { display: block; color: inherit; }
a.g-tile { color: #fff; }
.p-title a:hover, .gbox-body h3 a:hover { color: var(--pt); }

/* ชื่อร้านยาว ๆ ต้องไม่ดันปุ่มจนล้นจอ */
.nav .brand { flex-shrink: 1; min-width: 0; }
.brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-actions { flex-shrink: 0; }
#drawer-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide h1, .slide h2, .page-title, .pd-info h1, .gx-info h1 { overflow-wrap: anywhere; }
