.companion-home-brand img {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.2s ease;
}

.companion-home-brand img.rygau-charging {
  transform: scale(1.08) rotate(-4deg);
  transition: transform 0.08s linear;
}

.rygau-egg {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 80;
  width: min(42vw, 168px);
  aspect-ratio: 720 / 645;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
  opacity: 0;
  transform: translateY(24px) scale(0.7) rotate(-8deg);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.rygau-egg.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.rygau-egg:focus-visible {
  outline: 3px solid var(--accent, #f47b20);
  outline-offset: 6px;
  border-radius: 40%;
}

.rygau-egg img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-user-drag: none;
}

.rygau-egg-inner {
  width: 100%;
  height: 100%;
  transform-origin: 50% 90%;
}

.rygau-egg-inner.is-burping {
  animation: rygau-burp 0.62s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes rygau-burp {
  0% { transform: none; }
  12% { transform: scale(1.08, 0.86) translateY(3%); }
  28% { transform: scale(0.94, 1.1) translateY(-4%) rotate(3deg); }
  46% { transform: rotate(-5deg) translateX(-2%); }
  64% { transform: rotate(4deg) translateX(2%); }
  100% { transform: none; }
}

.rygau-egg-burst {
  position: absolute;
  left: 47%;
  top: 42%;
  transform: translate(-50%, -50%) scale(0.2) rotate(-16deg);
  font: 900 clamp(18px, 5vw, 28px) "Arial Rounded MT Bold", "Nunito", "Segoe UI", system-ui, sans-serif;
  color: #3d2b45;
  text-shadow:
    0.06em 0 0 #fff, -0.06em 0 0 #fff, 0 0.06em 0 #fff, 0 -0.06em 0 #fff,
    0.04em 0.04em 0 #fff, -0.04em 0.04em 0 #fff, 0.04em -0.04em 0 #fff, -0.04em -0.04em 0 #fff;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.rygau-egg-burst::before {
  content: "";
  position: absolute;
  inset: -0.45em -0.65em;
  z-index: -1;
  background: #f7d94c;
  clip-path: polygon(
    50% 0%, 58% 11%, 69% 4%, 72% 17%, 85% 15%, 83% 28%, 96% 31%, 89% 42%,
    100% 50%, 89% 58%, 96% 69%, 83% 72%, 85% 85%, 72% 83%, 69% 96%, 58% 89%,
    50% 100%, 42% 89%, 31% 96%, 28% 83%, 15% 85%, 17% 72%, 4% 69%, 11% 58%,
    0% 50%, 11% 42%, 4% 31%, 17% 28%, 15% 15%, 28% 17%, 31% 4%, 42% 11%
  );
}

.rygau-egg-burst.is-show {
  animation: rygau-pop 0.95s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}

@keyframes rygau-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-16deg); }
  18% { opacity: 1; transform: translate(-50%, -72%) scale(1.15) rotate(-6deg); }
  78% { opacity: 1; transform: translate(-50%, -118%) scale(1) rotate(-9deg); }
  100% { opacity: 0; transform: translate(-50%, -140%) scale(0.9) rotate(-9deg); }
}

@media (prefers-reduced-motion: reduce) {
  .rygau-egg,
  .companion-home-brand img {
    transition: none;
  }
  .rygau-egg-inner.is-burping,
  .rygau-egg-burst.is-show {
    animation: none;
  }
  .rygau-egg-burst.is-show {
    opacity: 1;
    transform: translate(-50%, -90%);
  }
}
