:root {
  --bg: #07060f; --bg2: #0e0c1f; --ink: #ecebf7; --mute: #9a97b8; --line: rgba(255,255,255,.09);
  --a: #7c5cff; --b: #22d3ee; --c: #f472b6; --good: #34d399; --bad: #fb7185; --mid: #fbbf24;
  --glass: rgba(255,255,255,.045);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Noto Sans Thai", system-ui, sans-serif; font-weight: 300; line-height: 1.65; }
b { font-weight: 600; }
a { color: var(--b); }
h1, h2, h3 { font-family: "Kanit", "Noto Sans Thai", sans-serif; font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(28px, 4.2vw, 52px); }
h3 { font-size: 18px; }
.muted { color: var(--mute); } .small { font-size: 14px; } .center { text-align: center; }
.good { color: var(--good); } .bad { color: var(--bad); } .mid { color: var(--mid); } .bad-t { color: var(--bad); }

/* แถบความคืบหน้า + จุดนำทาง + แสงตามเมาส์ */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 50; background: linear-gradient(90deg, var(--a), var(--b), var(--c)); box-shadow: 0 0 12px var(--b); }
#dots { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 10px; }
#dots a { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.2); position: relative; transition: .3s; }
#dots a.on { background: var(--b); box-shadow: 0 0 10px var(--b); transform: scale(1.4); }
#dots a span { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 12px; opacity: 0; transition: .2s; background: var(--bg2); padding: 2px 8px; border-radius: 6px; pointer-events: none; }
#dots a:hover span { opacity: 1; }
#glow { position: fixed; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; z-index: 0; background: radial-gradient(circle, rgba(124,92,255,.13), transparent 65%); transform: translate(-50%, -50%); transition: left .25s ease-out, top .25s ease-out; }

/* โผล่ตอนเลื่อนถึง */
.rv, .rv-l, .rv-r { opacity: 0; transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 110ms); }
.rv { transform: translateY(40px); } .rv-l { transform: translateX(-60px); } .rv-r { transform: translateX(60px); }
.in { opacity: 1 !important; transform: none !important; }

