/* คู่มือฉบับอ่านง่าย — ตัวหนังสือใหญ่ ปุ่มใหญ่ หนึ่งความคิดต่อหนึ่งกล่อง */
.guide-page { max-width: 760px; margin: 0 auto; padding: 20px 16px 40px; color: #3b3529; font-size: 18px; line-height: 1.75; }
.guide-page [hidden] { display: none !important; }
.guide-page p { font-size: 18px; line-height: 1.75; margin: 0 0 12px; }
.guide-page h1 { font-size: clamp(32px, 8vw, 44px); line-height: 1.25; margin: 10px 0 14px; font-weight: 900; letter-spacing: -.5px; }
.guide-page h1 span { color: #c2410c; }
.guide-page h2 { display: flex; align-items: center; gap: 10px; font-size: 25px; font-weight: 800; line-height: 1.4; margin: 0 0 14px; }
.guide-page h2 ion-icon { flex-shrink: 0; font-size: 28px; color: #c2410c; }
.guide-page h3 { font-size: 24px; font-weight: 800; line-height: 1.45; margin: 6px 0 16px; }
.guide-page b, .guide-page strong { font-weight: 800; }
.guide-page button, .guide-page a { font-family: inherit; }
.guide-page button:focus-visible, .guide-page a:focus-visible, .guide-page summary:focus-visible { outline: 3px solid #9a681c; outline-offset: 3px; }

/* ส่วนหัว */
.guide-hero { text-align: center; padding: 10px 0 8px; }
.guide-kicker { font-size: 15px; font-weight: 700; color: #916021; margin: 0; }
.guide-lead { color: #5f5340; font-size: 19px; }
.guide-promises { list-style: none; padding: 0; margin: 22px 0 8px; display: grid; gap: 10px; text-align: left; }
.guide-promises li { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid #f0e3cc; border-radius: 18px; padding: 14px 16px; box-shadow: 0 8px 22px -18px #6b4a1a; }
.guide-promises .gp-ico { flex-shrink: 0; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #fff1d6, #ffe0a3); color: #b45309; font-size: 28px; }
.guide-promises b { display: block; font-size: 19px; line-height: 1.4; }
.guide-promises small { display: block; font-size: 15.5px; line-height: 1.6; color: #6b5d48; margin-top: 2px; }
.guide-cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 60px; margin: 16px 0 8px; padding: 12px 18px; border-radius: 18px; background: linear-gradient(135deg, #ff8a00, #ffc400); color: #fff; font-size: 21px; font-weight: 800; text-decoration: none; box-shadow: 0 14px 28px -12px rgba(255, 138, 0, .7); }
.guide-cta ion-icon { font-size: 24px; }
.guide-cta:hover, .guide-cta:focus { color: #fff; }
.guide-cta-small { min-height: 54px; font-size: 18px; }
.guide-page .guide-hint { font-size: 15px; color: #7a6b52; margin: 0; }
.guide-motion { margin-top: 10px; background: none; border: 0; color: #8a6a34; font-size: 14px; text-decoration: underline; min-height: 40px; cursor: pointer; }

/* กล่องทั่วไป */
.guide-section { margin-top: 28px; scroll-margin-top: 80px; }
.guide-card { background: #fff; border: 1px solid #eee2cf; border-radius: 24px; padding: 22px 18px; box-shadow: 0 12px 30px -24px #62471e; }
.guide-note { display: flex; align-items: flex-start; gap: 8px; background: #edf8ef; color: #1f6b3a; border-radius: 14px; padding: 12px 14px; font-weight: 700; font-size: 17px; }
.guide-note ion-icon { flex-shrink: 0; font-size: 24px; margin-top: 3px; }
.guide-link { display: inline-block; margin-top: 6px; color: #9a3412; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; font-size: 18px; }

/* ภาพเงินไหล: ซื้อ → ร้าน → กระเป๋าโบนัส */
.guide-flow { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin: 18px 0; }
.gf-node { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 14px 6px; border-radius: 18px; background: #fff8ea; border: 2px solid #f3dfb5; }
.gf-node ion-icon { font-size: 36px; color: #b45309; margin-bottom: 4px; }
.gf-node b { font-size: 15px; line-height: 1.35; }
.gf-node small { font-size: 13px; color: #7a6b52; line-height: 1.4; }
.gf-wallet { background: #edf8ef; border-color: #bfe0c8; }
.gf-wallet ion-icon { color: #1f7a3f; }
.gf-track { position: relative; flex: 0 0 34px; height: 4px; border-radius: 2px; background: #eadcc0; overflow: visible; }
.gf-coin { position: absolute; top: -13px; left: 0; width: 30px; height: 30px; margin-left: -8px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, #ffe27a, #e6a100); color: #6b3d00; font-weight: 900; font-size: 15px; box-shadow: 0 3px 8px -2px #8a5a0088; animation: gfCoin 2.6s ease-in-out infinite; }
.gf-track:last-of-type .gf-coin { animation-delay: 1.3s; }
@keyframes gfCoin { 0% { transform: translateX(0) scale(.6); opacity: 0; } 15% { opacity: 1; transform: translateX(2px) scale(1); } 85% { opacity: 1; transform: translateX(34px) scale(1); } 100% { transform: translateX(38px) scale(.6); opacity: 0; } }

/* เรื่องเล่าทีละภาพ */
.guide-example { padding: 22px 16px; border: 1px solid #eadcc2; background: #fffaf0; border-radius: 24px; }
.guide-example .example-disclaimer { font-size: 15.5px; color: #775521; margin-bottom: 8px; }
.example-route { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 12px 0 14px; }
.example-route li { padding: 7px 11px; border-radius: 10px; background: #eee9df; color: #625b4f; font-size: 15px; font-weight: 700; }
.example-route li[aria-current] { background: #c2410c; color: #fff; }
.example-route li.done { background: #e2efe6; color: #275a3d; }
.example-stage { border: 1px solid #eee5d5; border-radius: 20px; background: #fff; padding: 20px 14px; }
.example-frame { text-align: center; }
.example-step { font-size: 15px; color: #775521; font-weight: 700; }
.example-diagram { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 220px; }
.example-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; max-width: 340px; padding: 18px 12px; border: 2px solid #eddbb8; background: #fff8e9; border-radius: 22px; animation: exampleAppear .65s ease both; }
.example-tile ion-icon { font-size: 40px; color: #885917; }
.example-tile strong { font-size: 46px; color: #704807; line-height: 1.2; }
.example-tile small { font-size: 22px; }
.example-tile span { font-size: 17px; color: #5c503b; line-height: 1.5; }
.example-tile strong.example-word { font-size: 26px; }
.example-result { background: #edf8ef; border-color: #c0dfc7; }
.example-result strong, .example-result ion-icon { color: #1f7a3f; }
.ex-highlight { border-color: #f59e0b; box-shadow: 0 0 0 4px #fde68a; }
.ex-person ion-icon { font-size: 54px; }
.example-arrow { font-size: 18px; font-weight: 800; line-height: 1.5; color: #775521; animation: exampleAppear .65s .25s ease both; }
.example-people { flex-direction: row; flex-wrap: wrap; }
.example-people .example-tile { flex: 1 1 130px; max-width: none; }
.example-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; max-width: 380px; }
.example-pair .example-tile { padding: 14px 8px; animation-delay: .5s; }
.example-pair .example-tile strong { font-size: 34px; }
.example-pair .example-tile strong.example-word { font-size: 21px; }
.example-pair .example-tile span { font-size: 15px; }
.guide-example .example-caption { font-size: 20px; line-height: 1.7; margin: 18px 0 0; color: #423b30; }
.example-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.example-player button { min-height: 54px; border: 1px solid #d9c6a6; border-radius: 14px; padding: 10px 12px; font-size: 18px; font-weight: 700; background: #fff; color: #654717; cursor: pointer; }
.example-player button:disabled { opacity: .45; cursor: default; }
.example-navigation button:last-child, #examplePlay { background: #c2410c; color: #fff; border-color: #c2410c; }
.example-playback { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.example-playback button { flex: 1 1 130px; }
.guide-example #exampleStatus { font-size: 16px; line-height: 1.7; margin: 12px 0 0; color: #695b45; }
@keyframes exampleAppear { from { opacity: .2; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 3 ขั้นใหญ่ */
.guide-bigsteps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.guide-bigsteps li { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid #eee2cf; border-radius: 20px; padding: 16px; }
.guide-invite .guide-bigsteps li { background: #fffaf0; }
.gb-num { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #ff8a00, #ffc400); color: #fff; font-size: 24px; font-weight: 900; }
.guide-bigsteps b { display: block; font-size: 19px; line-height: 1.4; }
.guide-bigsteps p { font-size: 16.5px; color: #5f5340; margin: 4px 0 6px; }
.guide-bigsteps a { color: #9a3412; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; font-size: 17px; }

/* อัตราจริงของร้าน */
.guide-live { border: 1px solid #d7e1de; background: #f7fbf9; border-radius: 24px; padding: 22px 18px; }
.guide-live h2 ion-icon { color: #1f7a3f; }
.guide-tier-now { background: #fff; border: 1px solid #cfe3d6; border-radius: 14px; padding: 12px 14px; font-weight: 800; color: #1f6b3a; }
.guide-ladder { display: grid; gap: 10px; margin: 12px 0 16px; }
.guide-level { background: #fff; border: 1px solid #dce4df; border-radius: 16px; padding: 16px; }
.guide-level.is-current { border-color: #1f7a3f; box-shadow: 0 0 0 3px #cfe9d7; }
.guide-level strong { display: block; font-size: 20px; color: #1f6b3a; margin-bottom: 4px; }
.guide-level p { font-size: 16.5px; margin: 4px 0 0; color: #3f3a30; }
.guide-level p.gl-unlock { color: #6b5d48; font-size: 15.5px; }

/* บันไดระดับ */
.guide-stairs { display: flex; align-items: flex-end; gap: 6px; margin: 18px 0 6px; padding-top: 44px; }
.gs-step { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center; gap: 2px; padding: 10px 4px 10px; border: 2px solid #f0d39a; border-bottom: 0; border-radius: 14px 14px 0 0; background: linear-gradient(180deg, #fff3d6, #ffe3a6); }
.gs-lv1 { min-height: 92px; } .gs-lv2 { min-height: 118px; } .gs-lv3 { min-height: 144px; } .gs-lv4 { min-height: 170px; } .gs-lv5 { min-height: 196px; } .gs-lv6 { min-height: 222px; }
.gs-step.is-current { background: linear-gradient(180deg, #ffd166, #ff9f1c); border-color: #c2410c; }
.gs-step.is-current .gs-name, .gs-step.is-current .gs-rate, .gs-step.is-current .gs-unlock { color: #4a2107; }
.gs-step.is-next { border-style: dashed; }
.gs-name { font-size: 15px; font-weight: 900; line-height: 1.3; color: #5b3d10; overflow-wrap: anywhere; }
.gs-rate { font-size: 13px; font-weight: 700; color: #7a5a22; line-height: 1.35; }
.gs-unlock { font-size: 11.5px; color: #8a6a34; line-height: 1.35; }
.gs-you { position: absolute; top: -40px; left: 50%; transform: translateX(-50%); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; background: #c2410c; color: #fff; font-size: 13px; font-weight: 800; padding: 5px 10px; border-radius: 999px; box-shadow: 0 6px 14px -6px #c2410c; }
.gs-you::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #c2410c; border-bottom: 0; }
.gs-you ion-icon { font-size: 16px; }
.guide-stairs-base { height: 6px; border-radius: 3px; background: #e6cfa3; margin-bottom: 8px; }
.guide-live .guide-stairs-cap { font-size: 15px; color: #6b5d48; margin: 8px 0 12px; }
@media (max-width: 420px) { .gs-name { font-size: 13.5px; } .gs-rate { font-size: 12px; } .gs-unlock { display: none; } }

/* ความคืบหน้าสู่ระดับถัดไป */
.guide-progress { background: #fff; border: 1px solid #cfe3d6; border-radius: 14px; padding: 14px; margin: 10px 0 14px; }
.guide-progress p { margin: 0; font-size: 16px; }
.gpr-head { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 16px; color: #1f6b3a; }
.gpr-bar { height: 16px; border-radius: 8px; background: #e6efe9; overflow: hidden; margin: 8px 0; }
.gpr-bar span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #34d399, #059669); min-width: 6px; transition: width .6s ease; }
.gpr-need { color: #3f3a30; }
.gpr-need b { color: #c2410c; }

/* กล่องกติกาขึ้น-ลง */
.guide-rules-box { margin-top: 18px; background: #fff; border: 2px solid #f1d9a8; border-radius: 20px; padding: 18px 16px; }
.guide-rules-box h3 { display: flex; align-items: center; gap: 8px; font-size: 21px; margin: 0 0 10px; color: #7c2d12; }
.guide-rules-box h3 ion-icon { font-size: 26px; }
.guide-rules-box > p { font-size: 17px; }
.guide-window { margin: 12px 0 16px; padding: 12px 10px 10px; border-radius: 14px; background: #fff8ea; }
.gw-labels { display: flex; justify-content: space-between; align-items: flex-end; font-size: 13px; color: #8a6a34; line-height: 1.35; margin-bottom: 6px; }
.gw-labels .gw-old b { color: #b91c1c; }
.gw-labels .gw-now { font-weight: 900; color: #c2410c; font-size: 14px; }
.gw-strip { display: flex; gap: 2px; }
.gw-strip span { flex: 1; height: 22px; border-radius: 4px; background: #ffd489; animation: gwSlide 6s linear infinite; }
.gw-strip span.gw-out { background: #efe6d8; position: relative; }
.gw-strip span.gw-out::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: #b91c1c; font-weight: 900; }
.gw-strip span.gw-today { background: #c2410c; }
.gw-move { text-align: right; font-size: 12.5px; color: #8a6a34; margin-top: 6px; }
@keyframes gwSlide { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-3px); } }
.guide-rulelist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.guide-rulelist li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.6; color: #4a4234; }
.guide-rulelist b { color: #3b3529; }
.rl-tag { flex-shrink: 0; width: 46px; text-align: center; padding: 4px 0; border-radius: 10px; font-size: 14px; font-weight: 900; color: #fff; margin-top: 3px; }
.rl-up { background: #059669; } .rl-down { background: #dc2626; } .rl-stop { background: #6b7280; } .rl-day { background: #d97706; }
.guide-tip { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: #fff1d6; color: #7c2d12; font-weight: 700; font-size: 16px; }
.guide-tip ion-icon { flex-shrink: 0; font-size: 22px; margin-top: 3px; }
.guide-page.is-paused .gw-strip span { animation: none; }

/* แผนภาพชวนเพื่อน */
.guide-tree { text-align: center; margin: 18px 0 6px; padding: 16px 8px; border-radius: 18px; background: #fff8ea; }
.gt-row { display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.gt-node { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid #ecd9b3; font-size: 14.5px; font-weight: 700; color: #6b4a1a; }
.gt-node ion-icon { font-size: 18px; }
.gt-me { background: #c2410c; color: #fff; border-color: #c2410c; font-size: 16px; }
.gt-far { background: #fffdf7; color: #8a6a34; font-size: 13.5px; }
.guide-tree p { font-size: 15.5px; color: #6b5d48; margin: 8px 0 0; }

/* ถาม-ตอบ */
.guide-faq details { background: #fff; border: 1px solid #eee2cf; border-radius: 16px; padding: 4px 16px; margin-bottom: 10px; }
.guide-faq summary { cursor: pointer; font-size: 19px; font-weight: 800; line-height: 1.5; padding: 12px 0; list-style: none; position: relative; padding-right: 34px; }
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff1d6; color: #b45309; font-size: 22px; font-weight: 900; }
.guide-faq details[open] summary::after { content: '−'; }
.guide-faq p { margin: 0 0 14px; color: #4a4234; }
.guide-faq .guide-link { margin: 0 0 14px; }
.guide-page .guide-footnote { font-size: 15px; color: #78694f; margin-top: 16px; }
.guide-end { text-align: center; margin-top: 32px; }
.guide-end p { font-size: 22px; font-weight: 800; margin-bottom: 0; }

/* หยุดภาพเคลื่อนไหว */
.guide-page.is-paused .gf-coin, .guide-page.is-paused .example-tile, .guide-page.is-paused .example-arrow { animation: none; }
@media (prefers-reduced-motion: reduce) { .gf-coin, .example-tile, .example-arrow { animation: none; } }
@media (max-width: 380px) { .example-pair { grid-template-columns: 1fr; } .gf-node b { font-size: 13.5px; } }

/* Topic navigation and readable task steps. */
.guide-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 24px 0; }
.guide-topics a { display: flex; align-items: center; min-height: 56px; padding: 12px; border: 1px solid #eadcc2; border-radius: 16px; background: #fff; color: #7c2d12; font-size: 17px; font-weight: 700; line-height: 1.5; }
.guide-topics a:focus-visible { outline: 3px solid #b45309; outline-offset: 3px; }
.guide-page section[id] { scroll-margin-top: 90px; }
.guide-faq ol { padding-left: 26px; margin: 0 0 16px; color: #4a4234; font-size: 18px; line-height: 1.8; }
.guide-faq ol li + li { margin-top: 10px; }
