.back-to-top{position:fixed;right:max(22px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));z-index:65;width:100px;height:150px;padding:0;border:0;background:none;color:var(--cream);font:inherit;isolation:isolate;cursor:pointer;-webkit-tap-highlight-color:transparent}
.back-to-top[hidden]{display:none}
.top-mascot{position:absolute;inset:0;transform-origin:50% 90%;transition:transform .22s ease;pointer-events:none;filter:drop-shadow(0 4px 3px #29251f28)}
.top-mascot img{display:block;width:100%;height:100%;object-fit:contain}
.top-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.back-to-top.is-visible{animation:top-control-arrive .25s ease-out}
.back-to-top.is-visible .top-mascot{animation:top-mascot-pop .65s cubic-bezier(.2,.8,.25,1)}
.back-to-top:focus-visible{outline:3px solid var(--cream);outline-offset:4px;border-radius:12px;box-shadow:0 0 0 7px var(--red)}
@media(hover:hover) and (pointer:fine){.back-to-top:hover .top-mascot{transform:translateY(-8px) rotate(-3deg)}}
.back-to-top:active .top-mascot{transform:translateY(2px) scale(.97)}
.back-to-top.is-going-up .top-mascot{animation:top-mascot-hop .45s ease-in}
@keyframes top-control-arrive{from{opacity:0;translate:0 12px}to{opacity:1;translate:0 0}}
@keyframes top-mascot-pop{0%{opacity:0;transform:translateY(38px) rotate(8deg) scale(.8)}55%{opacity:1;transform:translateY(-9px) rotate(-3deg) scale(1.03)}78%{transform:translateY(3px) rotate(2deg)}100%{opacity:1;transform:none}}
@keyframes top-mascot-hop{0%{transform:none}30%{transform:translateY(5px) rotate(2deg) scale(.96)}75%{transform:translateY(-25px) rotate(-3deg)}100%{transform:none}}
@media(max-width:720px){.back-to-top{right:max(14px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));width:76px;height:114px}.has-back-to-top footer{padding-bottom:150px}}
@media(max-height:500px){.back-to-top{width:64px;height:96px}}
@media(prefers-reduced-motion:reduce){:root{scroll-behavior:auto}.back-to-top,.back-to-top.is-visible,.back-to-top.is-visible .top-mascot,.back-to-top.is-going-up .top-mascot{animation:none}.top-mascot{transition:none}.back-to-top:hover .top-mascot{transform:none}}
