@font-face{font-family:Kai;src:url(story/assets/Kai.ttf)}@font-face{font-family:Thai;src:url(story/assets/Mali-Regular.woff2)}@font-face{font-family:Andika;src:url(story/assets/Andika.woff2)}
*{box-sizing:border-box}body{margin:0;color:#243c39;background:#f5f1e8;font-family:Kai,Thai,serif}button,select{font:inherit;color:inherit;cursor:pointer}button{border:1px solid #c3cfc6;background:#fffdf7;border-radius:13px;padding:11px 16px;font-size:19px;min-height:46px;touch-action:manipulation}button:hover{border-color:#52786b}button:focus-visible,select:focus-visible{outline:3px solid #bd8d27;outline-offset:3px}button:disabled{cursor:default;opacity:.6}.primary{background:#245c52;color:white;border-color:#245c52}button.quiet{background:transparent;border-color:transparent;font-size:17px}.secondary{background:#eaf0e7}header{max-width:980px;margin:auto;padding:12px 20px;display:flex;align-items:center;justify-content:space-between;font-size:19px}header button{font-size:15px;padding:5px 12px;min-height:36px}main{max-width:980px;margin:auto;padding:0 20px 20px;display:grid;grid-template-columns:1fr 1.1fr;gap:20px;align-items:start}#scene{position:relative;overflow:hidden;border-radius:18px}#scene img{display:block;width:100%;aspect-ratio:1.25;object-fit:cover}#sceneTag{position:absolute;bottom:12px;left:12px;padding:6px 12px;background:#fffdf3e8;border-radius:20px;font-size:16px}#card{background:#fffdf8;border:1px solid #dce0d4;border-radius:20px;padding:22px;min-width:0}.heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px}h1{font-size:30px;font-weight:normal;margin:16px 0 8px}#count{color:#687e70;white-space:nowrap;font:14px Andika}#instruction{line-height:1.65;color:#4b675b;font-size:19px;margin:6px 0 18px}#steps{display:flex;gap:6px;flex-wrap:wrap}#steps span{font-size:15px;padding:5px 8px;border-radius:8px;color:#627168;background:#f1f2ea}#steps .current{background:#dbe8dd;color:#204a3e}#workspace{min-height:120px}#actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:8px}#feedback{font-size:20px;line-height:1.5;margin:12px 0 0;color:#38604c;min-height:30px}#audioStatus{font-size:15px;color:#766230;margin:5px 0;min-height:22px}.language{display:flex;gap:10px;align-items:center;margin:8px 0 16px}.language select{font-family:Thai,Andika,Kai;font-size:18px;padding:8px;border:1px solid #c3cfc6;border-radius:8px;background:white}.prompt{border-radius:13px;background:#f1f4ec;padding:15px;margin:0 0 12px;font-size:23px;line-height:1.65;overflow-wrap:anywhere}.prompt[lang=th]{font-family:Thai;font-size:21px}.prompt[lang=en]{font-family:Andika;font-size:20px}.choices{display:grid;gap:10px}.choice{font-family:Kai;font-size:29px;line-height:1.8;text-align:center;min-height:63px}.choice.selected{background:#e1ecdb;border-color:#567b51}.choice.attempted{border-color:#c19663}.reading{font-family:Kai;font-size:40px;text-align:center;line-height:2.35;padding:18px 0;overflow-wrap:anywhere}.zhword{font-family:Kai}.smalltools{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:10px}.smalltools button{font-size:16px;padding:7px 10px;min-height:40px}ruby{ruby-align:center}rt{font:14px Andika;color:#62756b}.sound{background:#f8e5a0;border-radius:4px}.result-list{display:grid;gap:8px}.result-list p{margin:0;padding:12px;background:#f1f4ec;line-height:1.6}.result-list .zhword{font-size:27px;display:block}.result-list small{font-size:16px}footer{grid-column:1/-1;text-align:center}footer p{font-size:15px;color:#758073;line-height:1.5}.story-button{background:transparent;border-color:#9eb4a6}#freeStory{max-width:1240px;margin:auto}.storybar{display:flex;gap:12px;align-items:center;padding:6px 12px}.storybar span{color:#66756b;font-size:15px}iframe{width:100%;height:calc(100dvh - 115px);border:0;background:#f2eee5;display:block}html[lang=th] header,html[lang=th] #card,html[lang=th] footer,html[lang=th] .storybar{font-family:Thai,Kai}html[lang=th] h1{font-size:24px}html[lang=th] #instruction{font-size:17px}html[lang=th] button{font-size:17px}html[lang=th] .choice{font:29px/1.8 Kai}html[lang=th] #steps span{font-size:13px}html[lang=th] .smalltools button{font-size:14px}[hidden]{display:none!important}
@media(max-width:700px){header{padding:9px 14px}main{padding:0 12px 16px;display:block}#scene{margin:0 -12px 12px;border-radius:0}#scene img{aspect-ratio:2.9;object-position:center 57%}#sceneTag{bottom:6px;font-size:14px}#card{padding:15px;border-radius:16px}h1{font-size:27px;margin-top:12px}#instruction{font-size:18px;margin-bottom:12px}.prompt{padding:10px;font-size:21px}.choices{gap:8px}.choice{min-height:57px;font-size:27px}.reading{font-size:37px}footer{margin-top:14px}#steps span{font-size:14px}.language{margin:8px 0 12px}html[lang=th] .choice{font-size:27px}.storybar button{font-size:15px}.storybar span{font-size:13px}}

header{position:sticky;top:0;z-index:5;background:#f5f1e8ee;backdrop-filter:blur(8px)}.header-controls{display:flex;align-items:center;gap:7px}#brand{max-width:50%;font-size:17px}.choice:disabled{opacity:1}#scene{background:#faf6ee}@media(max-width:700px){#scene img{height:180px;aspect-ratio:auto;object-fit:contain;object-position:center}#sceneTag{font-size:12px;bottom:4px;padding:3px 8px}header{gap:8px}#brand{font-size:15px}header button{font-size:15px!important}html[lang=th] #brand{font-size:13px}}

.bookbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:14px 20px;max-width:1100px;margin:auto}.bookbar a{color:#315f46}.bookbar select{max-width:min(500px,90vw);padding:10px}.bookbar span{font-size:14px;color:#526b5a}@media(max-width:600px){.bookbar{padding:10px}.bookbar label,.bookbar select{width:100%}}

.story-sync{max-width:1060px;margin:8px auto;padding:12px;background:#eef3e8;border-radius:12px;display:flex;flex-wrap:wrap;gap:10px}.story-sync span{width:100%;line-height:1.5}.story-sync button{font-size:14px;padding:8px 12px}