/* เปิดเรื่อง */
.hero { position: relative; min-height: 100vh; display: grid; place-items: center; overflow: hidden; }
#wave { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-in { position: relative; z-index: 2; text-align: center; padding: 0 20px; max-width: 1100px; }
.kicker { letter-spacing: .25em; font-size: 13px; color: var(--b); text-transform: uppercase; }
.title { font-size: clamp(40px, 7.4vw, 104px); margin: 18px 0; font-weight: 800; }
.split .w { display: inline-block; white-space: nowrap; }
.split .ch { display: inline-block; opacity: 0; transform: translateY(.6em) rotate(8deg); filter: blur(8px); animation: rise .8s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; filter: none; } }
.grad, .grad .ch { background: linear-gradient(100deg, var(--a), var(--b) 45%, var(--c)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--mute); max-width: 720px; margin: 0 auto 40px; font-size: 17px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 18px 12px; backdrop-filter: blur(10px); }
.stat b { display: block; font-family: "Kanit"; font-size: clamp(34px, 4.6vw, 56px); font-weight: 800; background: linear-gradient(180deg, #fff, #a5a3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 14px; color: var(--ink); } .stat small { color: var(--mute); }
.scroll-hint { margin-top: 44px; color: var(--mute); animation: bob 2s infinite; }
@keyframes bob { 50% { transform: translateY(8px); } }

/* สารบัญ */
.toc, .chapter, footer { position: relative; z-index: 1; padding: 120px max(24px, 7vw); }
.toc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 14px; }
.toc-grid a { text-decoration: none; color: var(--ink); background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 18px; transition: transform .3s, border-color .3s, box-shadow .3s; }
.toc-grid a:hover { transform: translateY(-6px) scale(1.02); border-color: var(--a); box-shadow: 0 16px 40px rgba(124,92,255,.25); }
.toc-grid i { font-style: normal; font-size: 30px; display: block; } .toc-grid b { display: block; margin: 6px 0 2px; } .toc-grid span { color: var(--mute); font-size: 13px; }

/* หัวบท */
.ch-head { max-width: 900px; margin-bottom: 44px; }
.ch-head p { color: var(--mute); font-size: 17px; }
.num { font-family: "Kanit"; font-size: 15px; color: var(--b); letter-spacing: .2em; display: block; margin-bottom: 6px; }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: 20px; padding: 22px; backdrop-filter: blur(12px); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.btn, button { font: inherit; }
.btn { display: inline-block; margin-top: 12px; padding: 10px 18px; border-radius: 999px; background: linear-gradient(90deg, var(--a), var(--b)); color: #fff; text-decoration: none; font-weight: 600; }

/* 01 สาย */
.call-wrap { display: grid; grid-template-columns: 420px 1fr; gap: 28px; align-items: start; }
.phone { background: linear-gradient(180deg, #14112b, #0b0918); border: 1px solid var(--line); border-radius: 36px; padding: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 0 6px #1b1836; }
.phone-top { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--mute); padding: 4px 8px 10px; }
.phone-top #callTitle { flex: 1; color: var(--ink); }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 8px var(--bad); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
#callViz { width: 100%; height: 60px; display: block; }
.chat { height: 420px; overflow-y: auto; padding: 8px 4px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: 15px; animation: pop .45s cubic-bezier(.2,1.4,.4,1); }
.msg small { display: block; font-size: 11px; color: var(--mute); margin-top: 4px; }
.msg.cust { align-self: flex-start; background: linear-gradient(135deg, #2b2a52, #3b2f6d); border-bottom-left-radius: 4px; }
.msg.bot { align-self: flex-end; background: linear-gradient(135deg, #0f3a4a, #134e5e); border-bottom-right-radius: 4px; }
.msg.sys { align-self: center; background: none; color: var(--b); font-size: 13px; border: 1px dashed rgba(34,211,238,.4); }
.msg.speaking { box-shadow: 0 0 0 2px var(--b), 0 0 22px rgba(34,211,238,.4); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.9); } }
.typing span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--mute); animation: dot 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-5px); opacity: .4; } }
.cart { display: flex; justify-content: space-between; padding: 10px 14px; margin: 10px 0; border-radius: 14px; background: rgba(52,211,153,.08); border: 1px solid rgba(52,211,153,.25); font-size: 14px; transition: .4s; }
.cart.bump { transform: scale(1.05); background: rgba(52,211,153,.25); }
button.big { width: 100%; padding: 14px; border: 0; border-radius: 16px; cursor: pointer; font-weight: 600; font-size: 16px; color: #fff; background: linear-gradient(90deg, var(--a), var(--b)); box-shadow: 0 10px 30px rgba(124,92,255,.35); transition: transform .2s; }
button.big:hover { transform: translateY(-2px); }
.call-side { display: flex; flex-direction: column; gap: 18px; }
#memList li { margin: 6px 0; animation: pop .5s; }
.bars .row { display: flex; align-items: center; gap: 10px; font-size: 13px; margin: 6px 0; }
.bars .row i { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--b), var(--a)); width: 0; transition: width 1s cubic-bezier(.2,.8,.2,1); }

/* 02 การ์ดพลิก */
.flip { perspective: 1000px; height: 210px; }
.f-in { position: relative; width: 100%; height: 100%; transition: transform .8s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; cursor: pointer; }
.flip:hover .f-in, .flip.flipped .f-in { transform: rotateY(180deg); }
.f-front, .f-back { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 20px; padding: 22px; border: 1px solid var(--line); background: var(--glass); }
.f-back { transform: rotateY(180deg); background: linear-gradient(135deg, rgba(124,92,255,.2), rgba(34,211,238,.12)); font-size: 15px; }
.ba { font-family: "Kanit"; font-size: 34px; font-weight: 800; display: flex; gap: 10px; align-items: center; }
.f-front p { color: var(--mute); margin: 0; font-size: 14px; }
.mem-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.mem-how b { display: block; font-size: 22px; color: var(--b); } .mem-how span { color: var(--mute); font-size: 14px; }

