:root {
    --cream: #fbf4e8;
    --cream-2: #f5e8d2;
    --ink: #3b2614;
    --muted: #7a6450;
    --brown: #5b3a1e;
    --mustard: #f4b731;
    --mustard-2: #ffd56b;
    --green: #2f6a2b;
    --red: #b4441f;
    --card: #fffaf2;
    --line: #06c755;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #1d140b; overflow: hidden; }
body { font-family: 'IBM Plex Sans Thai', system-ui, sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, b, .price, .kicker { font-family: 'Prompt', 'IBM Plex Sans Thai', sans-serif; }

/* เวทีขนาด 1920×1080 ย่อขยายให้พอดีจอ */
.viewport { position: fixed; inset: 0; overflow: hidden; }
.deck { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform-origin: center; }

.slide {
    position: absolute; inset: 0; display: flex; align-items: center; gap: 60px;
    padding: 110px 130px; overflow: hidden;
    background:
        radial-gradient(1200px 700px at 85% 15%, rgba(244, 183, 49, .22), transparent 60%),
        radial-gradient(900px 600px at 0% 100%, rgba(91, 58, 30, .08), transparent 60%),
        var(--cream);
    opacity: 0; visibility: hidden; transform: scale(1.03);
    transition: opacity .7s var(--ease), transform .9s var(--ease), visibility 0s .7s;
}
.slide.active { opacity: 1; visibility: visible; transform: none; transition: opacity .7s var(--ease), transform .9s var(--ease); z-index: 2; }
.slide.leaving { opacity: 0; transform: scale(.97); }

/* ภาพพื้นหลังจาก ChatGPT (assets/bg/slide-XX.png) ถ้ามี — ข้อความอยู่ฝั่งซ้ายบนไล่สีครีม */
.slide.has-bg { background: var(--cream) var(--bg) center / cover no-repeat; }
.slide.has-bg::before {
    content: ''; position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(90deg, rgba(251, 244, 232, .97) 0%, rgba(251, 244, 232, .9) 38%, rgba(251, 244, 232, 0) 62%);
}
.slide.has-bg.full-copy::before { background: rgba(251, 244, 232, .86); }
.slide.has-bg .art { display: none; }
.slide.has-bg .art.corner { display: none; }
.slide > * { position: relative; z-index: 1; }

.copy { flex: 1 1 55%; max-width: 980px; }
.copy.wide { max-width: 1240px; }
.copy.full { max-width: none; width: 100%; }
.art { flex: 1 1 45%; display: grid; place-items: center; height: 100%; }

.kicker { display: inline-block; font-size: 26px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brown); background: rgba(244, 183, 49, .28); padding: 6px 20px; border-radius: 999px; margin-bottom: 22px; }
h1 { font-size: 148px; line-height: 1.05; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 84px; line-height: 1.15; font-weight: 700; margin-bottom: 44px; }
h2.big { font-size: 150px; }
.hl { color: var(--mustard); text-shadow: 0 6px 0 var(--brown); }
.lead { font-size: 44px; line-height: 1.5; color: var(--muted); margin-top: 26px; }
.lead b { color: var(--ink); }
.line { color: var(--line) !important; }
.logo { height: 120px; margin-bottom: 26px; }
.source { margin-top: 36px; font-size: 22px; color: var(--muted); }

.mascot { width: 640px; filter: drop-shadow(0 30px 40px rgba(91, 58, 30, .25)); }
.mascot.sm { width: 300px; }
.mascot.xs { width: 170px; position: absolute; right: -30px; bottom: -40px; }
.float { animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-22px) rotate(-1.5deg); } }

.chips { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 44px; }
.chips span { font-size: 28px; font-weight: 600; background: var(--card); border: 2px solid var(--cream-2); padding: 12px 26px; border-radius: 999px; box-shadow: 0 8px 20px rgba(91, 58, 30, .08); }

/* แอนิเมชันเข้า: ทุก .a ค่อย ๆ ขึ้นมาทีละชิ้น (delay ตั้งจาก app.js) */
.a { opacity: 0; transform: translateY(40px); }
.slide.active .a { animation: rise .8s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: none; } }
.slide.active .peek { animation: peek 1s var(--ease) 1.2s both; }
@keyframes peek { from { transform: translate(120px, 80px) rotate(12deg); opacity: 0; } }

