:root{--night:#102c31;--night-deep:#091d24;--paper:#fff9e9;--ink:#263b36;--muted:#56675c;--gold:#f3cf84;--mint:#90d9b5;--line:#e4d5b4;--accent:#78d8ad;--reading:19px;color-scheme:light}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:100px}body{margin:0;background:radial-gradient(ellipse at 12% 10%,#214c49,transparent 55%),var(--night-deep);color:var(--paper);font:18px/1.6 Verdana,Tahoma,sans-serif;padding-bottom:100px;-webkit-text-size-adjust:100%}button,a,input{touch-action:manipulation}button{font:inherit;cursor:pointer}button:disabled{cursor:default}button,a{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible{outline:3px solid #ebaf50;outline-offset:4px}button{color:inherit}a{color:inherit}img{max-width:100%;display:block}h1,h2,h3,p{margin-top:0}h1,h2,h3{line-height:1.2}h1,h2{font-family:Georgia,'Times New Roman',serif;letter-spacing:-.025em}.sr-only,.skip-link:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.skip-link:focus{position:fixed;z-index:1000;background:var(--paper);color:var(--ink);padding:12px}.academy-header{min-height:78px;padding:12px max(22px,env(safe-area-inset-right)) 12px max(22px,env(safe-area-inset-left));display:flex;align-items:center;gap:14px;background:rgba(11,32,36,.96);border-bottom:1px solid #b1c7a52a;position:sticky;top:0;z-index:30;backdrop-filter:blur(15px)}.home-link,.icon-button{min-width:46px;min-height:46px;display:grid;place-items:center;border:1px solid #c8d7ae40;border-radius:14px;background:#ffffff08;text-decoration:none}.icon-button{font-size:24px}.brand{border:0;background:none;text-align:left;padding:0;flex:1;min-width:0;font-family:Georgia,serif;font-size:22px;font-weight:bold;line-height:1.2}.brand small{display:block;font:10px/1.5 Verdana,sans-serif;letter-spacing:.18em;color:#c9d1b7;margin-top:4px}.key-count{white-space:nowrap;font-size:13px;color:var(--gold);padding:7px 12px;border:1px solid #f3cf8433;border-radius:30px}.academy-dock{position:fixed;bottom:0;left:0;right:0;z-index:30;background:#0d252df5;border-top:1px solid #d3dabb22;backdrop-filter:blur(14px);display:flex;justify-content:center;gap:8px;padding:8px max(12px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.academy-dock button{flex:1;max-width:210px;min-width:0;min-height:60px;border:0;border-radius:13px;background:transparent;color:#c9d4c7;font-size:13px;display:flex;align-items:center;justify-content:center;gap:10px}.academy-dock button>span:first-child{font-size:25px;color:var(--gold)}.academy-dock button.active{background:#9cddbc1c;color:white}.academy-dock button:hover{background:#ffffff10}
.sprite{display:inline-block;flex-shrink:0;width:var(--size,var(--art-size,80px));aspect-ratio:1;background-image:url('../scene/magic/sprites.webp');background-size:400% 400%;background-position:var(--sx) var(--sy);background-repeat:no-repeat;vertical-align:middle;pointer-events:none}.room-picture{background-image:url('../scene/magic/rooms.webp');background-size:200% 200%;background-position:var(--rx) var(--ry);background-repeat:no-repeat}.eyebrow{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--gold);font-weight:bold}.pill{display:inline-flex;gap:8px;align-items:center;border:1px solid #e4ca874d;border-radius:999px;padding:6px 12px;font-size:12px;color:#ffdfa0;background:#142c36c9}.primary,.secondary,.text-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;border-radius:13px;padding:12px 22px;font-weight:bold;text-decoration:none;border:1px solid transparent}.primary{color:#233d36;background:linear-gradient(135deg,#fce3a7,#dfb76f);box-shadow:0 5px 0 #8c6838,0 12px 30px #0002}.primary:hover{filter:brightness(1.06)}.primary:active{transform:translateY(2px);box-shadow:0 3px 0 #8c6838}.secondary{background:#fff9e910;border-color:#eddfb750;color:var(--paper)}.text-button{background:transparent;border-color:#8aa49a55;color:inherit;padding:8px 12px;font-size:14px}.button-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.button-row>*{max-width:100%}.muted{color:#b6c8bd}.page{max-width:1180px;margin:auto;padding:32px 24px 40px}.section-title{font-size:32px;margin-bottom:8px}.intro-hero{position:relative;isolation:isolate;min-height:560px;background:url('../scene/magic/workshop.webp') center/cover;border-bottom:1px solid #dcce9130;display:flex;align-items:center}.intro-hero:before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#081c25f0 2%,#0b2631d9 34%,#0b263130 75%),linear-gradient(0deg,#0a2028 0%,transparent 35%);z-index:-1}.hero-copy{max-width:650px;padding:52px max(24px,calc((100vw - 1130px)/2)) 56px;padding-right:24px;box-sizing:content-box}.hero-copy h1{font-size:clamp(36px,5vw,64px);max-width:620px;margin:22px 0}.hero-copy .lead{font-size:19px;max-width:460px;color:#e1e4cd;line-height:1.75}.hero-facts{display:flex;gap:22px;margin:24px 0 0;font-size:12px;color:#d4dec9}.hero-facts b{color:var(--gold);font-size:20px;display:block}.welcome-note{display:flex;gap:16px;align-items:center;margin-bottom:28px;padding:18px 22px;border:1px solid #a9d4b42b;background:#23453d55;border-radius:20px}.welcome-note p{margin:0;max-width:760px;font-size:15px}.welcome-note .sprite{--size:78px}.room-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin:26px 0}.room-card{overflow:hidden;background:#19353b;border:1px solid #c6d5af36;border-radius:20px;text-align:left;padding:0;position:relative;transition:transform .2s}.room-card:hover:not(:disabled){transform:translateY(-4px)}.room-card.selected{border-color:var(--gold);box-shadow:0 0 0 2px #f3cf8425}.room-card .room-picture{aspect-ratio:1;position:relative}.room-card:disabled .room-picture{filter:saturate(.35) brightness(.65)}.room-card .lock-tag{position:absolute;top:12px;right:12px;background:#0b2027d9;border-radius:20px;padding:5px 10px;font:11px Verdana}.room-card .room-copy{padding:16px}.room-card h3{font-family:Georgia,serif;font-size:21px;margin:0 0 8px}.room-card p{font-size:12px;color:#d0d9c8;margin:0}.room-card .mini-progress{margin-top:13px;display:flex;gap:6px}.mini-progress i{height:5px;flex:1;border-radius:10px;background:#ffffff20}.mini-progress i.on{background:var(--accent)}.room-detail{display:grid;grid-template-columns:1fr 1.15fr;border:1px solid #bbd6ae30;background:#102b32;border-radius:24px;overflow:hidden}.room-detail>.room-picture{min-height:420px;position:relative;isolation:isolate;transition:filter 1s}.room-detail>.room-picture:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#0b232a,transparent 50%)}.room-caption{position:absolute;bottom:22px;left:22px;right:22px;z-index:1}.room-caption h2{margin-bottom:8px;font-size:31px}.room-caption p{margin:0;font-size:13px;color:#e8e6ce}.level-list{padding:28px;display:flex;flex-direction:column;gap:10px}.level-list>.muted{font-size:14px;margin-bottom:8px}.level-link{width:100%;display:flex;align-items:center;gap:12px;padding:12px;border-radius:13px;border:1px solid #9ebf9d33;text-align:left;background:#ffffff05;font-size:15px}.level-link .level-number{width:35px;height:35px;border-radius:50%;background:#9ac6a21c;display:grid;place-items:center;font-size:13px;color:var(--gold);flex-shrink:0}.level-link .level-name{flex:1;min-width:0}.level-link small{display:block;color:#afc6b7;font-size:11px}.level-link.current{background:#f5d38b16;border-color:#e7c38477}.level-link:disabled{color:#9eafa7;background:transparent}.level-link:disabled .level-number{opacity:.5}.level-link .arrow{color:var(--gold)}.mystery-seals{display:flex;gap:9px;margin-top:18px}.mystery-seals span{display:grid;place-items:center;width:38px;height:38px;border:1px solid #f3cf8440;border-radius:50%;color:#72908b}.mystery-seals span.on{color:var(--gold);background:#f3cf841a;box-shadow:0 0 16px #f4c25725}
.level-page{max-width:1400px;margin:auto;padding:28px 32px}.mission-head{display:flex;justify-content:space-between;gap:18px;align-items:start;margin-bottom:18px}.mission-head h1{font-size:32px;margin:6px 0 0}.mission-head .eyebrow{margin-bottom:0}.mission-head .step-count{font-size:13px;color:var(--gold);white-space:nowrap}.stepper{display:flex;gap:6px;margin-bottom:22px}.stepper span{height:5px;flex:1;background:#829d942c;border-radius:5px}.stepper span.done{background:var(--accent)}.stepper span.now{background:var(--gold)}.task-layout{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:24px;align-items:start}.reading-card{background:var(--paper);color:var(--ink);border:1px solid #f7e4bd;border-radius:23px;padding:36px 40px;box-shadow:0 15px 50px #0002;min-width:0;min-height:clamp(560px,68dvh,780px);font-size:calc(var(--reading) + 3px);line-height:1.7}.reading-card h2{font:700 1.13em/1.5 Verdana,sans-serif;margin-bottom:20px;letter-spacing:.015em}.reading-card .eyebrow{color:#806438;font-size:11px}.reading-card .text-button{font-size:13px;border-color:#caba97;color:#52674f}.task-tools{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}.task-tools button{min-height:44px}.options{display:grid;gap:12px;margin:20px 0}.answer{border:2px solid #dcd2b9;background:#fffef8;border-radius:14px;padding:18px 22px;color:var(--ink);text-align:left;font-size:inherit;min-height:66px;line-height:1.5;overflow-wrap:anywhere}.answer:hover{border-color:#7cae91;background:#f2f8ec}.answer.wrong{border-color:#d4a579;background:#fff0d8}.answer.correct{border-color:#4d9470;background:#e7f5e7}.answer:disabled{opacity:1}.recipe-word{font-size:clamp(28px,4vw,42px);font-weight:bold;text-align:center;letter-spacing:.07em;margin:25px 0;overflow-wrap:anywhere}.syl-a{color:#28678d}.syl-b{color:#98513a}body.no-color .syl-a,body.no-color .syl-b{color:inherit}.token-tray,.sentence-slots{display:flex;gap:9px;flex-wrap:wrap;justify-content:center;margin:20px 0}.token{border:2px solid #cec4a8;background:#fffdf4;color:#2e433b;border-radius:12px;min-height:51px;padding:10px 15px;font-size:1.1em;font-weight:bold;line-height:1.4;max-width:100%;overflow-wrap:anywhere}.token.used{opacity:.35}.sentence-slots{min-height:72px;border:2px dashed #b6bda1;border-radius:14px;align-items:center;padding:12px;background:#f0efd9}.sentence-slots .empty-slot{color:#6b7561;font-size:14px;text-align:center}.story-text{font-size:1.03em;line-height:1.95;letter-spacing:.025em;border-left:4px solid #6fa38c;padding-left:18px;margin:22px 0}.feedback{min-height:1.7em;font-size:15px;color:#577453;margin:12px 0}.feedback.error{color:#8a592b}.hint-box{border:1px solid #d6bd86;border-radius:12px;background:#fff1ce;padding:12px 15px;font-size:15px;margin:16px 0}.companion-card{text-align:center;border:1px solid #9fc0a42b;border-radius:22px;padding:20px;background:linear-gradient(140deg,#244642,#132f37);position:sticky;top:106px}.companion-card .sprite{--size:140px;animation:floaty 5s ease-in-out infinite}.companion-card p{font-size:14px;color:#e1e2c9;margin:12px 0 0}.companion-card .phase-badge{display:block;font-size:11px;letter-spacing:.12em;color:var(--gold)}.task-complete{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:18px}.task-complete .primary{font-size:16px}.worktop{position:relative;isolation:isolate;overflow:hidden;border-radius:22px;border:1px solid #dbbb7640;background:linear-gradient(#09242db3,#10242be6),url('../scene/magic/workshop.webp') center/cover;min-height:clamp(560px,68dvh,780px);padding:40px;display:flex;flex-direction:column;align-items:center;justify-content:center}.action-card{grid-column:1/-1}.action-head{text-align:center;max-width:680px;margin:auto auto 22px}.action-head h2{font-size:30px;margin:0 0 12px}.action-head p{font-size:var(--reading);color:#e1e5cf;margin:0;line-height:1.7}.action-progress{display:flex;gap:10px;align-items:center;font-size:13px;color:#ecdeb9;margin:16px 0}.action-progress progress{width:180px;max-width:50vw;height:9px;accent-color:var(--accent)}.worktop .feedback{color:#fff2bd;min-height:1.5em;text-align:center}.brewing-props{display:flex;align-items:center;justify-content:center;gap:36px;width:100%;min-height:240px}.prop-button{background:transparent;border:0;position:relative;padding:10px;border-radius:24px;min-width:80px;touch-action:manipulation}.prop-button .sprite{--size:170px;max-width:100%;transition:transform .25s}.prop-button:hover .sprite{transform:translateY(-5px)}.prop-button.selected{background:#ffe9a319;box-shadow:0 0 0 2px #f3cf84}.prop-button small{display:block;font-size:13px;color:#fff0c4;line-height:1.5;max-width:190px}.prop-button.drag-source{touch-action:none;cursor:grab}.drag-ghost{position:fixed;z-index:100;pointer-events:none;opacity:.9;filter:drop-shadow(0 10px 16px #0007)}.drop-target{border:2px dashed #eace8144}.drop-target.over{background:#b5eead33;border-color:#cef5a1}.drop-target.received{border-color:#a9d88c;background:#b5eead15}.action-big{position:relative;display:grid;place-items:center;width:260px;height:230px;max-width:100%;border:0;border-radius:50%;background:transparent;touch-action:manipulation}.action-big .sprite{--size:210px}.stirring .action-big{touch-action:none;cursor:grab}.stir-spoon{position:absolute;inset:0;transform:rotate(var(--angle,0deg));transition:transform .18s;pointer-events:none}.stir-spoon .sprite{--size:110px;position:absolute;left:45%;top:1%}.glow-ring{position:absolute;inset:20px;border-radius:50%;background:radial-gradient(ellipse,#69f5be44,transparent 68%);pointer-events:none;opacity:var(--power,.2);transition:opacity .3s}.bubbling .glow-ring{animation:glow 2.5s ease-in-out infinite}.bubbles{position:absolute;inset:0;pointer-events:none;overflow:hidden}.bubble{position:absolute;bottom:28%;left:var(--x,50%);width:var(--s,12px);height:var(--s,12px);border:1px solid #d0ffdcbb;border-radius:50%;background:#a0f5c333;animation:rise 3s var(--delay,0s) infinite ease-out}.action-big.bump .sprite{animation:tap-bump .22s}.pouring .sprite{transition:transform .5s}.pouring.working .sprite{transform:rotate(-17deg)}.pour-stream{position:absolute;width:8px;height:0;border-radius:10px;left:49%;top:28%;background:linear-gradient(#eaffb8,#72dba8);box-shadow:0 0 15px #aefccc;transition:height .3s}.pouring.working .pour-stream{height:75px}.rune-board{position:relative;display:grid;place-items:center;width:250px;height:230px;border-radius:50%;background:radial-gradient(#314d69,#111e32);border:2px solid #c9c9df55;overflow:hidden;touch-action:none;cursor:crosshair}.rune-board .rune{font-size:130px;color:#ffdfa1;text-shadow:0 0 24px #fab658;opacity:var(--reveal,.1);transition:opacity .35s}.rune-board .fog{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse,#a3a1d995,#57638155);opacity:calc(1 - var(--reveal,.1));transition:opacity .35s}.cast-scene{width:100%;max-width:820px;min-height:370px;position:relative;display:grid;place-items:center;border-radius:17px;overflow:hidden;isolation:isolate}.cast-scene:before{content:'';position:absolute;inset:0;background:#09203285;z-index:-1;transition:background 1s}.cast-scene.lit:before{background:#10203205}.cast-scene .prop-button{background:#102a35a8;border:2px dashed #ffd889;border-radius:50%;padding:20px}.cast-scene.lit .prop-button{background:#edc76f20;box-shadow:0 0 70px #ffe29188;border-style:solid}.cast-scene .sprite{--size:110px}.cast-scene .orbit-star{position:absolute;font-size:25px;color:#ffe898;pointer-events:none;animation:appear .5s backwards;animation-delay:var(--delay,0s)}.cast-row{display:flex;width:100%;align-items:center;gap:22px}.cast-bottle{flex-shrink:0}.cast-bottle .sprite{--size:140px}.magic-particles{position:absolute;inset:0;pointer-events:none;overflow:hidden}.magic-particles i{position:absolute;left:50%;top:50%;font-style:normal;color:#ffdc8d;font-size:20px;animation:spark .85s ease-out forwards;--dx:0px;--dy:0px}.action-footer{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:18px}.action-footer .primary{font-size:16px}.small-note{font-size:12px;color:#c4d3c3;margin:10px 0 0;text-align:center}
.reward-page{text-align:center;max-width:850px;margin:auto;padding:36px 24px}.reward-page h1{font-size:clamp(34px,5vw,52px);margin:18px 0}.reward-page>.sprite{--size:165px;animation:floaty 5s infinite ease-in-out;filter:drop-shadow(0 8px 25px #e9c35c44)}.reward-page .result-text{font-size:var(--reading);max-width:650px;margin:0 auto 25px;color:#e4e9d5}.reward-scene{aspect-ratio:1.6;border-radius:22px;border:1px solid #f2d19655;position:relative;overflow:hidden;margin:25px 0}.reward-scene:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#09222a85,transparent 60%)}.reward-scene .mystery-seals{position:absolute;z-index:1;bottom:15px;left:50%;transform:translateX(-50%)}.reward-page .button-row{justify-content:center}.secret-message{padding:24px;border-radius:20px;background:#b4dfb41a;border:1px solid #c1dda344;margin:22px 0}.secret-message h2{font-size:27px;color:var(--gold)}.secret-message p{margin:0;color:#e3e7cb}.book-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin:28px 0}.potion-card{background:#18353b;border:1px solid #e5d39b26;border-radius:18px;text-align:center;padding:18px 10px;min-width:0}.potion-card .sprite{--size:115px;max-width:100%}.potion-card h3{font-size:14px;line-height:1.6;margin:12px 0 8px}.potion-card p{font-size:11px;color:#b4c8bb;margin:0}.potion-card.locked .sprite{filter:grayscale(1);opacity:.22}.potion-card button{margin-top:12px;font-size:12px}.finale{background:radial-gradient(ellipse at 50% 15%,#53588755,transparent 55%)}.finale .diploma{border:2px solid #d5b571;padding:32px;border-radius:22px;background:var(--paper);color:var(--ink);margin-top:28px}.diploma h2{font-size:34px;margin:10px 0}.diploma .mystery-seals{justify-content:center}.diploma .mystery-seals span{color:#886839;background:#eadab755;border-color:#c7a86c}.magic-dialog{background:var(--paper);color:var(--ink);border:2px solid #c7ab75;border-radius:23px;width:min(460px,calc(100% - 28px));padding:24px;max-height:calc(100dvh - 28px);overflow:auto}.magic-dialog::backdrop{background:#081d27c9;backdrop-filter:blur(5px)}.magic-dialog h2{font-size:28px}.setting-row{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:13px 0;border-bottom:1px solid #d5c7a4;font-size:15px}.setting-row .seg{display:flex;gap:6px;flex-wrap:wrap}.setting-row button{min-width:46px;min-height:46px;border:1px solid #bfbd9e;border-radius:10px;background:#fffcf2;color:var(--ink);font-size:15px}.setting-row button[aria-pressed=true]{background:#346e5b;color:white;border-color:#346e5b}.magic-dialog .button-row{margin-top:22px}.magic-dialog .text-button{color:#52694e}.magic-dialog .primary{font-size:15px}
@keyframes floaty{50%{transform:translateY(-7px)}}@keyframes glow{50%{filter:brightness(1.3)}}@keyframes rise{0%{transform:translateY(0);opacity:0}20%{opacity:.7}100%{transform:translateY(-130px);opacity:0}}@keyframes tap-bump{50%{transform:translateY(6px) rotate(-4deg)}}@keyframes spark{to{transform:translate(var(--dx),var(--dy)) rotate(60deg);opacity:0}}@keyframes appear{from{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}
@media(max-width:1000px){.room-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-copy{padding-left:28px;max-width:540px}.task-layout{grid-template-columns:minmax(0,1fr)}.companion-card{position:static;display:flex;align-items:center;gap:16px;text-align:left}.companion-card p{margin:0}.companion-card .phase-badge{display:none}.companion-card{padding:16px}.companion-card .sprite{--size:100px}}
@media(max-width:700px){.academy-header{min-height:66px;padding:9px 12px;gap:9px}.brand{font-size:18px}.brand small{font-size:8px;letter-spacing:.1em}.key-count{padding:5px 8px;font-size:11px}.home-link,.icon-button{min-width:44px;min-height:44px}.home-link img{width:33px;height:33px}.intro-hero{min-height:530px;align-items:flex-end;background-position:62% center}.intro-hero:before{background:linear-gradient(0deg,#09212a 0%,#0a2229dc 48%,#0a22291a 100%)}.hero-copy{padding:190px 20px 30px;max-width:none}.hero-copy h1{font-size:38px;margin:14px 0}.hero-copy .lead{font-size:16px;line-height:1.75;max-width:none}.hero-facts{margin-top:20px;gap:22px}.page{padding:25px 16px}.room-grid{gap:12px;margin:22px 0}.room-card .room-copy{padding:13px}.room-card h3{font-size:19px}.room-card p{font-size:11px}.room-card .lock-tag{font-size:10px;top:8px;right:8px}.room-detail{grid-template-columns:1fr}.room-detail>.room-picture{min-height:0;aspect-ratio:1.35}.room-caption{left:18px;bottom:18px}.room-caption h2{font-size:27px}.level-list{padding:18px}.welcome-note{padding:15px;gap:12px}.welcome-note p{font-size:13px}.welcome-note .sprite{--size:60px}.task-layout{grid-template-columns:minmax(0,1fr)}.companion-card{position:static;display:flex;align-items:center;gap:14px;text-align:left;padding:12px 16px}.companion-card .sprite{--size:70px}.companion-card p{font-size:13px;margin:0}.companion-card .phase-badge{display:none}.level-page{padding:18px 8px}.mission-head h1{font-size:27px}.mission-head{gap:10px}.mission-head .step-count{font-size:11px}.mission-head .eyebrow{font-size:9px;letter-spacing:.09em}.reading-card{padding:24px 18px;min-height:clamp(420px,58dvh,560px);font-size:calc(var(--reading) + 1px)}.answer{padding:16px;min-height:60px}.reading-card h2{font-size:1.05em}.action-head h2{font-size:27px}.action-head p{font-size:17px}.worktop{padding:26px 12px;min-height:clamp(420px,58dvh,560px)}.brewing-props{gap:8px;min-height:210px}.prop-button{padding:6px;min-width:0}.prop-button .sprite{--size:125px}.prop-button small{font-size:12px;max-width:125px}.action-big .sprite{--size:190px}.stir-spoon .sprite{--size:95px}.cast-row{flex-direction:column;gap:4px}.cast-bottle{display:flex;align-items:center;gap:10px}.cast-bottle .sprite{--size:88px}.cast-scene{min-height:280px}.cast-scene .sprite{--size:100px}.action-footer>*{max-width:100%}.book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.potion-card h3{font-size:13px}.reward-page{padding:28px 16px}.reward-scene{aspect-ratio:1.1}.reward-page h1{font-size:34px}.reward-page>.sprite{--size:140px}.academy-dock{gap:5px;padding-top:6px}.academy-dock button{font-size:11px;flex-direction:column;gap:0;line-height:1.4;min-height:59px}.academy-dock button>span:first-child{font-size:23px}.diploma h2{font-size:28px}.finale .diploma{padding:24px 16px}}
@media(max-width:359px){.key-count{display:none}.room-grid{gap:9px}.room-card h3{font-size:17px}.room-card .room-copy{padding:11px}.hero-copy h1{font-size:34px}.reading-card{padding:19px 14px}.token{padding:9px 11px}.prop-button .sprite{--size:110px}.prop-button small{max-width:115px}.hero-facts{gap:15px}.hero-facts b{font-size:18px}.level-link{padding:10px;font-size:14px}}
@media(max-height:500px) and (orientation:landscape){.academy-header{position:relative}.academy-dock button{min-height:46px;flex-direction:row}.intro-hero{min-height:360px}.hero-copy{padding-top:40px}.companion-card{position:static}}
.no-motion *{animation:none!important;transition:none!important;scroll-behavior:auto!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{body{background:white;color:black;padding:0}.academy-header,.academy-dock,.button-row,.reward-scene,.finale>.sprite,.finale>.eyebrow,.finale>.result-text,.finale>h1,.magic-dialog{display:none!important}.finale .diploma{box-shadow:none;break-inside:avoid;border:2px solid #b39754}.reward-page{padding:0;max-width:none}.diploma .sprite{print-color-adjust:exact;-webkit-print-color-adjust:exact}}

.action-card{min-width:0}#screen:focus{outline:none}

@media(min-width:1001px){.brewing-props{gap:64px;min-height:300px}.prop-button .sprite{--size:220px}.prop-button small{font-size:16px;max-width:240px}.action-big{width:330px;height:300px}.action-big .sprite{--size:280px}.stir-spoon .sprite{--size:140px}.rune-board{width:320px;height:290px}.rune-board .rune{font-size:170px}.cast-bottle .sprite{--size:190px}.cast-scene .sprite{--size:150px}}

.sprite.cauldron-leaves,.sprite.cauldron-berries{height:auto;object-fit:contain;background:none}

.reading-card #toggleSyllables[aria-pressed=true]{background:#e5f2e6;border-color:#689875;color:#264e38}

.brewing-props [hidden]{display:none}

@media(max-height:500px) and (orientation:landscape){.worktop{min-height:380px;padding:24px 12px}}

@media(max-height:500px) and (orientation:landscape){.reading-card{min-height:380px}}

/* Fireflies stay still until caught; progress changes their position and the potion glow. */
.firefly-scene{position:relative;width:min(100%,600px);height:370px;isolation:isolate}
.firefly-cauldron{position:absolute;bottom:28px;left:50%;transform:translateX(-50%);width:280px;max-width:85%}
.firefly-cauldron>.sprite{width:100%;filter:drop-shadow(0 0 calc(6px + var(--magic)*30px) #b8fa84);transition:filter .4s}
.firefly-halo{position:absolute;inset:20% 10% 0;border-radius:50%;background:radial-gradient(ellipse,#bbfa8077,transparent 68%);opacity:var(--magic);transition:opacity .4s;pointer-events:none}
.firefly-target{position:absolute;z-index:2;width:68px;height:68px;transform:translate(-50%,-50%);border:1px solid #fff2a577;border-radius:50%;background:#142d36cc;box-shadow:0 0 28px #fff28a55;display:grid;place-items:center;touch-action:manipulation}
.firefly-target[hidden]{display:none}
.firefly-light{width:17px;height:26px;background:#fff6a3;border-radius:50%;box-shadow:0 0 12px 5px #ffdc57,0 0 35px #ffe67e;z-index:1}
.firefly-wings{position:absolute;inset:18px 8px;background:radial-gradient(ellipse at 22% 45%,#d6fff4 0 28%,transparent 32%),radial-gradient(ellipse at 78% 45%,#d6fff4 0 28%,transparent 32%);transform:rotate(-15deg)}
.firefly-stars{position:absolute;bottom:0;left:0;right:0;display:flex;gap:14px;justify-content:center;color:#92a69a;font-size:27px}
.firefly-stars .lit{color:#ffe49c;text-shadow:0 0 15px #ffe386}
.caught-spark{position:absolute;z-index:3;color:#ffed9b;font-size:30px;pointer-events:none;transform:translate(-50%,-50%);animation:firefly-home .65s ease-in forwards}
@keyframes firefly-home{to{left:50%;top:58%;transform:translate(-50%,-50%) scale(.2);opacity:0}}
@media(max-width:700px){.firefly-scene{height:310px}.firefly-cauldron{width:210px}.firefly-target{width:60px;height:60px}}
@media(prefers-reduced-motion:reduce){.firefly-cauldron>.sprite,.firefly-halo{transition:none}}

/* Larger ingredients and cauldrons, bounded by the available workbench width. */
.brewing-props{gap:clamp(8px,4vw,64px)}
.brewing-props>.prop-button{width:min(344px,calc((100% - clamp(8px,4vw,64px))/2));min-width:0}
.brewing-props>.prop-button .sprite{width:100%;max-width:320px}
.brewing-props>.prop-button small{max-width:none}
.brewing-props>#cauldron.received{width:min(100%,384px)}
.brewing-props>#cauldron.received .sprite{max-width:360px}
.firefly-scene{height:460px}
.firefly-cauldron{width:380px}
@media(min-width:1001px){.action-big{width:390px;height:360px}.action-big>.sprite{--size:350px}}
@media(max-width:700px){
  .brewing-props{gap:8px}
  .brewing-props>.prop-button{width:calc((100% - 8px)/2);padding:4px}
  .brewing-props>#cauldron.received{width:min(100%,290px)}
  .action-big{height:260px}
  .action-big>.sprite{--size:230px}
  .firefly-scene{height:360px}
  .firefly-cauldron{width:270px;max-width:92%}
}

.awakening{width:100%;min-height:440px;border-radius:22px;position:relative;isolation:isolate;overflow:hidden;display:grid;align-items:end;padding:100px 24px 30px}
.awakening:before{content:'';position:absolute;inset:0;background:#061e3077;z-index:-1;transition:background 1s}
.awakening.complete:before{background:#061e3010}
.awakening-targets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;width:100%;align-items:end}
.wake-target{position:relative;min-width:0;height:265px;padding:0;border:0;background:transparent;display:flex;flex-direction:column;justify-content:end;align-items:center;border-radius:24px;touch-action:manipulation}
.wake-object{display:grid;place-items:center;width:100%;height:180px;transform:scale(.4);transform-origin:50% 100%;filter:saturate(.25) brightness(.6);transition:transform 1s,filter 1s}
.wake-object .sprite{width:min(100%,180px)}
.wake-target.ready{box-shadow:inset 0 0 0 2px #ffe49b99;background:radial-gradient(ellipse at bottom,#ffe18b33,transparent 70%)}
.wake-target.awake .wake-object{transform:scale(1);filter:drop-shadow(0 0 14px #d4f49177)}
.wake-earth{width:85%;height:18px;border-radius:50%;background:#49351e;box-shadow:0 5px 12px #061c23}
.wake-hint{font-size:26px;color:#ffe39b;height:44px}
.wake-bottle{position:absolute;z-index:3;top:0;left:50%;transform:translateX(-50%) rotate(-35deg);opacity:0;pointer-events:none}
.wake-bottle .sprite{width:90px}
.wake-drops{position:absolute;top:45px;left:50%;z-index:2;color:#c7fff1;line-height:1.1;opacity:0;pointer-events:none}
.just-watered .wake-bottle{animation:water-bottle .8s both}
.just-watered .wake-drops{animation:water-drops .8s both}
@keyframes water-bottle{0%,80%{opacity:1}100%{opacity:0;transform:translateX(-50%) rotate(-55deg)}}
@keyframes water-drops{0%{opacity:0;transform:translateY(-25px)}30%{opacity:1}100%{opacity:0;transform:translateY(65px)}}
.cloud-shape{width:90%;height:65px;border-radius:70px;background:radial-gradient(ellipse at 40% 20%,white,#b7def1);box-shadow:0 0 30px #edfaff66;position:relative}
.cloud-shape:before{content:'';position:absolute;width:55%;height:85px;left:22%;bottom:5px;border-radius:50%;background:inherit}
.room-1 .wake-earth,.room-2 .wake-earth,.room-3 .wake-earth{background:transparent;box-shadow:none}
.room-1 .awake .wake-object{transform:translateY(-55px) scale(1)}
.room-2 .awake .wake-object{transform:translateY(-25px) rotate(-12deg) scale(1)}
.room-3 .wake-object{transform:scale(.7)}
.awakening-path{display:none}
.room-3.complete .awakening-path{display:block;position:absolute;left:16%;right:16%;bottom:163px;height:3px;background:#ffe18b;box-shadow:0 0 20px #ffe18b;z-index:-1}
@media(max-width:700px){.awakening{min-height:350px;padding:75px 8px 18px}.awakening-targets{gap:8px}.wake-target{height:220px}.wake-object{height:125px}.wake-bottle .sprite{width:65px}.wake-bottle{top:15px}.wake-hint{font-size:22px}.cloud-shape{height:35px}.cloud-shape:before{height:45px}.room-3.complete .awakening-path{bottom:121px}}
.no-motion .wake-object,.no-motion .awakening:before{transition:none}
@media(prefers-reduced-motion:reduce){.wake-object,.awakening:before{transition:none}}
.room-2 .wake-object{position:relative}
.room-2 .awake .wake-object:before,.room-2 .awake .wake-object:after{content:'';position:absolute;z-index:1;width:34%;height:58%;top:8%;border:1px solid #d2b784;border-radius:5px;background:repeating-linear-gradient(#fff2cf 0 12px,#bd9b6466 13px,#fff2cf 14px 20px);box-shadow:0 0 15px #ffe6a866}
.room-2 .awake .wake-object:before{left:14%;transform:rotate(-17deg)}
.room-2 .awake .wake-object:after{right:14%;transform:rotate(17deg)}

.sprout-art{display:block;width:min(100%,180px);aspect-ratio:1;background-image:url('../scene/magic/sprouts.webp');background-size:300% 100%;background-repeat:no-repeat;pointer-events:none}.sprout-0{background-position:0% 50%}.sprout-1{background-position:50% 50%}.sprout-2{background-position:100% 50%}

/* Cauldrons remain drop targets without a dashed outline. */
.brewing-props>#cauldron{border:2px solid transparent}

/* Game illustrations have no frames; keyboard focus remains visible. */
.prop-button,.prop-button.selected,.drop-target.over,.drop-target.received,.cast-scene .prop-button{border-color:transparent;box-shadow:none;background:transparent}
.firefly-target{border-color:transparent;background:transparent}
.wake-target.ready{box-shadow:none}

/* One illustrated background for the garden; plants sit on the workbench scene. */
.awakening.room-0{background-image:none}
.awakening.room-0:before{display:none}

.reward-page:not(.finale)>.sprite{--size:300px;max-width:100%}
@media(max-width:700px){.reward-page:not(.finale)>.sprite{--size:240px}}

.book-grid .potion-card .sprite{--size:190px;max-width:100%}
@media(max-width:700px){.book-grid .potion-card .sprite{--size:160px}}

.grinding-scene{width:min(100%,440px);text-align:center}
.grind-area{position:relative;width:min(100%,360px);aspect-ratio:1;margin:auto;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}
.grind-area.rubbing{cursor:grabbing}
.grind-area:focus-visible{outline:3px solid #ebaf50;outline-offset:6px;border-radius:40%}
.grind-area>.mortar-art{width:100%;transform:rotate(var(--rub,0deg));transition:transform .08s}
.grind-ingredient{position:absolute;left:32%;top:47%;width:36%;pointer-events:none;transform:scale(calc(1 - var(--crushed)*.75));opacity:calc(1 - var(--crushed));transition:transform .35s,opacity .35s}
.grind-ingredient>.sprite{width:100%}
.grind-powder{position:absolute;left:24%;top:48%;width:52%;height:22%;pointer-events:none;opacity:var(--crushed);transition:opacity .35s}
.grind-powder i{position:absolute;left:var(--x);top:var(--y);width:9px;height:7px;border-radius:40%;background:#eedb94;box-shadow:0 0 8px #e9de8266;transform:rotate(var(--r))}
.grind-guide{color:#fff0bb;font-size:16px;margin:12px 0 0}
@media(max-width:700px){.grind-area{width:min(100%,280px)}}
.no-motion .grind-area>.mortar-art,.no-motion .grind-ingredient,.no-motion .grind-powder{transition:none}
@media(prefers-reduced-motion:reduce){.grind-area>.mortar-art,.grind-ingredient,.grind-powder{transition:none}}

.sprout-art.sprouts-level-2{background-image:url('../scene/magic/sprouts-level-2.webp')}

.sprite.potion-berries{height:auto;object-fit:contain;background:none}

/* Recipe-specific discoveries and Spark's journey. */
.awakening{background-image:none;padding-bottom:100px}
.awakening:before{display:none}
.scene-dragon{position:absolute;left:2%;bottom:65px;transition:left 1s,bottom 1s,transform 1s;pointer-events:none}
.scene-dragon .sprite{width:90px}
.dragon-cue{position:absolute;bottom:8px;left:8px;right:8px;margin:0;text-align:center;color:#fff6d6;font-size:15px;line-height:1.6;background:#102b32d9;border-radius:16px;padding:12px}
.secret-window{display:none;position:absolute;right:6%;top:14px;width:80px;height:85px;border-radius:45px 45px 0 0;background:radial-gradient(#fff7b5,#729c99);color:#fff4ac;text-align:center;font-size:40px}
.effect-stairs .secret-window{display:block}
.effect-stairs .wake-target:nth-child(2){transform:translateY(-45px)}
.effect-stairs .wake-target:nth-child(3){transform:translateY(-90px)}
.effect-stairs .step-leaf{position:absolute;bottom:0;width:100%;height:60px;transform:scaleX(0);transition:transform 1s}
.effect-stairs .awake .step-leaf{transform:scaleX(1)}
.effect-stairs .sprout-art{width:60%}
.effect-stairs.stage-1 .scene-dragon{left:19%;bottom:115px}
.effect-stairs.stage-2 .scene-dragon{left:49%;bottom:160px}
.effect-stairs.stage-3 .scene-dragon{left:77%;bottom:240px}
.effect-path .awake .wake-object{transform:scale(1) rotate(-20deg)}
.effect-path.stage-1 .scene-dragon,.effect-bridge.stage-1 .scene-dragon{left:22%}
.effect-path.stage-2 .scene-dragon,.effect-bridge.stage-2 .scene-dragon{left:48%}
.effect-path.stage-3 .scene-dragon,.effect-bridge.stage-3 .scene-dragon{left:78%}
.effect-bridge .awake .wake-object{transform:translateY(-25px) scale(1.25)}
.effect-float .cloud-shape{border-radius:50%;height:110px;width:110px;background:radial-gradient(circle at 30% 25%,#fff9,#c0eaff44 45%,#d0f3ff88);border:2px solid #c7efff}
.effect-float .cloud-shape:before{display:none}
.effect-float .awake .wake-object{transform:translateY(-80px) scale(1)}
.magic-lantern{width:95px;height:135px;border:8px solid #b39153;border-radius:45px 45px 14px 14px;background:#16323d;position:relative;display:grid;place-items:center}
.magic-lantern:before{content:'';position:absolute;top:-32px;width:40px;height:28px;border:5px solid #cda55e;border-radius:50%}
.magic-lantern i{width:35px;height:50px;border-radius:50%;background:#a69c68;transition:background .8s,box-shadow .8s}
.awake .magic-lantern i{background:#fff3a0;box-shadow:0 0 40px 20px #ffdc7888}
.effect-lantern.complete .awakening-path,.effect-candle.complete .awakening-path{display:block;position:absolute;left:5%;right:5%;bottom:120px;height:25px;background:linear-gradient(90deg,transparent,#ffe3a0aa,transparent);transform:rotate(-8deg);box-shadow:0 0 40px #ffe094}
.effect-roots .magic-root{font-size:150px;color:#b9a373}
.effect-roots .awake .magic-root{color:#b5e58d;text-shadow:0 0 20px #dbff9b}
.effect-roots.complete .awakening-path{display:block;position:absolute;left:20%;right:20%;height:6px;bottom:180px;background:#aad485;box-shadow:0 0 25px #c4e78d}
.effect-blossom .awake .wake-object{transform:rotate(8deg) scale(1.15)}
.effect-key.complete .secret-window,.effect-seal.complete .secret-window,.effect-bookdoor.complete .secret-window,.effect-moon.complete .secret-window{display:block;width:45%;height:85%;right:28%;top:10px;z-index:-1;background:linear-gradient(90deg,#0a1e29,#f8e2a988,#0a1e29)}
.wind-bell{font-size:110px;color:#eed6a0}
.effect-chime .just-watered .wind-bell{animation:chime-swing .7s ease-in-out 2}
@keyframes chime-swing{25%{transform:rotate(-18deg)}75%{transform:rotate(18deg)}}
.magic-page{display:grid;place-items:center;width:90%;height:140px;background:#f6e9c9;border-radius:8px;box-shadow:inset 0 0 12px #8a683444;transform:rotate(-5deg)}
.magic-page>span{font-size:clamp(10px,1.4vw,20px);font-weight:bold;color:#48546a;opacity:0;transition:opacity 1s}
.awake .magic-page>span{opacity:1}
.effect-pages .awake .wake-object{transform:translateY(-40px) rotate(12deg) scale(1)}
.effect-line .wake-target .wake-object{transform:scale(.9)}
.effect-line .awake .wake-object{transform:scale(1)}
.effect-telescope .wake-object{transform:rotate(-25deg) scale(.7)}
.effect-telescope .awake .wake-object{transform:rotate(0deg) scale(1)}
.effect-orbit .awakening-targets{border-radius:50%;border-bottom:3px solid #d8c58c88}
.effect-orbit .awake .wake-object{transform:translateY(-45px) rotate(35deg) scale(1)}
.effect-spark .awake .wake-object{transform:scale(1.2);filter:drop-shadow(0 0 35px #fff0a6)}
.effect-comet .awake .wake-object:after{content:'';position:absolute;right:55%;top:45%;width:110%;height:16px;background:linear-gradient(90deg,transparent,#ffe8aa);transform:rotate(-25deg);z-index:-1}
.effect-comet.complete .scene-dragon{left:78%;bottom:250px;transform:rotate(-12deg)}
.effect-academy.complete{background:radial-gradient(ellipse,#ffe89855,transparent 70%)}
.effect-academy.complete .wake-object{filter:drop-shadow(0 0 35px #ffe69f)}
.gather-scene{width:min(100%,540px);position:relative;text-align:center;min-height:360px}
.gather-plant{height:220px;opacity:.75;display:grid;place-items:center}
.gather-plant>.sprite{width:230px;max-width:85%}
.gather-items{position:absolute;left:5%;right:5%;top:100px;display:flex;justify-content:space-around;gap:8px}
.gather-item{border:0;background:transparent;padding:6px;border-radius:20px;min-width:0;min-height:60px;width:30%}
.gather-item>.sprite{width:100%;max-width:95px}
.gather-item:disabled{opacity:.55}
.gather-item.gathered{visibility:hidden}
.gather-item:not(:disabled){filter:drop-shadow(0 0 12px #ffe791)}
.gather-basket{font-size:65px;color:#d9b579;min-height:80px;display:flex;justify-content:center;align-items:center}
.gather-basket>span{font-size:20px;color:#fff0bb}
.dragon-mini{display:flex;align-items:center;justify-content:center;gap:12px;font-size:14px;margin:0;color:#e8e8c7}
.dragon-mini>.sprite{width:65px}
.dew-drop{display:inline-block;width:45px;height:60px;border-radius:70% 30% 65% 35%;transform:rotate(-35deg);background:radial-gradient(circle at 40% 30%,#fff,#9ce8ec 25%,#4ea4c4);box-shadow:0 0 20px #b8faff55}
.dew-drop.large{width:90px;height:120px;margin:25px}
.dust-puff{display:inline-block;font-size:70px;color:#d6d2b9;background:radial-gradient(#bac1bbaa,transparent 70%)}
.gather-flower .gather-plant{filter:brightness(.65)}
.brewing-props[hidden]{display:none}
.grind-powder i{background:var(--powder,#eedb94)}
.grinding-scene:has(.grind-area) .grind-powder{background:radial-gradient(ellipse,var(--powder) 15%,transparent 70%);border-radius:50%}
.potion-surface{position:absolute;left:28%;top:30%;width:44%;height:16%;border-radius:50%;background:var(--liquid);opacity:calc(var(--brew,0)*.7);filter:blur(4px);z-index:1;pointer-events:none;transition:opacity .5s}
.bubbling .bubbles{opacity:calc(.15 + var(--brew,0)*.85);transition:opacity .5s}
.bottle-fill{position:absolute;bottom:16%;left:30%;width:40%;height:calc(var(--fill,0)*55%);border-radius:30%;background:var(--liquid);opacity:.4;pointer-events:none;transition:height .4s}
.living-garden{padding:24px;border-radius:24px;margin:24px 0;background:linear-gradient(#142d3999,#142d39dd),url('../scene/magic/workshop.webp') center/cover}
.living-garden>p{font-size:14px}
.garden-keepsakes{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:18px;align-items:end}
.garden-keepsake{display:flex;align-items:center;flex-direction:column;justify-content:end;min-height:150px;position:relative;text-align:center}
.garden-keepsake>.sprite,.garden-keepsake>.sprout-art{width:100px;max-width:100%}
.garden-keepsake>.step-leaf{width:100px;height:40px;margin-top:-25px}
.garden-keepsake>.cloud-shape{width:90px;height:40px;margin-bottom:25px}
.garden-keepsake>.magic-lantern{width:55px;height:75px;margin:20px}.garden-keepsake .magic-lantern i{background:#fff1a5;box-shadow:0 0 30px #ffe9aa}
.garden-keepsake>span:last-child{font-size:12px;margin-top:12px}
.garden-keepsake>.magic-root,.garden-keepsake>.wind-bell{font-size:70px}
.decoration-choice{border:0;margin:22px auto;padding:10px;display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.decoration-choice legend{font-size:16px;margin-bottom:10px}
.decoration-choice button[aria-pressed=true]{background:#9ac9a344;box-shadow:0 0 0 2px #e8c581}
.potion-charm{display:block;font-size:32px;color:#f7da8c;text-shadow:0 0 12px #f7da8c55;text-align:center}
@media(max-width:700px){.awakening{padding-bottom:100px;min-height:450px}.scene-dragon .sprite{width:65px}.secret-window{width:55px;height:60px}.effect-stairs.stage-3 .scene-dragon{bottom:220px}.effect-stairs .wake-target:nth-child(2){transform:translateY(-30px)}.effect-stairs .wake-target:nth-child(3){transform:translateY(-60px)}.magic-lantern{width:55px;height:85px;border-width:5px}.magic-lantern:before{top:-24px;width:25px;height:20px}.magic-lantern i{width:20px;height:30px}.magic-page{height:90px}.effect-float .cloud-shape{width:60px;height:60px}.wind-bell{font-size:70px}.effect-roots .magic-root{font-size:85px}.living-garden{padding:18px 12px}.garden-keepsakes{grid-template-columns:repeat(2,minmax(0,1fr))}.dragon-cue{font-size:13px}.decoration-choice{padding:0;gap:8px}.decoration-choice button{padding:10px 12px;font-size:14px}}
.no-motion .scene-dragon,.no-motion .step-leaf,.no-motion .magic-page>span{transition:none}
@media(prefers-reduced-motion:reduce){.scene-dragon,.step-leaf,.magic-page>span{transition:none}}
.gather-flower .gather-plant>.sprite{transform:scale(calc(.55 + var(--gathered)*.45)) rotate(calc(var(--gathered)*25deg));filter:brightness(calc(.6 + var(--gathered)*.5))}
.gather-crystal .gather-plant>.sprite{filter:brightness(calc(.4 + var(--gathered)*.8)) saturate(calc(.3 + var(--gathered)))}
.gather-dew .gather-basket>.sprite{filter:brightness(calc(.6 + var(--gathered)*.4))}
.gather-plant>.sprout-art{width:230px;max-width:85%}

/* Illustrated pendants are physically attached to the bottle neck. */
.sprite.potion-display{position:relative;display:inline-block;background:none;vertical-align:middle;line-height:0}
.potion-display>.sprite{display:block;width:100%;max-width:100%;height:auto;aspect-ratio:1}
.charm-art{display:inline-block;width:90px;aspect-ratio:1;background:url('../scene/magic/bottle-charms.webp') no-repeat;background-size:300% 100%;vertical-align:middle;pointer-events:none}
.charm-0{background-position:0% 50%}.charm-1{background-position:50% 50%}.charm-2{background-position:100% 50%}
.potion-display>.potion-charm{position:absolute;left:50%;top:39%;width:34%;margin:0;line-height:0;z-index:2;pointer-events:none;filter:drop-shadow(1px 3px 2px #281a1966);transform:translate(-50%,-50%);transform-origin:center;text-shadow:none}
.potion-charm>.charm-art{width:100%;display:block}
.decoration-choice button{flex-direction:column;gap:4px;min-width:100px}
.decoration-choice .charm-art{width:86px}
.garden-keepsake>.potion-charm{width:42px;position:absolute;right:6px;top:35px}
@media(max-width:700px){.decoration-choice{gap:6px}.decoration-choice button{min-width:0;flex:1;padding:8px 5px}.decoration-choice .charm-art{width:clamp(52px,18vw,80px)}}

.decoration-choice{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:min(100%,540px);min-width:0}
.decoration-choice .charm-art{width:100%;max-width:144px}
@media(max-width:700px){.decoration-choice .charm-art{width:100%;max-width:116px}}

.pick-leaf{display:inline-block;width:100%;max-width:105px;aspect-ratio:1;background:url('../scene/magic/pick-leaves.webp') no-repeat;background-size:300% 100%;pointer-events:none;vertical-align:middle}.pick-leaf-0{background-position:0% 50%}.pick-leaf-1{background-position:50% 50%}.pick-leaf-2{background-position:100% 50%}

.tree-grove{width:min(100%,900px);text-align:center}
.tree-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end;margin:24px 0 10px}
.leaf-tree{position:relative;min-width:0;padding:0;border:0;background:transparent;touch-action:manipulation}
.tree-art{display:block;width:100%;aspect-ratio:1;background:url('../scene/magic/leaf-trees.webp') no-repeat;background-size:300% 100%;pointer-events:none}
.tree-0{background-position:0% 50%}.tree-1{background-position:50% 50%}.tree-2{background-position:100% 50%}
.leaf-tree .tree-leaf{position:absolute;left:36%;top:23%;width:30%;filter:drop-shadow(0 0 9px #ffffb1);transform:rotate(-12deg);transition:opacity .15s}
.leaf-tree.picked .tree-leaf{opacity:0}
.leaf-tree:not(:disabled):hover .tree-art{transform:rotate(2deg)}
.leaf-basket{position:relative;margin:12px auto;width:min(280px,90%);aspect-ratio:1640/944;background:url('../scene/magic/leaf-basket.webp') center/100% 100% no-repeat;isolation:isolate}
.leaf-basket::after{content:"";position:absolute;inset:0;background:inherit;clip-path:inset(56% 0 0);pointer-events:none;z-index:2}
.leaf-basket .pick-leaf{position:absolute;top:29%;left:27%;width:23%;max-width:none;filter:drop-shadow(0 2px 3px #18281366);transform:rotate(-22deg);z-index:1}
.leaf-basket .pick-leaf:nth-child(2){left:43%;top:27%;transform:rotate(12deg)}
.leaf-basket .pick-leaf:nth-child(3){left:58%;top:30%;transform:rotate(30deg)}
.flying-leaf{position:fixed;z-index:50;pointer-events:none;max-width:none;transform-origin:center}
@media(max-width:700px){.tree-row{gap:4px;margin-top:20px}.tree-grove>p{font-size:16px}.tree-grove .dragon-mini{font-size:13px}.leaf-tree .tree-leaf{width:36%;left:32%}.leaf-basket{margin-top:26px}}
.no-motion .leaf-tree .tree-leaf{transition:none}

/* Painted fireflies retain a stationary, generous touch target. */
.firefly-target{width:104px;height:104px;border:0;background:transparent;box-shadow:none;padding:0}
.firefly-art{display:block;width:100%;aspect-ratio:1;background:url('../scene/magic/fireflies.webp') no-repeat;background-size:300% 100%;pointer-events:none;filter:drop-shadow(0 0 10px #ffe38666)}
.firefly-art-0{background-position:0% 50%}.firefly-art-1{background-position:50% 50%}.firefly-art-2{background-position:100% 50%}
@media(max-width:700px){.firefly-target{width:82px;height:82px}}

/* Three distinct berries, without a plant behind the collection targets. */
.gather-berries .gather-items{position:relative;left:auto;right:auto;top:auto;align-items:center;min-height:190px;margin:24px 0 12px}
.gather-berries .gather-item{width:32%;padding:4px}
.pick-berry{display:block;width:100%;aspect-ratio:1;background:url('../scene/magic/pick-berries.webp') no-repeat;background-size:300% 100%;pointer-events:none}
.pick-berry-0{background-position:0% 50%}.pick-berry-1{background-position:50% 50%}.pick-berry-2{background-position:100% 50%}
.gather-berries .gather-item:disabled:not(.gathered){opacity:.85}
@media(max-width:700px){.gather-berries .gather-items{min-height:135px;gap:4px}}

/* Illustrated mortar: empty, petals, and finished powder. */
.mortar-picture{display:block;aspect-ratio:1;background-image:url('../scene/magic/mortar-petals.webp');background-size:200% 200%;background-position:0 0;background-repeat:no-repeat;pointer-events:none}
.mortar-picture.mortar-filled{background-position:100% 0}.mortar-picture.mortar-powder{background-position:0 100%}.mortar-picture.mortar-scoop{background-position:100% 100%;width:150px}
.mortar-empty{display:block;border:0;padding:0;background:transparent;color:inherit}
#petalsSource{margin:auto;touch-action:none}#petalsSource.selected{filter:drop-shadow(0 0 12px #ffe791)}
.mortar-empty.over{filter:drop-shadow(0 0 16px #ffe791)}
.grinding-scene:has(#petalsSource){display:grid;grid-template-columns:minmax(80px,1fr) minmax(0,2fr);width:min(100%,620px);align-items:center}
.grinding-scene:has(#petalsSource) .grind-guide{grid-column:1/-1}
#petalsSource .mortar-scoop{width:min(100%,150px);transform:scale(1.3);transform-origin:center bottom}

/* A real illustrated water ladle and clear ornamental arrows. */
.wake-hint{display:grid;place-items:center;min-width:44px;filter:drop-shadow(0 2px 5px #ffd66b77)}
.wake-target.ready .wake-hint::before{content:"";display:block;width:30px;height:34px;background:linear-gradient(135deg,#fff6bc 5%,#f3ce63 48%,#c89132);clip-path:polygon(50% 0,100% 47%,72% 47%,72% 100%,28% 100%,28% 47%,0 47%)}
.water-ladle{display:block;width:140px;max-width:none;height:auto;filter:drop-shadow(0 3px 6px #10251c55)}
.effect-grow .wake-bottle{transform:translateX(-40%) rotate(0deg);top:-8px}
.effect-grow .ready .wake-bottle{opacity:1}
.effect-grow .just-watered .wake-bottle{animation:water-ladle-pour 1s both}
.effect-grow .wake-drops{color:#92e9ff;top:60px;left:42%;text-shadow:0 0 7px #b8ffff}
@keyframes water-ladle-pour{0%{opacity:1;transform:translateX(-40%) rotate(0deg)}35%,70%{opacity:1;transform:translateX(-40%) rotate(-32deg)}100%{opacity:0;transform:translateX(-40%) rotate(-10deg)}}
@media(max-width:700px){.water-ladle{width:94px}.effect-grow .wake-bottle{top:9px}.effect-grow .wake-drops{top:52px}}
.no-motion .effect-grow .just-watered .wake-bottle{animation:none;opacity:0}
@media(prefers-reduced-motion:reduce){.effect-grow .just-watered .wake-bottle{animation:none;opacity:0}}

button.grind-area{display:block;border:0;padding:0;background:transparent;color:inherit;cursor:pointer;touch-action:manipulation}
button.grind-area:disabled{cursor:default;opacity:1}

/* Keep the next action on the illustrated worktop, with space below the scene. */
#worktop{padding-bottom:110px}
#worktop>.action-footer{position:absolute;bottom:24px;left:12px;right:12px;margin:0;z-index:5}
#worktop>.action-footer:empty{display:none}
@media(max-width:700px){#worktop{padding-bottom:100px}#worktop>.action-footer{bottom:18px}}

/* Broad leaf steps and a dragon that lands on each platform. */
.effect-stairs{min-height:470px;padding:0}
.effect-stairs .awakening-targets{position:absolute;inset:0;display:block}
.effect-stairs .wake-target{position:absolute;width:24%;height:110px;left:10%;bottom:90px;transform:none}
.effect-stairs .wake-target:nth-child(2){left:40%;bottom:170px;transform:none}
.effect-stairs .wake-target:nth-child(3){left:70%;bottom:250px;transform:none}
.effect-stairs .wake-object,.effect-stairs .awake .wake-object{width:100%;height:85px;transform:none;filter:none}
.effect-stairs .stair-leaf{width:100%;max-width:145px;transform:rotate(65deg) scaleY(.65);filter:drop-shadow(0 6px 6px #08291e88)}
.effect-stairs .waiting .wake-object{opacity:.6}
.effect-stairs .ready .wake-object{filter:drop-shadow(0 0 12px #f5df86)}
.effect-stairs .wake-bottle,.effect-stairs .wake-drops,.effect-stairs .wake-earth{display:none}
.effect-stairs .wake-hint{height:25px}
.effect-stairs .scene-dragon{left:0;bottom:65px;transition:none;z-index:4}
.effect-stairs.stage-1 .scene-dragon{left:calc(22% - 45px);bottom:155px}
.effect-stairs.stage-2 .scene-dragon{left:calc(52% - 45px);bottom:235px}
.effect-stairs.stage-3 .scene-dragon{left:calc(82% - 45px);bottom:315px}
.effect-stairs .secret-window{right:6%;top:18px}
@media(max-width:700px){.effect-stairs .scene-dragon .sprite{width:65px}.effect-stairs.stage-1 .scene-dragon{left:calc(22% - 32px);bottom:150px}.effect-stairs.stage-2 .scene-dragon{left:calc(52% - 32px);bottom:230px}.effect-stairs.stage-3 .scene-dragon{left:calc(82% - 32px);bottom:310px}}

/* Spark disappears into the illustrated window after the last leaf. */
.effect-stairs .secret-window{width:110px;height:165px;right:3%;top:0;background:none;border-radius:0;font-size:0;pointer-events:none}
.effect-stairs .secret-window img{display:block;width:100%;height:100%;object-fit:contain}
.effect-stairs.portal-entered .scene-dragon{visibility:hidden}
.effect-stairs.portal-entered .secret-window{filter:drop-shadow(0 0 14px #a8f3ec88)}
#actionFooter>[hidden]{display:none}
@media(max-width:700px){.effect-stairs .secret-window{width:85px;height:128px;right:1%;top:8px}}

/* Leave a distinct final jump between the top leaf and the window. */
.effect-stairs{min-height:600px}
.effect-stairs .secret-window{display:block;width:150px;height:225px;top:8px;right:1%;z-index:2;filter:drop-shadow(0 0 12px #9bf3e566)}
.effect-stairs .scene-dragon{z-index:4}
@media(max-width:700px){.effect-stairs{min-height:550px}.effect-stairs .secret-window{width:112px;height:168px;top:8px;right:0}}

.charm-art.charms-level-2{background-image:url('../scene/magic/bottle-charms-level-2.webp')}

/* Align the level-two pendants with the berry bottle neck. */


.flower-search{width:min(100%,1000px)}
.flower-count{text-align:center;color:#fff1cc;font-weight:bold}
.flower-search-picture{position:relative;aspect-ratio:3/2;min-height:310px;border-radius:18px;background:url('../scene/magic/flower-search.webp') center/cover;overflow:hidden}
.hidden-flower{position:absolute;width:clamp(48px,10%,100px);aspect-ratio:1;min-height:48px;border:0;padding:0;background:none;transform:translate(-50%,-50%);border-radius:50%;touch-action:manipulation}
.hidden-flower>.sprite{display:block;width:100%;height:auto;aspect-ratio:1;transform:rotate(var(--flower-turn));pointer-events:none;filter:drop-shadow(0 2px 3px #20301b77)}
.hidden-flower .flower-check{display:none}
.hidden-flower.found{opacity:1}
.hidden-flower.found>.sprite{opacity:.3}
.hidden-flower.found .flower-check{display:grid;place-items:center;position:absolute;inset:20%;border-radius:50%;background:#fff8df;color:#276940;font-size:25px;font-weight:bold;box-shadow:0 2px 6px #17332388}
.hidden-flower:focus-visible{outline:3px solid #fff2a6;outline-offset:3px}

/* Each academy room opens its own six-stop recipe trail. */
.room-route{display:block;scroll-margin-top:100px;background:radial-gradient(ellipse at top,#33564a88,transparent 65%),#102b32}
.route-heading{text-align:center;padding:30px 20px 8px;max-width:720px;margin:auto}
.route-heading h2{margin:0 0 12px;font-size:32px;color:#ffe5ab}
.route-heading p{color:#d5e1d0;margin:8px 0;line-height:1.6}
.route-count{display:inline-block;margin-top:12px;padding:6px 15px;border-radius:20px;background:#a3d7ad1c;color:#ffe5ab;font-size:14px}
.route-heading .route-locked{font-size:14px;color:#e5c89a}
.recipe-trail{position:relative;width:min(100%,600px);height:860px;margin:0 auto 25px}
.trail-line{position:absolute;inset:0;width:100%;height:840px;pointer-events:none;overflow:visible}
.trail-line path{fill:none;stroke:#a1c4a457;stroke-width:9;stroke-dasharray:3 19;stroke-linecap:round;vector-effect:non-scaling-stroke}
.recipe-stops{list-style:none;margin:0;padding:0}
.recipe-stop{position:absolute;left:var(--stop-x);top:var(--stop-y);width:0;height:0;text-align:center}
.recipe-node{position:absolute;left:-39px;top:-39px;width:78px;height:78px;min-height:0;border-radius:50%;border:3px solid #aac3ad;background:linear-gradient(145deg,#537464,#2d4a40);color:#e4efdf;box-shadow:0 6px 0 #152b24,0 10px 20px #0003;display:grid;place-items:center;padding:0}
.recipe-node-number{font-size:25px;font-weight:bold}
.recipe-node-state{position:absolute;right:-3px;bottom:-5px;display:grid;place-items:center;width:26px;height:26px;font-size:15px;border-radius:50%;background:#273f36;color:#dbe6d5;border:2px solid #9caf94}
.recipe-node.current{background:linear-gradient(140deg,#ffecb2,#dca64d);border-color:#fff3c9;color:#344a32;box-shadow:0 6px 0 #97712e,0 0 0 7px #ffd67c1f,0 0 30px #ffd67c33}
.recipe-node.done{background:linear-gradient(145deg,#a7df9f,#509d78);border-color:#ccedbb;color:#173f2f}
.recipe-node.done .recipe-node-state{background:#ddf5cb;color:#286740}
.recipe-node:disabled{opacity:.65;cursor:default}
.recipe-node:not(:disabled):hover{filter:brightness(1.1)}
.recipe-node:focus-visible{outline:3px solid #fff2a6;outline-offset:8px}
.recipe-stop-title{position:absolute;top:48px;left:50%;transform:translateX(-50%);width:180px;max-width:34vw;font-size:14px;line-height:1.4;color:#e4e8d3;text-shadow:0 2px 3px #102b32;background:#102b32e8;border-radius:10px;padding:4px 7px;pointer-events:none}
@media(max-width:700px){.route-heading{padding:24px 12px 8px}.route-heading h2{font-size:27px}.route-heading p{font-size:14px}.recipe-node{width:68px;height:68px;left:-34px;top:-34px}.recipe-stop-title{font-size:12px;top:44px;max-width:36vw}.room-route{scroll-margin-top:80px}}

/* Quiet room illustrations leave space for future map decorations. */
.room-trail-scene{position:relative;isolation:isolate;width:100%;background-position:center;background-size:cover;background-repeat:no-repeat;border-radius:0 0 23px 23px;overflow:hidden}
.trail-room-0{background-image:url('../scene/magic/route-greenhouse.webp')}
.trail-room-1{background-image:url('../scene/magic/route-laboratory.webp')}
.trail-room-2{background-image:url('../scene/magic/route-library.webp')}
.trail-room-3{background-image:url('../scene/magic/route-observatory.webp')}
.room-trail-scene .recipe-trail{margin:20px auto 35px}
.room-trail-scene .trail-line path{stroke:#f5e5b7a8;stroke-width:8;filter:drop-shadow(0 2px 2px #102d2aaa)}
.room-trail-scene .recipe-node:disabled{opacity:1;background:linear-gradient(145deg,#526459,#34493f);border-color:#97a995;color:#d4decd}
.room-trail-scene .recipe-stop-title{background:#102b32ed;box-shadow:0 2px 7px #0a211f44}
@media(max-width:700px){.room-trail-scene{background-size:100% 100%}}

#worktop.ingredient-worktop{background:#102b32}

/* Gently mark the level the child can return to. */
.recipe-node.current:not(:disabled){animation:recipe-current-pulse 2.4s ease-in-out infinite}
@keyframes recipe-current-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.08);box-shadow:0 6px 0 #97712e,0 0 0 11px #ffd67c22,0 0 35px #ffd67c55}}
.no-motion .recipe-node.current{animation:none}
@media(prefers-reduced-motion:reduce){.recipe-node.current{animation:none}}

/* Illustrated greenhouse objects sit outside the level trail. */
.greenhouse-map-decor{position:absolute;inset:0;pointer-events:none}
.greenhouse-decoration{position:absolute;display:block;width:26%;aspect-ratio:1;background-image:url('../scene/magic/greenhouse-decor.webp');background-size:200% 200%;background-repeat:no-repeat;filter:drop-shadow(0 7px 7px #16332566)}
.greenhouse-decoration-0{right:0;top:20px;background-position:0 0}
.greenhouse-decoration-1{left:0;top:225px;background-position:100% 0;transform:rotate(-8deg)}
.greenhouse-decoration-2{right:0;top:370px;background-position:0 100%}
.greenhouse-decoration-3{left:0;top:730px;background-position:100% 100%;clip-path:inset(0 0 0 12%)}

.greenhouse-fox{position:absolute;left:0;top:480px;width:26%;height:auto;pointer-events:none;filter:drop-shadow(0 7px 7px #16332566)}
@media(max-width:700px){.greenhouse-decoration-1{top:180px}.greenhouse-decoration-2{top:330px}}

/* Five word-matching rounds on illustrated acorns. */
.task-layout:has(.acorn-card){grid-template-columns:minmax(0,1fr)}
.acorn-card{min-width:0}
.acorn-scene{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;align-items:center;min-height:640px;border-radius:26px;padding:20px 25px;background:url('../scene/magic/acorn-greenhouse.webp') center/cover}
.acorn-round{align-self:flex-end;margin:0 0 8px;padding:8px 16px;background:#fff6dfed;border-radius:18px;color:#354d30;font-size:15px;font-weight:bold}
.acorn-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:start;gap:12px;width:min(100%,950px);position:relative;z-index:2}
.word-acorn{position:relative;display:block;min-width:0;width:100%;max-width:170px;margin:auto;padding:0;border:0;background:none;aspect-ratio:1144/1360;cursor:pointer;touch-action:manipulation;border-radius:40%}
.word-acorn img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.acorn-word{position:absolute;left:15%;right:15%;top:54%;height:21%;display:flex;justify-content:center;align-items:center;white-space:nowrap;color:#263c29;font-size:clamp(19px,2.5vw,32px);font-weight:bold;line-height:1.2;pointer-events:none}
.word-acorn:disabled{opacity:1;cursor:default}
.word-acorn:focus-visible{outline:3px solid #fff7cb;outline-offset:3px;filter:drop-shadow(0 0 7px #245638)}
.word-acorn.acorn-wrong{filter:drop-shadow(0 0 8px #b96227)}
.acorn-friends{position:relative;width:min(70%,650px);margin:15px auto 0}
.acorn-friends>img{display:block;width:100%;height:auto}
.basket-word{position:absolute;left:33%;width:34%;top:59%;height:17%;display:flex;justify-content:center;align-items:center;font-size:clamp(23px,3vw,36px);font-weight:bold;color:#263c29;line-height:1.2}
.acorn-scene>.feedback{margin:0;min-height:44px;padding:8px 14px;border-radius:12px;background:#fff5dfeb;color:#365233;text-align:center}
.acorn-scene>.feedback:empty{visibility:hidden}
.acorn-flying{position:fixed;z-index:100;pointer-events:none;max-width:none;margin:0}
@media(max-width:700px){.acorn-scene{padding:12px 8px;min-height:560px;background-position:center}.acorn-choices{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;max-width:430px}.word-acorn{grid-column:span 2;max-width:110px}.word-acorn:nth-child(4){grid-column:2/span 2}.word-acorn:nth-child(5){grid-column:4/span 2}.acorn-word{font-size:calc(var(--reading)*.95)}.acorn-friends{width:100%;max-width:420px;margin-top:10px}.basket-word{font-size:calc(var(--reading)*1.1)}.acorn-round{font-size:13px}.acorn-scene>.feedback{font-size:14px}}

/* A silver scratch layer covers the word, on the same greenhouse background. */
.task-layout:has(.scratch-game){grid-template-columns:minmax(0,1fr)}
.scratch-game{min-width:0}
.scratch-scene{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;min-height:600px;padding:45px 24px;border-radius:26px;background:url('../scene/magic/acorn-greenhouse.webp') center/cover}
.scratch-card{position:relative;width:min(100%,620px);aspect-ratio:5/3;border:12px solid #f4e1b0;border-radius:22px;box-shadow:0 12px 35px #17322a66;background:radial-gradient(ellipse,#fffdf1,#efdcad);overflow:hidden}
.scratch-word{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:.025em;font-size:clamp(40px,8vw,85px);font-weight:bold;letter-spacing:.05em;color:#294831;line-height:1.3}
#scratchCanvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair;user-select:none}
.scratch-card:has(#scratchCanvas:focus-visible){outline:4px solid #f7cd6d;outline-offset:5px}
.scratch-scene>.feedback{background:#fff8e7ed;padding:12px 18px;border-radius:14px;text-align:center;color:#304c34;margin:0;max-width:600px}
@media(max-width:700px){.scratch-scene{min-height:480px;padding:30px 12px;gap:22px}.scratch-card{border-width:8px;aspect-ratio:5/3}.scratch-scene>.feedback{font-size:16px}.scratch-word{font-size:clamp(36px,11vw,65px)}}

.scratch-scene>.feedback:empty{display:none}

/* The sleeping sprout reading task belongs inside the greenhouse. */
.task-layout:has(.sprout-story-scene){grid-template-columns:minmax(0,1fr)}
.sprout-story-scene{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(0,1.3fr);align-items:center;gap:30px;padding:48px 36px;min-height:650px;border-radius:28px;background:linear-gradient(#153b251a,#13312244),url('../scene/magic/acorn-greenhouse.webp') center/cover;overflow:hidden}
.sprout-story-art{display:flex;flex-direction:column;align-items:center;justify-content:center;filter:drop-shadow(0 8px 12px #16332355)}
.sprout-story-art>.sprout-art{width:min(100%,300px);filter:drop-shadow(0 0 25px #f5e99777)}
.sprout-story-art>.sprite{width:120px;align-self:flex-end;margin-top:-25px}
.sprout-story-scene .sprout-story-card{min-height:0;padding:30px;background:linear-gradient(120deg,#fff8e9f5,#f8efdceF);box-shadow:0 15px 35px #14352655;border-radius:25px}
.sprout-story-card .story-text{font-size:1em;line-height:1.8}
@media(max-width:700px){.sprout-story-scene{grid-template-columns:minmax(0,1fr);gap:8px;padding:22px 12px}.sprout-story-art{height:155px;flex-direction:row}.sprout-story-art>.sprout-art{width:170px}.sprout-story-art>.sprite{width:80px;margin:0 0 5px -25px}.sprout-story-scene .sprout-story-card{padding:22px 16px}.sprout-story-card .answer{padding:14px}}
/* Place the sprout on the greenhouse floor. */
.sprout-story-art{position:relative;align-self:end;flex-direction:row;align-items:flex-end;justify-content:center;padding-bottom:0;isolation:isolate}
.sprout-story-art::before{content:'';position:absolute;left:12%;right:12%;bottom:2%;height:22px;background:radial-gradient(ellipse,#233b2377,transparent 70%);z-index:-1}
.sprout-story-art>.sprout-art{width:min(75%,260px);flex-shrink:0;filter:drop-shadow(0 3px 4px #20372066)}
.sprout-story-art>.sprite{width:90px;align-self:flex-end;margin:0 0 0 -22px}
@media(max-width:700px){.sprout-story-art{grid-row:2;height:180px;width:100%;margin-top:12px}.sprout-story-art>.sprout-art{width:180px}.sprout-story-art>.sprite{width:80px;margin:0 0 0 -20px}.sprout-story-scene .sprout-story-card{grid-row:1}.sprout-story-scene{padding-bottom:12px}}
/* The three seedlings in the watering game grow in illustrated pots. */
.effect-grow .sprout-art{background-image:url('../scene/magic/potted-sprouts.webp')}
.effect-grow .wake-earth{background:transparent;box-shadow:none}

/* Feed three readable words to a playful plant in the observatory. */
.task-layout:has(.feeding-game){grid-template-columns:minmax(0,1fr)}
.feeding-game{min-width:0}
.feeding-scene{padding:40px 28px;min-height:600px;border-radius:26px;display:flex;flex-direction:column;justify-content:center;background:linear-gradient(#0e293220,#0c233342),url('../scene/magic/route-observatory.webp') center/cover}
.feeding-stage{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);align-items:center;gap:30px;max-width:900px;width:100%;margin:auto}
.hungry-plant{position:relative;display:block;width:100%;aspect-ratio:1;background:url('../scene/magic/feeding-plant.webp') 0 50%/300% 100% no-repeat;filter:drop-shadow(0 10px 12px #08221966)}
.hungry-plant.chewing{background-position:50% 50%}.hungry-plant.satisfied{background-position:100% 50%}
.hungry-plant.over{filter:drop-shadow(0 0 20px #ffe29c)}
.plant-mouth{position:absolute;left:32%;top:20%;width:35%;height:22%}
.plant-food{display:flex;flex-direction:column;align-items:center;gap:24px;min-height:250px;justify-content:center}
.food-word{padding:16px 25px;min-width:160px;min-height:60px;border:2px solid #ecd094;border-radius:18px;background:linear-gradient(130deg,#fff6dc,#efdaa3);color:#294633;font-size:calc(var(--reading) + 7px);font-weight:bold;box-shadow:0 5px 0 #927247,0 8px 18px #08233344;touch-action:none;user-select:none;cursor:grab}
.food-word:focus-visible{outline:3px solid #fff9cd;outline-offset:5px}
.food-word[hidden]{display:none}.food-flying{position:fixed;z-index:100;pointer-events:none;margin:0;min-width:0;opacity:1}
.feeding-scene>.feedback{margin:24px auto 0;text-align:center;background:#fff5dded;color:#294633;border-radius:14px;padding:12px 18px;max-width:600px}
.feeding-scene>.feedback:empty{visibility:hidden}
@media(max-width:700px){.feeding-scene{padding:30px 10px;min-height:500px}.feeding-stage{gap:8px;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}.food-word{min-width:0;width:100%;padding:12px 5px;font-size:calc(var(--reading) + 1px);min-height:55px}.plant-food{gap:20px}.feeding-scene>.feedback{font-size:15px}}

/* Catch ten distinct gently flying letters to name the pictured berry. */
.task-layout:has(.letter-catch-game){grid-template-columns:minmax(0,1fr)}
.letter-catch-game{min-width:0}
.letter-catch-scene{display:flex;flex-direction:column;align-items:center;min-height:640px;padding:28px 24px;border-radius:26px;background:linear-gradient(#102d4220,#13243655),url('../scene/magic/route-observatory.webp') center/cover;overflow:hidden}
.letter-picture{width:160px;background:radial-gradient(ellipse,#fff1b94d,transparent 70%);filter:drop-shadow(0 5px 10px #0a223855)}
.caught-word{display:flex;justify-content:center;gap:8px;width:100%;margin:18px 0}
.caught-slot{width:58px;height:62px;display:grid;place-items:center;border:2px solid #ddc48e;border-radius:13px;background:#fff5dfed;color:#2e4636;font-size:32px;font-weight:bold;box-shadow:0 4px 0 #715c39}
.caught-slot.filled{background:#eaf5cf;border-color:#b5d190}
.flying-letter-field{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;width:min(100%,830px);padding:18px 8px;margin-top:14px}
.letter-flight-lane{height:104px;display:grid;place-items:center;min-width:0}
.flying-letter{width:68px;height:68px;min-width:44px;min-height:44px;display:grid;place-items:center;padding:0;border:2px solid #f4dda7;border-radius:50%;background:radial-gradient(circle at 35% 25%,#fff7d8,#e2b869);color:#273f37;font-size:34px;font-weight:bold;box-shadow:0 5px 15px #051b3f88,0 0 18px #a9def544;animation:letter-drift var(--duration,5s) ease-in-out var(--delay,0s) infinite;touch-action:manipulation}
.flying-letter:hover,.flying-letter:focus-visible{animation-play-state:paused;outline:3px solid #e1f9ff;outline-offset:3px}
.flying-letter:disabled{animation:none;opacity:.7}
@keyframes letter-drift{0%,100%{transform:translate(-6px,10px) rotate(-6deg)}50%{transform:translate(6px,-14px) rotate(6deg)}}
.caught-letter-flight{position:fixed;z-index:100;pointer-events:none;animation:none!important;margin:0;opacity:1!important}
.letter-catch-scene>.feedback{padding:10px 15px;border-radius:12px;background:#fff5ddeb;color:#294631;text-align:center;margin:10px 0 0}
.letter-catch-scene>.feedback:empty{visibility:hidden}
.no-motion .flying-letter{animation:none}
@media(prefers-reduced-motion:reduce){.flying-letter{animation:none}}
@media(max-width:700px){.letter-catch-scene{padding:22px 10px;min-height:570px}.letter-picture{width:135px}.caught-word{gap:5px}.caught-slot{width:36px;height:46px;font-size:25px}.flying-letter-field{gap:4px;padding:16px 0}.flying-letter{width:44px;height:48px;font-size:27px}.letter-flight-lane{height:90px}.letter-catch-scene>.feedback{font-size:14px}}

.letter-picture>.pick-leaf,.letter-picture>.sprite{width:100%;max-width:none}

/* Observatory backdrop for the leaf-staircase reading clue. */
.task-layout.observatory-reading{padding:42px 32px;min-height:650px;border-radius:28px;background:linear-gradient(#0e263529,#102a384d),url('../scene/magic/route-observatory.webp') center/cover;align-items:center}
.observatory-reading .reading-card{min-height:0;background:linear-gradient(110deg,#fff9eaf7,#f5e9d0f5)}
.observatory-reading .companion-card{position:static;background:#153440d9}
@media(max-width:700px){.task-layout.observatory-reading{padding:25px 12px;gap:20px}.observatory-reading .reading-card{padding:22px 16px}}

/* Two playable rooms: greenhouse and observatory. */
.room-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
