pet {
  position: fixed;
  font-size: 12px;
  left: 3em;
  bottom: 3em;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  z-index: 1000;
}

:is(pet, pet *) {
  display: block;
  box-sizing: border-box;
}

@media (max-width: 750px) {
  pet {
    font-size: 10px;
  }
}

pet-body {
  width: 6em;
  height: 4.5em;
  background-color: #2584ff;
  background-image: radial-gradient(farthest-corner at 3.5em 0.4em, #6bbdff, #0165ff 60%, #0165ff);
  border-radius: 5em 5em 2.5em 2.5em;
  animation: pet-breathe 6s ease infinite;
  cursor: grab;
}

pet-body:active {
  cursor: grabbing;
}

pet-body::after {
  content: "";
  position: absolute;
  width: 125%;
  height: 40%;
  border-radius: 50%;
  left: -10%;
  bottom: -20%;
  background-color: rgba(0, 0, 0, 0.35);
  filter: blur(5px);
  z-index: -1;
}

pet-ears {
  position: absolute;
  top: -0.4em;
  width: 100%;
  z-index: -1;
}

pet-ear {
  position: absolute;
  width: 1.8em;
  height: 2em;
  background-color: #0165ff;
  background-image: radial-gradient(farthest-corner at 1.6em 0em, #49adfe, #0f6efd 60%, #0f6efd);
  border-top-left-radius: 3.34em 3em;
  border-top-right-radius: 0.5em 0.75em;
}

pet-ear[left] {
  left: 3%;
  transform: rotate(-60deg);
}

pet-ear[right] {
  right: 3%;
  transform: rotate(60deg) scaleX(-1);
}

pet-eyes {
  position: absolute;
  top: 1.8em;
  left: 0;
  width: 100%;
}

pet-eye {
  position: absolute;
  top: 0;
  width: 0.6em;
  height: 1.35em;
  border-radius: 100vw;
  background-color: #ffab00;
  background-image: radial-gradient(farthest-corner at 0.35em 0.4em, #facc6f, #d79510 75%);
  transform: translateY(-50%);
  animation: pet-wink 3.2s ease infinite;
}

pet-eye[left] {
  left: 25%;
}

pet-eye[right] {
  right: 25%;
}

pet-mouth {
  position: absolute;
  bottom: 25%;
  left: 50%;
  transform: translateX(-50%);
}

pet-mouth::before,
pet-mouth::after {
  content: '';
  position: absolute;
  bottom: 0;
  display: block;
  width: 0.7em;
  height: 0.6em;
  border: 1px solid transparent;
  border-bottom: 1px solid #fff;
  border-radius: 50%;
}

pet-mouth::before {
  right: -1.5px;
}

pet-mouth::after {
  left: -1.5px;
}

pet-dialog {
  position: absolute;
  left: 6em;
  bottom: calc(100% - 1em);
  background-color: rgba(255, 255, 255, 0.9);
  border: 0.2em solid #4d9fea;
  box-shadow: 0 0 1em rgba(0, 0, 0, 0.1);
  color: #252525;
  padding: 0.8em;
  border-radius: 0.5em;
  width: 24em;
  max-width: calc(100vw - 10em);
  font-size: 1.12em;
  line-height: 1.6;
  z-index: -2;
}

@keyframes pet-breathe {
  0% {
    height: 4.5em;
  }

  20% {
    height: 4em;
  }

  50% {
    height: 4.5em;
  }
}

@keyframes pet-wink {
  0% {
    height: 1.35em;
  }

  4% {
    height: 2px;
  }

  6% {
    height: 1.35em;
  }
}