/* ======================================================
   เกมหวย.ink — Global Stylesheet (FinnBet single-brand)
   Dark casino theme modelled on ailottothai.com &
   aibaccaratthai.casino, improved: Noto Sans Thai webfont,
   near-black background, #facc15 gold pill CTAs, glassy
   panels, sticky ToC, native accordions, sticky offer bar,
   exit popup, floating LINE button.
   ====================================================== */

:root {
  --bg:      #08080a;   /* near-black page background */
  --bg-2:    #0e0e12;   /* alt band */
  --panel:   #14141a;   /* card base */
  --panel-2: #1b1b22;   /* raised card */
  --line:    rgba(255,255,255,.09);
  --line-2:  rgba(255,255,255,.14);

  --gold:    #facc15;   /* primary CTA (yellow-400) */
  --gold-2:  #f5b301;   /* deeper amber */
  --gold-3:  #ffe27a;   /* highlight */
  --green:   #22c55e;   /* success / LINE-ish accents */

  --ink:     #0a0a0a;   /* text on gold */
  --text:    #f1f5f9;   /* slate-100 */
  --muted:   #9aa4b2;   /* slate-400 */
  --muted-2: #c7ced8;

  --radius:    16px;
  --radius-lg: 24px;
  --maxw: 1160px;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans Thai", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: "Noto Sans Thai", "Inter", sans-serif; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* ambient gold glow behind hero */
.glow-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% -6%, rgba(250,204,21,.16), transparent 60%),
    radial-gradient(40% 30% at 85% 8%, rgba(245,179,1,.10), transparent 60%),
    var(--bg);
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 40; width: 100%;
  background: rgba(8,8,10,.82);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 16px; min-height: 72px;
  max-width: 1280px; margin: 0 auto; padding: 8px clamp(16px, 3vw, 40px);
}
.logo { display: inline-flex; align-items: baseline; font-family: "Inter","Noto Sans Thai",sans-serif; font-weight: 900; font-size: 26px; letter-spacing: -.02em; }
.logo .l-finn { color: #fff; }
.logo .l-bet  { color: var(--gold); }
.logo .l-dot  { color: var(--gold); }

/* Nav */
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a, .dropdown-trigger {
  font-weight: 700; font-size: 15px; color: var(--muted-2);
  background: transparent; border: 1px solid transparent;
  padding: 9px 13px; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.nav > a:hover, .dropdown-trigger:hover, .has-dropdown.open .dropdown-trigger { background: rgba(255,255,255,.06); color: #fff; }
.has-dropdown { position: relative; }
.dropdown-trigger::after { content: "▾"; font-size: 11px; color: var(--gold); }
.dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 250px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: var(--shadow); padding: 8px; display: none; flex-direction: column; gap: 2px; z-index: 50;
}
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.has-dropdown:hover .dropdown, .has-dropdown.open .dropdown { display: flex; }
.dropdown a { display: flex; align-items: center; gap: 9px; color: var(--muted-2); font-weight: 700; font-size: 15px; padding: 10px 12px; border-radius: 9px; }
.dropdown a:hover { background: rgba(255,255,255,.06); color: #fff; }

.nav-cta { background: var(--gold) !important; color: var(--ink) !important; font-weight: 900 !important; border-radius: 999px !important; padding: 10px 20px !important; }
.nav-cta:hover { filter: brightness(1.05); background: var(--gold) !important; color: var(--ink) !important; }

.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 46px; height: 42px; background: rgba(255,255,255,.06); color: #fff;
  border: 1px solid var(--line-2); border-radius: 12px; font-size: 20px; cursor: pointer; margin-left: auto;
}

/* ---------------- Hero ---------------- */
.page-hero { position: relative; padding: 56px 18px 34px; }
.page-hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero-copy { min-width: 0; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: rgba(250,204,21,.12); border: 1px solid rgba(250,204,21,.35);
  color: var(--gold-3); font-weight: 700; font-size: 13.5px;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 18px;
}
.page-hero h1 { color: #fff; font-size: clamp(30px, 4.6vw, 52px); margin: 0 0 16px; }
.page-hero h1 .hl { color: var(--gold); }
.page-hero .lead { color: var(--muted-2); font-size: 18px; line-height: 1.85; margin: 0 0 24px; }
.lead-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.lead-clamp.is-expanded { -webkit-line-clamp: unset; overflow: visible; }
.read-more-btn { margin: -8px 0 20px; background: transparent; border: 1px solid var(--line-2); color: var(--gold-3); padding: 8px 16px; border-radius: 999px; font-weight: 700; cursor: pointer; font-family: inherit; }
.read-more-btn:hover { background: rgba(255,255,255,.05); }

.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.feature-chips span { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--muted-2); background: rgba(255,255,255,.04); border: 1px solid var(--line); padding: 7px 13px; border-radius: 999px; }
.feature-chips span::before { content: "✓"; color: var(--gold); font-weight: 900; }

/* hero visual */
.hero-visual { position: relative; }
.hero-card {
  position: relative; border-radius: var(--radius-lg); padding: 28px;
  background: linear-gradient(160deg, rgba(250,204,21,.14), rgba(255,255,255,.03));
  border: 1px solid rgba(250,204,21,.28);
  box-shadow: var(--shadow); overflow: hidden;
}
.hero-emoji { font-size: 96px; line-height: 1; text-align: center; filter: drop-shadow(0 8px 24px rgba(250,204,21,.35)); }
.hero-card h2 { color: #fff; font-size: 22px; margin: 14px 0 8px; text-align: center; }
.hero-card p { color: var(--muted-2); text-align: center; margin: 0; font-size: 15px; }
.hero-photo { margin: 0; border-radius: var(--radius-lg); overflow: hidden; line-height: 0; border: 1px solid rgba(250,204,21,.28); box-shadow: var(--shadow); background: linear-gradient(160deg, rgba(250,204,21,.14), rgba(255,255,255,.03)); }
.hero-photo img { width: 100%; height: auto; display: block; }
.content figure { margin: 26px 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); line-height: 0; }
.content figure img { width: 100%; height: auto; display: block; }
.content figure figcaption { line-height: 1.5; font-size: 13px; color: var(--muted); padding: 10px 14px; background: var(--panel); text-align: center; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 900; font-size: 16px;
  border-radius: 999px; padding: 14px 26px; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.btn-block { width: 100%; }
.btn-primary { background: var(--gold); color: var(--ink); box-shadow: 0 12px 26px rgba(250,204,21,.28); }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-primary::after { content: "→"; font-weight: 900; }
.btn-ghost { background: rgba(255,255,255,.05); color: #fff; border: 1px solid var(--line-2); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }

/* ---------------- Feature cards row ---------------- */
.feature-band { padding: 8px 18px 40px; }
.feature-grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; text-align: center; }
.feature-item .fi-icon { width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); font-size: 32px; line-height: 1;
  background: radial-gradient(circle at 50% 32%, rgba(250,204,21,.26), rgba(250,204,21,.05));
  border: 1px solid rgba(250,204,21,.4); box-shadow: inset 0 0 18px rgba(250,204,21,.12); }
.feature-item .fi-icon svg { width: 34px; height: 34px; display: block; }
a.feature-item { transition: transform .15s ease, border-color .15s ease, background .15s ease; }
a.feature-item:hover { transform: translateY(-3px); border-color: rgba(250,204,21,.5); background: linear-gradient(160deg, rgba(250,204,21,.07), var(--panel)); }
a.feature-item:hover .fi-icon { box-shadow: inset 0 0 18px rgba(250,204,21,.2), 0 6px 18px rgba(250,204,21,.18); }

/* Fix: buttons inside .content were inheriting the gold link colour (invisible text) */
.content a.btn-primary, .content a.btn-primary:hover { color: var(--ink); text-decoration: none; }
.content a.btn-ghost, .content a.btn-ghost:hover { color: #fff; text-decoration: none; }

/* Site wordmark logo (เกมหวย.ink) */
.logo.site-logo { font-family: "Noto Sans Thai", "Inter", sans-serif; font-weight: 800; align-items: baseline; }
.logo .lg-a { color: #fff; }
.logo .lg-b { color: var(--gold); }
.logo .lg-ink { color: var(--gold-2); font-size: .52em; font-weight: 800; margin-left: 3px; }
.feature-item h2, .feature-item h3 { color: #fff; font-size: 20px; margin: 0 0 8px; }
.feature-item p { color: var(--muted); margin: 0; font-size: 15px; }

/* ---------------- USP highlight strip (redesigned feature band) ---------------- */
.usp-band { padding: 6px 18px 42px; }
.usp {
  position: relative; max-width: var(--maxw); margin: 0 auto; overflow: hidden;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: linear-gradient(150deg, rgba(250,204,21,.10), var(--panel) 55%);
  border: 1px solid rgba(250,204,21,.30); border-radius: 22px;
  box-shadow: 0 18px 48px rgba(0,0,0,.4);
}
.usp::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-3) 50%, var(--gold) 80%, transparent); }
.usp::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 120% at 50% -10%, rgba(250,204,21,.10), transparent 60%); }
.usp-item { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; padding: 28px 26px; border-left: 1px solid rgba(255,255,255,.07); }
.usp-item:first-child { border-left: 0; }
.usp-ic { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; color: var(--gold);
  background: radial-gradient(circle at 38% 28%, rgba(250,204,21,.4), rgba(250,204,21,.06));
  border: 1px solid rgba(250,204,21,.45); box-shadow: inset 0 0 16px rgba(250,204,21,.18); }