/* 03 เลื่อนแนวนอน */
.hscroll { padding: 0; }
.hscroll .sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 0 max(24px, 7vw); }
.track { display: flex; gap: 22px; will-change: transform; }
.vcard { flex: 0 0 330px; border-radius: 26px; padding: 24px; background: var(--glass); border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform .3s; }
.vcard:hover { transform: translateY(-8px); }
.vcard::before { content: ""; position: absolute; inset: -40% -40% auto auto; width: 220px; height: 220px; border-radius: 50%; background: var(--tone); filter: blur(60px); opacity: .35; }
.vcard h3 { font-size: 26px; margin-bottom: 2px; position: relative; }
.tag { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; margin: 4px 4px 0 0; border: 1px solid var(--line); }
.tag.ok { color: var(--good); border-color: rgba(52,211,153,.4); } .tag.no { color: var(--bad); border-color: rgba(251,113,133,.4); } .tag.warn { color: var(--mid); border-color: rgba(251,191,36,.4); }
.meter { height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); margin: 14px 0 4px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 6px; }
.play { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; margin-top: 8px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--ink); cursor: pointer; font-size: 14px; transition: .2s; }
.play:hover { border-color: var(--b); background: rgba(34,211,238,.08); }
.play.on { border-color: var(--b); box-shadow: 0 0 16px rgba(34,211,238,.35); }
.play .ico { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--a), var(--b)); font-size: 11px; }
.eq { display: none; gap: 2px; align-items: end; height: 14px; margin-left: auto; }
.on .eq { display: flex; } .eq i { width: 3px; background: var(--b); animation: eq .7s infinite alternate; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { from { height: 3px; } to { height: 14px; } }

/* 04 พี่เปา */
.ab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 16px; }
.pair { border-radius: 20px; padding: 18px; background: var(--glass); border: 1px solid var(--line); }
.pair .word { font-family: "Kanit"; font-size: 28px; }
.switch { display: flex; background: rgba(255,255,255,.06); border-radius: 999px; padding: 4px; margin: 10px 0; }
.switch button { flex: 1; border: 0; padding: 8px; border-radius: 999px; cursor: pointer; color: var(--ink); background: none; transition: .3s; font-size: 14px; }
.switch button.sel.b4 { background: rgba(251,113,133,.25); } .switch button.sel.af { background: rgba(52,211,153,.25); }
.heard { font-size: 14px; color: var(--mute); min-height: 44px; } .heard b { color: var(--ink); }
.lex .row { display: grid; grid-template-columns: 96px 1fr 70px; gap: 10px; align-items: center; margin: 9px 0; font-size: 14px; }
.lex .track2 { position: relative; height: 14px; border-radius: 8px; background: rgba(255,255,255,.07); overflow: hidden; }
.lex .track2 i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 8px; width: 0; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.lex .track2 i.before { background: rgba(251,113,133,.6); z-index: 2; } .lex .track2 i.after { background: linear-gradient(90deg, var(--good), var(--b)); }
.drop { display: flex; gap: 10px; align-items: stretch; }
.drop div { flex: 1; text-align: center; padding: 14px 6px; border-radius: 14px; background: rgba(255,255,255,.04); }
.drop b { display: block; font-family: "Kanit"; font-size: 30px; } .drop span { font-size: 12px; color: var(--mute); }
.drop .win { background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.35); } .drop .win b { color: var(--good); }

/* 05 เสียง AI */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters button { border: 1px solid var(--line); background: var(--glass); color: var(--ink); padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; }
.filters button.sel { background: linear-gradient(90deg, var(--a), var(--b)); border-color: transparent; }
.ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.ai { position: relative; padding: 14px 12px 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); cursor: pointer; font-size: 13px; transition: transform .25s, border-color .25s, opacity .4s; overflow: hidden; }
.ai:hover { transform: translateY(-4px) scale(1.03); border-color: var(--a); }
.ai.hide { display: none; }
.ai .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; margin-bottom: 8px; background: var(--tone); }
.ai .cer { position: absolute; top: 10px; right: 10px; font-size: 11px; color: var(--mute); }
.ai.on { border-color: var(--b); box-shadow: 0 0 20px rgba(34,211,238,.4); }
.ai.on::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, rgba(34,211,238,.25), transparent 60%); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .3; } }
.natural { margin-top: 26px; }
.ab-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.ab-row .grp { background: rgba(255,255,255,.03); border-radius: 14px; padding: 12px; }
.ab-row .abtn { display: inline-flex; width: 46px; height: 46px; margin: 6px 6px 0 0; border-radius: 12px; align-items: center; justify-content: center; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); cursor: pointer; font-family: "Kanit"; font-size: 18px; transition: .2s; }
.ab-row .abtn.on { background: linear-gradient(135deg, var(--a), var(--b)); }
.lines-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 6px; }
.lines-row .play { margin: 0; }

