:root {
  --bg: #0b0d14;
  --panel: #141826;
  --line: #262b3d;
  --text: #e8eaf2;
  --muted: #9aa2b8;
  --accent: #b47cff;
  --accent2: #ffc440;
  --on-accent: #12081f;
  --hero: radial-gradient(ellipse at 50% -20%, #2a1d4d 0%, #0b0d14 70%);
  --font: system-ui, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); }
a { color: inherit; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--hero); padding: 48px 0 28px; border-bottom: 1px solid var(--line); }
.top.slim { padding: 16px 0; }
.top h1 { margin: 0; font-size: clamp(28px, 5vw, 44px); letter-spacing: .5px; padding-right: 48px; }
.tag { margin: 8px 0 4px; color: var(--muted); font-size: 18px; }
.note { margin: 0 0 16px; color: var(--accent2); font-size: 14px; }
.links { display: flex; gap: 12px; flex-wrap: wrap; }
.links a { text-decoration: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.links a:hover { border-color: var(--accent); }
.home { text-decoration: none; font-weight: 700; }
.home:hover { text-decoration: underline; }
.small { font-size: 13px; opacity: .75; margin: 0; }

/* ปุ่มรับข่าวแพ็กใหม่ (R429 · ลิงก์ ⛔ ฟอร์มฝัง) */
.follow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 0; }
.follow p { margin: 0; font-size: 14px; flex-basis: 100%; }
.follow .btn { flex: 0 1 auto; padding: 8px 16px; }
.follow .btn.alt { color: var(--text); }