.usp-ic svg { width: 30px; height: 30px; display: block; }
.usp-tx { min-width: 0; }
.usp-tx strong { display: block; color: #fff; font-size: 18px; font-weight: 800; line-height: 1.25; margin-bottom: 3px; }
.usp-tx span { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
@media (max-width: 860px) {
  .usp { grid-template-columns: 1fr; }
  .usp-item { border-left: 0; border-top: 1px solid rgba(255,255,255,.07); }
  .usp-item:first-child { border-top: 0; }
}

/* ---------------- Brand showcase card (single FinnBet) ---------------- */
.brand-band { padding: 20px 18px 46px; }
.list-heading { max-width: var(--maxw); margin: 0 auto 22px; text-align: center; color: #fff; font-size: clamp(22px, 3.4vw, 34px); }
.brand-card {
  position: relative; max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 220px 1.3fr 230px; gap: 26px; align-items: center;
  background: linear-gradient(150deg, rgba(250,204,21,.10), var(--panel));
  border: 2px solid rgba(250,204,21,.55); border-radius: 20px; padding: 26px 28px;
  box-shadow: 0 16px 44px rgba(250,204,21,.14);
}
.rank-badge {
  position: absolute; top: -14px; left: 22px;
  background: linear-gradient(180deg, var(--gold-3), var(--gold-2)); color: var(--ink);
  font-weight: 900; font-size: 13px; padding: 6px 16px; border-radius: 999px; letter-spacing: .04em;
}
.brand-thumb {
  height: 130px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(250,204,21,.22), rgba(0,0,0,.4));
  border: 1px solid var(--line-2); border-radius: 16px;
}
.brand-thumb .logo { font-size: 34px; }
.brand-info h3 { color: #fff; font-size: 24px; margin: 0 0 8px; }
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 900; color: var(--gold-2); background: rgba(250,204,21,.12); border: 1px solid rgba(250,204,21,.35); border-radius: 999px; padding: 3px 12px; }
.casino-features { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.casino-features li { position: relative; padding-left: 26px; font-size: 15px; color: var(--muted-2); }
.casino-features li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: rgba(34,197,94,.16); color: var(--green); font-size: 11px; font-weight: 900; display: grid; place-items: center; }
.brand-offer { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 14px; padding: 16px 14px; }
.brand-offer .bonus-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; color: var(--muted); }
.brand-offer .bonus-amount { font-weight: 900; font-size: 19px; color: var(--gold); line-height: 1.25; }

/* ---------------- Table of contents ---------------- */
.toc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 12px; }
.toc h2 { color: var(--gold); font-size: 18px; margin: 0 0 12px; }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.toc a { color: var(--muted-2); font-weight: 600; }
.toc a:hover { color: var(--gold-3); text-decoration: underline; }

