/* Wick behaviours — ported from the approved Character Approval Sheet.
   Vocabulary is closed (idle, curious, excited, concentrating, mismatch,
   celebration, walk, turn, wave). Do not add emotional states. */

.wick #root{ transform-origin:100px 250px; }
.wick .gaze{ transition:transform .35s ease; }

.wick.s-idle #root{ animation:idleBob 4.2s ease-in-out infinite; }
.wick.s-idle #core{ animation:idlePulse 4.2s ease-in-out infinite; transform-origin:100px 146px; }
.wick.s-idle #fin{ animation:idleFin 4.2s ease-in-out infinite; transform-origin:100px -6px; }
@keyframes idleBob{ 0%,38%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} 62%{transform:translateY(0)} }
@keyframes idlePulse{ 0%,38%,100%{opacity:0.8; transform:scale(1)} 50%{opacity:0.92; transform:scale(1.03)} 62%{opacity:0.8; transform:scale(1)} }
@keyframes idleFin{ 0%,38%,100%{transform:rotate(0deg)} 50%{transform:rotate(2.5deg)} 62%{transform:rotate(0deg)} }

.wick.s-curious #neckHead{ animation:curiousLean 2.6s ease-in-out infinite; transform-origin:100px 98px; }
.wick.s-curious #eyeL .iris{ animation:curiousEyeL 2.6s ease-in-out infinite; transform-origin:78px 46px; }
.wick.s-curious #ambientGlow{ animation:curiousGlow 2.6s ease-in-out infinite; }
@keyframes curiousLean{ 0%,100%{transform:rotate(0deg) translateX(0)} 55%{transform:rotate(-7deg) translateX(-3px)} }
@keyframes curiousEyeL{ 0%,100%{transform:scale(1)} 55%{transform:scale(1.12)} }
@keyframes curiousGlow{ 0%,100%{opacity:0.05; transform:translateX(0)} 55%{opacity:0.17; transform:translateX(-16px)} }

