.poulpyx-mascot {
  --poulpyx-pupil-x: 0px;
  --poulpyx-pupil-y: 0px;
  position: relative;
  display: block;
  width: 112px;
  height: 116px;
  isolation: isolate;
  pointer-events: none;
  transform-origin: 50% 90%;
}

.poulpyx-mascot__halo {
  position: absolute;
  z-index: -1;
  inset: 21% 11% 8%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--poulpyx-color, #5b3df5) 28%, transparent) 0, transparent 68%);
  filter: blur(3px);
  opacity: .85;
  animation: poulpyx-halo 3.2s ease-in-out infinite;
}

.poulpyx-mascot__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 9px 9px rgba(82, 52, 10, .22));
  animation: poulpyx-float 3.4s ease-in-out infinite;
}

.poulpyx-mascot__floor-shadow {
  fill: rgba(64, 38, 3, .18);
  transform-origin: center;
  animation: poulpyx-shadow 3.4s ease-in-out infinite;
}

.poulpyx-mascot__body {
  transform-box: fill-box;
  transform-origin: 50% 85%;
}

.poulpyx-mascot__head,
.poulpyx-mascot__head-shine {
  transform-box: fill-box;
  transform-origin: center bottom;
}

.poulpyx-mascot__eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: poulpyx-blink 6.8s linear infinite;
}

.poulpyx-mascot__pupils {
  transform: translate(var(--poulpyx-pupil-x), var(--poulpyx-pupil-y));
  transition: transform .16s ease-out;
}

.poulpyx-mascot__sparkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: poulpyx-sparkle 3s ease-in-out infinite;
}

.poulpyx-mascot__tentacle {
  transform-box: fill-box;
  transform-origin: 50% 0;
  animation: poulpyx-tentacle-left 2.7s ease-in-out infinite alternate;
}

.poulpyx-mascot__tentacle--1 {
  animation-duration: 3.1s;
  animation-delay: -.8s;
}

.poulpyx-mascot__tentacle--2 {
  animation-duration: 2.6s;
  animation-delay: -1.9s;
}

.poulpyx-mascot__tentacle--3 {
  animation-duration: 3.4s;
  animation-delay: -.3s;
}

.poulpyx-mascot__tentacle--4 {
  animation-duration: 2.9s;
  animation-delay: -2.1s;
}

.poulpyx-mascot__tentacle--5 {
  animation-name: poulpyx-tentacle-right;
  animation-duration: 3.2s;
  animation-delay: -1.1s;
}

.poulpyx-mascot__tentacle--6 {
  animation-name: poulpyx-tentacle-right;
  animation-duration: 2.8s;
  animation-delay: -2.3s;
}

.poulpyx-mascot__tentacle--7 {
  animation-name: poulpyx-tentacle-right;
  animation-duration: 3.3s;
  animation-delay: -.5s;
}

.poulpyx-mascot__tentacle--8 {
  animation-name: poulpyx-tentacle-right;
  animation-duration: 3s;
  animation-delay: -1.7s;
}

