/* V1.9: scoped animation for the lost balloon. Original portraits are untouched. */
#balloon-story{grid-column:1/-1;overflow:hidden}
#balloon-story .mission-sub{max-width:65ch}
.story19-stage{position:relative;isolation:isolate;height:360px;overflow:hidden;border:2px solid #d2eadc;border-radius:24px;background:linear-gradient(#dff5ff 0 69%,#c8edba 69% 100%);margin:16px 0 12px;--jaw:0}
.story19-stage:after{content:'';position:absolute;z-index:-1;width:130%;height:130px;border-radius:50%;background:#a9d997;bottom:-78px;left:-15%}
.story19-cloud{position:absolute;top:25px;left:9%;font-size:52px;opacity:.8;animation:story19-cloud 15s ease-in-out infinite alternate;pointer-events:none}
.story19-cloud.second{left:58%;top:12px;animation-delay:-7s;font-size:38px}
.story19-sun{position:absolute;right:17px;top:15px;font-size:36px}
.story19-tree{position:absolute;left:73%;bottom:48px;width:140px;height:250px;z-index:1;transform-origin:bottom center}
.story19-trunk{position:absolute;width:28px;height:155px;border-radius:13px;background:linear-gradient(90deg,#95623b,#bb8050);bottom:0;left:56px;transform:rotate(4deg)}
.story19-crown{position:absolute;background:#58aa72;box-shadow:inset -14px -10px #46925f;width:118px;height:130px;left:7px;top:3px;border-radius:48% 52% 42% 44%;transform-origin:bottom center}
.story19-crown:before,.story19-crown:after{content:'';position:absolute;width:80px;height:85px;background:#71be80;border-radius:50%;left:-15px;top:27px}
.story19-crown:after{left:51px;top:40px;background:#56aa6d}
.story19-flower{position:absolute;bottom:22px;left:8%;font-size:23px}.story19-flower.two{left:89%;bottom:13px}
.story19-person{position:absolute;z-index:3;bottom:35px;width:112px;height:190px;transform-origin:50% 94%;transition:left 1.35s cubic-bezier(.4,0,.2,1);border:0;background:transparent;padding:0;cursor:pointer;color:#42324f;min-height:0;--skin:#a96b43;--shirt:#f49ac9}
.story19-person:focus-visible{outline:3px solid #6d40aa;outline-offset:8px;border-radius:30px}
.story19-person.margo{left:13%}.story19-person.boubou{left:39%;--skin:#a16d41;--shirt:#69a9dc}
.story19-shadow{position:absolute;bottom:-5px;left:18px;width:80px;height:12px;border-radius:50%;background:#457a3a33}
.story19-torso{position:absolute;left:29px;top:88px;width:58px;height:65px;border-radius:20px 20px 15px 15px;background:var(--shirt);box-shadow:inset -8px 0 #0000000a;z-index:2}
.margo .story19-torso:after{content:'♥';color:#fff;font-size:23px;position:absolute;top:15px;left:19px}
.boubou .story19-torso:after{content:'★';color:#ffdb64;font-size:27px;position:absolute;top:14px;left:16px}
.story19-arm{position:absolute;width:18px;height:65px;top:91px;background:var(--skin);border-radius:15px;transform-origin:9px 8px;z-index:1;transition:transform .5s ease}
.story19-arm.left{left:19px;transform:rotate(15deg)}.story19-arm.right{right:15px;transform:rotate(-15deg)}
.story19-arm:after{content:'';position:absolute;width:22px;height:24px;bottom:-3px;left:-2px;border-radius:50%;background:var(--skin)}
.story19-leg{position:absolute;top:146px;width:21px;height:39px;background:#635384;border-radius:8px;transform-origin:50% 0;z-index:1}
.story19-leg.left{left:32px}.story19-leg.right{left:63px}.boubou .story19-leg{background:#a16d41}
.story19-leg:after{content:'';position:absolute;bottom:-5px;left:-3px;width:29px;height:14px;background:#ef7caa;border-radius:13px 14px 7px 7px}.boubou .story19-leg:after{background:#7e512c}
.story19-head{position:absolute;left:13px;top:0;width:91px;height:96px;z-index:4;transform-origin:50% 85%;transition:transform .5s;filter:drop-shadow(0 3px 2px #0002)}
.story19-portrait{width:100%;height:100%;object-fit:cover;display:block;border-radius:48%;border:3px solid #fff;box-sizing:border-box}
.story19-mouth{position:absolute;left:41%;top:65%;width:33%;height:17%;overflow:hidden;border-radius:50%;transform:scaleY(calc(1 + var(--jaw)*.32));transform-origin:center;pointer-events:none}
.story19-mouth img{position:absolute;width:303.03%;height:588.24%;max-width:none;left:-124.24%;top:-382.35%;object-fit:fill}
.boubou .story19-mouth{left:31%;top:46%;width:27%;height:20%}.boubou .story19-mouth img{width:370.37%;height:500%;left:-114.81%;top:-230%}
.story19-label{position:absolute;left:10%;bottom:-27px;width:90%;font:800 13px system-ui;color:#40344e;white-space:nowrap}
.story19-expression{position:absolute;top:0;right:-5px;background:white;border-radius:50%;font-size:23px;line-height:1.4;box-shadow:0 2px 7px #54425c20;transition:transform .3s;z-index:5}
.story19-balloon{position:absolute;z-index:4;width:48px;height:61px;left:calc(39% + 81px);bottom:158px;background:radial-gradient(ellipse at 32% 25%,#ffb2aa 0 9%,#ff555f 30%,#e33951 77%);border-radius:50% 50% 46% 46%;box-shadow:inset -6px -5px #c82e421a;transform-origin:50% 100%;pointer-events:none}
.story19-balloon:before{content:'';position:absolute;left:20px;bottom:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:8px solid #de3850}
.story19-string{position:absolute;left:23px;top:65px;width:2px;height:58px;background:#916c7b;transform:rotate(8deg);transform-origin:top}
.story19-stage[data-scene="0"] .boubou .story19-arm.right{transform:rotate(-112deg)}
.story19-stage[data-scene="0"].is-playing .boubou{animation:story19-bounce 1.3s ease-in-out infinite}
.story19-stage[data-scene="0"] .story19-balloon{animation:story19-sway 2.5s ease-in-out infinite}
.story19-stage[data-scene="1"] .margo{left:29%}.story19-stage[data-scene="1"] .boubou{left:49%}
.story19-stage[data-scene="1"] .story19-balloon{left:76%;bottom:238px;transform:rotate(12deg)}
.story19-stage[data-scene="1"].is-entering .story19-balloon{animation:story19-escape 2.8s cubic-bezier(.25,.65,.5,1) both}
.story19-stage[data-scene="1"] .story19-string{height:38px;transform:rotate(-18deg)}
.story19-stage[data-scene="1"] .margo .story19-arm.right{transform:rotate(-145deg)}
.story19-stage[data-scene="1"] .boubou .story19-arm.left{transform:rotate(130deg)}
.story19-stage[data-scene="1"] .boubou .story19-head{transform:rotate(13deg)}
.story19-stage[data-scene="1"].is-entering .story19-crown{animation:story19-leaves .7s ease-in-out 4}
.story19-stage[data-scene="2"] .margo{left:46%}.story19-stage[data-scene="2"] .boubou{left:22%}
.story19-stage[data-scene="2"] .story19-balloon{left:calc(46% + 84px);bottom:166px;transform:rotate(-8deg)}
.story19-stage[data-scene="2"].is-entering .story19-balloon{animation:story19-return 2.1s ease-in-out both}
.story19-stage[data-scene="2"] .margo .story19-arm.right{transform:rotate(-110deg)}
.story19-stage[data-scene="2"].is-playing .boubou{animation:story19-cheer .9s ease-in-out infinite}
.story19-stage[data-scene="2"].is-playing .boubou .story19-arm{animation:story19-wave .75s ease-in-out infinite alternate}
.story19-person.is-speaking .story19-head{animation:story19-nod .75s ease-in-out infinite alternate}
.story19-person.is-speaking .story19-expression{transform:scale(1.12)}
.story19-caption{padding:12px 15px;background:#fff6e8;border-radius:15px;border:1px solid #f2dfc4;min-height:60px;font-size:clamp(17px,2.2vw,22px);font-weight:750;line-height:1.4}
.story19-caption small{display:block;color:#795b68;font-size:12px;text-transform:uppercase;letter-spacing:.05em;margin-bottom:4px}
#balloon-story .mission-controls{display:flex;flex-wrap:wrap;gap:9px}#balloon-story .mission-controls button{min-height:46px}
.story19-progress{display:flex;align-items:center;gap:12px;margin:10px 0;font-size:13px;color:#6d5676}.story19-progress progress{flex:1;min-width:50px;height:8px;accent-color:#be61aa}
#story19-audio-status{min-height:22px;font-size:13px;color:#755b79;margin:8px 0}#story19-audio-status[data-state="error"]{color:#b32b42}
@keyframes story19-sway{50%{transform:rotate(6deg) translateY(-5px)}}
@keyframes story19-cloud{to{transform:translateX(30px)}}
@keyframes story19-bounce{50%{transform:translateY(-5px) rotate(-2deg)}}
@keyframes story19-nod{to{transform:rotate(2deg) translateY(1px)}}
@keyframes story19-leaves{50%{transform:rotate(4deg)}}
@keyframes story19-wave{from{transform:rotate(110deg)}to{transform:rotate(155deg)}}
@keyframes story19-cheer{50%{transform:translateY(-12px) rotate(3deg)}}
@keyframes story19-escape{0%{left:calc(39% + 81px);bottom:158px;transform:rotate(-10deg)}40%{left:60%;bottom:245px;transform:rotate(20deg)}70%{left:72%;bottom:266px;transform:rotate(-8deg)}100%{left:76%;bottom:238px;transform:rotate(12deg)}}
@keyframes story19-return{from{left:76%;bottom:238px;transform:rotate(12deg)}65%{left:63%;bottom:217px;transform:rotate(-17deg)}to{left:calc(46% + 84px);bottom:166px;transform:rotate(-8deg)}}
@media(max-width:600px){.story19-stage{height:310px}.story19-person{scale:.8;transform-origin:50% 100%;bottom:36px}.story19-person.margo{left:3%}.story19-person.boubou{left:32%}.story19-tree{left:65%;scale:.8;transform-origin:bottom center}.story19-balloon{scale:.8;left:calc(32% + 79px);bottom:137px}.story19-stage[data-scene="1"] .margo{left:17%}.story19-stage[data-scene="1"] .boubou{left:36%}.story19-stage[data-scene="1"] .story19-balloon{left:73%;bottom:219px}.story19-stage[data-scene="2"] .margo{left:39%}.story19-stage[data-scene="2"] .boubou{left:8%}.story19-stage[data-scene="2"] .story19-balloon{left:calc(39% + 80px);bottom:143px}#balloon-story .mission-controls button{flex:1 1 42%;padding:11px 8px}}
@media(prefers-reduced-motion:reduce){.story19-stage *{animation:none!important;transition:none!important}.story19-mouth{transform:none!important}}
.story19-stage.is-entering:not([data-scene="0"]) .story19-leg.left{animation:story19-step .28s ease-in-out 5 alternate}
.story19-stage.is-entering:not([data-scene="0"]) .story19-leg.right{animation:story19-step .28s ease-in-out 5 alternate-reverse}
@keyframes story19-step{from{transform:rotate(-18deg)}to{transform:rotate(18deg)}}
@media(max-width:600px){
@keyframes story19-escape{0%{left:calc(32% + 79px);bottom:137px;transform:rotate(-10deg)}40%{left:58%;bottom:224px;transform:rotate(20deg)}70%{left:68%;bottom:240px;transform:rotate(-8deg)}100%{left:73%;bottom:219px;transform:rotate(12deg)}}
@keyframes story19-return{from{left:73%;bottom:219px;transform:rotate(12deg)}65%{left:58%;bottom:195px;transform:rotate(-17deg)}to{left:calc(39% + 80px);bottom:143px;transform:rotate(-8deg)}}}
@media(prefers-reduced-motion:reduce){.story19-stage .story19-leg{animation:none!important}}
@media(max-width:600px){.story19-person{scale:.72}.story19-person.margo{left:2%}.story19-person.boubou{left:36%}.story19-stage[data-scene="1"] .margo{left:12%}.story19-stage[data-scene="1"] .boubou{left:43%}.story19-stage[data-scene="2"] .margo{left:43%}.story19-stage[data-scene="2"] .boubou{left:10%}.story19-stage[data-scene="2"] .story19-balloon{left:calc(43% + 80px)}
@keyframes story19-return{from{left:73%;bottom:219px;transform:rotate(12deg)}65%{left:58%;bottom:195px;transform:rotate(-17deg)}to{left:calc(43% + 80px);bottom:143px;transform:rotate(-8deg)}}}

#balloon-story{scroll-margin-top:90px}#story19-voices{margin-bottom:10px}#story-controls{margin-bottom:9px}@media(max-width:600px){.story19-stage{height:280px;margin-top:10px}#balloon-story .mission-sub{font-size:14px;margin:7px 0 10px}#balloon-story .mission-controls{gap:6px}#balloon-story .mission-controls button{min-height:44px;padding:9px 7px}.story19-caption{font-size:17px;min-height:55px;padding:9px 12px}}

button.story19-balloon{pointer-events:auto;border:0;padding:0;min-height:0;cursor:pointer}button.story19-balloon:disabled{opacity:1;cursor:default}button.story19-balloon:focus-visible{outline:3px dashed #673a9a;outline-offset:5px}


/* V2.0: complete vector characters; photographic references remain untouched in assets/ */
.story20-stage .story19-person{width:135px;height:211px;bottom:27px;--jaw:0;filter:drop-shadow(0 2px 1px #365a5535)}
.story20-stage .story20-avatar{width:100%;height:100%;display:block;overflow:visible;pointer-events:none}
.story20-stage .story19-expression{top:8%;right:0;border:2px solid #fff;font-size:19px;transform:translate(12%,-20%);z-index:10}
.story20-stage .story19-label{bottom:-11px;text-align:center;left:0;width:100%;font-size:13px;font-weight:900}
.story20-stage .a-talk-mouth{transform-box:fill-box;transform-origin:center 10%;transform:scaleY(calc(var(--jaw) * 1.05));opacity:calc(var(--jaw) * 1.5);transition:transform .055s linear}
.story20-stage .a-eyes{transform-box:fill-box;transform-origin:center;animation:story20-blink 6.2s ease-in-out infinite}
.story20-stage .boubou .a-eyes{animation-delay:-3.2s}
.story20-stage .a-head{transform-box:fill-box;transform-origin:50% 83%;transition:transform .2s ease-out}
.story20-stage .a-arm{transform-box:fill-box;transform-origin:50% 13%;transition:transform .4s cubic-bezier(.2,.8,.2,1)}
.story20-stage .a-leg{transform-box:fill-box;transform-origin:50% 8%;transition:transform .2s}
.story20-stage .a-puff{transform-box:fill-box;transform-origin:50% 65%;animation:story20-puff 2s ease-in-out infinite alternate}
.story20-stage .a-puff-right{animation-delay:-1.1s}
.story20-stage .story19-person.is-speaking .a-head{animation:story20-talk .33s ease-in-out infinite alternate}
.story20-stage .story19-person.is-speaking .a-arm-right{animation:story20-chatter .8s ease-in-out infinite alternate}
.story20-stage .story19-person:active .a-head{transform:rotate(8deg)}
.story20-stage[data-scene="0"] .boubou .a-arm-right{transform:rotate(-35deg)}
.story20-stage[data-scene="1"] .margo .a-arm-right{transform:rotate(-35deg)}
.story20-stage[data-scene="1"] .boubou .a-head{transform:rotate(9deg)}
.story20-stage[data-scene="1"] .a-brows{transform:translateY(-2px)}
.story20-stage[data-scene="2"] .margo .a-arm-right{transform:rotate(-38deg)}
.story20-stage[data-scene="2"] .boubou .a-arm-left{transform:rotate(30deg)}
.story20-stage[data-scene="2"] .boubou .a-arm-right{transform:rotate(-30deg)}
.story20-stage[data-scene="2"] .story19-person{animation:story20-win 1.25s ease-in-out infinite alternate}
.story20-stage.is-entering:not([data-scene="0"]) .a-leg-left{animation:story20-step .24s ease-in-out 6 alternate}
.story20-stage.is-entering:not([data-scene="0"]) .a-leg-right{animation:story20-step .24s ease-in-out 6 alternate-reverse}
.story20-stage .story20-sparkles{display:none;position:absolute;z-index:4;font-size:24px;color:#e2a122;top:12%;left:38%;pointer-events:none;animation:story20-sparks 1.6s ease-in-out infinite}
.story20-stage[data-scene="2"] .story20-sparkles{display:block}
.story20-reference{background:#faf5ff;border:1px solid #e9dff1;border-radius:14px;padding:10px 14px;margin-top:10px;font-size:13px}
.story20-reference summary{cursor:pointer;font-weight:750;color:#67458c}
.story20-reference>div{display:flex;gap:14px;flex-wrap:wrap;margin-top:12px}
.story20-reference figure{margin:0;width:112px;text-align:center}
.story20-reference img{width:100%;border-radius:16px;aspect-ratio:1;object-fit:cover}
.story20-reference figcaption{font-size:11px;color:#6f5b7d;margin-top:4px}
@keyframes story20-blink{0%,42%,44%,100%{transform:scaleY(1)}43%{transform:scaleY(.05)}}
@keyframes story20-puff{to{transform:rotate(3deg) translateY(1px)}}
@keyframes story20-talk{to{transform:rotate(2deg) translateY(1px)}}
@keyframes story20-chatter{to{transform:rotate(-14deg)}}
@keyframes story20-win{50%{transform:translateY(-8px)}}
@keyframes story20-step{from{transform:rotate(-14deg)}to{transform:rotate(14deg)}}
@keyframes story20-sparks{50%{transform:translateY(-12px) scale(1.13);opacity:.65}}
@media(max-width:600px){.story20-stage .story19-person{width:115px;height:194px;bottom:25px;scale:.9}.story20-stage .story19-person.margo{left:2%}.story20-stage .story19-person.boubou{left:39%}.story20-stage[data-scene="1"] .margo{left:12%}.story20-stage[data-scene="1"] .boubou{left:43%}.story20-stage[data-scene="2"] .margo{left:43%}.story20-stage[data-scene="2"] .boubou{left:10%}}
@media(max-width:360px){.story20-stage .story19-person{scale:.8}.story20-stage .story19-person.margo{left:-1%}.story20-stage .story19-person.boubou{left:36%}}
@media(prefers-reduced-motion:reduce){.story20-stage .a-eyes,.story20-stage .a-puff,.story20-stage .story19-person,.story20-stage .a-leg,.story20-stage .story20-sparkles,.story20-stage .a-head{animation:none!important;transition:none!important}}


/* V2.2 — expressive, accessible scene and bilingual 3-step learning loop */
.story20-stage{background:linear-gradient(180deg,#dff5ff 0%,#edfbff 65%,#d6edc5 66%,#bce7a5 100%)}
.story20-stage .story19-person{transition:left 1.2s cubic-bezier(.2,.75,.25,1),filter .25s ease;will-change:auto}
.story20-stage .story19-person.story22-happy{animation:story22-celebrate .52s ease-in-out 2!important}
.story20-stage .story19-person.story22-happy .a-arm-left{transform:rotate(23deg)}
.story20-stage .story19-person.story22-happy .a-arm-right{transform:rotate(-30deg)}
.story20-stage.story22-success::before{content:'✦ ⭐ ✨ ⭐ ✦';position:absolute;left:14%;top:14px;right:14%;z-index:9;text-align:center;font-size:clamp(17px,4vw,29px);pointer-events:none;animation:story22-spark .9s ease-out both}
.story20-stage[data-scene="1"] .a-brows{transform:translateY(-4px) rotate(-2deg);transform-box:fill-box;transform-origin:center;}
.story20-stage[data-scene="1"] .margo .a-head{transform:rotate(-5deg)}
.story20-stage[data-scene="1"] .boubou .a-head{transform:rotate(7deg)}
.story20-stage[data-scene="2"] .a-head{transform:rotate(-2deg)}
.story20-stage[data-scene="2"] .story19-person.is-speaking .a-head{transform:rotate(1deg)}
.story20-stage .story19-expression{transition:transform .2s,background .2s}
.story20-stage .story19-person:hover .story19-expression{transform:scale(1.15) rotate(-8deg)}
.story20-stage.is-playing .a-puff{animation-duration:1.3s}
.story22-lesson{margin:14px 0 13px;padding:16px;border:2px solid #efe5fa;border-radius:20px;background:linear-gradient(140deg,#fff8ff,#f6faff);color:#3e2d52}
.story22-topline{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
.story22-eyebrow{font-weight:800;color:#75459c;font-size:clamp(13px,1.7vw,15px)}
#story22-stars{font-size:22px;white-space:nowrap;letter-spacing:2px}
.story22-question{font-weight:900;margin:13px 0 10px;font-size:clamp(18px,2.7vw,23px);line-height:1.25}
.story22-answers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
button.story22-answer{display:flex;align-items:center;justify-content:center;background:white;color:#4c3762;border:2px solid #d9c3f1;border-radius:15px;font-size:clamp(15px,2.1vw,19px);font-weight:800;min-height:62px;line-height:1.25;padding:11px;box-shadow:0 3px 0 #ddcef0;cursor:pointer;transition:transform .16s,box-shadow .16s,border-color .16s}
button.story22-answer:hover:not(:disabled),button.story22-answer:focus-visible{border-color:#8652b3;transform:translateY(-2px);outline-offset:3px}
button.story22-answer:active:not(:disabled){transform:translateY(1px);box-shadow:0 1px 0 #ddcef0}
button.story22-answer.is-right{border-color:#3ca56c;background:#effff3;color:#21613e;box-shadow:0 3px 0 #b8e3c5}
button.story22-answer:disabled:not(.is-right){opacity:.65}
.story22-feedback{font-size:14px;line-height:1.4;font-weight:700;min-height:24px;margin:11px 0}
.story22-recap{border-top:1px dashed #d2bcea;padding-top:11px;display:flex;gap:8px 18px;flex-wrap:wrap;font-size:13px;color:#5d4a71;font-weight:650}
.story22-recap span:first-child{background:#efe6ff;padding:6px 9px;border-radius:9px}
.story22-lesson.is-complete{border-color:#9fd9b6;background:#f0fff5}
.story22-lesson.is-shaking{animation:story22-shake .24s ease-in-out 1}
@keyframes story22-shake{25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
@keyframes story22-spark{0%{opacity:0;transform:translateY(21px) scale(.8)}50%{opacity:1;transform:translateY(-4px) scale(1.04)}100%{opacity:0;transform:translateY(-25px)}}
@keyframes story22-celebrate{50%{transform:translateY(-12px) rotate(-3deg)}}
@media(max-width:500px){.story22-lesson{padding:12px 10px}.story22-answers{gap:7px}button.story22-answer{min-height:59px;padding:8px 5px;font-size:15px}.story22-topline{align-items:center}.story22-feedback{font-size:13px}.story22-recap{font-size:12px}}
@media(prefers-reduced-motion:reduce){.story22-lesson,.story20-stage.story22-success:before,.story20-stage .story19-person.story22-happy{animation:none!important}.story20-stage .story19-person{transition:none!important}}
