/* Ground calibration stays independent of placement. Only its width responds
   to idle motion, using the body's duration and easing. */
.mascot-art{--mascot-x:0%;--mascot-y:0%;--mascot-scale:1;--mascot-shadow-width:72%;--mascot-shadow-height:15.384615%;--mascot-idle-duration:1800ms;--mascot-idle-easing:ease-in-out;position:relative;display:inline-block;isolation:isolate;width:100px;height:100px;aspect-ratio:1;vertical-align:middle;flex:none;pointer-events:none}
.mascot-art::before{content:"";position:absolute;z-index:0;left:calc((100% - var(--mascot-shadow-width)) / 2);top:calc(87.5% - var(--mascot-shadow-height) / 2);width:var(--mascot-shadow-width);height:var(--mascot-shadow-height);border-radius:50%;background:rgb(30 76 46 / 16%);transform-origin:center;animation:mascot-shadow-hop var(--mascot-idle-duration) var(--mascot-idle-easing) infinite}
.mascot-art-placement,.mascot-art-motion{position:absolute;inset:0;display:block}
.mascot-art-placement{z-index:1;transform:translate(var(--mascot-x),var(--mascot-y)) scale(var(--mascot-scale));transform-origin:50% 50%}
.mascot-art.is-jumping { --jump-flight:780ms; --jump-settle:270ms; }
.mascot-art.is-jumping .mascot-art-placement {
  animation:mascot-jump-flight var(--jump-flight) ease-in-out forwards,
    mascot-jump-settle var(--jump-settle) ease-out var(--jump-flight) forwards;
}
.mascot-art.is-jumping[data-idle]::before {
  animation:mascot-jump-shadow var(--jump-flight) ease-in-out forwards,
    mascot-jump-shadow-settle var(--jump-settle) ease-out var(--jump-flight) forwards;
}
@keyframes mascot-jump-flight {
  0% { translate:0 0; scale:1; }
  28% { translate:0 3%; scale:1.05 .94; animation-timing-function:cubic-bezier(.18,.7,.32,1); }
  62% { translate:0 -25%; scale:.98 1.035; animation-timing-function:cubic-bezier(.45,0,.8,.46); }
  100% { translate:0 0; scale:1; }
}
@keyframes mascot-jump-settle {
  0%,100% { translate:0 0; scale:1; }
  35% { translate:0 2.5%; scale:1.045 .95; }
}
@keyframes mascot-jump-shadow {
  0%,100% { scale:1; }
  28% { scale:1.04 .98; }
  62% { scale:.66 .80; }
}
@keyframes mascot-jump-shadow-settle {
  0%,100% { scale:1; }
  35% { scale:1.05 .98; }
}
.mascot-art-motion{transform-origin:50% 88%;transition:transform .15s ease;animation:mascot-art-hop var(--mascot-idle-duration) var(--mascot-idle-easing) infinite}
.mascot-art img{display:block;width:100%;height:100%;margin:0;object-fit:contain;user-select:none}
/* Artwork calibration, shared by every surface. Body placement and shadow dimensions are stage-specific. */
.mascot-art[data-mascot="pot"]{--mascot-y:5%;--mascot-scale:.88;--mascot-shadow-width:68.5%}
.mascot-art[data-mascot="soil"]{--mascot-y:2%;--mascot-scale:1.1;--mascot-shadow-width:96%;--mascot-shadow-height:20.6448685223451%}
.mascot-art[data-mascot="seed"]{--mascot-scale:.8;--mascot-shadow-width:39%}
.mascot-art[data-mascot="root"]{--mascot-x:3.5%;--mascot-y:-6.5%;--mascot-scale:.88}
.mascot-art[data-mascot="seedling"]{--mascot-y:-13%;--mascot-scale:.9;--mascot-shadow-width:34%}
.mascot-art[data-mascot="sprout"]{--mascot-y:-8%;--mascot-shadow-width:65%}
.mascot-art[data-mascot="stem"]{--mascot-x:.5%;--mascot-y:-6%;--mascot-scale:1.05;--mascot-shadow-width:39.5%;--mascot-shadow-height:7.71085322836256%}
.mascot-art[data-mascot="bud"]{--mascot-y:-6%;--mascot-scale:.9;--mascot-shadow-width:37%;--mascot-shadow-height:13.0271463879097%}
.mascot-art[data-mascot="evergreen"]{--mascot-y:-11.5%;--mascot-scale:1.13;--mascot-shadow-width:81.5%;--mascot-shadow-height:20.7183258376889%}
.mascot-art[data-mascot="flower"]{--mascot-y:-3%;--mascot-scale:.86;--mascot-shadow-width:60%;--mascot-shadow-height:8%}
.mascot-art[data-mascot="mystery"]{--mascot-shadow-width:36.5%}
.mascot-art[data-idle="float"]{--mascot-idle-duration:2800ms}
.mascot-art[data-idle="float"] .mascot-art-motion{animation-name:mascot-art-float}
.mascot-art[data-idle="float"]::before{animation-name:mascot-shadow-float}
/* One breath drives every moving part. 0 is the raised pose, 1 the lowered pose. */
@property --mascot-breath { syntax:"<number>"; inherits:true; initial-value:0; }
@keyframes mascot-breathe { 0%,100% { --mascot-breath:0; } 50% { --mascot-breath:1; } }
.mascot-art[data-idle="sleep"] { animation:mascot-breathe 3.2s ease-in-out infinite; }
/* These five silhouettes use the opposite bubble phase in the approved sleep study. */
.mascot-art:is([data-mascot="seedling"],[data-mascot="stem"],[data-mascot="evergreen"],[data-mascot="flower"],[data-mascot="bud"]) .mascot-sleep-bubble {
  --bubble-phase:calc(1 - var(--mascot-breath));
}
.mascot-art:is([data-idle="sleep"],[data-idle="waking"]) .mascot-art-motion {
  animation:none;
  translate:0 calc(1.5% * var(--mascot-breath));
  rotate:calc(-1deg + 2deg * var(--mascot-breath));
  scale:calc(1 + .035 * var(--mascot-breath)) calc(1 - .03 * var(--mascot-breath));
}
.mascot-art:is([data-idle="sleep"],[data-idle="waking"])::before {
  animation:none;
  scale:calc(.82 + .18 * var(--mascot-breath)) 1;
  opacity:calc(.8 + .2 * var(--mascot-breath));
}
.mascot-sleep-mouth {
  transform-box:fill-box;
  transform-origin:center;
  scale:calc(1 + .12 * var(--mascot-breath)) calc(.82 + .36 * var(--mascot-breath));
}
.mascot-sleep-bubble {
  --bubble-phase:var(--mascot-breath);
  transform-box:view-box;
  transform-origin:0 0;
  transform:scale(calc(.68 + .5 * var(--bubble-phase)));
  opacity:calc(.86 + .14 * var(--bubble-phase));
}
.mascot-sleep-lid,.mascot-waking-eye { transition:opacity 120ms ease; }
.mascot-art[data-idle="waking"] .mascot-sleep-lid { opacity:0; }
.mascot-art[data-idle="waking"] .mascot-waking-eye { opacity:1; }
.mascot-art[data-idle="waking"] .mascot-sleep-bubble { animation:mascot-bubble-pop 180ms ease-out forwards; }
@keyframes mascot-bubble-pop {
  65% { scale:1.55; opacity:1; }
  100% { scale:1.62; opacity:0; }
}
.mascot-art[data-idle="waking"] .mascot-bubble-drops {
  transform-origin:0 0;
  animation:mascot-bubble-splash 400ms 100ms ease-out both;
}
@keyframes mascot-bubble-splash {
  0% { transform:scale(.18); opacity:0; }
  18% { opacity:1; }
  60% { opacity:.95; }
  100% { transform:scale(1.4); opacity:0; }
}
.mascot-art[data-idle="waking"] {
  transform-origin:50% 78%;
  animation:mascot-wake-exit 1.4s ease-in-out both;
}
@keyframes mascot-wake-exit {
  0% { opacity:1; translate:0 0; rotate:0deg; scale:1; }
  8% { translate:0 4%; rotate:-4deg; scale:1.06 .92; }
  18% { translate:0 -2%; rotate:2deg; scale:.98 1.06; }
  30% { opacity:1; translate:0 0; rotate:0deg; scale:1; }
  100% { opacity:0; translate:0 0; rotate:0deg; scale:1.9; }
}
.loading-mascot-frame { position:relative; display:inline-grid; isolation:isolate; }
/* Fixed to the sleeping frame, outside the view being replaced. No page curtain or hit target. */
.loading-mascot-departure {
  position:fixed; z-index:71; inset:auto; max-width:none; max-height:none;
  margin:0; padding:0; border:0; overflow:visible; background:transparent; pointer-events:none;
}
.loading-mascot-departure::backdrop { background:transparent; pointer-events:none; }
.loading-mascot-departure > .mascot-art { width:100%; height:100%; }
.loading-mascot-departure::after {
  content:""; position:absolute; z-index:2; left:50%; top:46%; width:7%; aspect-ratio:1;
  border:3px solid #a8d465; border-radius:50%; opacity:0; pointer-events:none;
  animation:mascot-wake-ripple .9s .42s ease-out forwards;
}
@keyframes mascot-wake-ripple {
  from { opacity:.8; transform:translate(-50%,-50%) scale(.2); }
  to { opacity:0; transform:translate(-50%,-50%) scale(14); }
}
@media(prefers-reduced-motion:reduce) {
  .mascot-art[data-idle="sleep"],.mascot-art[data-idle="waking"],.loading-mascot-departure::after { animation:none; }
}
.mascot-sleep-symbols{position:absolute;inset:0;z-index:2;display:block;container-type:inline-size;font-family:"Avenir Next",system-ui,sans-serif;font-weight:850;color:#173D2C;pointer-events:none}
.mascot-sleep-symbols span{position:absolute;top:62%;left:64%;font-size:17cqi;line-height:1;opacity:0;animation:mascot-sleep-z 3600ms ease-out infinite}
.mascot-sleep-symbols span:nth-child(2){animation-delay:-2400ms}
.mascot-sleep-symbols span:nth-child(3){animation-delay:-1200ms}
.mascot-art[data-idle="none"] .mascot-art-motion,.mascot-art[data-idle="none"]::before{animation:none}
/* The former 600 ms greeting is now a hop, followed by a 1200 ms rest.
   Independent translate/rotate/scale keep hover transforms and calibration intact.
   A little squash before takeoff/landing and stretch in flight add elastic weight. */
@keyframes mascot-art-hop{0%,33.333333%,100%{translate:0 0;rotate:0deg;scale:1 1}5%{translate:0 0;scale:1.06 .94}11.666667%{rotate:-7deg;scale:.97 1.04}16.666667%{translate:0 -8%;scale:.99 1.02}23.333333%{rotate:6deg;scale:1 1}30%{scale:1.05 .95}}
@keyframes mascot-shadow-hop{0%,5%,33.333333%,100%{transform:scaleX(1)}16.666667%{transform:scaleX(.78)}}
@keyframes mascot-art-float{0%,100%{translate:0 0}50%{translate:0 -10%}}
@keyframes mascot-shadow-float{0%,100%{transform:scaleX(1)}50%{transform:scaleX(.70)}}
@keyframes mascot-sleep-z{0%{opacity:0;translate:0 0;rotate:-12deg;scale:.45}14%{opacity:.88}68%{opacity:.8}100%{opacity:0;translate:22cqi -42cqi;rotate:13deg;scale:1.08}}
@media(prefers-reduced-motion:reduce){.mascot-art-motion,.mascot-art::before,.mascot-sleep-mouth,.mascot-sleep-symbols span{animation:none!important;transition:none!important}.mascot-sleep-symbols span{opacity:0}.mascot-sleep-symbols span:first-child{top:30%;left:77%;opacity:.85}}

/* Face placement is an SVG transform. Only the inner eye groups express emotion. */
.mascot-face{position:absolute;inset:0;display:block;width:100%;height:100%;overflow:visible;pointer-events:none}
.mascot-eye-expression{transform-origin:0 0}
.mascot-face[data-expression="wink-left"] .mascot-eye--left .mascot-eye-expression,
.mascot-face[data-expression="wink-right"] .mascot-eye--right .mascot-eye-expression,
.mascot-face[data-expression="blink"] .mascot-eye-expression{transform:scaleY(.12)}
.mascot-art.is-winking-left .mascot-eye--left .mascot-eye-expression,
.mascot-art.is-winking-right .mascot-eye--right .mascot-eye-expression{animation:mascot-eye-close 480ms ease-in-out}
.mascot-art.is-auto-blinking .mascot-eye-expression,
.mascot-art.is-blinking .mascot-eye-expression{animation:mascot-eye-blink 160ms ease-in-out}
@keyframes mascot-eye-blink{0%,100%{transform:scaleY(1)}45%,55%{transform:scaleY(.08)}}
@keyframes mascot-eye-close{0%,100%{transform:scaleY(1)}35%,65%{transform:scaleY(.12)}}
@media(prefers-reduced-motion:reduce){.mascot-eye-expression{animation:none!important}}

.mascot-icon{display:inline-block;width:100px;height:100px;object-fit:contain;vertical-align:middle;flex:none;pointer-events:none;user-select:none}

/* Sobbing: body and shadow dip together in two small sobs, then rest while one tear falls and fades. */
.mascot-art[data-idle="sob"] .mascot-art-motion{animation:mascot-art-sob 2600ms ease-in-out infinite}
.mascot-art[data-idle="sob"]::before{animation:mascot-shadow-sob 2600ms ease-in-out infinite}
.mascot-tear{position:absolute;z-index:2;left:30.5%;top:63%;width:5%;height:7.5%;border-radius:50%;background:#9ad7f5;opacity:0;pointer-events:none;animation:mascot-tear-fall 2600ms ease-in infinite}
@keyframes mascot-art-sob{0%,40%,100%{translate:0 0;scale:1 1}8%,24%{translate:0 2.5%;scale:1.03 .97}16%{translate:0 .5%;scale:1.01 .99}32%{translate:0 0;scale:1 1}}
@keyframes mascot-shadow-sob{0%,40%,100%{transform:scaleX(1)}8%,24%{transform:scaleX(1.06)}16%{transform:scaleX(1.02)}32%{transform:scaleX(1)}}
@keyframes mascot-tear-fall{0%,30%{opacity:0;translate:0 0;scale:.6}38%{opacity:.9;translate:0 0;scale:1}92%{opacity:0;translate:0 320%;scale:1}100%{opacity:0;translate:0 320%}}
@media(prefers-reduced-motion:reduce){.mascot-tear{animation:none!important;opacity:0}}

.mascot-tumble-track { display:block; width: 100%; text-align:center; --mascot-tumble-size: 120px; --mascot-tumble-duration: 4625ms; container-type: inline-size; overflow: hidden; padding-top: calc(var(--mascot-tumble-size) * .55); }
.mascot-art[data-idle="tumble"] { width: var(--mascot-tumble-size); height: var(--mascot-tumble-size); --mascot-shadow-width: 61%; --mascot-shadow-height: 9%; }
.mascot-art[data-idle="tumble"] .mascot-art-motion, .mascot-art[data-idle="tumble"]::before { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  .mascot-art[data-idle="tumble"] { animation: mascot-tumble-travel var(--mascot-tumble-duration) ease-out infinite; }
  .mascot-art[data-idle="tumble"] .mascot-art-placement { animation: mascot-tumble-bounce var(--mascot-tumble-duration) ease-out infinite; }
  .mascot-art[data-idle="tumble"] .mascot-art-motion { transform-origin: center; animation: mascot-tumble-roll var(--mascot-tumble-duration) ease-out infinite; }
  .mascot-art[data-idle="tumble"]::before { animation: mascot-tumble-ground var(--mascot-tumble-duration) ease-out infinite; }
}
@keyframes mascot-tumble-travel {
  0% { translate: calc(-50cqw - 55%) 0; animation-timing-function: cubic-bezier(.25,.55,.45,1); }
  40%, 58% { translate: 0 0; animation-timing-function: ease-in; }
  95%, 100% { translate: calc(50cqw + 55%) 0; }
}
@keyframes mascot-tumble-roll {
  0% { rotate: -420deg; animation-timing-function: cubic-bezier(.25,.55,.45,1); }
  40%, 58% { rotate: 0deg; animation-timing-function: ease-in; }
  95%, 100% { rotate: 330deg; }
}
/* The original 1850ms entry occupies the first 40% of this loop. */
@keyframes mascot-tumble-bounce {
  0%, 18.4%, 30.8%, 40%, 100% { translate: 0 0; }
  9.2% { translate: 0 -46%; animation-timing-function: ease-in; }
  24.4% { translate: 0 -24%; animation-timing-function: ease-in; }
  35.2% { translate: 0 -9%; animation-timing-function: ease-in; }
}
@keyframes mascot-tumble-ground {
  0%, 18.4%, 30.8%, 40%, 100% { scale: 1; opacity: 1; }
  9.2% { scale: .56 .69; opacity: .49; animation-timing-function: ease-in; }
  24.4% { scale: .75 .85; opacity: .72; animation-timing-function: ease-in; }
  35.2% { scale: .9 .95; opacity: .86; animation-timing-function: ease-in; }
}
