/* Copied from SmashingCans/src/game/index.html: the complete button moves.
   Durations, easing and bounce shape follow that reference; amplitude adapts
   to the control's size, and the pivot is centered.
   These explicitly requested input effects also run when Windows disables
   system animations, matching SmashingCans. Other game motion keeps its
   existing reduced-motion behavior. */
:is(#stage,#loading-screen,body) .sc-button{transform-origin:50% 50%;}
:is(#stage,#loading-screen,body) :is(.sc-button,.sc-node){--sc-motion-x:1;--sc-motion-y:1;--sc-motion-angle:1;}
/* Clip scrollable overflow at a stationary content boundary, while allowing
   the bounce to paint beyond it. Real content keeps its normal scroll area. */
.sc-motion-clip{overflow:clip;overflow-clip-margin:64px;}
.sc-motion-frame{display:flow-root;min-width:0;}
.sc-panel-frame{margin:10px 0;}
.sc-panel-frame>.settings-group{margin:0;}
:is(.choice-options,.research-options)>.sc-motion-frame>button{width:100%;}
:is(#stage,#loading-screen,body) .sc-panel{transform-origin:50% var(--sc-header-pivot,50%);}
:is(#stage,#loading-screen,body) .sc-button:where(:not(.sc-panel)):hover:not(:disabled),
:is(#stage,#loading-screen,body) .sc-panel:has(>summary:hover){filter:brightness(1.08) saturate(1.1);animation:fizz-wobble .6s cubic-bezier(.3,.7,.4,1);}
:is(#stage,#loading-screen,body) .sc-button.pressed:not(:disabled){animation:can-pop .35s cubic-bezier(.2,1.6,.4,1);}
:is(#stage,#loading-screen,body) .sc-button:where(:not(.sc-panel)):active:not(:disabled),
:is(#stage,#loading-screen,body) .sc-button.ui-held:not(:disabled){animation:can-crush .22s ease-out forwards;}
:is(#stage,#loading-screen,body) .sc-node{transform-box:fill-box;transform-origin:50% 50%;}
:is(#stage,#loading-screen,body) .sc-node.hover{animation:node-hover .45s cubic-bezier(.2,1.7,.4,1) forwards;}
:is(#stage,#loading-screen,body) .sc-node.node-buy{animation:node-buy .5s cubic-bezier(.2,1.6,.4,1);}
:is(#stage,#loading-screen,body) .sc-node:is(.pressed,.ui-held){animation:can-pop .35s cubic-bezier(.2,1.6,.4,1);}
:is(#stage,#loading-screen,body) .skill-node.ui-held>.sc-node{animation:can-crush .22s ease-out forwards;}
@keyframes fizz-wobble {
    0%   { transform: scale(1, 1) rotate(0deg); }
    14%  { transform: scale(calc(1 - .1 * var(--sc-motion-x)), calc(1 + .2 * var(--sc-motion-y))) rotate(calc(-2deg * var(--sc-motion-angle))) translateY(-2px); }
    32%  { transform: scale(calc(1 + .1 * var(--sc-motion-x)), calc(1 - .1 * var(--sc-motion-y))) rotate(calc(1.5deg * var(--sc-motion-angle))); }
    52%  { transform: scale(calc(1 - .03 * var(--sc-motion-x)), calc(1 + .05 * var(--sc-motion-y))) rotate(calc(-.8deg * var(--sc-motion-angle))) translateY(-1px); }
    72%  { transform: scale(calc(1 + .02 * var(--sc-motion-x)), calc(1 - .02 * var(--sc-motion-y))) rotate(calc(.3deg * var(--sc-motion-angle))); }
    100% { transform: scale(1, 1) rotate(0deg); }
  }

@keyframes can-crush {
    0%   { transform: scale(1, 1); }
    60%  { transform: scale(calc(1 + .14 * var(--sc-motion-x)), calc(1 - .22 * var(--sc-motion-y))) translateY(1px); }
    100% { transform: scale(calc(1 + .1 * var(--sc-motion-x)), calc(1 - .16 * var(--sc-motion-y))) translateY(1px); }
  }

@keyframes can-pop {
    0%   { transform: scale(calc(1 + .12 * var(--sc-motion-x)), calc(1 - .2 * var(--sc-motion-y))); }
    45%  { transform: scale(calc(1 - .06 * var(--sc-motion-x)), calc(1 + .14 * var(--sc-motion-y))) translateY(-2px); }
    75%  { transform: scale(calc(1 + .03 * var(--sc-motion-x)), calc(1 - .03 * var(--sc-motion-y))); }
    100% { transform: scale(1, 1); }
  }

@keyframes node-hover { 0% { transform: scale(1) rotate(0); } 40% { transform: scale(1.28, 1.1) rotate(-7deg) translateY(-2px); } 100% { transform: scale(1.15) rotate(-3deg) translateY(-1px); } }

@keyframes node-buy { 0% { transform: scale(0.7, 1.3); } 40% { transform: scale(1.35, 0.8); } 70% { transform: scale(0.95, 1.08); } 100% { transform: scale(1); } }
