/* p6h.pro — style.css (ธีม dark navy / violet-cyan, อิงรูปแบบเว็บตัวอย่าง tkslot.wine)
   ประกอบด้วย: tokens → base → chrome (nav/hero/footer) → ส่วนประกอบหน้าแรก → บล็อกบทความ → responsive
   ห้ามเพิ่ม CDN: ฟอนต์/ไอคอน/Bootstrap เก็บใน assets/ ทั้งหมด */

/* ---------------- design tokens ---------------- */
:root {
  --bg: #020617;
  --surface: #040c2e;
  --surface-2: #081536;
  --text: #eaedf3;
  --heading: #f8fafc;
  --muted: #a3adbe;
  --primary: #8b5cf6;
  --primary-2: #6366f1;
  --on-primary: #000000;
  --accent: #22d3ee;
  --gold: #f5c451;
  --green: #4ade80;
  --red: #f87171;
  --border: rgba(255, 255, 255, 0.12);
  --border-soft: rgba(255, 255, 255, 0.07);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.75);
  --glow: 0 0 34px rgba(139, 92, 246, 0.35);
  --wrap: 1180px;
}

/* ---------------- base ---------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Sarabun', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 92px; /* กัน sticky CTA ทับเนื้อหา */
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--primary); }
h1, h2, h3, h4 { color: var(--heading); font-weight: 800; line-height: 1.45; margin: 0 0 .75rem; }
h1 { font-size: clamp(1.7rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.35rem; }
li { margin-bottom: .45rem; }
strong { color: #fff; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.num { color: var(--gold); font-weight: 700; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 999; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; }

/* ---------------- chrome: topbar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(2, 6, 23, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-in { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-logo { height: 40px; width: auto; }
.brand-name { font-weight: 800; font-size: 1.28rem; color: #fff; letter-spacing: .4px; }
.nav-links { display: flex; gap: 4px; flex: 1 1 auto; flex-wrap: wrap; justify-content: center; }
.nav-links a {
  color: var(--text); font-size: .95rem; font-weight: 600;
  padding: 7px 11px; border-radius: 999px; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.on { background: rgba(139, 92, 246, .18); color: #fff; }
.nav-cta { display: flex; gap: 8px; flex: 0 0 auto; }
.burger { display: none; }

/* ปุ่ม */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 800; border-radius: 999px; border: 0; cursor: pointer;
  padding: 12px 22px; font-size: 1rem; line-height: 1; text-align: center;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.btn:active { transform: scale(.985); }
.btn-primary {
  color: #04121a;
  background: linear-gradient(135deg, #7cffcb 0%, #00f5a0 32%, #00d9ff 68%, #4f8cff 100%);
  box-shadow: 0 10px 26px rgba(0, 245, 160, .28), 0 0 18px rgba(0, 217, 255, .22);
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(0, 245, 160, .42); transform: translateY(-2px); }
.btn-ghost { background: rgba(139, 92, 246, .16); color: #fff; border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(139, 92, 246, .3); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-lg { padding: 15px 30px; font-size: 1.08rem; }
.btn-block { width: 100%; }

/* ---------------- hero ---------------- */
.hero-section { position: relative; overflow: hidden; padding: 74px 0 62px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(1000px 480px at 18% 12%, rgba(139, 92, 246, .34), transparent 62%),
              radial-gradient(760px 420px at 88% 26%, rgba(34, 211, 238, .24), transparent 60%);
}
.hero-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.hero-orb-1 { width: 320px; height: 320px; background: #7c3aed; top: -80px; left: -60px; }
.hero-orb-2 { width: 260px; height: 260px; background: #06b6d4; bottom: -70px; right: 4%; }
.hero-orb-3 { width: 180px; height: 180px; background: #f59e0b; top: 40%; right: 26%; opacity: .28; }
.hero-in { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: center; }
.hero h1 { margin-bottom: 14px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  background: rgba(34, 211, 238, .12); border: 1px solid rgba(34, 211, 238, .3);
  color: #cffafe; font-size: .86rem; font-weight: 700; padding: 6px 13px; border-radius: 999px;
}
.hero-lead { font-size: 1.06rem; color: #dbe2ee; max-width: 640px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-stats { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats .k { display: block; font-size: 1.45rem; font-weight: 800; color: #fff; }
.hero-stats .v { font-size: .86rem; color: var(--muted); }
.hero-art {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow), var(--glow);
}
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------------- jackpot ---------------- */
.jackpot-section { padding: 26px 0 6px; }
.jackpot-box {
  background: linear-gradient(160deg, var(--surface) 0%, #0b1a45 100%);
  border: 1px solid rgba(245, 196, 81, .28); border-radius: var(--radius);
  padding: 26px 18px; text-align: center; box-shadow: var(--shadow);
}
.jackpot-label { font-weight: 700; color: var(--gold); font-size: 1rem; }
.jackpot-amount {
  font-size: clamp(2rem, 6vw, 3.3rem); font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(120deg, #fff7d6, #f5c451 45%, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.jackpot-sub { color: var(--muted); font-size: .9rem; }

/* ---------------- sections ---------------- */
.section-pad { padding: 58px 0; }
.section-title { text-align: center; margin-bottom: .4rem; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 2rem; }
.section-title.left, .section-sub.left { text-align: left; }

/* การ์ดทั่วไป */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: linear-gradient(165deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; height: 100%;
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, .5); }
.card h3 { margin-bottom: .35rem; }
.card-desc { color: var(--muted); font-size: .95rem; margin: 0; }
.card-badge {
  display: inline-block; font-size: .78rem; font-weight: 700; color: #04121a;
  background: linear-gradient(135deg, #f5c451, #fbbf24);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(139, 92, 246, .18); color: #ddd6fe; font-size: 1.35rem; margin-bottom: 12px;
}
.card-num { font-size: 1.6rem; font-weight: 800; color: var(--gold); }

/* steps */
.steps { counter-reset: st; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step-item {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 18px 18px;
}
.step-item::before {
  counter-increment: st; content: counter(st);
  position: absolute; top: -16px; left: 18px;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #06121f; font-weight: 800; font-size: 1rem;
}
.step-item h3 { margin-top: 8px; font-size: 1rem; }
.step-desc { color: var(--muted); font-size: .92rem; margin: 0; }

/* vip */
.vip-card {
  background: linear-gradient(170deg, var(--surface) 0%, #101b45 100%);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center;
}
.vip-card.gold { border-color: rgba(245, 196, 81, .5); box-shadow: var(--glow); }
.vip-rank { font-weight: 800; font-size: 1.2rem; color: var(--gold); }
.vip-perk { color: var(--muted); font-size: .92rem; }

/* ---------------- บทความ ---------------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; align-items: start; }
.article-body { min-width: 0; }
.article-body h2 { margin-top: 2.2rem; scroll-margin-top: 90px; }
.article-body h3 { margin-top: 1.5rem; scroll-margin-top: 90px; }
.article-body ul, .article-body ol { margin-bottom: 1.2rem; }
.article-body > p:first-of-type { font-size: 1.08rem; color: #e7ecf5; }

.toc {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--primary); border-radius: var(--radius-sm);
  padding: 18px 20px; margin: 0 0 1.8rem;
}
.toc h2 { font-size: 1.05rem; margin-bottom: .6rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin-bottom: .3rem; }
.toc a { color: #cbd5e1; font-weight: 600; font-size: .96rem; }
.toc a:hover { color: var(--accent); }

figure.fig {
  margin: 1.6rem 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
figure.fig img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
figure.fig figcaption { padding: 12px 16px; color: var(--muted); font-size: .9rem; }

table.tb {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; font-size: .95rem;
}
table.tb th, table.tb td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--border-soft); }
table.tb thead th { background: rgba(139, 92, 246, .18); color: #fff; font-weight: 700; }
table.tb tbody tr:last-child td { border-bottom: 0; }
table.tb tbody tr:nth-child(even) { background: rgba(255, 255, 255, .02); }
.tb-wrap { overflow-x: auto; }

details.faq {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden;
}
details.faq summary {
  cursor: pointer; list-style: none; padding: 15px 18px; font-weight: 700; color: #fff;
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; color: var(--accent); font-size: 1.3rem; line-height: 1; }
details.faq[open] summary::after { content: '–'; }
details.faq .faq-body { padding: 0 18px 16px; color: #dbe2ee; margin: 0; }

.callout {
  background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .26);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 1.5rem 0;
}
.callout strong { color: #cffafe; }
.cta-band {
  background: linear-gradient(140deg, rgba(139, 92, 246, .22), rgba(34, 211, 238, .16));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; text-align: center; margin: 2.2rem 0;
}
.cta-band h2 { font-size: 1.35rem; }
.cta-band p { color: #e2e8f3; max-width: 620px; margin: 0 auto 1.2rem; }

/* aside */
.side { position: sticky; top: 88px; display: grid; gap: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.side-card h3 { font-size: 1rem; margin-bottom: .7rem; }
.side-card ul { list-style: none; padding: 0; margin: 0; }
.side-card li { margin-bottom: .5rem; font-size: .94rem; }
.side-card li a { color: #cbd5e1; }
.side-card li a:hover { color: var(--accent); }
.side-card img { border-radius: var(--radius-sm); margin-bottom: .8rem; }

/* ---------------- sticky CTA ---------------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(2, 6, 23, .1), rgba(2, 6, 23, .96) 42%);
  pointer-events: none;
}
.sticky-cta .in {
  pointer-events: auto; max-width: 460px; margin: 0 auto; display: flex; gap: 10px; align-items: center;
}
.sticky-cta .btn { box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.sticky-cta .btn-primary { flex: 1.8; animation: pulse 2s ease-in-out infinite; }
.sticky-cta .btn-ghost { flex: 1; background: rgba(8, 21, 54, .96); border-color: var(--border); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(0, 245, 160, .3); }
  50% { box-shadow: 0 14px 34px rgba(0, 217, 255, .52); }
}

/* ---------------- footer ---------------- */
.footer { background: #01040f; border-top: 1px solid var(--border-soft); padding: 44px 0 120px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; }
.footer h4 { font-size: 1rem; color: #fff; margin-bottom: .7rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .45rem; }
.footer a { color: var(--muted); font-size: .94rem; }
.footer a:hover { color: var(--accent); }
.footer-about { color: var(--muted); font-size: .94rem; }
.article-note {
  border-top: 1px solid var(--border-soft); margin-top: 30px; padding-top: 18px;
  color: var(--muted); font-size: .88rem; line-height: 1.7;
}
.footer-18 {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--red); color: var(--red); font-weight: 800; margin-bottom: 8px;
}

/* ---------------- responsive ---------------- */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .nav-links { display: none; }
  .burger {
    display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
    background: rgba(139, 92, 246, .16); border: 1px solid var(--border); color: #fff; font-size: 1.3rem; cursor: pointer;
  }
  .nav-toggle:checked ~ .nav-links {
    display: flex; position: absolute; top: 68px; left: 0; right: 0; z-index: 70;
    flex-direction: column; gap: 2px; padding: 12px 16px 18px;
    background: rgba(2, 6, 23, .98); border-bottom: 1px solid var(--border);
  }
  .nav-toggle:checked ~ .nav-links a { padding: 11px 12px; border-radius: 10px; }
  .grid-3, .grid-2, .steps { grid-template-columns: 1fr 1fr; }
  .section-pad { padding: 42px 0; }
  .hero-section { padding: 48px 0 40px; }
  .nav-cta .btn-ghost { display: none; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4, .grid-2, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 18px; }
  table.tb { font-size: .88rem; }
}
@media print { .sticky-cta, .topbar { display: none; } }

/* ---------------- quick facts strip ---------------- */
.facts { background: rgba(4, 12, 46, .72); border-bottom: 1px solid var(--border-soft); }
.facts-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 16px 18px; }
.fact { text-align: center; }
.fact .k { display: block; font-size: 1.15rem; font-weight: 800; color: #fff; }
.fact .v { font-size: .84rem; color: var(--muted); }

/* ---------------- เมนู burger แบบ CSS-only (ไม่มี JS) ---------------- */
.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

/* โลโก้ footer */
.footer-logo { height: 46px; width: auto; margin-bottom: 12px; }

/* การ์ดที่ทำเป็นลิงก์ */
a.card { display: block; text-decoration: none; }
a.card h3 { font-size: 1.05rem; }

@media (max-width: 860px) { .facts-in { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .facts-in { grid-template-columns: 1fr 1fr; } }

/* ---------------- ที่เพิ่มภายหลัง: nav / card-grid / cta-inline ---------------- */
.nav-a { color: var(--text); text-decoration: none; font-size: .95rem; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.nav-a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.nav-a.on { color: #fff; background: rgba(139, 92, 246, .24); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 18px 0; }
.cta-inline { color: var(--gold); font-weight: 700; text-decoration: underline; }
.cta-inline:hover { color: #fff; }
@media (max-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }
.card-title { font-weight: 700; color: var(--heading); font-size: 1.02rem; margin: 2px 0 6px; }
.step-title { font-weight: 700; color: var(--heading); font-size: 1.02rem; margin: 2px 0 6px; }
/* กัน grid item บวมจากรูปในคอลัมน์ข้าง (min-width:auto ทำให้การ์ดล้นคอลัมน์ 320px) */
.article-layout > * { min-width: 0; }
.side { display: grid; gap: 18px; align-content: start; }
.side-card img { width: 100%; height: auto; }