/* 06 ชุดเทส */
.scen { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 10px; margin-bottom: 30px; }
.sc { padding: 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); font-size: 14px; display: flex; gap: 10px; align-items: center; opacity: .25; transform: scale(.94); transition: .5s; }
.sc.done { opacity: 1; transform: none; border-color: rgba(52,211,153,.35); }
.sc .ck { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); transition: .4s; }
.sc.done .ck { background: var(--good); color: #06281c; }
.small-stats { grid-template-columns: repeat(3, 1fr); max-width: 760px; margin: 0 auto 16px; text-align: center; }
.ear .emoji { font-size: 34px; }

/* 08 VibeVoice */
.dclip { margin: 14px 0; }
.dclip .t { font-size: 13px; display: flex; justify-content: space-between; gap: 10px; }
.dclip .t span { color: var(--mute); white-space: nowrap; }
.strip { position: relative; height: 22px; border-radius: 6px; background: rgba(255,255,255,.06); overflow: hidden; margin-top: 4px; }
.strip i { position: absolute; top: 0; bottom: 0; transform: scaleY(0); transform-origin: bottom; transition: transform .6s; }
.strip.go i { transform: scaleY(1); }
.dclip.fail .strip { outline: 1px dashed var(--bad); }

/* 09 เบื้องหลัง */
.flow { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 30px; flex-wrap: wrap; }
.node { text-align: center; padding: 18px 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); min-width: 150px; font-size: 26px; }
.node b { display: block; font-size: 16px; margin-top: 4px; } .node span { display: block; font-size: 12px; color: var(--mute); }
.pipe { width: 60px; height: 3px; position: relative; background: rgba(255,255,255,.1); overflow: hidden; }
.pipe::after { content: ""; position: absolute; left: -30%; top: 0; bottom: 0; width: 30%; background: linear-gradient(90deg, transparent, var(--b), transparent); animation: flow 1.4s linear infinite; }
@keyframes flow { to { left: 100%; } }

/* 10 ยังไม่ดี */
.honest { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 12px; }
.honest li { padding: 16px 20px 16px 52px; margin: 0; border-radius: 16px; background: rgba(251,113,133,.06); border: 1px solid rgba(251,113,133,.2); position: relative; }
.honest li::before { content: "!"; position: absolute; left: 18px; top: 15px; width: 22px; height: 22px; border-radius: 50%; background: var(--bad); color: #2a0610; display: grid; place-items: center; font-weight: 800; font-size: 13px; }

footer { text-align: center; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.links { width: 100%; }
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; max-width: 900px; margin: 0 auto 30px; }
.links a { text-decoration: none; color: var(--ink); font-size: 30px; padding: 24px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); transition: .3s; }
.links a:hover { transform: translateY(-6px); border-color: var(--b); box-shadow: 0 20px 50px rgba(34,211,238,.2); }
.links b { display: block; font-size: 17px; margin-top: 6px; } .links span { font-size: 13px; color: var(--mute); }

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .call-wrap, .two, .mem-how { grid-template-columns: 1fr; }
  #dots { display: none; }
  .vcard { flex-basis: 280px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .rv, .rv-l, .rv-r { opacity: 1; transform: none; } }

/* 07 หลายสาย */
.load-hero { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 10px 0 30px; text-align: left; }
.load-hero b { font-family: "Kanit"; font-size: clamp(90px, 14vw, 180px); font-weight: 800; line-height: 1; background: linear-gradient(120deg, var(--a), var(--b), var(--c)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(124,92,255,.35)); }
.load-hero span { font-size: clamp(18px, 2.2vw, 28px); } .load-hero em { font-style: normal; color: var(--good); font-weight: 600; }
.loadbars .grp { margin: 14px 0; } .loadbars .lbl { font-size: 14px; margin-bottom: 4px; }
.loadbars .bar { display: flex; align-items: center; gap: 8px; margin: 3px 0; font-size: 13px; }
.loadbars .bar i { height: 14px; border-radius: 8px; width: 0; transition: width 1.3s cubic-bezier(.2,.8,.2,1); }
.loadbars .bar.old i { background: rgba(251,113,133,.65); } .loadbars .bar.new i { background: linear-gradient(90deg, var(--good), var(--b)); box-shadow: 0 0 12px rgba(34,211,238,.4); }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; } .lg.old { background: rgba(251,113,133,.65); } .lg.new { background: var(--b); }
.load-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.load-facts b { display: block; font-family: "Kanit"; font-size: 30px; color: var(--b); } .load-facts span { font-size: 14px; color: var(--mute); }

/* มือถือ/แท็บเล็ต */
@media (max-width: 860px) {
  .load-hero { flex-direction: column; text-align: center; gap: 6px; }
  .flow { flex-direction: column; } .pipe { width: 3px; height: 28px; }
  .pipe::after { left: 0; top: -30%; width: 100%; height: 30%; background: linear-gradient(180deg, transparent, var(--b), transparent); animation: flowv 1.4s linear infinite; }
  .call-wrap { grid-template-columns: minmax(0, 1fr); }
}
@keyframes flowv { to { top: 100%; } }
@media (max-width: 600px) {
  .toc, .chapter, footer { padding: 72px 18px; }
  .hscroll .sticky { padding: 0 18px; }
  .chat { height: 340px; }
  .msg { max-width: 92%; font-size: 14px; }
  .small-stats, .load-facts, .drop { grid-template-columns: 1fr; display: grid; }
  .flip { height: 230px; }
  .dclip .t { flex-direction: column; gap: 0; }
  .lex .row { grid-template-columns: 78px 1fr 64px; font-size: 13px; }
  .ai-grid { grid-template-columns: repeat(2, 1fr); }
  .stat b { font-size: 32px; }
  .phone { border-radius: 26px; padding: 12px; }
}

