/* Supplied Word Garden motion, integrated below. Seed travel and petal fall
   are bounded to the real card; the tap wiggle finishes in 280 milliseconds. */
@keyframes wg-pop{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes wg-pop-up{from{transform:scale(.2,0)}60%{transform:scale(1.08,1.12)}to{transform:scale(1)}}
@keyframes wg-seed{0%{transform:translateY(-115px);opacity:1}85%{transform:translateY(0);opacity:1}100%{transform:translateY(0);opacity:0}}
@keyframes wg-squash{0%{transform:scale(1)}40%{transform:scale(1.12,.7)}100%{transform:scale(1)}}
@keyframes wg-grow{from{transform:scale(.3,0)}to{transform:scale(1)}}
@keyframes wg-unfold{from{transform:rotate(60deg) scale(.2)}to{transform:none}}
@keyframes wg-unfold-r{from{transform:rotate(-60deg) scale(.2)}to{transform:none}}
@keyframes wg-burst{0%{transform:translate(0,0) scale(.3) rotate(0);opacity:0}15%{opacity:1}100%{transform:translate(var(--dx),var(--dy)) scale(1) rotate(220deg);opacity:0}}
@keyframes wg-dot{from{background:#FFFFFF;box-shadow:0 0 0 4px #F5B83D inset;transform:scale(1)}50%{transform:scale(1.35)}to{background:#2B6E39;box-shadow:none;transform:scale(1)}}
@keyframes wg-fly{from{offset-distance:0%}to{offset-distance:100%}}
@keyframes wg-flap{from{transform:scaleX(1)}to{transform:scaleX(.3)}}
@keyframes wg-rest{from{transform:scaleX(1)}to{transform:scaleX(.7)}}
@keyframes wg-drop{from{transform:translateY(-130px)}to{transform:none}}
@keyframes wg-swing{from{transform:rotate(-1deg)}to{transform:rotate(1deg)}}
@keyframes wg-fall{0%{transform:translate(0,0) rotate(0);opacity:0}8%{opacity:1}50%{transform:translate(var(--sway),240px) rotate(200deg)}90%{opacity:.9}100%{transform:translate(0,440px) rotate(400deg);opacity:0}}
@keyframes wg-bob{from{transform:translateY(-6px) rotate(-4deg)}to{transform:translateY(6px) rotate(4deg)}}
@keyframes wg-ring{from{transform:scale(1);opacity:.8}to{transform:scale(1.7);opacity:0}}
@keyframes wg-wiggle{0%,100%{transform:rotate(0)}20%{transform:rotate(-9deg)}40%{transform:rotate(8deg)}65%{transform:rotate(-5deg)}85%{transform:rotate(3deg)}}
@keyframes wg-nudge{0%,100%{transform:scale(1)}50%{transform:scale(1.1)}}
@keyframes wg-drift{0%,100%{transform:translate(0,0)}25%{transform:translate(-10px,-5px)}50%{transform:translate(14px,0)}75%{transform:translate(4px,5px)}}


/* Reduced motion: every animated element must look finished without its animation. */
@media (prefers-reduced-motion: reduce){.wg-motion,.wg-motion *{animation:none!important}}

/* Integrations: these base styles are the completed, reduced-motion state. */
.wg-motion{position:relative}
.wg-success{width:180px;max-width:100%;height:144px;margin:0 auto 8px;isolation:isolate;pointer-events:none}
.wg-success-art{display:block;width:100%;height:100%;overflow:visible}
.wg-seed{opacity:0;transform:translateY(0)}
.wg-soil{transform-origin:100px 140px}
.wg-sprout{transform-origin:100px 140px}
.wg-leaf-left{transform-origin:100px 112px}
.wg-leaf-right{transform-origin:100px 95px}
.wg-petals{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:2}
.wg-success .wg-petals{overflow:visible}
.wg-petal{position:absolute;display:block;width:8px;height:13px;border-radius:60% 15% 60% 15%;opacity:0;background:#E86F51}
.wg-petal-1{background:#F5B83D}.wg-petal-2{background:#8CC152}.wg-petal-3{background:#8E6CC9}
.wg-bursting>.wg-petal{left:50%;top:58%}
.wg-falling>.wg-petal{left:var(--petal-left);top:0}
.wg-celebration .celebration-bed{position:relative;isolation:isolate;overflow:visible}
.wg-celebration .celebration-bed>.garden-art-plant{transform-origin:center bottom}
.wg-flight-wrap{display:block;flex-shrink:0;width:100px;height:88px;position:relative}
.wg-flyer{position:absolute;inset:0;display:block;width:100%;height:100%}.wg-flight-wrap .garden-visitor{width:100%;height:100%;transform-origin:center}
.wg-celebration .celebration-visitor>.wg-flight-wrap{animation:none}
.wg-celebration .celebration-bunting{transform-origin:center top}
.wg-growth-flower{position:relative;display:inline-flex;flex-shrink:0}
.wg-growth-flower>.wg-petals{overflow:visible}
.wg-growth-flower>.garden-art-plant{width:80px;height:96px}
.wg-growth-flower .wg-petal{width:6px;height:10px}
.wg-celebration .extra-actions{position:relative;z-index:3}
/* Only the actual playback state puts rings on screen. No class, no rings. */
.audio-main .speaker-disc,.book-speaker,.instruction-sound,.sentence-trigger{position:relative;isolation:isolate}
.audio-main.playing .speaker-disc:before,.audio-main.playing .speaker-disc:after,
.book-speaker.playing:before,.book-speaker.playing:after,
.instruction-sound.playing:before,.instruction-sound.playing:after,
.sentence-trigger.playing:before,.sentence-trigger.playing:after{content:'';position:absolute;inset:2px;border:2px solid #8CC152;border-radius:inherit;pointer-events:none;opacity:0;z-index:-1}
.audio-main.playing .speaker-disc:before,.audio-main.playing .speaker-disc:after{border-radius:50%}
@media(max-width:600px){.wg-flight-wrap{width:70px;height:70px}}

@media(prefers-reduced-motion:no-preference){
 .wg-success .wg-seed{animation:wg-seed .5s ease-in both}
 .wg-success .wg-soil{animation:wg-squash .3s .45s ease-out both}
 .wg-success .wg-sprout{animation:wg-grow .5s .55s cubic-bezier(.2,.8,.2,1) backwards}
 .wg-success .wg-leaf-left{animation:wg-unfold .45s 1s ease-out backwards}
 .wg-success .wg-leaf-right{animation:wg-unfold-r .45s 1s ease-out backwards}
 .wg-bursting>.wg-petal{animation:wg-burst .9s var(--petal-delay,.95s) ease-out both}
 .feedback-success.wg-motion h1{animation:wg-pop .3s .7s ease-out backwards}
 .path-dot.right.celebrate{animation:wg-dot .35s .5s ease-out backwards}
 .wg-celebration h1{animation:wg-pop .35s ease-out both}
 .wg-celebration .celebration-bed>.garden-art-plant:not(.plant-empty){animation:wg-pop-up .55s ease-out backwards}
 .wg-celebration .celebration-bed>.garden-art-plant:nth-child(1){animation-delay:.18s}.wg-celebration .celebration-bed>.garden-art-plant:nth-child(2){animation-delay:.32s}.wg-celebration .celebration-bed>.garden-art-plant:nth-child(3){animation-delay:.46s}.wg-celebration .celebration-bed>.garden-art-plant:nth-child(4){animation-delay:.6s}.wg-celebration .celebration-bed>.garden-art-plant:nth-child(5){animation-delay:.74s}.wg-celebration .celebration-bed>.garden-art-plant:nth-child(6){animation-delay:.88s}.wg-celebration .celebration-bed>.garden-art-plant:nth-child(7){animation-delay:1.02s}.wg-celebration .celebration-bed>.garden-art-plant:nth-child(8){animation-delay:1.16s}.wg-celebration .celebration-bed>.garden-art-plant:nth-child(9){animation-delay:1.3s}.wg-celebration .celebration-bed>.garden-art-plant:nth-child(10){animation-delay:1.44s}
 .wg-celebration.is-full .celebration-bed>.garden-art-plant{animation-delay:calc(.15s + var(--plant-order,0)*.07s)}
 .wg-celebration .celebration-bunting{animation:wg-drop .6s cubic-bezier(.2,.8,.2,1.15) both,wg-swing 1.2s .6s ease-in-out alternate 2}
 .wg-celebration.is-full .wg-falling>.wg-petal{animation:wg-fall var(--petal-duration,2.6s) var(--petal-delay,.4s) ease-in-out both}
 .wg-celebration.is-full .wg-flight-wrap .garden-visitor{animation:wg-bob 1.3s ease-in-out alternate 3}
 .wg-celebration:not(.is-full) .wg-flight-wrap .garden-visitor{animation:wg-flap .16s .7s linear alternate 14,wg-rest .8s 2.94s ease-in-out alternate 2}
 .kid-garden .bed-butterfly{animation:wg-drift 8s ease-in-out 2}
 .garden-level .wg-tapped{animation:wg-wiggle .28s ease-out both;transform-origin:center bottom}
 .audio-main.playing .speaker-disc:before,.book-speaker.playing:before,.instruction-sound.playing:before,.sentence-trigger.playing:before{animation:wg-ring 1.2s ease-out infinite}
 .audio-main.playing .speaker-disc:after,.book-speaker.playing:after,.instruction-sound.playing:after,.sentence-trigger.playing:after{animation:wg-ring 1.2s .6s ease-out infinite}
 .letter-grid>.letter-row-label:first-child~.letter-missing{animation:wg-nudge .35s ease-in-out 2}
 .letter-grid>.letter-row-label:nth-of-type(2)~.letter-missing{animation:none}
 .growth-recap .earned-growth{animation:wg-pop-up .5s .2s ease-out backwards}
 .growth-recap .growth-row:nth-child(2) .earned-growth{animation-delay:.4s}.growth-recap .growth-row:nth-child(3) .earned-growth{animation-delay:.6s}
}
/* Flight always ends at the card's own position; without path support the
   butterfly is already landed and its content is still visible. */
@supports(offset-path:path('M 0 0 L 1 1')){
 .wg-celebration:not(.is-full) .wg-flyer{offset-path:path('M -20 -66 C 160 -141 200 9 95 26 S 35 62 50 44');offset-distance:100%;offset-rotate:0deg;offset-anchor:50% 50%}
 @media(max-width:600px){.wg-celebration:not(.is-full) .wg-flyer{offset-path:path('M -35 -75 C 145 -150 185 0 80 17 S 20 53 35 35')}}
 @media(prefers-reduced-motion:no-preference){.wg-celebration:not(.is-full) .wg-flyer{animation:wg-fly 2.2s .7s cubic-bezier(.25,.6,.4,1) backwards}}
}
.wg-motion-finished,.wg-motion-finished *,.wg-motion-finished *:before,.wg-motion-finished *:after,
body.reduce-motion .wg-motion,body.reduce-motion .wg-motion *,body.reduce-motion .wg-motion *:before,body.reduce-motion .wg-motion *:after{animation:none!important;transition:none!important}
body.reduce-motion .bed-butterfly,body.reduce-motion .playing:before,body.reduce-motion .playing:after,body.reduce-motion .playing .speaker-disc:before,body.reduce-motion .playing .speaker-disc:after,body.reduce-motion .wg-tapped{animation:none!important}
@media(prefers-reduced-motion:reduce){.wg-motion,.wg-motion *,.wg-motion *:before,.wg-motion *:after,.playing:before,.playing:after,.playing .speaker-disc:before,.playing .speaker-disc:after,.wg-tapped{animation:none!important;transition:none!important}}
@media print{.wg-success,.wg-petals{display:none!important}}