/* ชุดรวม = ตัวทำเงิน นำหน้า (Inversion 28 ต.ค. 69) */
.featured { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 24px 0 8px; }
.featured img { width: 100%; border-radius: 10px; display: block; }
.featured h2 { margin: 4px 0 8px; font-size: clamp(20px, 3vw, 28px); line-height: 1.25; }
.featured h2 a { text-decoration: none; }
.featured p { margin: 0 0 12px; }
.featured .buy { display: flex; flex-wrap: wrap; gap: 8px; }
.kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent2); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0 16px; }
.chip { cursor: pointer; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 14px; font-family: inherit; }
.chip[aria-selected="true"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding-bottom: 32px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.card .thumb { display: block; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #000; }
.card .body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.card h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.blurb { margin: 0; font-size: 13px; line-height: 1.4; opacity: .78; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta, .product .meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }
.card .price, .product .price { color: var(--accent2); font-weight: 700; }
.card .buy { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.buy .btn.main { flex-basis: 100%; }
.btn { flex: 1 1 auto; text-align: center; text-decoration: none; padding: 8px; border-radius: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn.main { background: var(--accent); color: var(--on-accent); }
.btn.alt { border: 1px solid var(--line); color: var(--muted); }
.btn:hover { filter: brightness(1.1); }
.buy .pay-note { flex-basis: 100%; text-align: center; color: var(--muted); font-size: 12px; } /* การ์ด 226 ร้านหลัก ArtStation + _INBOX 🔗 Gumroad "No account needed" */

/* หน้ารายแพ็ก (R430 · ชื่อหน้า = คำค้น) */
.product { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; padding-top: 24px; padding-bottom: 24px; align-items: start; }
.product .pimg img { width: 100%; border-radius: 12px; display: block; }
.product h1 { margin: 0 0 8px; font-size: clamp(22px, 3.4vw, 32px); line-height: 1.25; }
.product .tagline { margin: 0 0 12px; font-size: 17px; }
.product .meta { justify-content: flex-start; gap: 16px; font-size: 14px; }
.product .buy { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.product .buy .btn { padding: 10px 14px; font-size: 15px; }
.desc { grid-column: 1 / -1; max-width: 780px; }
/* การ์ด 289: ราคารวมแพ็กเดี่ยวของชุด */
.product .anchor, .featured .anchor { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
/* การ์ด 299: หน้าแรก Pick your size 4 ขั้น */
.ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 8px 0 24px; }
.ladder .tier { background: var(--panel); color: var(--card-ink, var(--text)); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.ladder .tier p { margin: 0; font-size: 14px; }
.ladder .tier .kicker { color: var(--card-mute, var(--accent2)); }
.ladder .tier a:not(.btn) { color: inherit; }
.ladder .tprice { font-size: 20px; font-weight: 700; color: inherit; }  /* --tag-text = สีบนพื้นป้าย (ธีมมืดจางบนการ์ดครีม) */
.ladder .btn { flex: 0 0 auto; margin-top: auto; align-self: flex-start; padding: 8px 12px; font-size: 14px; }  /* .btn ทั่วไปมี flex-grow 1 = ปุ่มยืดสูงในคอลัมน์ */
@media (max-width: 760px) { .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .ladder { grid-template-columns: 1fr; } }
/* การ์ด 295: หน้า vfxcol รายการหมวด → เดโมตามหมวด */
.catlist { grid-column: 1 / -1; max-width: 780px; }
.catlist h2 { font-size: 15px; letter-spacing: .05em; margin: 8px 0 8px; }
.catlist ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.catlist a { display: inline-block; padding: 4px 10px; border: 1px solid var(--accent2); border-radius: 999px; font-size: 13px; text-decoration: none; }
.catlist a span { color: var(--muted); margin-left: 4px; }
/* การ์ด 288: แถว More like this ท้ายหน้าสินค้า */
.related h2 { font-size: 18px; margin: 8px 0 12px; }
/* การ์ด 286: แพ็กเดี่ยวที่อยู่ในชุดรวม → พาไป vfxcol */
.upsell { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--accent2); border-radius: 12px; }
.upsell p { margin: 0 0 10px; font-size: 14px; }
.upsell .btn { padding: 8px 12px; font-size: 14px; }
/* การ์ด 285: วิดีโอ YouTube แบบเบา (ภาพปก → กดแล้ว iframe) */
.pvideo { grid-column: 1 / -1; max-width: 780px; display: grid; gap: 12px; }
.pvideo .yt, .pvideo .yt-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; overflow: hidden; background: #000; }
.pvideo .yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pvideo .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: rgba(0, 0, 0, .72); }
.pvideo .play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.pvideo .yt:hover .play, .pvideo .yt:focus-visible .play { background: #c00; }
.desc h2 { font-size: 15px; letter-spacing: .05em; margin: 24px 0 6px; }
.desc p { margin: 0 0 12px; }
.desc ul { margin: 0 0 12px; padding-left: 20px; }
.desc li { margin-bottom: 4px; }
.desc code { font-size: 14px; }

.faq { padding: 8px 0 24px; max-width: 780px; }
.faq h2 { font-size: 22px; margin: 16px 0 8px; }
.faq h3 { font-size: 16px; margin: 16px 0 4px; }
.faq p { margin: 0; }
.foot { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 32px; }

/* การ์ด 202: แถบโค้ดส่วนลด (offer.js) · หน้าเดโม · หน้าตัวฟรี · ปุ่ม Gumroad overlay คงหน้าตาเดิม */
.offer-bar { background: var(--accent2); color: #1a1205; text-align: center; font-size: 14px; font-weight: 700; padding: 6px 64px 6px 16px; min-height: 54px; display: flex; align-items: center; justify-content: center; } /* การ์ด 321: เว้นข้างให้ปุ่ม ☀️/🌙 (fixed ขวาบน 42px) ไม่บังตัวหนังสือ */
a.btn.gumroad-button, a.btn.gumroad-button:hover { background-image: none; box-shadow: none; font-family: inherit; line-height: inherit; display: inline-block; }
a.btn.main.gumroad-button { background-color: var(--accent); color: var(--on-accent); border: 0; }
a.btn.alt.gumroad-button { background-color: transparent; color: var(--muted); border: 1px solid var(--line); }
.gumroad-button .logo-full, .gumroad-button-logo { display: none !important; }
.pagetitle { margin: 12px 0 4px; font-size: clamp(24px, 4vw, 34px); }
.links .demo-link { border-color: var(--accent); }
.demo-page { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.demobar { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 10px 16px; background: var(--panel); color: var(--card-ink, var(--text)); border-bottom: 1px solid var(--line); }
.demobar .dtitle { flex: 1 1 320px; min-width: 0; }
.demobar h1 { margin: 0; font-size: 18px; line-height: 1.3; }
.demobar .buy { display: flex; flex-wrap: wrap; gap: 8px; }
.demobar .btn { flex: 0 0 auto; padding: 8px 14px; }
.demoframe { flex: 1; width: 100%; border: 0; background: #000; display: block; }
.demostart { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background-size: cover; background-position: center; box-shadow: inset 0 0 0 2000px rgba(6, 6, 14, 0.62); color: #e8eaf2; }
.demostart .btn { flex: 0 0 auto; padding: 14px 26px; font-size: 18px; }

@media (max-width: 760px) {
  .featured, .product { grid-template-columns: 1fr; }
  .demo-page { height: auto; overflow: auto; }
  .demoframe { height: 70vh; flex: none; }
}
/* มือถือ: 1 คอลัมน์ การ์ดแนวนอน รูปซ้าย · ปุ่มเรียงแถว ⛔ ปุ่มยืดสูง/ชื่อร้านโดนตัด (บอสแคป 29 ต.ค. 69) */
@media (max-width: 560px) {
  .top { padding: 40px 0 20px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .card { flex-direction: row; }
  .card .thumb { flex: 0 0 104px; align-self: flex-start; }
  .card img { width: 104px; height: 104px; }
  .card .body { padding: 10px 12px; gap: 6px; }
  .card h3 { font-size: 14px; }
  .blurb { -webkit-line-clamp: 2; }
  .card .buy .btn { padding: 7px 8px; font-size: 13px; }
  .follow .btn { flex: 1 1 auto; }
}

/* การ์ด 269: หน้ารวมตามธีม (/xianxia/) */
.theme-group { margin: 28px 0 12px; font-size: clamp(18px, 2.4vw, 24px); }
.top.slim .small { max-width: 820px; font-size: 15px; line-height: 1.5; margin-bottom: 10px; }
