/* Original Keycap Buddy artwork; motion is kept separate from game behaviour. */
.keycap-mascot{position:relative;display:inline-block;aspect-ratio:1;flex-shrink:0;vertical-align:middle;overflow:visible;line-height:0}
.buddy-motion{position:absolute;inset:0;display:block;transform-origin:50% 89%;animation:buddy-idle 6.8s ease-in-out infinite}
.keycap-mascot .buddy-motion .buddy-frame{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:contain;pointer-events:none;user-select:none}
.keycap-mascot .buddy-blink{opacity:0;clip-path:polygon(34% 19%,65% 19%,65% 35%,34% 35%);animation:buddy-blink 6.8s steps(1,end) infinite}
.logo .keycap-mascot.melon-mark{width:47px;height:47px;overflow:visible}
.footer .logo .keycap-mascot.melon-mark{width:34px;height:34px}
.game-header .logo .keycap-mascot.melon-mark{width:39px;height:39px}
.keycap-wordmark{display:flex;align-items:center;justify-content:center;gap:13px;font-family:var(--display);font-size:36px;font-weight:700;letter-spacing:-1.8px;color:var(--green)}
.keycap-wordmark .keycap-mascot{width:100px;height:100px}
.brand-key:has(.keycap-mascot){width:158px;height:158px;background:transparent;border-radius:0}
.brand-key .keycap-mascot.melon-mark{width:158px;height:158px}
.auth-side .auth-melon{width:172px;height:172px;transform:none}
@keyframes buddy-idle{0%,68%,100%{transform:translateY(0) rotate(0)}74%{transform:translateY(-3px) rotate(-2deg)}80%{transform:translateY(0) rotate(1.5deg)}86%{transform:translateY(-1px) rotate(-.6deg)}}
@keyframes buddy-blink{0%,37%,41%,100%{opacity:0}38%,40%{opacity:1}}
.less-motion .buddy-motion,.less-motion .buddy-blink{animation:none!important}
.less-motion .buddy-blink{opacity:0!important}
@media(prefers-reduced-motion:reduce){.buddy-motion,.buddy-blink{animation:none!important}.buddy-blink{opacity:0!important}}
@media(max-width:760px){.logo .keycap-mascot.melon-mark{width:42px;height:42px}.game-header .logo .keycap-mascot.melon-mark{width:34px;height:34px}.footer .logo .keycap-mascot.melon-mark{width:30px;height:30px}.home-main .hero-friend{right:12px;bottom:34px}.home-main .hero-friend .hero-melon{width:53px;height:53px}.keycap-wordmark{font-size:30px;gap:10px}.keycap-wordmark .keycap-mascot{width:80px;height:80px}}

/* Screen-specific poses share the same identity, with a compact face in navigation. */
.buddy-head .buddy-motion{transform-origin:50% 60%;animation:buddy-head-idle 7.6s ease-in-out infinite}
.buddy-welcome .buddy-motion{animation:buddy-welcome 7.4s ease-in-out infinite}
.buddy-think .buddy-motion{animation:buddy-think 8.2s ease-in-out infinite}
.buddy-celebrate .buddy-motion{animation:buddy-celebrate 850ms cubic-bezier(.2,.7,.25,1) both,buddy-idle 6.8s 1s ease-in-out infinite}
.brand-key .brand-melon{width:158px;height:158px}
.result-page .result-emblem{width:122px;height:122px;background:transparent;border-radius:0;transform:none;margin:0 auto 15px}
.result-melon{width:122px;height:122px}
.help-melon,.progress-melon{width:112px;height:112px;display:block;margin:0 auto 15px}
@keyframes buddy-head-idle{0%,72%,100%{transform:rotate(0)}77%{transform:rotate(-4deg)}83%{transform:rotate(3deg)}90%{transform:rotate(0)}}
@keyframes buddy-welcome{0%,68%,100%{transform:translateY(0) rotate(0)}75%{transform:translateY(-3px) rotate(-3deg)}82%{transform:translateY(0) rotate(2deg)}89%{transform:rotate(0)}}
@keyframes buddy-think{0%,65%,100%{transform:rotate(0)}73%{transform:rotate(-3deg)}83%{transform:rotate(-3deg)}92%{transform:rotate(0)}}
@keyframes buddy-celebrate{0%{transform:translateY(0) scale(.93)}35%{transform:translateY(-13px) rotate(-4deg) scale(1.04)}65%{transform:translateY(0) rotate(3deg) scale(1.02,.97)}100%{transform:translateY(0) scale(1)}}
/* This comes last so every new pose also obeys the in-app preference. */
.less-motion .keycap-mascot .buddy-motion{animation:none!important}
@media(prefers-reduced-motion:reduce){.keycap-mascot .buddy-motion{animation:none!important}}