/* มือถือ = สไลด์เรื่องเล่า: หัวบทเป็นหน้าปกเต็มจอ (เลขบทใหญ่เรืองแสง) แล้วปัดทีละการ์ด (snap.js) */
@media (max-width: 600px) {
  .chapter { padding-top: 0; }
  .chapter:not(.hscroll) > .ch-head { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; margin: 0 0 24px; }
  .chapter:not(.hscroll) > .ch-head .num { font-size: 88px; line-height: 1; letter-spacing: 0; margin-bottom: 14px; background: linear-gradient(120deg, var(--a), var(--b), var(--c)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 24px rgba(124,92,255,.5)); }
  .chapter:not(.hscroll) > .ch-head h2 { font-size: 36px; }
  .chapter:not(.hscroll) > .ch-head::after { content: "ปัดขึ้นเพื่อดูต่อ ↑"; margin-top: 28px; font-size: 13px; color: var(--mute); animation: bob 2s infinite; }
}

/* โหมดสไลด์ (deck.js · จอ ≥900×560): สไลด์ละเต็มจอ เนื้อหากลางจอ ย่อให้พอดีถ้ายาว */
body.deck .toc, body.deck .chapter, body.deck footer { padding: 0; min-height: 0; }
body.deck .slide { height: 100vh; box-sizing: border-box; padding: 4vh max(24px, 6vw); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
body.deck .slide-in { width: 100%; max-width: 1280px; transform-origin: center center; }
body.deck .hero.slide { min-height: 0; }
body.deck .ch-head { margin-bottom: 22px; }
body.deck .ch-head p { font-size: 16px; }
/* เสียงคนจริง: เลิกเลื่อนแนวนอน → เรียงการ์ดเป็นตาราง */
body.deck #real { height: auto !important; }
body.deck .hscroll .sticky { position: static; height: auto; padding: 0; display: block; overflow: visible; }
body.deck .track { flex-wrap: wrap; justify-content: center; transform: none !important; }
body.deck .vcard { flex: 0 0 280px; padding: 18px; }
body.deck .vcard:hover { transform: none; }
/* กริดยาว: เลื่อนในกรอบ (หมุนจนสุดกรอบแล้วค่อยไปสไลด์ถัดไป) */
body.deck .ai-grid { max-height: 50vh; overflow-y: auto; padding: 4px 8px 4px 2px; }
body.deck .lines-row { max-height: 30vh; }
body.deck .scroll-hint { display: none; }
body.deck .links { margin-bottom: 18px; }
/* โหมดสไลด์: บทที่สูงเกินจอ ทำให้กระชับ (ไม่ต้องย่อจนอ่านไม่ออก) */
body.deck .vcard { flex-basis: 270px; padding: 16px 18px; counter-reset: ex; }
body.deck .vcard p.small { margin: 6px 0; }
body.deck .vcard .play { display: inline-flex; width: auto; margin: 6px 6px 0 0; padding: 6px 10px; }
body.deck .vcard .play > span:nth-child(2) { display: none; }   /* ประโยคเต็มซ่อน · เหลือปุ่มตัวอย่าง 1/2/3 */
body.deck .vcard .play::after { counter-increment: ex; content: "ตัวอย่าง " counter(ex); font-size: 13px; }
body.deck .vcard .play .eq { margin-left: 4px; order: 3; }
body.deck .chat { height: clamp(200px, calc(100vh - 520px), 420px); }
body.deck .phone { padding: 14px; }
body.deck .load-hero { margin: 0 0 16px; }
body.deck .load-hero b { font-size: clamp(70px, 13vh, 170px); }
body.deck .loadbars .grp { margin: 8px 0; }
body.deck .track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
body.deck .vcard { padding: 14px 16px; }
body.deck .vcard h3 { font-size: 22px; }
body.deck .vcard p.small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.deck #real .ch-head p, body.deck #call .ch-head p, body.deck #load .ch-head p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.deck .flip { height: 172px; }
body.deck .ba { font-size: 28px; }
body.deck .mem-how { margin-top: 14px; padding: 16px; }
body.deck .load-hero b { font-size: clamp(64px, 11vh, 160px); }
body.deck .loadbars .bar i { height: 11px; }
