/* Kibun (気分), the fox: assets/kibun.js places him (Firefly illustrations, public/assets/kibun/<pose>.svg, and their
   animated loops <pose>.webp); these rules size him and pop him when the pose changes. The loops move by themselves
   (.kibun-live); the still drawings keep the old whole-fox motion: a slow breath, a hop when he is excited. */
.kibun { display: block; width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }
/* Mood panel: a small fox beside the lead under the question, so the heading keeps its own lines. */
.kibun-slot { float: right; width: 64px; margin: 8px -6px 4px 10px; }
.kibun-slot .kibun { width: 100%; }
.stack-end-kibun { display: block; width: 132px; margin: 0 auto 8px; }
.empty-card > .stack-end-kibun { width: 116px; }

@media (prefers-reduced-motion: no-preference) {
    .kibun { transform-origin: 50% 92%; }
    .kibun:not(.kibun-live) { animation: kibun-breathe 3.6s ease-in-out infinite; }
    .kibun[data-pose="hype"]:not(.kibun-live) { animation: kibun-hop .9s ease-in-out infinite; }
    .kibun[data-pose="wave"]:not(.kibun-live) { animation: kibun-sway 1.6s ease-in-out infinite; }
    .kibun[data-pose="done"]:not(.kibun-live), .kibun[data-pose="heavy"]:not(.kibun-live) { animation-duration: 5.2s; }
    .kibun[data-pose="oops"]:not(.kibun-live) { animation: kibun-wobble 2.4s ease-in-out infinite; }
    .kibun.kibun-pop { animation: kibun-pop .42s cubic-bezier(.3, 1.6, .5, 1); }
}
@keyframes kibun-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, .985); } }
@keyframes kibun-hop { 0%, 100% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-5%) scale(.99, 1.02); } 70% { transform: translateY(0) scale(1.03, .96); } }
@keyframes kibun-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-3deg); } }
@keyframes kibun-wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2.5deg); } 75% { transform: rotate(2.5deg); } }
@keyframes kibun-pop { 0% { transform: scale(.82) rotate(-4deg); } 100% { transform: scale(1) rotate(0); } }

/* Phones: the slot sits in the tune sheet (#moodPanelBody), shown once it opens. */
@media (max-width: 760px) {
    .kibun-slot { width: 58px; }
}

/* Landing page, chapter 気分: Kibun sits on the night hills just left of the mood sample card. */
.kibun-demo { position: absolute; left: -104px; bottom: -8px; width: 96px; pointer-events: none; }
.kibun-demo .kibun { width: 100%; }
@media (max-width: 1000px) {
    /* One column (landing.css): no room beside the card: he perches on its top edge, right of the label. */
    .kibun-demo { left: auto; right: 14px; bottom: auto; top: -58px; width: 70px; }
}