.poulpyx-mascot__mouth {
  transition: opacity .18s ease, transform .18s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.poulpyx-mascot__mouth--happy,
.poulpyx-mascot__mouth--thinking,
.poulpyx-mascot__mouth--error {
  opacity: 0;
  transform: scale(.75);
}

.poulpyx-mascot__bubbles {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: visible;
}

.poulpyx-mascot__bubbles span {
  position: absolute;
  right: 3px;
  bottom: 26px;
  width: 11px;
  height: 11px;
  border: 2px solid color-mix(in srgb, var(--poulpyx-color, #5b3df5) 64%, #fff);
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .8);
  opacity: 0;
}

.poulpyx-mascot__bubbles span:nth-child(2) {
  right: -7px;
  width: 7px;
  height: 7px;
}

.poulpyx-mascot__bubbles span:nth-child(3) {
  right: 13px;
  width: 15px;
  height: 15px;
}

.poulpyx-mascot__bubbles span:nth-child(4) {
  right: -1px;
  width: 5px;
  height: 5px;
}

.poulpyx-chat--is-bubbling .poulpyx-mascot__bubbles span,
.poulpyx-chat--is-thinking .poulpyx-mascot__bubbles span {
  animation: poulpyx-bubble 2.6s ease-out forwards;
}

.poulpyx-chat--is-bubbling .poulpyx-mascot__bubbles span:nth-child(2),
.poulpyx-chat--is-thinking .poulpyx-mascot__bubbles span:nth-child(2) {
  animation-delay: .42s;
}

.poulpyx-chat--is-bubbling .poulpyx-mascot__bubbles span:nth-child(3),
.poulpyx-chat--is-thinking .poulpyx-mascot__bubbles span:nth-child(3) {
  animation-delay: .88s;
}

.poulpyx-chat--is-bubbling .poulpyx-mascot__bubbles span:nth-child(4),
.poulpyx-chat--is-thinking .poulpyx-mascot__bubbles span:nth-child(4) {
  animation-delay: 1.28s;
}

.poulpyx-chat--is-thinking .poulpyx-mascot__mouth--idle,
.poulpyx-chat--is-happy .poulpyx-mascot__mouth--idle,
.poulpyx-chat--is-error .poulpyx-mascot__mouth--idle {
  opacity: 0;
  transform: scale(.75);
}

.poulpyx-chat--is-thinking .poulpyx-mascot__mouth--thinking,
.poulpyx-chat--is-happy .poulpyx-mascot__mouth--happy,
.poulpyx-chat--is-error .poulpyx-mascot__mouth--error {
  opacity: 1;
  transform: scale(1);
}

.poulpyx-chat--is-thinking .poulpyx-mascot__pupils {
  animation: poulpyx-think 1.7s ease-in-out infinite;
}

.poulpyx-chat--is-thinking .poulpyx-mascot__sparkle {
  animation-duration: .8s;
}

.poulpyx-chat--is-happy .poulpyx-mascot__body {
  animation: poulpyx-celebrate .62s ease-in-out 2;
}

.poulpyx-chat--is-error .poulpyx-mascot__body {
  animation: poulpyx-wobble .45s ease-in-out 2;
}

.poulpyx-chat--is-swimming .poulpyx-mascot__tentacle {
  animation-duration: .72s;
}

.poulpyx-chat__launcher:hover .poulpyx-mascot__head,
.poulpyx-chat__launcher:focus-visible .poulpyx-mascot__head {
  animation: poulpyx-squish .58s ease-in-out;
}

.poulpyx-mascot--compact {
  width: 118px;
  height: 122px;
}

@keyframes poulpyx-float {
  0%, 100% { transform: translateY(1px) rotate(-1deg); }
  50% { transform: translateY(-4px) rotate(1deg); }
}

@keyframes poulpyx-shadow {
  0%, 100% { transform: scaleX(1); opacity: .18; }
  50% { transform: scaleX(.82); opacity: .11; }
}

@keyframes poulpyx-halo {
  0%, 100% { transform: scale(.9); opacity: .55; }
  50% { transform: scale(1.12); opacity: .95; }
}

@keyframes poulpyx-blink {
  0%, 43%, 47%, 78%, 82%, 100% { transform: scaleY(1); }
  45%, 80% { transform: scaleY(.08); }
}

@keyframes poulpyx-sparkle {
  0%, 100% { transform: rotate(-8deg) scale(.9); opacity: .82; }
  50% { transform: rotate(9deg) scale(1.13); opacity: 1; }
}

@keyframes poulpyx-tentacle-left {
  from { transform: rotate(5deg) translateY(0); }
  to { transform: rotate(-8deg) translateY(2px); }
}

@keyframes poulpyx-tentacle-right {
  from { transform: rotate(-5deg) translateY(1px); }
  to { transform: rotate(8deg) translateY(-1px); }
}

@keyframes poulpyx-bubble {
  0% { transform: translate(0, 0) scale(.4); opacity: 0; }
  16% { opacity: .88; }
  72% { opacity: .75; }
  100% { transform: translate(16px, -92px) scale(1.12); opacity: 0; }
}

@keyframes poulpyx-think {
  0%, 100% { transform: translate(-2px, -2px); }
  50% { transform: translate(3px, -3px); }
}

@keyframes poulpyx-celebrate {
  0%, 100% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(-8px) rotate(-4deg); }
  70% { transform: translateY(-3px) rotate(4deg); }
}

@keyframes poulpyx-wobble {
  0%, 100% { transform: translateX(0) rotate(0); }
  33% { transform: translateX(-4px) rotate(-3deg); }
  66% { transform: translateX(4px) rotate(3deg); }
}

@keyframes poulpyx-squish {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.045, .955); }
}

@media (prefers-reduced-motion: reduce) {
  .poulpyx-mascot *,
  .poulpyx-mascot *::before,
  .poulpyx-mascot *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }

  .poulpyx-mascot__bubbles {
    display: none;
  }
}
