.mascot-companion {
  --mascot-size: 250px;
  position: fixed;
  z-index: 750;
  bottom: 18px;
  left: 18px;
  /* width: min(500px, calc(100vw - 36px)); */
  display: flex;
  align-items: flex-end;
  pointer-events: none;
  transition:
    left 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    right 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s;
}
.mascot-companion.side-right {
  left: auto;
  right: 18px;
  flex-direction: row-reverse;
}
.mascot-companion.is-changing {
  opacity: 0.15;
}
.mascot-image {
  /* flex: 0 0 var(--mascot-size); */
  /* width: var(--mascot-size); */
  height: var(--mascot-size);
  object-fit: contain;
  filter: drop-shadow(0 12px 10px rgba(29, 42, 68, 0.2));
  animation: float 3.2s ease-in-out infinite;
}
.mascot-bubble {
  position: relative;
  max-width: 210px;
  margin: 0 -14px 75px 0;
  padding: 0.8rem 1rem;
  border: 2px solid rgba(29, 42, 68, 0.08);
  border-radius: 20px 20px 20px 5px;
  background: white;
  color: var(--text-dark);
  box-shadow: var(--shadow-soft);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.35;
  transform-origin: bottom left;
}
.side-right .mascot-bubble {
  margin: 0 0 75px -14px;
  border-radius: 20px 20px 5px 20px;
  transform-origin: bottom right;
}
.mascot-toggle {
  position: absolute;
  right: 0;
  bottom: 0;
  pointer-events: auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--text-dark);
  color: white;
  cursor: pointer;
  font-size: 0.8rem;
}
.side-right .mascot-toggle {
  right: auto;
  left: 0;
}
.mascot-companion.minimized {
  width: 64px;
}
.mascot-companion.minimized .mascot-image {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
}
.mascot-companion.minimized .mascot-bubble {
  display: none;
}
@media (max-width: 700px) {
  .mascot-companion {
    --mascot-size: 180px;
    bottom: 8px;
    left: 0px;
    width: min(330px, calc(100vw - 16px));
  }
  .mascot-companion.side-right {
    right: 8px;
  }
  .mascot-bubble {
    max-width: 170px;
    margin-bottom: 48px;
    padding: 0.65rem 0.8rem;
    font-size: 0.74rem;
  }
  .side-right .mascot-bubble {
    margin-bottom: 48px;
  }
}
