/* Animate the illustration only; its layout and existing tilt stay unchanged. */
img[data-cat-motion] {
  pointer-events:auto;
  transform-origin:50% 82%;
  --cat-lift:8px;
  --cat-tilt:5deg;
}
img[data-cat-motion].cat-motion-active {
  animation:var(--cat-motion-name,cat-greet) 1.15s cubic-bezier(.36,.02,.28,1) both;
  will-change:translate,rotate,scale;
}
img[data-cat-motion="greet"] { --cat-motion-name:cat-greet; }
img[data-cat-motion="think"] { --cat-motion-name:cat-think; }
img[data-cat-motion="work"] { --cat-motion-name:cat-work; }
img[data-cat-motion="nod"] { --cat-motion-name:cat-nod; }
img[data-cat-motion="sway"] { --cat-motion-name:cat-sway; }
img[data-cat-trigger="idle"] { --cat-lift:5px; --cat-tilt:3deg; }
/* The full-card copy layer must not intercept the cat's pointer events. */
.edition-cover .guide-copy { pointer-events:none; }
@keyframes cat-greet {
  0%,100% { translate:0 0; rotate:0deg; scale:1; }
  16% { translate:0 2px; scale:1.025 .975; }
  36% { translate:0 calc(-1 * var(--cat-lift)); rotate:calc(-1 * var(--cat-tilt)); scale:.99 1.025; }
  58% { translate:0 -2px; rotate:var(--cat-tilt); scale:1; }
  78% { translate:0 -4px; rotate:-2deg; }
}
@keyframes cat-think {
  0%,100% { translate:0 0; rotate:0deg; scale:1; }
  28% { translate:0 -2px; rotate:calc(-1 * var(--cat-tilt)); }
  53% { translate:0 -2px; rotate:calc(-1 * var(--cat-tilt)); scale:1.015; }
  77% { rotate:2deg; }
}
@keyframes cat-work {
  0%,100% { translate:0 0; rotate:0deg; scale:1; }
  20%,60% { translate:0 -3px; rotate:-2deg; }
  40%,80% { translate:0 1px; rotate:2deg; }
}
@keyframes cat-nod {
  0%,100% { translate:0 0; rotate:0deg; scale:1; }
  23% { translate:0 2px; rotate:3deg; scale:1.01 .98; }
  48% { translate:0 -4px; rotate:-2deg; scale:1; }
  73% { translate:0 1px; rotate:2deg; }
}
@keyframes cat-sway {
  0%,100% { translate:0 0; rotate:0deg; scale:1; }
  25% { translate:-2px -2px; rotate:calc(-1 * var(--cat-tilt)); }
  55% { translate:2px -3px; rotate:var(--cat-tilt); }
  80% { translate:-1px 0; rotate:-2deg; }
}
@media(prefers-reduced-motion:reduce) {
  img[data-cat-motion].cat-motion-active { animation:none!important; }
}
