.thai-chapter-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:18px 0;padding:16px 20px;border:1px solid #f2bbd2;border-radius:20px;background:linear-gradient(130deg,#fff3f8,#fffdf8);box-shadow:0 7px 0 #f4d8e5;color:#873553;font-weight:800}
.thai-chapter-heading strong{padding:7px 12px;border-radius:999px;background:#fff;color:#9b4165;font-size:15px}
.thai-book-chapters{display:grid;gap:11px;margin:22px 0;text-align:left}
.thai-book-chapter{border:1px solid #eed2dd;border-radius:18px;background:#fff;box-shadow:0 4px 12px #8d47720c;overflow:hidden}
.thai-book-chapter[open]{border-color:#e7a8c1;box-shadow:0 8px 22px #8d477217}
.thai-book-chapter summary{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 14px;padding:16px 20px;cursor:pointer;color:#813c58;font-weight:800;list-style:none}
.thai-book-chapter summary::-webkit-details-marker{display:none}
.thai-book-chapter summary::after{content:'⌄';margin-left:auto;font-size:23px;line-height:1;transition:transform .2s ease}
.thai-book-chapter[open] summary::after{transform:rotate(180deg)}
.thai-book-chapter summary small{font-size:14px;font-weight:500;color:#755869}
.thai-book-chapter-content{padding:0 18px 20px;border-top:1px solid #f5e3ea}
.thai-book-chapter summary:focus-visible{outline:3px solid #8c4ac6;outline-offset:-3px}
.thai-learn-card{margin:18px 0;padding:20px 24px;text-align:left;border:1px solid #f2d5df;border-radius:22px;background:#fff;box-shadow:0 8px 20px #8d477213}
.thai-learn-card h2{margin:0 0 12px;color:#85405c;font-size:clamp(21px,2.5vw,26px)}
.thai-learn-card p{margin:12px 0 0;line-height:1.85}
.thai-steps{margin:8px 0 0;padding-left:27px;line-height:1.9}
.thai-steps li{padding:3px 0}
.thai-passage{max-width:720px;margin:24px auto;padding:24px 28px;text-align:left;border:1px solid #e9cfda;border-left:7px solid #bc527d;border-radius:10px 24px 24px 10px;background:linear-gradient(145deg,#fffafc,#fff1f7);box-shadow:0 8px 0 #f1dce5,0 16px 32px #903f6417;color:#3d3440}
.thai-passage h2{font-size:clamp(22px,3vw,29px);margin:10px 0}
.thai-passage p{font-size:clamp(18px,2.5vw,22px);line-height:1.9;margin:12px 0}
.thai-passage .lesson-tag{display:inline-block;font-size:13px;letter-spacing:.02em;color:#8a3b5b;font-weight:700}
.thai-passage small{display:block;font-size:14px;line-height:1.6;color:#675766}
.thai-word-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:11px}
.thai-word-grid span{display:flex;flex-direction:column;gap:4px;padding:13px 15px;border:1px solid #f5ccdb;border-radius:16px;background:#fff7fa}
.thai-word-grid b{color:#85405c;font-size:23px}
.thai-word-grid small{font-size:14px;line-height:1.5;color:#60515a}
.thai-blends{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:10px}
.thai-blends span{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 14px;border-radius:15px;background:#fff1f7;color:#873553}
.thai-blends small{font-size:15px}
.thai-blends b{font-size:21px;white-space:nowrap}
.thai-vowel-groups{display:grid;gap:10px}
.thai-vowel-groups>div{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px;border-radius:15px;background:#fff6f9}
.thai-vowel-groups b{min-width:72px;color:#7f3755}
.thai-vowel-groups span{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:10px;background:#fff;border:1px solid #f0d3df;font-size:19px}
.thai-vowel-groups small{font-size:15px;color:#6c5361}
.thai-poem{text-align:center}
.thai-poem p{line-height:2}
.thai-sentence{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:22px 0}
.thai-sentence span{display:flex;flex-direction:column;padding:16px 10px;background:#fff1f6;border-radius:16px;text-align:center;font-size:28px;font-weight:700}
.thai-sentence small{font-size:14px;font-weight:400;color:#735b68}
@media(max-width:600px){.thai-passage{padding:18px 20px;margin:18px auto}.thai-learn-card{padding:17px}.thai-sentence span{font-size:24px;padding:12px 4px}.thai-sentence small{font-size:12px}.thai-blends span{padding:10px}}
.thai-hero{background:linear-gradient(135deg,#fff2f7,#fff9eb 70%,#e7f7ff);border:1px solid #f4cadb;border-radius:28px;box-shadow:0 12px 0 #f6dce7,0 22px 35px #b04e741c;padding:30px;margin-bottom:24px}
.thai-hero h1{color:#873a60}.thai-dashboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:22px 0}.thai-dashboard div{background:#fff;border:1px solid #f2d4df;border-radius:20px;box-shadow:0 6px 0 #f8e3eb;padding:16px;text-align:center}.thai-dashboard b{display:block;font-size:clamp(22px,3vw,34px);color:#943f67}.thai-dashboard span{font-size:14px;color:#685763}
.thai-review-banner{display:flex;justify-content:space-between;align-items:center;gap:18px;background:linear-gradient(120deg,#fff0ad,#fff9e6);border:1px solid #f1d58d;border-radius:24px;box-shadow:0 7px 0 #f5e6b7;padding:18px 24px;margin:22px 0}.thai-review-banner h2{margin:0 0 5px;color:#6a4c23}.thai-review-banner p{margin:0}.thai-final-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:28px 0}.thai-final-grid .exam-banner{margin:0;display:flex;flex-direction:column;align-items:flex-start;gap:12px}.thai-final-grid .exam-banner h2{margin:0 0 7px}.thai-intro,.thai-reading-card,.thai-complete,.thai-result{text-align:center;max-width:850px;margin:20px auto;padding:clamp(22px,4vw,42px)}.thai-story-summary{background:#fff5f8;border:1px solid #f0ccda;border-radius:20px;padding:20px;text-align:left;margin:20px 0}.thai-story-summary b{color:#8b3c60;font-size:22px}.thai-story-summary p{line-height:1.8;margin:8px 0}.thai-reading-card .thai-card-icon{font-size:clamp(60px,10vw,105px);margin:12px auto}.thai-large-word{font-size:clamp(42px,8vw,76px);line-height:1.35;overflow-wrap:anywhere;color:#783252;margin:10px 0}.thai-reading-card p{font-size:clamp(18px,2.4vw,23px);line-height:1.6}.thai-card-actions,.thai-rating{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:18px 0}.thai-reading-card>.button{margin-top:12px}.thai-question .choice{font-size:clamp(20px,2.4vw,28px);min-height:68px}.thai-skill-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin:24px 0}.thai-skill-grid div{background:#fff4f8;border:1px solid #edc9da;border-radius:16px;padding:14px;display:flex;justify-content:space-between;gap:10px}.thai-result details{text-align:left;margin-top:24px}.thai-result li{padding:9px 0;border-bottom:1px solid #eee}.thai-missions .mission-card{min-height:220px}
@media(max-width:700px){.thai-dashboard{grid-template-columns:repeat(2,minmax(0,1fr))}.thai-review-banner{align-items:stretch;flex-direction:column}.thai-final-grid{grid-template-columns:1fr}.thai-reading-card,.thai-question{padding:20px}.thai-reading-card .button,.thai-rating .button{min-height:54px}}
.thai-teaching{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;text-align:left;margin:20px 0}.thai-teaching div{padding:15px;border:1px solid #efd5e0;border-radius:16px;background:#fffdfd}.thai-teaching b{display:block;color:#873a60;font-size:18px;margin-bottom:5px}.thai-teaching span{line-height:1.7}
@media(max-width:620px){.thai-teaching{grid-template-columns:1fr}}
.thai-built{min-height:70px;border:2px dashed #d8a7bd;background:#fff7fb;border-radius:18px;padding:13px;font-size:clamp(26px,5vw,42px);font-weight:800;color:#843b61;margin:16px 0}.thai-tiles{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin:12px 0}.thai-tiles .choice{width:clamp(62px,10vw,88px);min-height:66px;padding:8px}
.thai-hero h1:focus,.thai-intro h1:focus,.thai-reading-card h1:focus,.thai-question h1:focus,.thai-result h1:focus,.thai-complete h1:focus{outline:none}

/* Chapter 1–6 exam-prep activities */
.thai-missions .mission-card{position:relative;overflow:hidden;border:1px solid #f0c5d6;border-radius:25px;background:linear-gradient(145deg,#fff,#fff4f8 72%,#fff9e9);box-shadow:0 8px 0 #f3d7e2,0 17px 28px #81425a12;transform:translateY(0);transition:transform .18s ease,box-shadow .18s ease}
.thai-missions .mission-card:hover{transform:perspective(700px) rotateX(2deg) translateY(-4px);box-shadow:0 12px 0 #f3d7e2,0 24px 35px #81425a20}
.thai-missions .mission-card:focus-visible,.thai-chapter-select button:focus-visible,.thai-vowel-sets button:focus-visible,.thai-vocab-row button:focus-visible,.thai-tiles button:focus-visible{outline:3px solid #743fbd;outline-offset:3px}
.thai-missions .mission-pending{background:linear-gradient(145deg,#f6f5fb,#eeedf7);border-color:#d9d6e5;box-shadow:0 7px 0 #dedbe9,0 15px 25px #493d6c10}
.thai-missions .mission-pending .mission-icon{filter:grayscale(.35)}
.thai-chapter-select,.thai-vowel-sets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:22px 0}
.thai-chapter-select button,.thai-vowel-sets button{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;min-height:84px;padding:16px;border:1px solid #efcad9;border-radius:18px;background:linear-gradient(145deg,#fff,#fff5f9);box-shadow:0 5px 0 #f3e0e8;color:#71364f;text-align:left;cursor:pointer;font:inherit}
.thai-chapter-select button b,.thai-vowel-sets button b{font-size:18px;color:#803955}
.thai-chapter-select button small,.thai-vowel-sets button span{font-size:14px;line-height:1.55;color:#675460}
.thai-vowel-sets{grid-template-columns:repeat(2,minmax(0,1fr))}
.thai-vowel-chapters{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 20px}.thai-vowel-chapters .button{min-height:44px}
.thai-vowel-lessons{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:20px 0;text-align:left}.thai-vowel-lessons article{padding:16px;border:1px solid #ebcbda;border-radius:18px;background:linear-gradient(145deg,#fff,#fff4f9);box-shadow:0 5px 0 #f2dfe7}.thai-vowel-symbol{font-size:26px;font-weight:800;color:#994c73}.thai-vowel-lessons h2{margin:5px 0;color:#743c56}.thai-vowel-lessons p{display:grid;gap:9px;margin:12px 0}.thai-vowel-lessons p span{display:flex;flex-direction:column;gap:4px;padding:9px 11px;border-radius:12px;background:#fff;color:#684d5a}.thai-vowel-lessons p b{font-size:20px}.thai-vowel-lessons p small{font-size:13px;line-height:1.5;color:#71606a}
.thai-letter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(112px,1fr));gap:10px;margin:20px 0;text-align:center}
.thai-letter-grid>div{display:flex;flex-direction:column;align-items:center;gap:3px;padding:13px 8px;border:1px solid #eed0dc;border-radius:17px;background:linear-gradient(145deg,#fff,#fff3f8);box-shadow:0 4px 0 #f4e2e9}
.thai-letter-grid b{font-size:27px;color:#803955}.thai-letter-grid span{font-size:14px;color:#54434d}.thai-letter-grid small{font-size:13px;color:#7b6872}
.thai-blend-examples{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:9px;margin:20px 0;text-align:left}
.thai-blend-examples span{padding:12px 14px;border:1px solid #f0d3de;border-radius:15px;background:#fff7fa;color:#684650}
.thai-blend-examples strong{color:#793c58;font-size:20px}
.thai-svo-example{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:7px;margin:24px auto;max-width:670px}
.thai-svo-example>span{display:flex;min-width:0;flex-direction:column;gap:5px;padding:14px 8px;border:1px solid #e8c8d4;border-radius:17px;background:linear-gradient(145deg,#fff,#fff4f8);box-shadow:0 5px 0 #f2e0e7}
.thai-svo-example b{font-size:clamp(20px,3vw,28px);color:#823857;overflow-wrap:anywhere}.thai-svo-example small{font-size:12px;color:#67525d}.thai-svo-example i{font-style:normal;color:#cc77a1;font-size:22px}
.thai-vocab-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:9px;margin:20px 0}
.thai-vocab-row button{display:flex;flex-direction:column;gap:5px;padding:13px;border:1px solid #eed4de;border-radius:15px;background:#fff9fb;color:#71364f;text-align:left;cursor:pointer;font:inherit}
.thai-vocab-row b{font-size:19px}.thai-vocab-row small{color:#64535d;line-height:1.45}
.thai-story-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:20px}
.thai-readiness{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:20px 0;text-align:left}
.thai-readiness>div{display:grid;grid-template-columns:34px 1fr;align-items:center;gap:2px 8px;padding:13px;border:1px solid #ecd5df;border-radius:15px;background:#fff9fb}
.thai-readiness>div>b{grid-row:span 2}.thai-readiness>div span{font-weight:700}.thai-readiness>div small{color:#735f6a}
.thai-ready-card .thai-ready-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.thai-ready-actions .button{min-height:42px;padding:8px 12px;font-size:14px}
.thai-writing,.thai-parent-review{max-width:760px;margin:20px auto;padding:clamp(20px,4vw,38px);text-align:left}
.thai-writing-guides{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.thai-writing-guides span{padding:8px 12px;border:1px solid #efd6df;border-radius:999px;background:#fff7fa;color:#77445b;font-size:14px}
.written-answer{display:flex;flex-direction:column;gap:8px;margin:18px 0;font-weight:700;color:#693b52}
.written-answer textarea{width:100%;min-height:96px;resize:vertical;padding:14px;border:2px solid #e8c5d3;border-radius:15px;background:#fff;font:inherit;font-size:20px;line-height:1.65;scroll-margin:100px}
.written-answer textarea:focus-visible{outline:3px solid #9f62c7;outline-offset:2px}
.thai-question{max-width:820px;margin:20px auto;padding:clamp(20px,4vw,38px)}
.thai-question h1{line-height:1.55;overflow-wrap:anywhere}.thai-question .choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.thai-question .choice{min-width:0;overflow-wrap:anywhere}.thai-built{overflow-wrap:anywhere;line-height:1.6}
.thai-tiles .choice{border:1px solid #e7b9cc;background:linear-gradient(150deg,#fff,#fff0f7);box-shadow:0 5px 0 #f0d7e1;color:#743753}.thai-blend-built{border-style:solid;background:linear-gradient(145deg,#fff9e9,#fff2f8)}
.exam-controls,.thai-parent-actions{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:20px}
.thai-parent-review blockquote{margin:18px 0;padding:16px 19px;border-left:5px solid #d56d9c;border-radius:8px 16px 16px 8px;background:#fff4f8;font-size:21px;line-height:1.7;overflow-wrap:anywhere}
.thai-rubric{display:grid;gap:10px;padding:16px;border:1px solid #ebd4df;border-radius:17px;background:#fffafc}.thai-rubric label{display:flex;align-items:center;gap:9px;line-height:1.6}.thai-rubric input{width:20px;height:20px;accent-color:#a94c76}
.thai-result h2{margin-top:26px;color:#77354f}.thai-result .thai-skill-grid{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.thai-story-summary small,.source-note{line-height:1.7}
@media(max-width:700px){.thai-chapter-select{grid-template-columns:repeat(2,minmax(0,1fr))}.thai-letter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.thai-readiness{grid-template-columns:1fr}.thai-question .choices{grid-template-columns:1fr}.exam-controls .button,.thai-parent-actions .button{flex:1 1 45%;min-height:52px}.thai-parent-review,.thai-writing{padding:20px}.thai-vocab-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.thai-chapter-select,.thai-vowel-sets{grid-template-columns:1fr}.thai-svo-example{gap:4px}.thai-svo-example>span{padding:11px 5px}.thai-svo-example i{font-size:17px}.thai-svo-example small{font-size:10px}.thai-letter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.thai-writing-guides{display:grid;grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.thai-missions .mission-card{transition:none}.thai-missions .mission-card:hover{transform:none}}
.button.thai-back{min-height:44px;padding:12px 8px;border:0;background:transparent;background-image:none;box-shadow:none;color:#4c658b}
.button.thai-back:hover,.button.thai-back:active{background:#edf3fc;background-image:none;box-shadow:none;transform:none;color:#315b9b}
.thai-song-lesson{max-width:900px}
.thai-song-source{margin:4px auto 14px;color:#79516b;font-weight:700}
.thai-video-wrap{position:relative;width:min(100%,820px);min-height:200px;aspect-ratio:16/9;margin:18px auto 8px;overflow:hidden;border:3px solid #fff;border-radius:22px;background:#202638;box-shadow:0 8px 0 #e6d8ec,0 16px 34px #46304a24}
.thai-video-wrap iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.thai-video-fallback{margin:8px 0 20px;font-size:14px;color:#756477}
.thai-video-fallback a{color:#315b9b;font-weight:800;text-underline-offset:3px}
.thai-song-guide{max-width:820px;margin:20px auto;padding:clamp(18px,3vw,28px);border:1px solid #ebd9ef;border-radius:22px;background:linear-gradient(145deg,#fffafd,#f5f8ff);box-shadow:0 6px 0 #eee5f1;text-align:left}
.thai-song-guide h2{margin:0 0 10px;color:#713d70;font-size:clamp(19px,2.4vw,24px)}
.thai-song-guide ol{margin:8px 0 16px;padding-left:26px;line-height:1.8}
.thai-song-guide li{padding:3px 0}
.thai-song-guide p{line-height:1.8}
.thai-song-guide~.button{margin:6px 6px 0}
@media(max-width:520px){.thai-video-wrap{border-radius:14px;border-width:2px}.thai-song-guide{border-radius:17px}}
