/* 字詞小島: one picture, one large word, one clear action for K3. */
.story-ic{background:linear-gradient(145deg,#f6daa1,#d8a953);color:#305e58;font-family:'Noto Serif TC','Songti TC',serif}
#story{overflow-y:auto;overflow-x:hidden;align-items:stretch;text-align:left;scrollbar-width:thin;border-radius:28px;background:#f9f3df;color:#284f49;isolation:isolate}
#story.on{display:block}
#story *{box-sizing:border-box}
#story button{font-family:inherit;cursor:pointer;touch-action:manipulation}
#story button:disabled{cursor:default;opacity:.48}
#story button:focus-visible,#story a:focus-visible,#story summary:focus-visible{outline:3px solid #b85438;outline-offset:3px}
#story h1,#story h2,#story h3,#story p{margin:0}
#story h1,#story h2{font-family:'Noto Sans TC','PingFang HK',sans-serif}
#story svg{display:block;width:100%;height:auto}
#story h1:focus,#story h2:focus{outline:none}
.ks-page{min-height:100%;padding:14px 18px 24px;background:radial-gradient(ellipse at 100% 0,#e1e9d780,transparent 47%),#f9f3df;animation:ks-page-in .3s ease}
.ks-nav{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.ks-nav button{border:0;background:none;color:#345e50;min-width:56px;min-height:56px;font-size:20px;font-weight:700;padding:8px}
.ks-nav .ks-book-nav{border:1px solid #b7c8ab;border-radius:50%;width:56px;font-size:28px;padding:0;background:#eff2df}
.ks-heading{text-align:center}
.ks-heading h1{font-size:36px;letter-spacing:3px;line-height:1.4}
.ks-world{margin:4px auto;max-width:340px}
.ks-world svg{max-height:180px}
.ks-world .ks-boat{animation:ks-float 4s ease-in-out infinite}
.ks-panel{border:1px solid #d8cda8;border-radius:20px;background:#fffaf0;padding:16px;box-shadow:0 5px 0 #dcd3b53d}
.ks-next{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 18px}
.ks-seal{display:grid;place-items:center;background:#f2dfb0;border-radius:14px;color:#294f43;font-size:48px;min-width:80px;min-height:88px;padding:6px 12px;transform:rotate(-3deg);box-shadow:0 3px 0 #d5bd8a}
.ks-count{font-size:20px;font-variant-numeric:tabular-nums;white-space:nowrap;color:#49654c}
.ks-main{display:block;width:100%;border:1px solid #285b52;border-radius:16px;min-height:68px;padding:14px 10px;background:#327366;color:#fffdf3;font-weight:800;font-size:24px;line-height:1.35;box-shadow:0 5px 0 #234f47}
.ks-main:active{transform:translateY(3px);box-shadow:0 2px 0 #234f47}
.ks-home-tools,.ks-tools{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}
.ks-tool{flex:1;min-width:100px;border:1px solid #b8c7a7;color:#345e50;background:#edf1db;border-radius:14px;min-height:60px;padding:12px 8px;font-size:20px;font-weight:700;line-height:1.4}
.ks-tool.is-playing{background:#dae9c9;border-color:#527959}
.ks-parent-notes{margin-top:12px;font-size:18px;line-height:1.8;color:#4f6350}
.ks-parent-notes summary{cursor:pointer;min-height:56px;padding:12px 0;font-size:18px}
.ks-parent-notes p{margin:12px 0!important}
.ks-parent-notes a{color:#265f52;display:inline-block;min-height:48px;padding:7px 0}
.ks-chapter{margin:20px 0;border:1px solid #d9cfac;border-radius:16px;background:#fffaf0;padding:14px}
.ks-chapter h2{font-size:24px;line-height:1.5;margin-bottom:14px!important}
.ks-stops{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ks-stop{border:1px solid #cdbb8d;border-radius:12px;padding:8px 0;background:#fffaf0;color:#345e50;position:relative;min-width:0;min-height:80px}
.ks-stop strong{display:block;font-size:32px;line-height:1.3}
.ks-stop span{display:block;font-size:18px;line-height:1}
.ks-stop.is-done{background:#e3ebd8;border-color:#91aa92}
.ks-stop.is-current{background:#f3d790;border-color:#b58b3d;box-shadow:0 3px 0 #d1b06c}
.ks-page-top{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px;font-size:18px;line-height:1.4;color:#526b51}
.ks-dots{display:flex;gap:7px}
.ks-dots i{display:block;width:9px;height:9px;border-radius:50%;background:#d9d9c2}
.ks-dots .done{background:#b8872b}
.ks-dots .current{background:#548c78;box-shadow:0 0 0 3px #62988522}
.ks-book{background:#fffaf0;border:1px solid #d9caa4;border-radius:14px 24px 24px 14px;box-shadow:-4px 0 #e5d9b9,0 6px 0 #e4d9bd66;overflow:hidden}
.ks-illustration{overflow:hidden;background:#dbeae0}
.ks-illustration svg{max-height:160px;animation:ks-reveal .5s ease}
.ks-word-body{text-align:center;padding:10px 10px 18px}
.ks-big-word{font-family:'Noto Sans TC','PingFang HK',sans-serif;font-size:80px;line-height:1.25;font-weight:900;letter-spacing:4px;color:#284f46}
.ks-story-line{font-size:32px;line-height:1.65;color:#284f46;margin:10px 0!important;text-wrap:balance;overflow-wrap:anywhere}
.ks-story-line mark{background:transparent;color:#ae4a32;border-bottom:3px solid #e4bf62;padding:0 2px}
.ks-lesson-tools{gap:8px}
.ks-lesson-tools .ks-tool{min-width:0;padding:12px 4px;white-space:nowrap}
.ks-meaning{font-size:20px;line-height:1.7;color:#4b6450;margin:8px 0!important}
.ks-status{font-size:20px;line-height:1.7;color:#78532d;margin:12px 0!important;text-align:center}
.ks-status:empty{display:none}
.ks-secondary{border:1px solid #c6ceb5;border-radius:14px;background:#f4f2df;color:#3b6051;font-size:20px;min-height:60px;width:100%;margin-top:14px;padding:12px}
.ks-prompt{font-size:30px;line-height:1.5;text-align:center;margin-bottom:12px!important}
.ks-task-clue{text-align:center;font-size:30px;line-height:1.7;margin:12px 0!important;color:#315746;overflow-wrap:anywhere}
.ks-task-art{border:1px solid #d8ccab;border-radius:18px;overflow:hidden;margin:12px 0;background:#e3eddf}
.ks-task-art svg{max-height:140px}
.ks-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}
.ks-choices.two,.ks-pictures{grid-template-columns:repeat(2,minmax(0,1fr))}
.ks-choice{border:1px solid #bfad82;border-radius:16px;background:#fffaf0;box-shadow:0 4px 0 #d8c798;color:#294f43;padding:14px 2px;min-height:84px;font-size:36px;font-weight:900;line-height:1.35}
.ks-choice:active{transform:translateY(3px);box-shadow:0 1px 0 #d8c798}
.ks-picture-choice{padding:5px;overflow:hidden;min-height:112px;display:flex;align-items:center}
.ks-pictures .ks-picture-choice:last-child:nth-child(odd){grid-column:1/-1;width:calc((100% - 12px)/2);justify-self:center}
.ks-hint{padding:14px;background:#f1e6c9;border-left:4px solid #b78b38;border-radius:8px;font-size:24px;line-height:1.7;margin:14px 0;color:#614b30}
.ks-hint:empty{display:none}
.ks-answer-slots{display:flex;gap:10px;flex-wrap:wrap;border:2px dashed #9eaf8f;border-radius:16px;min-height:94px;padding:12px;align-items:center;margin:16px 0;background:#eaf0dc}
.ks-answer-slots:empty:before{content:'點詞語 ↓';font-size:24px;color:#4d664d;text-align:center;width:100%}
.ks-tile{border:1px solid #bfad82;border-radius:12px;background:#fffaf0;box-shadow:0 4px 0 #d8c798;color:#294f43;min-width:68px;min-height:68px;font-size:30px;padding:10px 12px;line-height:1.4}
.ks-tile-bank{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-bottom:22px}
.ks-answer-slots .ks-tile{background:#dfead3;border-color:#a0b38a;box-shadow:0 3px 0 #b9ccb0}
.ks-celebrate{text-align:center;padding:4px 0}
.ks-check{display:grid;place-items:center;margin:8px auto 14px;width:64px;height:64px;background:#e8d293;color:#456d44;border-radius:50%;font-size:36px;box-shadow:0 0 0 6px #eadfba55;animation:ks-pop .45s ease}
.ks-award{display:flex;gap:16px;align-items:center;text-align:left;border:1px solid #cdb88c;background:#f3e7c8;border-radius:17px;margin:18px 0;padding:18px 14px}
.ks-award b{font-size:40px;color:#88621e;white-space:nowrap}
.ks-award span{font-size:24px;line-height:1.6}
.ks-award small{display:block;font-size:20px;color:#526345}
.ks-library{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:20px}
.ks-library-card{border:1px solid #cdb88c;background:#fffaf0;border-radius:16px;overflow:hidden;padding:0 0 12px;color:#315b4c;box-shadow:0 4px #dfd4b4}
.ks-library-card b{display:block;font-size:36px;line-height:1.4;margin-top:10px}
.ks-trace{width:100%;max-width:290px;margin:18px auto;background:#fff9e9;border:2px solid #c1a97a;border-radius:16px;overflow:hidden;position:relative}
.ks-trace svg{touch-action:pan-y}
.ks-trace.is-drawing svg{touch-action:none}
.ks-grid{stroke:#d7cba7;stroke-width:2;stroke-dasharray:10 12}
.ks-ink{stroke-dashoffset:var(--dash);animation:ks-write .52s ease forwards;animation-delay:var(--delay)}
.ks-empty{padding:32px 0;text-align:center;font-size:24px;line-height:1.8}
.ks-empty.ks-big-word{font-size:80px}
.ks-review-badge{display:block;text-align:center;color:#76552b;background:#eee2bf;padding:8px;font-size:20px;border-radius:12px;margin-bottom:12px}
@keyframes ks-float{50%{transform:translate(73px,282px) rotate(-2deg)}}
@keyframes ks-page-in{from{opacity:.35;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes ks-reveal{from{opacity:.4;transform:scale(1.035)}to{opacity:1;transform:scale(1)}}
@keyframes ks-pop{from{transform:scale(.7);opacity:.2}to{transform:scale(1);opacity:1}}
@keyframes ks-write{to{stroke-dashoffset:0}}
@media(max-width:360px){
 .ks-page{padding:12px 12px 22px}.ks-nav{margin-bottom:8px}.ks-heading h1{font-size:32px}
 .ks-world svg{max-height:145px}.ks-panel{padding:14px}.ks-seal{font-size:44px;min-height:80px}
 .ks-illustration svg{max-height:120px}.ks-prompt{font-size:28px}.ks-task-art svg{max-height:104px}
 .ks-story-line,.ks-task-clue{font-size:30px}.ks-choice{font-size:32px;min-height:80px}.ks-choices{gap:10px}
 .ks-pictures .ks-picture-choice:last-child:nth-child(odd){width:calc((100% - 10px)/2)}.ks-picture-choice{min-height:104px}
 .ks-stops{gap:8px}.ks-chapter{padding:10px}.ks-stop strong{font-size:30px}.ks-tool{min-width:90px}
}
@media(prefers-reduced-motion:reduce){#story,#story *,#story *:before,#story *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.ks-ink{stroke-dashoffset:0!important}}
#openStoryScores{background:#314e48;border:1px solid #789c82;color:#ecedce;border-radius:14px;padding:14px;width:100%;font:inherit;font-size:22px;min-height:64px;margin-bottom:10px}