.wick.s-excited #root{ animation:excitedBounce 0.55s ease-in-out infinite; }
.wick.s-excited #armL{ animation:excitedArmL 0.55s ease-in-out infinite; transform-origin:44px 118px; }
.wick.s-excited #armR{ animation:excitedArmR 0.55s ease-in-out infinite; transform-origin:156px 118px; }
.wick.s-excited #fin{ animation:excitedFin 0.4s ease-in-out infinite; transform-origin:100px -6px; }
.wick.s-excited #core{ animation:excitedCore 0.55s ease-in-out infinite; transform-origin:100px 146px; }
@keyframes excitedBounce{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes excitedArmL{ 0%,100%{transform:rotate(-6deg)} 50%{transform:rotate(-18deg)} }
@keyframes excitedArmR{ 0%,100%{transform:rotate(6deg)} 50%{transform:rotate(18deg)} }
@keyframes excitedFin{ 0%,100%{transform:rotate(-6deg)} 50%{transform:rotate(8deg)} }
@keyframes excitedCore{ 0%,100%{opacity:0.82; transform:scale(0.97)} 50%{opacity:1; transform:scale(1.1)} }

.wick.s-concentrating #neckHead{ transform:rotate(3deg) translateY(2px); transform-origin:100px 98px; }
.wick.s-concentrating #eyeL .iris, .wick.s-concentrating #eyeR .iris{ transform:scaleY(0.4); transform-box:fill-box; transform-origin:center; }
.wick.s-concentrating #ambientGlow{ opacity:0.02; }
.wick.s-concentrating #core{ opacity:0.98; }

.wick.s-mismatch #neckHead{ transform:rotate(8deg); transform-origin:100px 98px; }
.wick.s-mismatch #eyeL{ transform:translateY(-2px) rotate(5deg); }
.wick.s-mismatch #eyeR{ transform:translateY(2px) rotate(-6deg); }
.wick.s-mismatch #armL{ transform:rotate(4deg); transform-origin:44px 118px; }
.wick.s-mismatch #core{ animation:mismatchDim 2s ease-in-out 1; }
@keyframes mismatchDim{ 0%,100%{opacity:0.78; filter:saturate(1)} 40%{opacity:0.42; filter:saturate(0.3)} }
.wick.s-mismatch .mote{ animation:driftDown 2s ease-in 1; }
@keyframes driftDown{ 0%{transform:translateY(0); opacity:0.8} 100%{transform:translateY(22px); opacity:0} }

.wick.s-celebration #root{ animation:cheerBounce 0.65s ease-in-out 3; }
.wick.s-celebration #armL{ animation:cheerArmL 0.65s ease-in-out 3; transform-origin:44px 118px; }
.wick.s-celebration #armR{ animation:cheerArmR 0.65s ease-in-out 3; transform-origin:156px 118px; }
.wick.s-celebration #fin{ animation:cheerFin 0.32s ease-in-out 6; transform-origin:100px -6px; }
.wick.s-celebration #core{ animation:cheerCore 0.55s ease-in-out 3; transform-origin:100px 146px; }
.wick.s-celebration .burst-mote{ animation:burst 1.1s ease-out 1; }
@keyframes cheerBounce{ 0%,100%{transform:translateY(0) scale(1,1)} 50%{transform:translateY(-15px) scale(1.04,1.06)} }
@keyframes cheerArmL{ 0%,100%{transform:rotate(0deg)} 50%{transform:rotate(-78deg)} }
@keyframes cheerArmR{ 0%,100%{transform:rotate(0deg)} 50%{transform:rotate(78deg)} }
@keyframes cheerFin{ 0%,100%{transform:rotate(0deg)} 50%{transform:rotate(14deg)} }
@keyframes cheerCore{ 0%,100%{opacity:0.88; transform:scale(1)} 50%{opacity:1; transform:scale(1.18)} }
@keyframes burst{ 0%{transform:translate(0,0) scale(1); opacity:1} 100%{transform:var(--burst-t); opacity:0} }

.wick.s-walk #root{ animation:walkBob 0.95s ease-in-out infinite; }
.wick.s-walk #legL{ animation:walkLegL 0.95s ease-in-out infinite; transform-origin:72px 196px; }
.wick.s-walk #legR{ animation:walkLegR 0.95s ease-in-out infinite; transform-origin:128px 196px; }
.wick.s-walk #armL{ animation:walkArmL 0.95s ease-in-out infinite; transform-origin:44px 118px; }
.wick.s-walk #armR{ animation:walkArmR 0.95s ease-in-out infinite; transform-origin:156px 118px; }
@keyframes walkBob{ 0%,50%,100%{transform:translateY(0)} 25%,75%{transform:translateY(-7px)} }
@keyframes walkLegL{ 0%,100%{transform:rotate(13deg)} 50%{transform:rotate(-13deg)} }
@keyframes walkLegR{ 0%,100%{transform:rotate(-13deg)} 50%{transform:rotate(13deg)} }
@keyframes walkArmL{ 0%,100%{transform:rotate(-9deg)} 50%{transform:rotate(9deg)} }
@keyframes walkArmR{ 0%,100%{transform:rotate(9deg)} 50%{transform:rotate(-9deg)} }
.wick.s-walk .trailL{ animation:trailPulse 0.95s ease-out infinite; }
.wick.s-walk .trailR{ animation:trailPulse 0.95s ease-out infinite; animation-delay:0.475s; }
@keyframes trailPulse{ 0%{opacity:0.65; transform:scale(1)} 100%{opacity:0; transform:scale(2.4)} }

.wick.s-turn #root{ animation:turnSpin 0.75s ease-in-out 1; }
.wick.s-turn #fin{ animation:turnFin 0.75s ease-in-out 1; transform-origin:100px -6px; }
.wick.s-turn #turnSmear{ animation:smear 0.75s ease-out 1; transform-origin:100px 146px; }
@keyframes turnSpin{ 0%{transform:scaleX(1) rotate(0deg)} 35%{transform:scaleX(0.72) rotate(6deg)} 65%{transform:scaleX(0.72) rotate(-6deg)} 100%{transform:scaleX(1) rotate(0deg)} }
@keyframes turnFin{ 0%,100%{transform:rotate(0deg)} 50%{transform:rotate(20deg)} }
@keyframes smear{
  0%{opacity:0; stroke-dasharray:0 400; transform:scale(0.65) rotate(0deg)}
  35%{opacity:0.5; stroke-dasharray:210 400; transform:scale(1) rotate(70deg)}
  70%{opacity:0; stroke-dasharray:210 400; transform:scale(1.12) rotate(140deg)}
  100%{opacity:0}
}

.wick.s-wave #armR{ animation:waveArm 1s ease-in-out 3; transform-origin:156px 118px; }
.wick.s-wave #handR{ animation:waveHand 0.4s ease-in-out 6; transform-origin:167px 132px; }
.wick.s-wave #neckHead{ transform:rotate(-3deg); transform-origin:100px 98px; }
@keyframes waveArm{ 0%,100%{transform:rotate(92deg)} 50%{transform:rotate(100deg)} }
@keyframes waveHand{ 0%,100%{transform:rotate(-8deg)} 50%{transform:rotate(8deg)} }

@media (prefers-reduced-motion: reduce){
  .wick.s-idle #root, .wick.s-idle #core, .wick.s-idle #fin{ animation:none; }
}