/* 2 สถิติ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stat { background: var(--card); border-radius: 36px; padding: 40px 34px; box-shadow: 0 20px 50px rgba(91, 58, 30, .1); border: 2px solid var(--cream-2); }
.stat b { display: block; font-size: 96px; line-height: 1; color: var(--brown); }
.stat em { display: block; font-style: normal; font-size: 34px; font-weight: 600; margin-top: 10px; }
.stat small { display: block; font-size: 24px; color: var(--muted); margin-top: 12px; line-height: 1.4; }
.stat.alert { background: var(--brown); border-color: var(--brown); color: var(--cream); }
.stat.alert b { color: var(--mustard); font-size: 78px; }
.stat.alert small { color: #e9d6bd; }
.art.corner { position: absolute; right: 60px; bottom: 30px; height: auto; display: block; }

/* 3 ปัญหา */
.pains { list-style: none; display: grid; gap: 16px; }
.pains li { display: flex; gap: 26px; align-items: center; background: var(--card); border-radius: 28px; padding: 16px 30px; border: 2px solid var(--cream-2); }
.pains i { font-style: normal; font-size: 48px; width: 76px; height: 76px; display: grid; place-items: center; background: rgba(244, 183, 49, .25); border-radius: 22px; flex: none; }
.pains b { font-size: 36px; display: block; }
.pains span { font-size: 26px; color: var(--muted); }
.mess { position: relative; width: 640px; height: 640px; }
.mess > span { position: absolute; display: grid; place-items: center; }
.paper { width: 250px; height: 320px; background: #fff; border-radius: 16px; box-shadow: 0 20px 40px rgba(0, 0, 0, .12); background-image: repeating-linear-gradient(transparent 0 34px, #eadfcf 34px 37px); background-position: 0 50px; }
.p1 { left: 70px; top: 160px; transform: rotate(-12deg); }
.p2 { left: 230px; top: 110px; transform: rotate(7deg); }
.p3 { left: 160px; top: 260px; transform: rotate(-3deg); }
.win { width: 220px; height: 140px; background: #fff; border-radius: 14px; border-top: 30px solid var(--brown); font: 700 30px Prompt; color: #c9b8a2; box-shadow: 0 14px 30px rgba(0, 0, 0, .12); }
.w1 { left: 0; top: 10px; } .w2 { right: 0; top: 60px; } .w3 { right: 30px; bottom: 30px; }
.q { font: 800 110px Prompt; color: var(--mustard); text-shadow: 0 6px 0 var(--brown); }
.q1 { left: 10px; bottom: 40px; } .q2 { right: 180px; top: -20px; } .q3 { left: 290px; bottom: -20px; }
.slide.active .mess > span { animation: jitter 3s ease-in-out infinite; }
.slide.active .mess > span:nth-child(2n) { animation-duration: 3.6s; animation-direction: reverse; }
@keyframes jitter { 50% { translate: 0 -16px; } }

/* 4 ภาคธุรกิจ */
.sectors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.sector { background: var(--card); border-radius: 30px; padding: 30px 34px; border: 2px solid var(--cream-2); box-shadow: 0 14px 34px rgba(91, 58, 30, .07); transition: transform .3s var(--ease); }
.sector:hover { transform: translateY(-8px) !important; }
.sector i { font-style: normal; font-size: 54px; }
.sector b { display: block; font-size: 34px; margin: 10px 0 8px; }
.sector span { font-size: 25px; color: var(--muted); line-height: 1.5; }
.banner { margin-top: 34px; font-size: 36px; background: var(--brown); color: var(--cream); padding: 22px 36px; border-radius: 24px; display: inline-block; }
.banner b { color: var(--mustard); }

/* 5 โทรศัพท์ */
.bubble { margin-top: 44px; font-size: 36px; line-height: 1.5; background: var(--card); border: 3px solid var(--mustard); border-radius: 36px 36px 36px 8px; padding: 30px 38px; display: inline-block; }
.bubble span { display: block; font-size: 24px; color: var(--muted); margin-top: 8px; }
.phone { position: relative; width: 430px; height: 800px; background: var(--ink); border-radius: 64px; padding: 22px; box-shadow: 0 40px 80px rgba(59, 38, 20, .35); }
.screen { height: 100%; border-radius: 46px; background: #8fb3cf; padding: 60px 24px; display: flex; flex-direction: column; gap: 22px; }
.msg { max-width: 80%; font-size: 26px; padding: 16px 22px; border-radius: 26px; opacity: 0; }
.msg.in { background: #fff; align-self: flex-start; border-top-left-radius: 6px; }
.msg.out { background: var(--line); color: #fff; align-self: flex-end; border-top-right-radius: 6px; }
.slide.active .msg { animation: rise .6s var(--ease) forwards; }
.slide.active .msg:nth-child(1) { animation-delay: .9s; }
.slide.active .msg:nth-child(2) { animation-delay: 1.8s; }
.slide.active .msg:nth-child(3) { animation-delay: 2.7s; }
.phone .pop { position: absolute; width: 320px; left: -200px; bottom: -40px; }
.slide.active .phone .pop { animation: pop .9s var(--ease) 3.2s both; }
@keyframes pop { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }

/* 6 ฟีเจอร์ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feat { background: var(--card); border-radius: 32px; padding: 36px; border: 2px solid var(--cream-2); }
.feat i { font-style: normal; font-size: 46px; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 28px; background: linear-gradient(145deg, var(--mustard-2), var(--mustard)); box-shadow: 0 10px 0 var(--brown); margin-bottom: 26px; }
.feat b { display: block; font-size: 36px; }
.feat span { font-size: 26px; color: var(--muted); line-height: 1.5; }

/* 7 ขั้นตอน */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding-top: 180px; }
.track { position: absolute; left: 6%; right: 6%; top: 120px; height: 14px; border-radius: 99px; background: var(--cream-2); }
.track .fill { position: absolute; inset: 0 100% 0 0; border-radius: 99px; background: var(--mustard); }
.walker { position: absolute; width: 170px; top: -150px; left: -40px; }
.slide.active .track .fill { animation: fill 3.2s var(--ease) .8s forwards; }
.slide.active .walker { animation: walk 3.2s var(--ease) .8s forwards; }
@keyframes fill { to { right: 0; } }
@keyframes walk { to { left: calc(100% - 130px); } }
.step { text-align: center; background: var(--card); border-radius: 34px; padding: 40px 24px; border: 2px solid var(--cream-2); position: relative; }
.step b { position: absolute; top: -34px; left: 50%; translate: -50% 0; width: 68px; height: 68px; border-radius: 50%; background: var(--brown); color: var(--mustard); display: grid; place-items: center; font-size: 36px; }
.step i { font-style: normal; font-size: 70px; display: block; margin: 10px 0 14px; }
.step span { font-size: 32px; font-weight: 600; }

/* 8 ก่อน/หลัง */
.compare { display: grid; grid-template-columns: 1fr 120px 1fr; align-items: stretch; gap: 20px; }
.col { border-radius: 40px; padding: 46px 52px; position: relative; }
.col h3 { font-size: 46px; margin-bottom: 24px; }
.col ul { list-style: none; display: grid; gap: 20px; }
.col li { font-size: 34px; padding-left: 58px; position: relative; }
.before { background: #e8e2da; color: #6d6359; filter: grayscale(1); }
.before li::before { content: '✕'; position: absolute; left: 0; color: var(--red); font-weight: 700; }
.after { background: var(--card); border: 4px solid var(--mustard); box-shadow: 0 30px 60px rgba(244, 183, 49, .3); }
.after li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.vs { display: grid; place-items: center; font: 800 90px Prompt; color: var(--mustard); }

/* 9 ช่วยใคร */
.who { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 26px; align-items: end; }
.who .card { background: var(--card); border-radius: 34px; padding: 40px 32px; border: 2px solid var(--cream-2); text-align: center; min-height: 380px; display: flex; flex-direction: column; justify-content: center; }
.who .card i { font-style: normal; font-size: 80px; }
.who .card b { font-size: 38px; margin: 16px 0 10px; }
.who .card span { font-size: 26px; color: var(--muted); line-height: 1.5; }
.who .center { order: 2; background: none; border: 0; }
.who .center img { width: 100%; }
.who .card:nth-child(1) { order: 1; } .who .card:nth-child(3) { order: 3; } .who .card:nth-child(4) { order: 4; }

/* 10 แพ็กเกจ */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; align-items: center; }
.plan { background: var(--card); border-radius: 40px; padding: 46px 44px; border: 2px solid var(--cream-2); position: relative; }
.plan h3 { font-size: 40px; }
.plan .price { font-size: 92px; font-weight: 800; color: var(--brown); line-height: 1.1; margin-top: 10px; }
.plan .price small { font-size: 28px; color: var(--muted); font-weight: 500; }
.plan .yr { font-size: 24px; color: var(--muted); }
.plan ul { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.plan li { font-size: 28px; padding-left: 40px; position: relative; }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.plan.hot { background: var(--brown); color: var(--cream); transform: scale(1.06); padding: 60px 44px; border: 0; box-shadow: 0 40px 80px rgba(59, 38, 20, .35); }
.slide.active .plan.hot { animation: risehot .8s var(--ease) forwards; animation-delay: var(--d); }
@keyframes risehot { to { opacity: 1; transform: scale(1.06); } }
.plan.hot .price { color: var(--mustard); }
.plan.hot .price small, .plan.hot .yr { color: #e9d6bd; }
.plan.hot li::before { color: var(--mustard); }
.tag { position: absolute; top: -22px; right: 40px; background: var(--mustard); color: var(--ink); font: 700 24px Prompt; padding: 8px 22px; border-radius: 999px; }
.addon { margin-top: 44px; font-size: 30px; color: var(--muted); }
.addon b { color: var(--ink); }

/* 11 สแกน */
.qr { background: #fff; padding: 46px; border-radius: 48px; box-shadow: 0 40px 90px rgba(59, 38, 20, .25); text-align: center; border: 6px solid var(--mustard); }
.qr img { width: 520px; height: 520px; display: block; }
.qr span { display: block; font-size: 28px; color: var(--muted); margin-top: 18px; }
.slide.active .qr { animation: rise .8s var(--ease) forwards, pulse 2.4s ease-in-out 1.6s infinite; animation-delay: var(--d), calc(var(--d) + 1s); }
@keyframes pulse { 50% { box-shadow: 0 40px 90px rgba(59, 38, 20, .25), 0 0 0 26px rgba(244, 183, 49, .25); } }
.scan .mascot.sm { margin-top: 30px; }
.slide.has-bg.scan .art { display: grid; place-items: center end; }
.slide.has-bg.scan .qr img { width: 460px; height: 460px; }
.slide.has-bg.scan .copy .mascot { display: none; }
.contact { font-size: 40px; font-weight: 600; margin-top: 20px; color: var(--brown); }
.end h1 { font-size: 130px; margin-bottom: 30px; }

/* ไอคอนเส้น */
[data-icon] svg { width: 56%; height: 56%; display: block; }
.pains i, .feat i, .sector i, .step i, .who .card i { color: var(--brown); }
.sector i, .step i, .who .card i { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 28px; background: rgba(244, 183, 49, .25); }
.step i { margin: 10px auto 14px; }
.who .card i { margin: 0 auto; width: 120px; height: 120px; border-radius: 36px; }
.hud [data-icon] { display: grid; place-items: center; width: 100%; height: 100%; }

/* แผงควบคุม */
.hud { position: fixed; right: 24px; bottom: 22px; display: flex; align-items: center; gap: 8px; z-index: 10; background: rgba(59, 38, 20, .82); backdrop-filter: blur(8px); padding: 8px 10px; border-radius: 999px; color: var(--cream); font: 600 15px 'IBM Plex Sans Thai'; opacity: .35; transition: opacity .3s; }
.hud:hover { opacity: 1; }
.hud button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 22px; cursor: pointer; }
.hud button:hover { background: rgba(255, 255, 255, .15); }
#counter { min-width: 64px; text-align: center; }
.progress { position: fixed; left: 0; right: 0; bottom: 0; height: 5px; z-index: 10; }
.progress span { display: block; height: 100%; width: 0; background: var(--mustard); transition: width .6s var(--ease); }
.help { position: fixed; left: 50%; bottom: 26px; translate: -50% 0; z-index: 10; color: var(--cream); background: rgba(59, 38, 20, .82); padding: 10px 22px; border-radius: 999px; font-size: 15px; transition: opacity .6s; pointer-events: none; }
.help.hide { opacity: 0; }

/* ภาพรวม (กด O) */
.overview .viewport { overflow-y: auto; }
.overview .deck { left: 40px; top: 40px; display: grid; grid-template-columns: repeat(4, 1920px); gap: 80px; width: auto; height: auto; transform-origin: top left; }
.overview .slide { position: relative; inset: auto; width: 1920px; height: 1080px; opacity: 1; visibility: visible; transform: none; cursor: pointer; border-radius: 40px; outline: 0 solid var(--mustard); transition: outline-width .2s; }
.overview .slide:hover { outline-width: 16px; }
.overview .slide .a, .overview .msg { opacity: 1; transform: none; animation: none !important; }
.overview .hud, .overview .help { display: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01s !important; animation-delay: 0s !important; transition-duration: .01s !important; }
}

/* ===== ปรับใหม่: สไลด์ปัญหาให้อ่านง่าย ===== */
.pains-slide .copy { max-width: 800px; }
.pains-slide.has-bg::before { background: linear-gradient(90deg, var(--cream) 0%, var(--cream) 47%, rgba(251, 244, 232, .75) 55%, rgba(251, 244, 232, 0) 66%); }
.pains-slide .pains { gap: 18px; }
.pains-slide .pains li { padding: 22px 30px; background: #fff; border: 0; box-shadow: 0 10px 30px rgba(91, 58, 30, .08); }
.pains-slide .pains b { font-size: 42px; }

/* ป้ายจำนวนหน่วยงานในแต่ละกลุ่ม */
.sector { position: relative; }
.sector em { position: absolute; top: 30px; right: 30px; font-style: normal; font: 600 22px Prompt; color: var(--brown); background: rgba(244, 183, 49, .3); padding: 6px 16px; border-radius: 999px; }

/* ===== สไลด์จำลอง (interactive) ===== */
.sim-slide { background: radial-gradient(1000px 700px at 90% 10%, rgba(244, 183, 49, .28), transparent 60%), var(--cream); }
.sim { height: 100%; display: flex; flex-direction: column; }
.sim-stage { display: none; flex: 1; flex-direction: column; }
.sim[data-stage="pick"] [data-stage="pick"],
.sim[data-stage="think"] [data-stage="think"],
.sim[data-stage="result"] [data-stage="result"] { display: flex; animation: rise .6s var(--ease) both; }
.sim-hint { font-size: 32px; color: var(--muted); margin: -24px 0 40px; }
.sim-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.sim-opt { all: unset; cursor: pointer; background: #fff; border-radius: 40px; padding: 48px 40px; border: 3px solid var(--cream-2); box-shadow: 0 20px 50px rgba(91, 58, 30, .08); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; display: flex; flex-direction: column; gap: 14px; }
.sim-opt:hover { transform: translateY(-12px); border-color: var(--mustard); box-shadow: 0 30px 60px rgba(244, 183, 49, .35); }
.sim-opt i { width: 120px; height: 120px; border-radius: 36px; display: grid; place-items: center; background: linear-gradient(145deg, var(--mustard-2), var(--mustard)); color: var(--brown); box-shadow: 0 10px 0 var(--brown); margin-bottom: 18px; }
.sim-opt b { font-size: 42px; }
.sim-opt span { font-size: 28px; color: var(--muted); line-height: 1.5; }

.think { display: flex; align-items: center; gap: 90px; margin-top: 30px; }
.ring { position: relative; width: 520px; height: 520px; flex: none; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .track-c { stroke: var(--cream-2); }
.ring .bar-c { stroke: var(--mustard); stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transition: stroke-dashoffset .25s linear; }
.ring img { position: absolute; width: 330px; left: 95px; top: 80px; animation: float 2.4s ease-in-out infinite; }
.ring .pct { position: absolute; left: 0; right: 0; bottom: -20px; text-align: center; font: 800 64px Prompt; color: var(--brown); }
.think-title { margin-bottom: 30px; }
.think-steps { list-style: none; display: grid; gap: 16px; }
.think-steps li { font-size: 34px; display: flex; align-items: center; gap: 18px; color: var(--muted); animation: rise .4s var(--ease) both; }
.think-steps li i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--cream-2); color: var(--cream-2); flex: none; }
.think-steps li.done { color: var(--ink); }
.think-steps li.done i { background: var(--green); color: #fff; }
.think-steps li.now i { background: var(--mustard); animation: pulse-dot 1s ease-in-out infinite; }
@keyframes pulse-dot { 50% { transform: scale(1.2); } }
.chips-fly { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; min-height: 60px; }
.chips-fly span { font: 600 24px Prompt; padding: 8px 20px; border-radius: 999px; background: #fff; border: 2px solid var(--cream-2); animation: chip .5s var(--ease) both; }
.chips-fly span.hit { background: var(--brown); color: var(--mustard); border-color: var(--brown); }
@keyframes chip { from { opacity: 0; transform: translateY(30px) scale(.6); } }

.res-head { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.res-head h2 { margin: 0; font-size: 64px; }
.sim-reset { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 12px; font: 600 28px Prompt; padding: 18px 34px; border-radius: 999px; background: var(--brown); color: var(--cream); }
.sim-reset i { width: 36px; height: 36px; }
.res-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 44px; }
.res-grid h3 { font-size: 34px; margin-bottom: 18px; color: var(--brown); }
.res-funds { display: grid; gap: 18px; }
.fund { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; background: #fff; border-radius: 28px; padding: 24px 30px; box-shadow: 0 12px 30px rgba(91, 58, 30, .08); animation: rise .6s var(--ease) both; }
.fund b { font-size: 32px; }
.fund .amt { font: 700 30px Prompt; color: var(--green); text-align: right; }
.fund .who-f { font-size: 24px; color: var(--muted); }
.fund .match { grid-column: 1 / -1; height: 12px; border-radius: 99px; background: var(--cream-2); overflow: hidden; margin-top: 8px; }
.fund .match span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mustard), var(--green)); border-radius: 99px; transition: width 1.2s var(--ease); }
.fund .mp { font: 600 22px Prompt; color: var(--brown); text-align: right; }
.res-prep { list-style: none; display: grid; gap: 14px; }
.res-prep li { display: flex; gap: 16px; align-items: flex-start; font-size: 28px; line-height: 1.45; background: #fff; border-radius: 22px; padding: 18px 24px; animation: rise .5s var(--ease) both; }
.res-prep li i { width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; margin-top: 2px; }
.sim .source { margin-top: auto; padding-top: 20px; }

/* ===== ปัญหาเป็นตัวเลข (กรวย) ===== */
.funnel { display: grid; gap: 16px; }
.fstep { width: var(--w); min-width: 1180px; display: flex; align-items: center; gap: 36px; padding: 22px 44px; border-radius: 30px; background: #fff; box-shadow: 0 14px 34px rgba(91, 58, 30, .08); }
.fstep b { font: 800 54px Prompt; color: var(--brown); white-space: nowrap; }
.fstep > span { font-size: 30px; color: var(--muted); line-height: 1.4; }
.fstep.hot { background: var(--brown); }
.fstep.hot b { color: var(--mustard); }
.fstep.hot > span { color: #e9d6bd; }

/* ===== Roadmap ===== */
.road { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding-top: 40px; align-items: end; }
.road-line { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 300px; z-index: 0; }
.road-line path { fill: none; stroke: var(--mustard); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 2000; stroke-dashoffset: 2000; }
.slide.active .road-line path { animation: draw 2.4s var(--ease) .4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.mile { position: relative; z-index: 1; background: #fff; border-radius: 34px; padding: 36px 34px; box-shadow: 0 18px 40px rgba(91, 58, 30, .1); display: flex; flex-direction: column; gap: 8px; }
.mile:nth-child(2) { margin-top: 260px; } .mile:nth-child(3) { margin-top: 190px; } .mile:nth-child(4) { margin-top: 110px; } .mile:nth-child(5) { margin-top: 20px; }
.mile em { font-style: normal; font: 600 26px Prompt; color: var(--brown); background: rgba(244, 183, 49, .3); align-self: flex-start; padding: 6px 18px; border-radius: 999px; }
.mile b { font: 800 56px Prompt; color: var(--brown); line-height: 1.15; }
.mile small { font: 600 28px 'IBM Plex Sans Thai'; }
.mile > span { font-size: 24px; color: var(--muted); line-height: 1.5; }
.mile.goal { background: var(--brown); }
.mile.goal b { color: var(--mustard); font-size: 84px; }
.mile.goal small, .mile.goal > span { color: #e9d6bd; }

/* ===== พันธมิตร ===== */
.partners { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.pcol { background: #fff; border-radius: 40px; padding: 40px 46px; box-shadow: 0 18px 40px rgba(91, 58, 30, .08); }
.pcol h3 { display: flex; align-items: center; gap: 18px; font-size: 40px; margin-bottom: 22px; }
.pcol h3 i { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: rgba(244, 183, 49, .3); color: var(--brown); }
.pcol ul { list-style: none; display: grid; gap: 16px; }
.pcol li { font-size: 26px; color: var(--muted); line-height: 1.5; padding-left: 40px; position: relative; }
.pcol li::before { content: ''; position: absolute; left: 0; top: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--mustard); }
.pcol li b { color: var(--ink); font-size: 28px; display: block; }

/* ===== รายได้ ===== */
.rev { display: grid; grid-template-columns: 1fr 70px 1fr 70px 1fr; align-items: center; gap: 16px; }
.rcard { background: #fff; border-radius: 40px; padding: 46px 40px; box-shadow: 0 18px 40px rgba(91, 58, 30, .1); display: flex; flex-direction: column; gap: 12px; }
.rcard .f { font-size: 26px; color: var(--muted); }
.rcard b { font: 800 66px Prompt; color: var(--brown); line-height: 1.1; }
.rcard em { font-style: normal; font-size: 26px; color: var(--muted); }
.rcard.hot { background: var(--brown); }
.rcard.hot b { color: var(--mustard); font-size: 110px; }
.rcard.hot .f, .rcard.hot em { color: #e9d6bd; }
.plus { font: 800 80px Prompt; color: var(--mustard); text-align: center; }

/* ===== ผลกระทบ ===== */
.impact { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; }
.flow { background: #fff; border-radius: 40px; padding: 40px 46px; box-shadow: 0 18px 40px rgba(91, 58, 30, .08); }
.flow h3 { font-size: 32px; margin-bottom: 26px; }
.fbar { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 20px 26px; margin-bottom: 16px; border-radius: 20px; background: var(--cream); overflow: hidden; font-size: 28px; }
.fbar::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(244, 183, 49, .45); border-radius: 20px; }
.slide.active .fbar::before { animation: grow 1.6s var(--ease) .8s forwards; }
@keyframes grow { to { width: var(--v); } }
.fbar span, .fbar b { position: relative; }
.fbar b { font: 700 30px Prompt; }
.sum { font-size: 30px; margin-top: 22px; }
.sum b { font: 800 46px Prompt; color: var(--brown); }
.gains { display: grid; gap: 20px; }
.gain { background: #fff; border-radius: 30px; padding: 30px 36px; box-shadow: 0 14px 34px rgba(91, 58, 30, .08); border-left: 12px solid var(--mustard); }
.gain b { display: block; font: 800 50px Prompt; color: var(--brown); }
.gain > span { font-size: 26px; color: var(--muted); line-height: 1.5; }
.pains-slide h2 { font-size: 74px; white-space: nowrap; }
.sim .kicker { align-self: flex-start; }

/* ===== สไลด์สรุปแต่ละช่วง ===== */
.slide.recap { background: radial-gradient(1100px 700px at 85% 20%, rgba(244, 183, 49, .22), transparent 60%), radial-gradient(900px 600px at 0% 100%, rgba(0, 0, 0, .25), transparent 60%), #3b2614; color: var(--cream); }
.recap .chapter-no { position: absolute; right: 90px; top: -60px; font: 800 520px/1 Prompt; color: rgba(244, 183, 49, .08); z-index: 0; letter-spacing: -.04em; }
.recap .kicker { background: rgba(244, 183, 49, .18); color: var(--mustard); }
.recap .statement { font-size: 92px; line-height: 1.2; margin-bottom: 56px; max-width: 1400px; }
.recap .hl2 { color: var(--mustard); }
.takeaways { list-style: none; display: grid; gap: 22px; max-width: 1250px; }
.takeaways li { display: flex; align-items: center; gap: 26px; font-size: 40px; color: #f1e2cc; }
.takeaways li i { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--mustard); color: var(--ink); flex: none; }
.next-q { margin-top: 60px; display: inline-block; font: 700 46px Prompt; color: var(--mustard); border-bottom: 4px dashed rgba(244, 183, 49, .5); padding-bottom: 10px; }
.recap-mascot { position: absolute; right: 110px; bottom: 60px; width: 360px; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); }
.slide.has-bg.recap .recap-mascot { display: block; }

/* ชิ้นที่เผยทีละคลิก */
.frag { opacity: 0; transform: translateY(30px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.frag.shown { opacity: 1; transform: none; }
.next-q.frag.shown { animation: glow 2.4s ease-in-out .6s infinite; }
@keyframes glow { 50% { text-shadow: 0 0 30px rgba(244, 183, 49, .7); } }
.overview .frag { opacity: 1; transform: none; }
.recap .statement { margin-bottom: 24px; }
.recap-sub { font-size: 32px; line-height: 1.6; color: #c9b296; max-width: 1180px; margin-bottom: 52px; }

/* ===== รายได้ (ใหม่) ===== */
.hl2 { color: var(--mustard); text-shadow: 0 4px 0 var(--brown); }
.rev2-slide h2 { margin-bottom: 10px; }
.rev2-hero { display: flex; align-items: flex-end; gap: 30px; margin: 10px 0 40px; }
.rev2-hero b { font: 800 260px/0.9 Prompt; color: var(--brown); letter-spacing: -.03em; }
.rev2-hero em { display: block; font: 800 84px Prompt; font-style: normal; color: var(--mustard); text-shadow: 0 5px 0 var(--brown); }
.rev2-hero small { display: block; font-size: 40px; color: var(--muted); margin-bottom: 26px; }
.rev2-bar { display: flex; height: 150px; border-radius: 40px; background: var(--cream-2); overflow: hidden; }
.rev2-bar .seg { display: flex; flex-direction: column; justify-content: center; padding: 0 44px; transform: none; opacity: 1; width: 0; transition: width 1.2s var(--ease); overflow: hidden; white-space: nowrap; }
.rev2-bar .seg.shown { transform: none; }
.rev2-bar .s1 { background: var(--mustard); }
.rev2-bar .s1.shown { width: 79.6%; }
.rev2-bar .s2 { background: var(--brown); color: var(--cream); }
.rev2-bar .s2.shown { width: 20.4%; }
.rev2-bar .seg b { font: 800 64px Prompt; }
.rev2-bar .seg span { font: 600 30px Prompt; }
.rev2-bar .s2 b { color: var(--mustard); }
.rev2-notes { display: flex; margin-top: 18px; font-size: 30px; color: var(--muted); }
.rev2-notes p { opacity: 0; transition: opacity .6s .6s; }
.rev2-notes p:first-child { width: 79.6%; padding-left: 44px; }
.rev2-notes p.on { opacity: 1; }
.overview .rev2-bar .s1 { width: 79.6%; } .overview .rev2-bar .s2 { width: 20.4%; } .overview .rev2-notes p { opacity: 1; }

/* ===== Roadmap ปักธง ===== */
.road2-slide { flex-direction: column; align-items: stretch; justify-content: flex-start; padding-bottom: 0; }
.road2-slide h2 { margin-bottom: 0; }
.summit { position: relative; flex: 1; margin: 0 -130px; }
.stairs { position: absolute; left: 130px; right: 130px; bottom: 0; width: calc(100% - 260px); height: 520px; }
.stairs .ground { fill: rgba(244, 183, 49, .16); }
.stairs .trail { fill: none; stroke: var(--mustard); stroke-width: 10; stroke-linejoin: round; stroke-dasharray: 3000; stroke-dashoffset: 3000; }
.slide.active .stairs .trail { animation: draw 2.4s var(--ease) .3s forwards; }
.flag { position: absolute; left: calc(130px + var(--x)); bottom: calc(520px - var(--y)); width: 0; height: 0; opacity: 1; transform: none; }
.flag .pole { position: absolute; left: 0; bottom: 0; width: 8px; height: 0; background: var(--brown); border-radius: 4px; transition: height .6s var(--ease); }
.flag.shown .pole { height: 190px; }
.flag .cloth { position: absolute; left: 6px; bottom: 112px; width: 130px; height: 76px; transform-origin: left center; transform: scaleX(0); transition: transform .5s var(--ease) .45s; }
.flag.shown .cloth { transform: scaleX(1); animation: wave 2.2s ease-in-out 1s infinite; }
@keyframes wave { 50% { transform: scaleX(1) skewY(4deg); } }
.flag .cloth path { fill: var(--mustard); stroke: var(--brown); stroke-width: 3; }
.flag.goal .cloth path { fill: var(--brown); }
.flag .cloth text { font: 800 38px Prompt; fill: var(--brown); }
.flag.goal .cloth text { fill: var(--mustard); }
.flabel { position: absolute; left: -20px; top: 24px; width: 360px; opacity: 0; transform: translateY(20px); transition: all .5s var(--ease) .7s; }
.flag.shown .flabel { opacity: 1; transform: none; }
.flabel em { font-style: normal; font: 600 26px Prompt; color: var(--brown); background: rgba(244, 183, 49, .35); padding: 4px 16px; border-radius: 999px; }
.flabel b { display: block; font: 800 50px Prompt; margin-top: 12px; line-height: 1.15; }
.flabel span { font-size: 28px; color: var(--muted); }
.flag.goal .flabel { left: -150px; }
.flag.goal .flabel b { font-size: 76px; color: var(--brown); }
.flag-mascot { position: absolute; left: 60px; bottom: -6px; width: 170px; opacity: 0; transition: opacity .5s 1s; }
.flag.goal.shown .flag-mascot { opacity: 1; animation: float 2.6s ease-in-out 1.5s infinite; }
.overview .flag .pole { height: 190px; } .overview .flag .cloth { transform: scaleX(1); } .overview .flabel, .overview .flag-mascot { opacity: 1; transform: none; }

/* ===== พันธมิตร (ใหม่) ===== */
.part2-slide h2 { margin-bottom: 34px; }
.xchange { display: grid; grid-template-columns: 1fr 380px 1fr; gap: 50px; align-items: center; }
.side { display: grid; gap: 22px; }
.who2 { display: flex; align-items: center; gap: 20px; margin-bottom: 8px; }
.who2 i { width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center; background: var(--brown); color: var(--mustard); }
.who2 b { font: 800 52px Prompt; }
.gain2 { font: 700 44px Prompt; background: #fff; border-radius: 28px; padding: 26px 36px; box-shadow: 0 14px 34px rgba(91, 58, 30, .1); border-left: 14px solid var(--mustard); }
.side.right .gain2 { border-left: 0; border-right: 14px solid var(--mustard); text-align: right; }
.side.right .who2 { justify-content: flex-end; }
.hub { width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fff, var(--cream-2)); box-shadow: 0 0 0 18px rgba(244, 183, 49, .25), 0 30px 70px rgba(91, 58, 30, .25); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.slide.active .hub { animation: rise .8s var(--ease) both, hubpulse 3s ease-in-out 1.2s infinite; }
@keyframes hubpulse { 50% { box-shadow: 0 0 0 32px rgba(244, 183, 49, .12), 0 30px 70px rgba(91, 58, 30, .25); } }
.hub img { width: 170px; }
.hub b { font: 800 56px Prompt; color: var(--brown); line-height: 1; }
.hub span { font-size: 26px; color: var(--muted); line-height: 1.35; margin-top: 6px; }

/* ===== แกลเลอรีด้านซ้าย ===== */
.gallery { position: fixed; left: 0; top: 0; bottom: 0; width: 300px; z-index: 20; background: #1d140b; border-right: 1px solid rgba(255, 255, 255, .08); overflow-y: auto; padding: 16px 14px 60px 8px; display: none; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: #5b3a1e transparent; }
.with-gallery .gallery { display: flex; }
.with-gallery .viewport { left: 300px; }
.thumb { all: unset; cursor: pointer; display: flex; gap: 8px; align-items: flex-start; }
.thumb .num { width: 26px; text-align: right; font: 600 13px 'IBM Plex Sans Thai'; color: #a8927a; padding-top: 4px; flex: none; }
.thumb .frame { position: relative; width: 240px; height: 135px; border-radius: 8px; overflow: hidden; outline: 2px solid rgba(255, 255, 255, .08); transition: outline-color .2s; flex: none; background: var(--cream); }
.thumb:hover .frame { outline-color: rgba(244, 183, 49, .5); }
.thumb.current .frame { outline: 3px solid var(--mustard); }
.thumb.current .num { color: var(--mustard); }
.thumb .stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform: scale(.125); transform-origin: top left; pointer-events: none; }
.thumb-slide { opacity: 1 !important; visibility: visible !important; transform: none !important; transition: none !important; }
.thumb-slide *, .thumb-slide *::before { animation: none !important; transition: none !important; }
.thumb-slide .a, .thumb-slide .frag, .thumb-slide .msg, .thumb-slide .flabel, .thumb-slide .flag-mascot { opacity: 1 !important; transform: none !important; }
.thumb-slide .flag .pole { height: 190px; } .thumb-slide .flag .cloth { transform: scaleX(1) !important; }
.thumb-slide .rev2-bar .s1 { width: 79.6%; } .thumb-slide .rev2-bar .s2 { width: 20.4%; } .thumb-slide .rev2-notes p { opacity: 1; }
.thumb-slide .stairs .trail, .thumb-slide .road-line path { stroke-dashoffset: 0 !important; }
.thumb-slide .track .fill { right: 0 !important; } .thumb-slide .walker { left: calc(100% - 130px) !important; }
.thumb-slide .fbar::before { width: var(--v) !important; }
.hud [data-icon] svg { width: 20px; height: 20px; }

/* ===== ปากกา ===== */
.ink { position: absolute; inset: 0; width: 1920px; height: 1080px; z-index: 6; pointer-events: none; }
.pen .ink { pointer-events: auto; cursor: crosshair; touch-action: none; }
.overview .ink { display: none; }
.pens { display: none; align-items: center; gap: 6px; padding: 0 6px; border-right: 1px solid rgba(255, 255, 255, .15); margin-right: 2px; }
.pen .pens { display: inline-flex; }
.swatch { width: 24px !important; height: 24px !important; border-radius: 50% !important; background: var(--c) !important; border: 2px solid transparent !important; }
.swatch.on { border-color: #fff !important; box-shadow: 0 0 0 2px var(--c); }
.pen #pen { background: var(--mustard); color: var(--ink); }
.pen .hud { opacity: 1; }
#gal, #pen, #clearInk, #full { display: grid; place-items: center; }
.with-gallery #gal { background: rgba(255, 255, 255, .18); }
/* roadmap: ป้ายอยู่บนขั้นบันได ข้างเสาธง */
.flag.shown .pole { height: 300px; }
.flag .cloth { bottom: 222px; }
.flabel { left: 28px; top: auto; bottom: 10px; width: 340px; }
.flag.goal .flabel { left: 28px; width: 400px; }
.flag.goal .flabel b { font-size: 68px; }
.flag-mascot { left: 160px; bottom: 150px; }
.overview .flag .pole, .thumb-slide .flag .pole { height: 300px; }
/* รายได้: สูตรใต้แต่ละช่วง */
.rev2-notes p:first-child { width: 60%; }
.rev2-notes p:last-child { flex: 1; text-align: right; white-space: nowrap; padding-right: 10px; }
.flabel b { font-size: 46px; white-space: nowrap; }
.flag.goal .flabel b { font-size: 68px; }