/* ---------------- Sticky Table of Contents (2-col article layout) ---------------- */
.content-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 36px; align-items: start; }
.toc-side { position: sticky; top: 88px; }
.toc-box { background: linear-gradient(160deg, rgba(250,204,21,.06), var(--panel)); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 10px; max-height: calc(100vh - 110px); overflow: auto; }
.toc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.toc-head span { color: var(--gold); font-weight: 800; font-size: 15px; }
.toc-toggle { background: none; border: 0; color: var(--muted); font-family: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.toc-toggle:hover { color: var(--gold-3); }
.toc-nav ol { list-style: none; counter-reset: t; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc-nav li { counter-increment: t; }
.toc-nav a { display: block; position: relative; color: var(--muted-2); font-size: 13.5px; line-height: 1.4; font-weight: 600; padding: 8px 10px 8px 32px; border-radius: 8px; border-left: 2px solid transparent; }
.toc-nav a::before { content: counter(t); position: absolute; left: 8px; top: 7px; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.07); color: var(--muted); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.toc-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.toc-nav a.active { color: var(--gold); background: rgba(250,204,21,.1); border-left-color: var(--gold); }
.toc-nav a.active::before { background: var(--gold); color: var(--ink); }
.toc-side.collapsed .toc-nav { display: none; }
.article { min-width: 0; }
.article section[id] { scroll-margin-top: 92px; }
@media (max-width: 960px) {
  .content-layout { grid-template-columns: 1fr; gap: 18px; }
  .toc-side { position: static; top: auto; }
  .toc-box { max-height: none; }
}

/* ---------------- Article / content ---------------- */
.content { padding: 30px 18px; }
.content .container { max-width: var(--maxw); }
.content section { margin: 34px 0; }
.content section:first-child { margin-top: 0; }
.content h2 { color: #fff; font-size: clamp(23px, 3.2vw, 34px); margin: 8px 0 14px; scroll-margin-top: 90px; }
.content h3 { color: var(--gold-3); font-size: clamp(18px, 2.2vw, 24px); margin: 24px 0 10px; }
.content p { margin: 0 0 16px; color: var(--muted-2); font-size: 17px; line-height: 1.85; }
.content ul, .content ol { margin: 0 0 18px; padding-left: 22px; color: var(--muted-2); }
.content li { margin: 0 0 9px; line-height: 1.75; }
.content strong { color: #fff; }
.content a { color: var(--gold); font-weight: 700; }
.content a:hover { text-decoration: underline; }

/* steps list */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 60px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--ink); font-weight: 900; display: grid; place-items: center; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 20px 0 28px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15.5px; min-width: 520px; }
thead th { background: linear-gradient(135deg, #2a2410, #1a1a20); color: var(--gold-3); text-align: left; font-weight: 900; padding: 14px 16px; }
td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: top; color: var(--muted-2); }
tbody tr:nth-child(even) td { background: rgba(255,255,255,.02); }
td:first-child { font-weight: 800; color: #fff; }

/* CTA inline block */
.cta-inline { text-align: center; background: linear-gradient(150deg, rgba(250,204,21,.12), var(--panel)); border: 1px solid rgba(250,204,21,.3); border-radius: var(--radius-lg); padding: 30px 24px; margin: 28px 0; }
.cta-inline h3 { color: #fff; margin: 0 0 8px; font-size: 22px; }
.cta-inline p { color: var(--muted-2); margin: 0 0 18px; }

/* Responsible-gambling callout */
.callout { border-radius: var(--radius-lg); padding: 24px; margin: 10px 0; }
.callout.is-warning { background: linear-gradient(135deg, rgba(250,204,21,.08), var(--panel)); border: 1px solid rgba(250,204,21,.4); }
.callout h3 { margin: 0 0 6px; color: var(--gold-3); font-size: 20px; }
.callout p { margin: 0; color: var(--muted-2); line-height: 1.7; }
.callout a { color: var(--gold); font-weight: 700; }

/* ---------------- FAQ accordion (native details) ---------------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 700; color: #fff; font-size: 16.5px; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 22px; font-weight: 900; flex: 0 0 auto; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { margin: 0; padding: 0 20px 18px; color: var(--muted-2); line-height: 1.8; }

/* ---------------- Footer ---------------- */
.site-footer { background: linear-gradient(180deg, #0c0c10, #08080a); border-top: 1px solid rgba(250,204,21,.25); padding: 46px 18px 26px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 34px; max-width: var(--maxw); margin: 0 auto 24px; }
.footer-grid .logo { font-size: 24px; }
.footer-grid p { color: var(--muted); line-height: 1.7; font-size: 15px; margin: 12px 0 0; }
.footer-grid h3 { color: var(--gold); font-size: 16px; margin: 0 0 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid li a { color: var(--muted-2); font-size: 15px; font-weight: 600; }
.footer-grid li a:hover { color: #fff; }
.footer-contact { color: var(--muted-2); font-size: 15px; display: grid; gap: 8px; }
.footer-contact a { color: var(--gold-3); font-weight: 700; }
.responsible-badge { display: inline-block; margin-top: 14px; border: 1px solid rgba(34,197,94,.4); background: rgba(34,197,94,.1); color: #bff4cf; border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 13px; }
.footer-bottom {