/**
 * Dog Companions — Liquid Glass & Animated Canine Companions
 * Features:
 * - Ultra-modern iOS Liquid Glass speech bubble with backdrop-filter blur & specular sheen
 * - Animated dogs running onto and off screen with authentic bounding gallop physics
 * - Transparent integrated character avatars with realistic contact drop shadows
 * - Horizontal liquid glass dock for dog companion buttons (Enzo, Doodle, Mariah)
 * - Dynamic UI element bump reaction physics keyframes
 * - Interactive heart & sparkle particle burst animations
 * - Responsive support across desktop and mobile
 */

/* Root overlay container */
#enzo-companion-root,
#dog-companions-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100010;
  overflow: visible;
}

/* Character Wrapper */
.enzo-character-wrap {
  position: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  z-index: 100020;
  user-select: none;
  will-change: left, top, transform, opacity;
}

/* Avatar Image */
.enzo-avatar {
  width: 175px;
  height: auto;
  max-height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.65)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-user-drag: none;
  display: block;
}

.enzo-avatar:hover {
  transform: scale(1.06) rotate(-2deg);
}

.enzo-avatar:active {
  transform: scale(0.95) rotate(2deg);
}

/* ==========================================================================
   Canine Walking & Movement Animations
   ========================================================================== */

/* Authentic walking gait: rhythmic quadruped vertical bounce, subtle body pitch, and footstep squash/stretch */
@keyframes dogWalkGait {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1);
  }
  25% {
    transform: translate3d(0, -9px, 0) rotate(-2deg) scale(0.98, 1.02);
  }
  50% {
    transform: translate3d(0, 2px, 0) rotate(0.5deg) scale(1.02, 0.98);
  }
  75% {
    transform: translate3d(0, -7px, 0) rotate(1.5deg) scale(0.99, 1.01);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1);
  }
}

/* Energetic running gallop fallback */
@keyframes dogRunGait {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  20% {
    transform: translateY(-16px) rotate(-4deg) scaleY(1.05) scaleX(0.97);
  }
  45% {
    transform: translateY(-24px) rotate(3deg) scaleY(1.08) scaleX(0.95);
  }
  70% {
    transform: translateY(-8px) rotate(-1deg) scaleY(0.97) scaleX(1.02);
  }
  85% {
    transform: translateY(2px) rotate(0deg) scaleY(0.93) scaleX(1.05);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

/* Skidding / halting when arriving from a walk */
@keyframes dogSkidHalt {
  0% {
    transform: translateY(0) scale(1) rotate(-5deg);
  }
  35% {
    transform: translateY(3px) scale(0.95, 1.05) rotate(2.5deg);
  }
  65% {
    transform: translateY(-2px) scale(1.02, 0.99) rotate(-1deg);
  }
  100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

/* Bumping recoil animations (Directional) */
@keyframes dogBumpRecoilLeft {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  28% {
    transform: translate3d(-20px, -6px, 0) rotate(-5deg) scale(0.92, 1.06);
  }
  60% {
    transform: translate3d(6px, 0, 0) rotate(2deg) scale(1.03, 0.98);
  }
  82% {
    transform: translate3d(-2px, 0, 0) rotate(-1deg) scale(1);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
}

@keyframes dogBumpRecoilRight {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  28% {
    transform: translate3d(20px, -6px, 0) rotate(5deg) scale(0.92, 1.06);
  }
  60% {
    transform: translate3d(-6px, 0, 0) rotate(-2deg) scale(1.03, 0.98);
  }
  82% {
    transform: translate3d(2px, 0, 0) rotate(1deg) scale(1);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
}

/* Joyful pet wiggle */
@keyframes enzoPetWiggle {
  0% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.08) rotate(-4deg); }
  40% { transform: scale(1.1) rotate(4deg); }
  60% { transform: scale(1.06) rotate(-3deg); }
  80% { transform: scale(1.04) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.dog-walking {
  animation: dogWalkGait 0.42s infinite ease-in-out !important;
}

.dog-running {
  animation: dogRunGait 0.28s infinite ease-in-out !important;
}

.dog-skidding {
  animation: dogSkidHalt 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.enzo-walking {
  animation: dogWalkGait 0.42s infinite ease-in-out !important;
}

.enzo-bumping,
.dog-bumping-left {
  animation: dogBumpRecoilLeft 0.52s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.dog-bumping-right {
  animation: dogBumpRecoilRight 0.52s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.enzo-petting {
  animation: enzoPetWiggle 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Floor Paw Prints */
.dog-paw-print {
  position: fixed;
  pointer-events: none;
  z-index: 99991;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.55;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  animation: dogPawFade 1.6s ease-out forwards;
  user-select: none;
}

@keyframes dogPawFade {
  0% {
    opacity: 0.65;
    transform: translateY(0) scale(1);
  }
  60% {
    opacity: 0.45;
  }
  100% {
    opacity: 0;
    transform: translateY(3px) scale(0.85);
  }
}

/* ==========================================================================
   Target UI Element Bump Physics (Directional Spring Impulse)
   ========================================================================== */
@keyframes dogElementSpringFromLeft {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  18% {
    transform: translate3d(12px, -3px, 0) scale(0.98, 1.02) rotate(1.2deg);
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.55), inset 0 0 15px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.75) !important;
  }
  42% {
    transform: translate3d(-6px, 2px, 0) scale(1.015, 0.99) rotate(-0.8deg);
  }
  68% {
    transform: translate3d(3px, -1px, 0) scale(0.995, 1.005) rotate(0.4deg);
  }
  85% {
    transform: translate3d(-1px, 0, 0) scale(1) rotate(0deg);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
}

@keyframes dogElementSpringFromRight {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  18% {
    transform: translate3d(-12px, -3px, 0) scale(0.98, 1.02) rotate(-1.2deg);
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.55), inset 0 0 15px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.75) !important;
  }
  42% {
    transform: translate3d(6px, 2px, 0) scale(1.015, 0.99) rotate(0.8deg);
  }
  68% {
    transform: translate3d(-3px, -1px, 0) scale(0.995, 1.005) rotate(-0.4deg);
  }
  85% {
    transform: translate3d(1px, 0, 0) scale(1) rotate(0deg);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
}

.dog-bump-react-left,
.enzo-bump-react {
  animation: dogElementSpringFromLeft 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  border-color: rgba(56, 189, 248, 0.65) !important;
  z-index: 10 !important;
}

.dog-bump-react-right {
  animation: dogElementSpringFromRight 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  border-color: rgba(56, 189, 248, 0.65) !important;
  z-index: 10 !important;
}

/* ==========================================================================
   1. Translucent Liquid Glass Speech Bubble for Dog Companions
   ========================================================================== */
.enzo-speech-bubble {
  position: absolute;
  width: clamp(170px, 13vw, 205px);
  max-width: min(205px, calc(100vw - 24px));
  max-height: min(200px, calc(100vh - 120px));
  padding: 9px 12px;
  /* Translucent Liquid Glass with emerald refraction & specular highlight */
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(16, 185, 129, 0.06) 25%,
    rgba(15, 23, 42, 0.82) 75%,
    rgba(6, 32, 20, 0.90) 100%
  );
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 1.5px solid rgba(255, 255, 255, 0.45);
  border-left: 1.5px solid rgba(167, 243, 208, 0.35);
  border-radius: 14px;
  box-shadow: 
    0 16px 36px -8px rgba(0, 0, 0, 0.65),
    0 0 20px rgba(16, 185, 129, 0.12),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 2px 0 rgba(0, 0, 0, 0.35);
  color: #f8fafc;
  opacity: 0;
  pointer-events: none;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  z-index: 20;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform, opacity;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

.enzo-speech-bubble.visible {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.enzo-speech-bubble.visible:hover {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 
    0 18px 40px -8px rgba(0, 0, 0, 0.72),
    0 0 24px rgba(16, 185, 129, 0.18),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 2px 0 rgba(0, 0, 0, 0.35);
}

/* Placed on the RIGHT of the dog (Directly next to dog) */
.enzo-speech-bubble.bubble-side-right {
  left: calc(100% + 14px);
  right: auto;
  bottom: 12px;
  top: auto;
  transform: scale(0.85) translateX(-8px);
  transform-origin: left 70%;
}

.enzo-speech-bubble.bubble-side-right.visible {
  opacity: 1;
  transform: scale(1) translateX(0);
}

/* Placed on the LEFT of the dog (Directly next to dog) */
.enzo-speech-bubble.bubble-side-left {
  right: calc(100% + 14px);
  left: auto;
  bottom: 12px;
  top: auto;
  transform: scale(0.85) translateX(8px);
  transform-origin: right 70%;
}

.enzo-speech-bubble.bubble-side-left.visible {
  opacity: 1;
  transform: scale(1) translateX(0);
}

/* Fallback / Collision-avoidance: Placed ABOVE the dog */
.enzo-speech-bubble.bubble-side-top {
  bottom: calc(100% + 16px);
  left: 50%;
  right: auto;
  top: auto;
  transform: translateX(-50%) scale(0.85);
  transform-origin: bottom center;
}

.enzo-speech-bubble.bubble-side-top.visible {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Placed BELOW the dog (when dog arrives near top header) */
.enzo-speech-bubble.bubble-side-bottom {
  top: calc(100% + 16px);
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translateX(-50%) scale(0.85);
  transform-origin: top center;
}

.enzo-speech-bubble.bubble-side-bottom.visible {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* When JS calculates exact clamped left / relative coordinates */
.enzo-speech-bubble[style*="left"] {
  right: auto !important;
  transform: scale(0.85) !important;
}

.enzo-speech-bubble[style*="left"].visible {
  transform: scale(1) !important;
}

/* --------------------------------------------------------------------------
   Liquid Glass Speech Bubble Pointer Tails (Pointing directly into the dog)
   -------------------------------------------------------------------------- */

/* Tail pointing LEFT into the dog's mouth/cheek (when bubble is on right) */
.enzo-speech-bubble.bubble-side-right::before {
  content: '';
  position: absolute;
  left: -9px;
  bottom: var(--bubble-tail-y, 34px);
  width: 16px;
  height: 16px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1.5px solid rgba(167, 243, 208, 0.35);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.2);
  border-top: none;
  border-right: none;
  transform: rotate(45deg);
  border-bottom-left-radius: 2px;
  z-index: 2;
}

/* Tail pointing RIGHT into the dog's mouth/cheek (when bubble is on left) */
.enzo-speech-bubble.bubble-side-left::before {
  content: '';
  position: absolute;
  right: -9px;
  bottom: var(--bubble-tail-y, 34px);
  width: 16px;
  height: 16px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-right: 1.5px solid rgba(255, 255, 255, 0.25);
  border-top: 1.5px solid rgba(255, 255, 255, 0.42);
  border-left: none;
  border-bottom: none;
  transform: rotate(45deg);
  border-top-right-radius: 2px;
  z-index: 2;
}

/* Tail pointing DOWN into the dog's head (when bubble is on top on small phones) */
.enzo-speech-bubble.bubble-side-top::before {
  content: '';
  position: absolute;
  bottom: -9px;
  left: var(--bubble-tail-x, 50%);
  transform: translateX(-50%) rotate(45deg);
  width: 16px;
  height: 16px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-right: 1.5px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.18);
  border-top: none;
  border-left: none;
  border-bottom-right-radius: 2px;
  z-index: 2;
}

/* Tail pointing UP into the dog's paws (when bubble is placed below dog) */
.enzo-speech-bubble.bubble-side-bottom::before {
  content: '';
  position: absolute;
  top: -9px;
  left: var(--bubble-tail-x, 50%);
  transform: translateX(-50%) rotate(45deg);
  width: 16px;
  height: 16px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1.5px solid rgba(255, 255, 255, 0.45);
  border-left: 1.5px solid rgba(167, 243, 208, 0.35);
  border-bottom: none;
  border-right: none;
  border-top-left-radius: 2px;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   Floor Nametag Beside Sitting Dog (Containerless, Closely Positioned)
   -------------------------------------------------------------------------- */
.dog-floor-nametag {
  position: absolute;
  bottom: 12px;
  left: calc(100% - 30px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #ffffff;
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 16px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(0, 0, 0, 1);
  white-space: nowrap;
  pointer-events: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(4px) scale(0.96);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease, text-shadow 0.2s ease;
  z-index: 15;
  user-select: none;
}

.dog-floor-nametag:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #38bdf8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 18px rgba(56, 189, 248, 0.7);
  transform: translateY(-1px) scale(1.06);
}

.dog-floor-nametag:active {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: translateY(0) scale(0.98);
}

.enzo-character-wrap.nametag-on-left .dog-floor-nametag {
  left: auto;
  right: calc(100% - 24px);
}

/* Precise per-dog horizontal alignment accounting for sprite alpha margins */
.dog-floor-nametag--doodle {
  left: calc(100% - 38px);
}
.enzo-character-wrap.nametag-on-left .dog-floor-nametag--doodle {
  left: auto;
  right: calc(100% - 14px);
}

.dog-floor-nametag--mariah {
  left: calc(100% - 36px);
}
.enzo-character-wrap.nametag-on-left .dog-floor-nametag--mariah {
  left: auto;
  right: calc(100% - 34px);
}

.dog-floor-nametag--enzo {
  left: calc(100% - 6px);
}
.enzo-character-wrap.nametag-on-left .dog-floor-nametag--enzo {
  left: auto;
  right: calc(100% + 8px);
}

.dog-floor-nametag--stella {
  left: calc(100% - 22px);
}
.enzo-character-wrap.nametag-on-left .dog-floor-nametag--stella {
  left: auto;
  right: calc(100% - 12px);
}

.dog-floor-nametag--growlet {
  left: calc(100% - 14px);
}
.enzo-character-wrap.nametag-on-left .dog-floor-nametag--growlet {
  left: auto;
  right: calc(100% + 4px);
}

/* ==========================================================================
   Stella Companion Sizing (Reduced by 30%: 70% scale)
   ========================================================================== */
.enzo-character-wrap.dog--stella .enzo-avatar,
.enzo-character-wrap[data-dog-id="stella"] .enzo-avatar {
  width: 122px;
  max-height: 161px;
}

.enzo-character-wrap.dog--stella .dog-mouth-bone,
.enzo-character-wrap[data-dog-id="stella"] .dog-mouth-bone {
  font-size: 1.4rem;
  bottom: 12px;
}

.enzo-character-wrap.dog--stella .enzo-speech-bubble,
.enzo-character-wrap[data-dog-id="stella"] .enzo-speech-bubble {
  max-width: min(180px, calc(100vw - 20px));
}

/* Robert Growler: Speech bubble permanently removed per user request */
.enzo-character-wrap.dog--growlet .enzo-speech-bubble,
.enzo-character-wrap[data-dog-id="growlet"] .enzo-speech-bubble,
.enzo-co-wrap.dog--growlet .enzo-speech-bubble,
.enzo-co-wrap[data-dog-id="growlet"] .enzo-speech-bubble,
.growler-mode .enzo-speech-bubble {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.enzo-character-wrap.is-sitting .dog-floor-nametag {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.enzo-character-wrap.dog-sleeping .dog-floor-nametag {
  opacity: 0.65;
}

/* Red container dropped completely / legacy badge reset */
.dog-badge,
.enzo-badge,
.dog-badge--enzo,
.dog-badge--doodle,
.dog-badge--mariah,
.dog-badge--stella,
.dog-badge--growlet {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #f8fafc !important;
}

/* Liquid Glass Dismiss Button (not needed / removed) */
.enzo-close-btn {
  display: none !important;
}

/* ==========================================================================
   Floating Toss Bone / Treat Button (Random spot on opposite side of screen)
   ========================================================================== */
.dog-floating-treat-btn {
  position: fixed !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
  line-height: 1 !important;
  cursor: grab !important;
  user-select: none !important;
  pointer-events: auto !important;
  z-index: 10000 !important;
  opacity: 0;
  transform: scale(0.75) translateY(12px);
  transition: opacity 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.dog-floating-treat-btn.is-active {
  opacity: 1 !important;
  transform: scale(1) translateY(0) !important;
}

.dog-floating-treat-btn .floating-bone-glyph {
  font-size: 2.85rem !important;
  line-height: 1 !important;
  display: inline-block !important;
  user-select: none !important;
  filter: drop-shadow(0 0 10px rgba(254, 240, 138, 0.95))
          drop-shadow(0 0 22px rgba(251, 191, 36, 0.85))
          drop-shadow(0 0 38px rgba(245, 158, 11, 0.65))
          drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  animation: dogGlowingBoneFloat 2.4s ease-in-out infinite alternate !important;
  transform-origin: center center;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.22s ease !important;
}

.dog-floating-treat-btn:hover {
  cursor: grab !important;
}

.dog-floating-treat-btn:hover .floating-bone-glyph {
  transform: scale(1.24) translateY(-3px) rotate(6deg) !important;
  filter: drop-shadow(0 0 16px rgba(254, 240, 138, 1))
          drop-shadow(0 0 34px rgba(251, 191, 36, 1))
          drop-shadow(0 0 54px rgba(245, 158, 11, 0.95))
          drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55)) !important;
}

.dog-floating-treat-btn:active .floating-bone-glyph {
  cursor: grabbing !important;
  transform: scale(0.92) !important;
}

.dog-floating-treat-btn.is-popping .floating-bone-glyph {
  transform: scale(1.4) !important;
  opacity: 0 !important;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease-out !important;
}

@keyframes dogGlowingBoneFloat {
  0% {
    transform: translateY(0) scale(1) rotate(-4deg);
    filter: drop-shadow(0 0 8px rgba(254, 240, 138, 0.9))
            drop-shadow(0 0 18px rgba(251, 191, 36, 0.8))
            drop-shadow(0 0 32px rgba(245, 158, 11, 0.6))
            drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
  }
  50% {
    transform: translateY(-6px) scale(1.08) rotate(4deg);
    filter: drop-shadow(0 0 14px rgba(254, 240, 138, 1))
            drop-shadow(0 0 28px rgba(251, 191, 36, 0.95))
            drop-shadow(0 0 44px rgba(245, 158, 11, 0.75))
            drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
  }
  100% {
    transform: translateY(3px) scale(0.97) rotate(-2deg);
    filter: drop-shadow(0 0 9px rgba(254, 240, 138, 0.85))
            drop-shadow(0 0 20px rgba(251, 191, 36, 0.8))
            drop-shadow(0 0 34px rgba(245, 158, 11, 0.6))
            drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
  }
}

@media (max-width: 768px) {
  .dog-floating-treat-btn .floating-bone-glyph {
    font-size: 2.3rem !important;
  }
}

/* Liquid Glass Bubble Text */
.enzo-bubble-text {
  font-size: 0.80rem;
  line-height: 1.38;
  color: #f1f5f9;
  margin: 0 0 7px 0;
  font-weight: 450;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  max-height: min(150px, 28vh);
  overflow-y: auto;
  scrollbar-width: thin;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}

/* Normal text emphasis — natural italics, not styled as a button pill */
.enzo-bubble-text em {
  font-style: italic;
  font-weight: 600;
  color: #f1f5f9;
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
  display: inline;
}

/* Category Pills — only when linking to an active category */
.dog-bubble-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 1px 7px;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
  font-style: normal;
  font-weight: 600;
  font-size: 0.74rem;
  text-decoration: none;
  cursor: pointer;
  vertical-align: baseline;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.15);
}

.dog-bubble-category-pill:hover {
  background: rgba(56, 189, 248, 0.32);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

.dog-bubble-category-pill:active {
  transform: scale(0.96);
}

/* Bubble Actions */
.enzo-bubble-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  cursor: default;
}

.enzo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3.5px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  line-height: 1.2;
}

.enzo-btn-primary {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35) 0%, rgba(5, 150, 105, 0.5) 100%);
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.5);
  border-top: 1px solid rgba(167, 243, 208, 0.65);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 14px rgba(16, 185, 129, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.enzo-btn-primary:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.55) 0%, rgba(5, 150, 105, 0.7) 100%);
  border-color: #6ee7b7;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 22px rgba(52, 211, 153, 0.4);
  color: #ffffff;
}

.enzo-btn-primary:active {
  transform: translateY(1px);
}

.enzo-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.enzo-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  color: #ffffff;
}

.enzo-btn-secondary:active {
  transform: translateY(1px);
}

/* ==========================================================================
   Particles (Hearts, Sparkles, Stars)
   ========================================================================== */
.enzo-particle {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  font-size: 1.4rem;
  animation: enzoFloatUp 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes enzoFloatUp {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.6) rotate(0deg);
  }
  50% {
    opacity: 0.9;
    transform: translate(var(--dx, 0px), -45px) scale(1.2) rotate(var(--rot, 15deg));
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--dx, 0px) * 1.6), -85px) scale(0.9) rotate(var(--rot, 30deg));
  }
}

/* ==========================================================================
   4. Dog Summon Buttons — Integrated Header Navigation & Mobile Drawer
   ========================================================================== */
.dog-summon-dock.mobile-dog-dock,
.mobile-nav-drawer .dog-summon-dock {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px;
  padding: 2px 6px;
  background: rgba(14, 20, 32, 0.40) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 9999px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 0 12px rgba(5, 150, 105, 0.15);
  pointer-events: auto;
  position: relative !important;
  z-index: 10;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.dog-summon-dock.mobile-dog-dock:hover,
.mobile-nav-drawer .dog-summon-dock:hover {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 0 18px rgba(5, 150, 105, 0.3);
}

/* Navigation header hanging dock: completely containerless floating avatars centered below the island */
.nav-hanging-dogs,
.nav-hanging-dogs.dog-summon-dock,
.nav-hanging-dogs:hover,
.nav-hanging-dogs.dog-summon-dock:hover,
.site-header .dog-summon-dock,
.site-header:hover .dog-summon-dock,
.site-header .nav-hanging-dogs,
.site-header:hover .nav-hanging-dogs,
.nav-island .dog-summon-dock,
.nav-island:hover .dog-summon-dock,
.nav-island .nav-hanging-dogs,
.nav-island:hover .nav-hanging-dogs,
.welcome-stage-header .dog-summon-dock,
.welcome-stage-header:hover .dog-summon-dock,
.nav-dog-dock {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(0) !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  width: max-content !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

.nav-hanging-dogs::before,
.nav-hanging-dogs::after,
.nav-hanging-dogs.dog-summon-dock::before,
.nav-hanging-dogs.dog-summon-dock::after,
.site-header .dog-summon-dock::before,
.site-header .dog-summon-dock::after,
.site-header .nav-hanging-dogs::before,
.site-header .nav-hanging-dogs::after,
.nav-island .dog-summon-dock::before,
.nav-island .dog-summon-dock::after,
.nav-island .nav-hanging-dogs::before,
.nav-island .nav-hanging-dogs::after {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.nav-hanging-dogs.dog-summon-dock::before,
.site-header .nav-hanging-dogs::before {
  content: "";
  position: absolute;
  top: -14px;
  bottom: -8px;
  left: -20px;
  right: -20px;
  background: transparent;
  pointer-events: auto;
  z-index: -1;
}

.nav-island:hover .nav-hanging-dogs.dog-summon-dock,
.nav-island:focus-within .nav-hanging-dogs.dog-summon-dock,
.site-header:hover .nav-hanging-dogs.dog-summon-dock,
.site-header.is-hovered .nav-hanging-dogs.dog-summon-dock {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateX(-50%) translateY(0) !important;
}

.dog-summon-btn {
  position: relative !important;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.30);
  background: rgba(20, 28, 45, 0.42) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  overflow: visible;
  padding: 0;
  pointer-events: auto;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.2s ease,
              border-color 0.2s ease;
  flex-shrink: 0;
}

/* Forest Green Hover Highlight */
.dog-summon-btn:hover {
  transform: scale(1.18) translateY(1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 16px rgba(16, 185, 129, 0.65), 0 0 4px rgba(5, 150, 105, 0.8);
  border-color: #34d399;
}

.dog-summon-btn:hover .dog-summon-avatar-crop {
  box-shadow: inset 0 0 6px rgba(16, 185, 129, 0.4);
}

/* Active / Summoned Dog State — clearly indicates this dog is active on screen */
.dog-summon-btn.active {
  transform: scale(1.1) !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.7), 0 0 4px rgba(5, 150, 105, 0.8) !important;
}

.dog-summon-btn.active .dog-summon-avatar-crop {
  box-shadow: inset 0 0 8px rgba(16, 185, 129, 0.5) !important;
}

.dog-summon-btn.active:hover {
  transform: scale(1.2) translateY(1px) !important;
  border-color: #6ee7b7 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.9) !important;
}

[data-theme="light"] .dog-summon-btn.active {
  border-color: #059669 !important;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.35), 0 0 12px rgba(16, 185, 129, 0.5) !important;
}

[data-theme="light"] .dog-summon-btn.active:hover {
  border-color: #047857 !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4), 0 0 16px rgba(16, 185, 129, 0.65) !important;
}

/* Tactile momentary click press — returns to clean unselected state on release */
.dog-summon-btn:active {
  transform: scale(0.94) !important;
  transition: transform 0.08s ease;
}

.dog-summon-btn:focus:not(:focus-visible) {
  outline: none;
}


.dog-summon-btn:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

.dog-summon-avatar-crop {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 25, 0.38) !important;
  transition: box-shadow 0.2s ease;
}

.dog-summon-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  -webkit-user-drag: none;
  pointer-events: none;
  transition: transform 0.25s ease;
}

/* Perfect portrait framing for Doodle and Mariah */
.dog-summon-btn[data-dog-id="doodle"] .dog-summon-avatar {
  transform: scale(1.35);
  transform-origin: center 18%;
}

.dog-summon-btn[data-dog-id="mariah"] .dog-summon-avatar {
  transform: scale(1.35);
  transform-origin: center 18%;
}

.dog-summon-btn[data-dog-id="stella"] .dog-summon-avatar {
  transform: scale(1.35);
  transform-origin: center 18%;
}

.dog-summon-btn[data-dog-id="growlet"] .dog-summon-avatar {
  transform: scale(1.35);
  transform-origin: center 16%;
}

/* Name Tooltip — Slides down below the avatar with forest green glass, placed safely beyond cursor reach */
.dog-summon-name {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(-2px);
  background: rgba(8, 22, 16, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e2e8f0;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none !important;
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  z-index: 1000;
}

/* Glass caret pointing up to button anchor */
.dog-summon-name::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 4px 5px 4px;
  border-style: solid;
  border-color: transparent transparent rgba(8, 22, 16, 0.95) transparent;
}

.dog-summon-btn:hover .dog-summon-name {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  border-color: rgba(52, 211, 153, 0.7);
  color: #a7f3d0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 10px rgba(16, 185, 129, 0.35);
}

/* ==========================================================================
   Dog Companion Pet Hint Tooltip (Dropped per user request)
   ========================================================================== */
.dog-pet-hint {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


/* Mobile drawer specific adjustments */
.mobile-dog-dock {
  padding: 4px 8px;
  gap: 10px;
}
.mobile-dog-dock .dog-summon-btn {
  width: 38px;
  height: 38px;
}

/* ==========================================================================
   Responsive Rules
   ========================================================================== */
@media (max-width: 768px) {
  .enzo-avatar {
    width: 100px;
    max-height: 132px;
  }
  .dog-floor-nametag {
    font-size: 0.92rem;
    padding: 0 !important;
    bottom: 8px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  .dog-floor-nametag--doodle {
    left: calc(100% - 28px);
  }
  .enzo-character-wrap.nametag-on-left .dog-floor-nametag--doodle {
    left: auto;
    right: calc(100% - 10px);
  }
  .dog-floor-nametag--mariah {
    left: calc(100% - 26px);
  }
  .enzo-character-wrap.nametag-on-left .dog-floor-nametag--mariah {
    left: auto;
    right: calc(100% - 24px);
  }
  .dog-floor-nametag--enzo {
    left: calc(100% - 4px);
  }
  .enzo-character-wrap.nametag-on-left .dog-floor-nametag--enzo {
    left: auto;
    right: calc(100% + 6px);
  }
  .dog-floor-nametag--stella {
    left: calc(100% - 18px);
  }
  .enzo-character-wrap.nametag-on-left .dog-floor-nametag--stella {
    left: auto;
    right: calc(100% - 10px);
  }
  .dog-floor-nametag--growlet {
    left: calc(100% - 10px);
  }
  .enzo-character-wrap.nametag-on-left .dog-floor-nametag--growlet {
    left: auto;
    right: calc(100% + 2px);
  }
  .enzo-character-wrap.dog--stella .enzo-avatar,
  .enzo-character-wrap[data-dog-id="stella"] .enzo-avatar {
    width: 70px;
    max-height: 92px;
  }
  .enzo-character-wrap.dog--stella .dog-mouth-bone,
  .enzo-character-wrap[data-dog-id="stella"] .dog-mouth-bone {
    font-size: 1.15rem;
    bottom: 8px;
  }
  .enzo-speech-bubble {
    width: clamp(155px, 35vw, 185px);
    max-width: calc(100vw - 20px);
    padding: 8px 11px;
    border-radius: 13px;
  }
  .enzo-bubble-text {
    font-size: 0.77rem;
    line-height: 1.34;
    margin-bottom: 6px;
  }
}

@media (max-width: 480px) {
  .enzo-avatar {
    width: 80px;
    max-height: 106px;
  }
  .dog-floor-nametag {
    font-size: 0.84rem;
    padding: 0 !important;
    bottom: 6px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  .dog-floor-nametag--doodle {
    left: calc(100% - 22px);
  }
  .enzo-character-wrap.nametag-on-left .dog-floor-nametag--doodle {
    left: auto;
    right: calc(100% - 8px);
  }
  .dog-floor-nametag--mariah {
    left: calc(100% - 20px);
  }
  .enzo-character-wrap.nametag-on-left .dog-floor-nametag--mariah {
    left: auto;
    right: calc(100% - 18px);
  }
  .dog-floor-nametag--enzo {
    left: calc(100% - 2px);
  }
  .enzo-character-wrap.nametag-on-left .dog-floor-nametag--enzo {
    left: auto;
    right: calc(100% + 4px);
  }
  .dog-floor-nametag--stella {
    left: calc(100% - 14px);
  }
  .enzo-character-wrap.nametag-on-left .dog-floor-nametag--stella {
    left: auto;
    right: calc(100% - 8px);
  }
  .dog-floor-nametag--growlet {
    left: calc(100% - 8px);
  }
  .enzo-character-wrap.nametag-on-left .dog-floor-nametag--growlet {
    left: auto;
    right: calc(100% + 2px);
  }
  .enzo-character-wrap.dog--stella .enzo-avatar,
  .enzo-character-wrap[data-dog-id="stella"] .enzo-avatar {
    width: 56px;
    max-height: 74px;
  }
  .enzo-speech-bubble {
    width: clamp(145px, 50vw, 175px);
    max-width: calc(100vw - 16px);
    padding: 7px 10px;
    border-radius: 12px;
  }
  .enzo-bubble-text {
    font-size: 0.73rem;
    line-height: 1.30;
    margin-bottom: 5px;
  }
  .enzo-btn {
    padding: 3px 8px;
    font-size: 0.68rem;
  }
}

/* --------------------------------------------------------------------------
   Canine Companions 2.0: Sleeping, Treats & Particle Animations
   -------------------------------------------------------------------------- */
.enzo-btn-treat {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(217, 119, 6, 0.5) 100%);
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-top: 1px solid rgba(253, 230, 138, 0.7);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 14px rgba(245, 158, 11, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.enzo-btn-treat:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.55) 0%, rgba(217, 119, 6, 0.75) 100%);
  border-color: #fcd34d;
  color: #ffffff;
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

/* Sleeping State */
.enzo-character-wrap.dog-sleeping .enzo-avatar {
  animation: dogSleepBreathing 3.2s ease-in-out infinite;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6)) brightness(0.92);
}

.enzo-character-wrap.dog-sleeping .enzo-speech-bubble {
  opacity: 0.35;
  transform: scale(0.92);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

@keyframes dogSleepBreathing {
  0%, 100% {
    transform: scale(0.92) translateY(8px);
  }
  50% {
    transform: scale(0.94, 0.89) translateY(10px);
  }
}

/* Floating Glass Z Particle */
.sleep-z-particle {
  position: fixed;
  z-index: 10002;
  pointer-events: none;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: #a7f3d0;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.6);
  opacity: 0;
  animation: floatSleepZ 2.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes floatSleepZ {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.6) rotate(-12deg);
  }
  30% {
    opacity: 0.9;
  }
  80% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-75px) scale(1.3) rotate(15deg);
  }
}

/* Parabolic Flying Treat Element */
.dog-flying-treat {
  position: fixed;
  z-index: 10005;
  pointer-events: none;
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.6));
  user-select: none;
  will-change: transform, left, top;
}

/* Grabbed Treat and Pointer Holding State */
body.is-holding-dog-treat,
body.is-holding-dog-treat * {
  cursor: grabbing !important;
  user-select: none !important;
}

.dog-grabbed-treat {
  position: fixed !important;
  z-index: 100050 !important;
  pointer-events: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  transform: translate(-50%, -50%) !important;
  will-change: transform, left, top !important;
  transition: transform 0.06s ease-out;
}

.dog-grabbed-treat.hint-above {
  flex-direction: column-reverse !important;
}

.dog-grabbed-bone {
  font-size: 3.1rem;
  line-height: 1;
  display: inline-block;
  user-select: none;
  filter: drop-shadow(0 0 14px rgba(254, 240, 138, 1))
          drop-shadow(0 0 28px rgba(251, 191, 36, 0.95))
          drop-shadow(0 0 45px rgba(245, 158, 11, 0.75))
          drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55));
  animation: dogGrabbedBonePulse 1.2s ease-in-out infinite alternate;
  transform-origin: center center;
}

@keyframes dogGrabbedBonePulse {
  0% {
    transform: scale(1) rotate(-8deg);
    filter: drop-shadow(0 0 10px rgba(254, 240, 138, 0.9))
            drop-shadow(0 0 22px rgba(251, 191, 36, 0.85))
            drop-shadow(0 0 36px rgba(245, 158, 11, 0.65))
            drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
  }
  100% {
    transform: scale(1.18) rotate(8deg);
    filter: drop-shadow(0 0 16px rgba(254, 240, 138, 1))
            drop-shadow(0 0 34px rgba(251, 191, 36, 1))
            drop-shadow(0 0 54px rgba(245, 158, 11, 0.95))
            drop-shadow(0 8px 18px rgba(0, 0, 0, 0.65));
  }
}

.dog-grabbed-hint {
  display: none !important;
}

.dog-grabbed-treat.is-over-dog .dog-grabbed-bone {
  animation-duration: 0.5s;
  transform: scale(1.28);
  filter: drop-shadow(0 0 20px rgba(254, 240, 138, 1))
          drop-shadow(0 0 40px rgba(251, 191, 36, 1))
          drop-shadow(0 0 65px rgba(245, 158, 11, 1))
          drop-shadow(0 10px 22px rgba(0, 0, 0, 0.7)) !important;
}

/* Dropping Treat direct into mouth */
.dog-dropping-treat {
  position: fixed;
  z-index: 100050;
  pointer-events: none;
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.6));
  user-select: none;
  will-change: transform, left, top;
}

/* Dog Anticipation State when treat is grabbed */
.enzo-character-wrap.dog-anticipating-treat .enzo-avatar {
  animation: dogAnticipationWiggle 1.2s ease-in-out infinite alternate !important;
}

@keyframes dogAnticipationWiggle {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) scale(1.03) rotate(1.5deg);
  }
  100% {
    transform: translateY(-4px) scale(1.02) rotate(-1.5deg);
  }
}

.dog-anticipation-target {
  position: absolute !important;
  bottom: 0px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 140px !important;
  height: 34px !important;
  border-radius: 50% !important;
  border: 2px dashed rgba(245, 158, 11, 0.7) !important;
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.28) 0%, rgba(245, 158, 11, 0) 75%) !important;
  pointer-events: none !important;
  animation: dogTargetPulse 1.4s ease-in-out infinite !important;
  z-index: 1 !important;
}

@keyframes dogTargetPulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.7;
    border-color: rgba(245, 158, 11, 0.7);
  }
  50% {
    transform: translateX(-50%) scale(1.14);
    opacity: 1;
    border-color: rgba(251, 191, 36, 1);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.55);
  }
}

/* Dog Hungry Hover State (when treat is directly over the dog) */
.enzo-character-wrap.dog-hungry-hover .enzo-avatar {
  transform: scale(1.1) translateY(-12px) !important;
  filter: drop-shadow(0 0 24px rgba(52, 211, 153, 0.75)) drop-shadow(0 15px 30px rgba(0, 0, 0, 0.6)) !important;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease !important;
}

.enzo-character-wrap.dog-hungry-hover .dog-anticipation-target {
  border-color: #34d399 !important;
  border-style: solid !important;
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.45) 0%, rgba(16, 185, 129, 0) 75%) !important;
  box-shadow: 0 0 26px rgba(52, 211, 153, 0.75) !important;
  transform: translateX(-50%) scale(1.24) !important;
  animation: none !important;
}

/* Hand-Fed Celebratory Vertical Joy Bounce */
.enzo-character-wrap.dog-hand-fed-joy {
  animation: dogHandFedJoy 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes dogHandFedJoy {
  0% {
    transform: scale(1) translateY(0);
  }
  25% {
    transform: scale(1.18, 0.86) translateY(-32px);
  }
  50% {
    transform: scale(0.94, 1.14) translateY(-40px);
  }
  75% {
    transform: scale(1.08, 0.94) translateY(-10px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

/* Treat Catch Celebratory 360 Spin */
.enzo-character-wrap.dog-treat-spin {
  animation: dogTreatSpin 0.75s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes dogTreatSpin {
  0% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.18) translateY(-32px) rotate(90deg);
  }
  50% {
    transform: scale(1.22) translateY(-38px) rotate(180deg);
  }
  75% {
    transform: scale(1.15) translateY(-18px) rotate(270deg);
  }
  100% {
    transform: scale(1) translateY(0) rotate(360deg);
  }
}

/* ==========================================================================
   Dog Waiting to Receive Bone & Happy Dance Animations
   ========================================================================== */

/* Dog Waiting to Receive the Bone */
.enzo-character-wrap.dog-waiting-for-bone .enzo-avatar {
  animation: dogWaitingForBone 0.38s ease-in-out infinite alternate !important;
  transform-origin: bottom center !important;
}

@keyframes dogWaitingForBone {
  0% {
    transform: translateY(0) scale(1, 1) rotate(0deg);
    filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.65)) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
  }
  100% {
    transform: translateY(-16px) scale(1.05, 0.95) rotate(-2deg);
    filter: drop-shadow(0 0 28px rgba(251, 191, 36, 0.95)) drop-shadow(0 16px 28px rgba(0, 0, 0, 0.6));
  }
}

.enzo-character-wrap.dog-waiting-for-bone::after {
  content: '🦴✨';
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.6rem;
  line-height: 1;
  pointer-events: none;
  animation: dogWaitingBubble 0.5s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
  z-index: 10;
}

@keyframes dogWaitingBubble {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 0.85;
  }
  100% {
    transform: translateX(-50%) translateY(-10px) scale(1.18);
    opacity: 1;
  }
}

/* Celebratory Happy Dance upon receiving the bone */
.enzo-character-wrap.dog-happy-dance {
  animation: dogHappyDance 2.2s cubic-bezier(0.28, 0.84, 0.42, 1) forwards !important;
  transform-origin: bottom center !important;
}

@keyframes dogHappyDance {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  /* Phase 1: High Joyful Leap! */
  10% {
    transform: translateY(-42px) scale(1.14, 0.88) rotate(-6deg);
  }
  20% {
    transform: translateY(-48px) scale(0.92, 1.15) rotate(6deg);
  }
  30% {
    transform: translateY(0) scale(1.18, 0.86) rotate(0deg);
  }
  /* Phase 2: Rapid Joyous Tippy-Tap Wiggle Dance! */
  38% {
    transform: translateY(-18px) scale(1.08) rotate(-14deg);
  }
  46% {
    transform: translateY(-12px) scale(1.08) rotate(14deg);
  }
  54% {
    transform: translateY(-20px) scale(1.1) rotate(-14deg);
  }
  62% {
    transform: translateY(-12px) scale(1.1) rotate(14deg);
  }
  /* Phase 3: Joyous Celebratory Spin in mid-air! */
  72% {
    transform: translateY(-38px) scale(1.16) rotate(180deg);
  }
  82% {
    transform: translateY(-18px) scale(1.12) rotate(360deg);
  }
  /* Phase 4: Proud Happy Stance with Chest Puffed! */
  90% {
    transform: translateY(-6px) scale(1.06, 0.96) rotate(360deg);
  }
  100% {
    transform: translateY(0) scale(1) rotate(360deg);
  }
}

/* Visible Bone held in Dog's mouth while dancing and trotting away */
.dog-mouth-bone {
  position: absolute;
  top: 30%;
  left: 32%;
  transform: translate(-50%, -50%) rotate(-14deg);
  font-size: 2.2rem;
  line-height: 1;
  pointer-events: none;
  z-index: 10;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(251, 191, 36, 0.45));
  animation: dogMouthBoneWiggle 0.35s ease-in-out infinite alternate;
  user-select: none;
  transition: left 0.2s ease, transform 0.2s ease;
}

.dog-mouth-bone.facing-right {
  left: 68%;
  transform: translate(-50%, -50%) scaleX(-1) rotate(-14deg);
  animation-name: dogMouthBoneWiggleRight;
}

@keyframes dogMouthBoneWiggle {
  0% {
    transform: translate(-50%, -50%) rotate(-18deg) scale(1);
  }
  100% {
    transform: translate(-50%, -50%) rotate(-8deg) scale(1.06);
  }
}

@keyframes dogMouthBoneWiggleRight {
  0% {
    transform: translate(-50%, -50%) scaleX(-1) rotate(-18deg) scale(1);
  }
  100% {
    transform: translate(-50%, -50%) scaleX(-1) rotate(-8deg) scale(1.06);
  }
}

@media (max-width: 768px) {
  .dog-mouth-bone {
    font-size: 1.65rem;
    top: 28%;
    left: 30%;
  }
  .dog-mouth-bone.facing-right {
    left: 70%;
  }
}

/* Celebration Confetti Particles */
.enzo-particle.dog-celebration-particle {
  position: fixed;
  z-index: 100060;
  pointer-events: none;
  user-select: none;
  animation: dogCelebrationParticleFly 1.35s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

@keyframes dogCelebrationParticleFly {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.6) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: translate(var(--dx), -85px) scale(1.3) rotate(var(--rot));
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--dx) * 1.3), -135px) scale(0.8) rotate(calc(var(--rot) * 2));
  }
}

/* Wake Up Stretch Animation */
.enzo-character-wrap.dog-wake-stretch {
  animation: dogWakeStretch 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes dogWakeStretch {
  0% {
    transform: scale(0.92) translateY(8px);
  }
  40% {
    transform: scale(1.12, 0.86) translateY(5px);
  }
  75% {
    transform: scale(0.96, 1.08) translateY(-10px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .enzo-character-wrap,
  .dog-running,
  .dog-skidding,
  .enzo-walking,
  .enzo-bumping,
  .enzo-petting,
  .enzo-bump-react {
    animation: none !important;
    transition: opacity 0.3s ease !important;
  }
}

/* ==========================================================================
   Dog Companions - Light Mode Overrides
   ========================================================================== */
[data-theme="light"] .enzo-speech-bubble {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.94) 40%,
    rgba(241, 245, 249, 0.95) 100%
  ) !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  border-top: 1.5px solid rgba(255, 255, 255, 0.98) !important;
  box-shadow: 
    0 18px 45px -10px rgba(15, 23, 42, 0.14),
    0 0 20px rgba(5, 150, 105, 0.10),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.8) !important;
  color: #0f172a !important;
}

[data-theme="light"] .enzo-bubble-text {
  color: #0f172a !important;
  text-shadow: none !important;
}

[data-theme="light"] .enzo-bubble-text em {
  color: #047857 !important;
  font-weight: 600 !important;
}

[data-theme="light"] .dog-bubble-category-pill {
  background: rgba(2, 132, 199, 0.12) !important;
  border: 1px solid rgba(2, 132, 199, 0.35) !important;
  color: #0284c7 !important;
  box-shadow: none !important;
}

[data-theme="light"] .dog-bubble-category-pill:hover {
  background: rgba(2, 132, 199, 0.22) !important;
  border-color: #0284c7 !important;
  color: #0369a1 !important;
}

[data-theme="light"] .enzo-btn-secondary {
  background: rgba(15, 23, 42, 0.07) !important;
  border: 1px solid rgba(15, 23, 42, 0.18) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.9) !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .enzo-btn-secondary:hover {
  background: rgba(15, 23, 42, 0.14) !important;
  border-color: rgba(15, 23, 42, 0.3) !important;
  color: #000000 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14) !important;
}

[data-theme="light"] .enzo-btn-secondary span {
  color: #0f172a !important;
}

[data-theme="light"] .enzo-btn-secondary:hover span {
  color: #000000 !important;
}

[data-theme="light"] .enzo-btn-primary {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #ffffff !important;
  border: 1px solid #047857 !important;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.35) !important;
}

[data-theme="light"] .enzo-btn-primary:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
  border-color: #065f46 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.45) !important;
}

[data-theme="light"] .dog-floor-nametag {
  color: #0f172a !important;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .dog-floating-treat-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(217, 119, 6, 0.32) 100%) !important;
  border: 1.5px solid rgba(217, 119, 6, 0.55) !important;
  border-top: 1.5px solid rgba(255, 255, 255, 0.9) !important;
  color: #92400e !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 0 20px rgba(245, 158, 11, 0.25) !important;
}

[data-theme="light"] .dog-floating-treat-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.30) 0%, rgba(217, 119, 6, 0.45) 100%) !important;
  border-color: #d97706 !important;
  color: #78350f !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18), 0 0 28px rgba(245, 158, 11, 0.4) !important;
}

[data-theme="light"] .enzo-avatar {
  filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.18)) drop-shadow(0 2px 5px rgba(15, 23, 42, 0.12));
}

[data-theme="light"] .dog-summon-name {
  background: rgba(255, 255, 255, 0.96) !important;
  color: #0f172a !important;
  border-color: rgba(5, 150, 105, 0.35) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .dog-summon-name::before {
  border-color: transparent transparent rgba(255, 255, 255, 0.96) transparent !important;
}

[data-theme="light"] .dog-summon-btn:hover .dog-summon-name {
  border-color: rgba(5, 150, 105, 0.7) !important;
  color: #047857 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15), 0 0 10px rgba(16, 185, 129, 0.25) !important;
}



[data-theme="light"] .dog-anticipation-target {
  border-color: rgba(217, 119, 6, 0.75) !important;
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.22) 0%, rgba(245, 158, 11, 0) 75%) !important;
}

[data-theme="light"] .enzo-character-wrap.dog-hungry-hover .dog-anticipation-target {
  border-color: #059669 !important;
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.32) 0%, rgba(16, 185, 129, 0) 75%) !important;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.5) !important;
}

/* ==========================================================================
   Ambient Music Synchronized Dancing for Canine Companions
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Header & Mobile Navigation Dock Dancing Styles
   -------------------------------------------------------------------------- */
.mobile-dog-dock.is-music-dancing {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 18px rgba(16, 185, 129, 0.4), inset 0 0 12px rgba(52, 211, 153, 0.15) !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
}

[data-theme="light"] .mobile-dog-dock.is-music-dancing {
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.15), 0 0 16px rgba(5, 150, 105, 0.35) !important;
  border-color: rgba(5, 150, 105, 0.5) !important;
}

/* Ensure the header hanging dock NEVER receives container box-shadow or border even when dancing */
.nav-hanging-dogs.is-music-dancing,
.site-header .dog-summon-dock.is-music-dancing,
.nav-island .dog-summon-dock.is-music-dancing,
.welcome-stage-header .dog-summon-dock.is-music-dancing {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Floating musical notes above dock */
.dog-summon-dock.is-music-dancing::after {
  content: '♪';
  position: absolute;
  top: -14px;
  right: 6px;
  font-size: 13px;
  color: #34d399;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.85);
  animation: dockMusicNoteFloat 2.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 10;
}

@keyframes dockMusicNoteFloat {
  0% {
    transform: translateY(0) scale(0.7) rotate(-8deg);
    opacity: 0;
  }
  25% {
    opacity: 0.95;
  }
  75% {
    opacity: 0.8;
    transform: translateY(-12px) translateX(4px) scale(1.1) rotate(10deg);
  }
  100% {
    transform: translateY(-20px) translateX(7px) scale(0.9) rotate(16deg);
    opacity: 0;
  }
}

/* Dock buttons subtle musical pulse */
.dog-summon-dock.is-music-dancing .dog-summon-btn {
  animation: dockBtnBeatPulse 1.08s ease-in-out infinite;
}

@keyframes dockBtnBeatPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.dog-summon-dock.is-music-dancing .dog-summon-btn:hover {
  animation-play-state: paused;
}

/* Dock avatars grooving with multi-beat signature rhythm */
.dog-summon-dock.is-music-dancing .dog-summon-btn[data-dog-id="enzo"] .dog-summon-avatar {
  animation: dockEnzoGroove 0.84s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  transform-origin: center bottom;
}

.dog-summon-dock.is-music-dancing .dog-summon-btn[data-dog-id="doodle"] .dog-summon-avatar {
  animation: dockDoodleGroove 1.4s cubic-bezier(0.4, 0, 0.2, 1) infinite 0.15s;
  transform-origin: center 18%;
}

.dog-summon-dock.is-music-dancing .dog-summon-btn[data-dog-id="mariah"] .dog-summon-avatar {
  animation: dockMariahGroove 1.08s cubic-bezier(0.25, 0.8, 0.25, 1) infinite 0.3s;
  transform-origin: center 18%;
}

.dog-summon-dock.is-music-dancing .dog-summon-btn[data-dog-id="stella"] .dog-summon-avatar {
  animation: dockStellaGroove 0.72s cubic-bezier(0.34, 1.56, 0.64, 1) infinite 0.45s;
  transform-origin: center 18%;
}

@keyframes dockEnzoGroove {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate3d(-1.5px, -2px, 0) rotate(-4deg) scale(1.04);
  }
  50% {
    transform: translate3d(0, 1px, 0) rotate(0deg) scale(1.08);
  }
  75% {
    transform: translate3d(1.5px, -3px, 0) rotate(5deg) scale(1.05);
  }
}

@keyframes dockDoodleGroove {
  0%, 100% {
    transform: scale(1.35) rotate(-3deg);
  }
  25% {
    transform: scale(1.37) translate3d(-1px, 1.5px, 0) rotate(-1deg);
  }
  50% {
    transform: scale(1.35) translate3d(0, -2px, 0) rotate(3deg);
  }
  75% {
    transform: scale(1.38) translate3d(1px, 1.5px, 0) rotate(1deg);
  }
}

@keyframes dockMariahGroove {
  0%, 100% {
    transform: scale(1.35) rotate(0deg) translate3d(0, 0, 0);
  }
  25% {
    transform: scale(1.37) rotate(-5deg) translate3d(-1.5px, -2px, 0);
  }
  50% {
    transform: scale(1.35) rotate(0deg) translate3d(0, 1px, 0);
  }
  75% {
    transform: scale(1.38) rotate(5deg) translate3d(1.5px, -2.5px, 0);
  }
}

@keyframes dockStellaGroove {
  0%, 100% {
    transform: scale(1.35) translate3d(0, 0, 0) rotate(0deg);
  }
  25% {
    transform: scale(1.4) translate3d(-1px, -3px, 0) rotate(-5deg);
  }
  50% {
    transform: scale(1.37) translate3d(0, 1px, 0) rotate(2deg);
  }
  75% {
    transform: scale(1.42) translate3d(1px, -4px, 0) rotate(6deg);
  }
}

.dog-summon-dock.is-music-dancing .dog-summon-btn[data-dog-id="growlet"] .dog-summon-avatar {
  animation: dockGrowletGroove 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) infinite 0.35s;
  transform-origin: center 16%;
}

@keyframes dockGrowletGroove {
  0%, 100% {
    transform: scale(1.35) translate3d(0, 0, 0) rotate(0deg);
  }
  25% {
    transform: scale(1.4) translate3d(-1px, -2px, 0) rotate(-4deg);
  }
  50% {
    transform: scale(1.35) translate3d(0, 1px, 0) rotate(0deg);
  }
  75% {
    transform: scale(1.38) translate3d(1px, -2px, 0) rotate(4deg);
  }
}

/* --------------------------------------------------------------------------
   2. Glowing Stage Dance Floor (Pulsing neon disc under dancing paws)
   -------------------------------------------------------------------------- */
.dog-dance-floor {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 24px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.4s ease, transform 0.4s ease;
  filter: blur(1.5px);
}

.enzo-character-wrap.is-music-dancing:not(.dog-sleeping):not(.dog-waiting-for-bone) .dog-dance-floor {
  opacity: 0.85;
}

/* Dog-specific neon dance floor themes */
.enzo-character-wrap.dog--enzo .dog-dance-floor,
.enzo-character-wrap[data-dog-id="enzo"] .dog-dance-floor {
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.65) 0%, rgba(5, 150, 105, 0.35) 45%, rgba(16, 185, 129, 0) 75%);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.5);
  animation: enzoStagePulse 2.16s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.enzo-character-wrap.dog--doodle .dog-dance-floor,
.enzo-character-wrap[data-dog-id="doodle"] .dog-dance-floor {
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.65) 0%, rgba(217, 119, 6, 0.35) 45%, rgba(245, 158, 11, 0) 75%);
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.5);
  animation: doodleStagePulse 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.enzo-character-wrap.dog--mariah .dog-dance-floor,
.enzo-character-wrap[data-dog-id="mariah"] .dog-dance-floor {
  background: radial-gradient(ellipse at center, rgba(236, 72, 153, 0.65) 0%, rgba(219, 39, 119, 0.35) 45%, rgba(236, 72, 153, 0) 75%);
  box-shadow: 0 0 22px rgba(236, 72, 153, 0.5);
  animation: mariahStagePulse 2.4s cubic-bezier(0.25, 0.8, 0.25, 1) infinite;
}

.enzo-character-wrap.dog--stella .dog-dance-floor,
.enzo-character-wrap[data-dog-id="stella"] .dog-dance-floor {
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.65) 0%, rgba(14, 165, 233, 0.35) 45%, rgba(56, 189, 248, 0) 75%);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.5);
  animation: stellaStagePulse 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

.enzo-character-wrap.dog--growlet .dog-dance-floor,
.enzo-character-wrap[data-dog-id="growlet"] .dog-dance-floor {
  background: radial-gradient(ellipse at center, rgba(234, 179, 8, 0.7) 0%, rgba(202, 138, 4, 0.35) 45%, rgba(234, 179, 8, 0) 75%);
  box-shadow: 0 0 24px rgba(234, 179, 8, 0.55);
  animation: growletStagePulse 1.9s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

@keyframes enzoStagePulse {
  0%, 50%, 100% {
    transform: translateX(-50%) scale(1, 1);
    opacity: 0.85;
  }
  25%, 37.5% {
    transform: translateX(-50%) scale(1.15, 0.85);
    opacity: 1;
  }
  72%, 78% {
    transform: translateX(-50%) scale(0.65, 0.65);
    opacity: 0.35;
  }
  90% {
    transform: translateX(-50%) scale(1.22, 0.8);
    opacity: 1;
  }
}

@keyframes doodleStagePulse {
  0%, 100% {
    transform: translateX(-50%) scale(1, 1);
    opacity: 0.8;
  }
  22%, 46% {
    transform: translateX(-50%) scale(1.18, 0.88);
    opacity: 0.95;
  }
  68%, 84% {
    transform: translateX(-50%) scale(1.22, 0.82);
    opacity: 1;
  }
  30%, 62% {
    transform: translateX(-50%) scale(0.92, 0.92);
    opacity: 0.6;
  }
}

@keyframes mariahStagePulse {
  0%, 100% {
    transform: translateX(-50%) scale(1, 1);
    opacity: 0.85;
  }
  13%, 40% {
    transform: translateX(-50%) scale(1.16, 0.86);
    opacity: 0.98;
  }
  26%, 84% {
    transform: translateX(-50%) scale(1.24, 0.82);
    opacity: 1;
  }
  76% {
    transform: translateX(-50%) scale(0.68, 0.68);
    opacity: 0.38;
  }
}

@keyframes stellaStagePulse {
  0%, 100% {
    transform: translateX(-50%) scale(1, 1);
    opacity: 0.85;
  }
  12%, 24% {
    transform: translateX(-50%) scale(1.12, 0.9);
    opacity: 0.95;
  }
  36% {
    transform: translateX(-50%) scale(1.18, 0.85);
    opacity: 0.98;
  }
  66%, 74% {
    transform: translateX(-50%) scale(0.55, 0.55);
    opacity: 0.3;
  }
  88% {
    transform: translateX(-50%) scale(1.28, 0.78);
    opacity: 1;
  }
}

@keyframes growletStagePulse {
  0%, 100% {
    transform: translateX(-50%) scale(1, 1);
    opacity: 0.85;
  }
  25%, 75% {
    transform: translateX(-50%) scale(1.15, 0.9);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) scale(1.05, 1.05);
    opacity: 0.9;
  }
}

/* --------------------------------------------------------------------------
   3. Ambient Musical Particle Stream & Breakdance Spin
   -------------------------------------------------------------------------- */
.dog-music-particle {
  position: fixed;
  pointer-events: none;
  z-index: 100030;
  font-size: 1.35rem;
  line-height: 1;
  font-family: system-ui, -apple-system, sans-serif;
  user-select: none;
  animation: dogMusicParticleRise 2.1s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  will-change: transform, opacity;
}

@keyframes dogMusicParticleRise {
  0% {
    transform: translate3d(0, 0, 0) scale(0.4) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
    transform: translate3d(calc(var(--drift-x, 0px) * 0.2), -16px, 0) scale(1.15) rotate(-8deg);
  }
  50% {
    opacity: 0.95;
    transform: translate3d(calc(var(--drift-x, 0px) * 0.6), -48px, 0) scale(1.05) rotate(12deg);
  }
  80% {
    opacity: 0.7;
    transform: translate3d(var(--drift-x, 0px), -78px, 0) scale(0.9) rotate(-14deg);
  }
  100% {
    transform: translate3d(calc(var(--drift-x, 0px) * 1.2), -105px, 0) scale(0.6) rotate(22deg);
    opacity: 0;
  }
}

/* Breakdance 360 Spin on Petting / Click during Music */
.enzo-character-wrap.dog-dance-spin .enzo-avatar,
.enzo-co-wrap.dog-dance-spin .enzo-co-avatar {
  animation: dogBreakdanceSpin 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
  transform-origin: center 60% !important;
}

@keyframes dogBreakdanceSpin {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  20% {
    transform: translate3d(0, -18px, 0) rotate(-90deg) scale(0.9, 1.1);
  }
  45% {
    transform: translate3d(0, -28px, 0) rotate(-180deg) scale(1.08, 0.92);
  }
  70% {
    transform: translate3d(0, -16px, 0) rotate(-270deg) scale(0.92, 1.08);
  }
  88% {
    transform: translate3d(0, 4px, 0) rotate(-360deg) scale(1.12, 0.88);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(-360deg) scale(1);
  }
}

/* Floating musical notes above sitting dancing dog */
.enzo-character-wrap.is-music-dancing::after {
  content: '♪';
  position: absolute;
  top: -14px;
  right: 14px;
  font-size: 1.25rem;
  color: #34d399;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.85), 0 0 20px rgba(16, 185, 129, 0.6);
  pointer-events: none;
  animation: dogMusicNoteFloat 2.2s ease-in-out infinite;
  z-index: 100025;
}

.enzo-character-wrap.is-music-dancing::before {
  content: '♫';
  position: absolute;
  top: -8px;
  left: 14px;
  font-size: 1rem;
  color: #6ee7b7;
  text-shadow: 0 0 10px rgba(110, 231, 183, 0.85);
  pointer-events: none;
  animation: dogMusicNoteFloat 2.6s ease-in-out infinite 0.8s;
  z-index: 100025;
}

/* Suppress floating musical notes during sleep, petting, or treat waiting */
.enzo-character-wrap.dog-waiting-for-bone::after,
.enzo-character-wrap.dog-waiting-for-bone::before,
.enzo-character-wrap.dog-sleeping::after,
.enzo-character-wrap.dog-sleeping::before,
.enzo-character-wrap.enzo-petting::after,
.enzo-character-wrap.enzo-petting::before {
  display: none !important;
}

@keyframes dogMusicNoteFloat {
  0% {
    transform: translateY(0) translateX(0) scale(0.7) rotate(-10deg);
    opacity: 0;
  }
  20% {
    opacity: 0.95;
  }
  70% {
    opacity: 0.8;
    transform: translateY(-24px) translateX(8px) scale(1.1) rotate(12deg);
  }
  100% {
    transform: translateY(-40px) translateX(14px) scale(0.85) rotate(20deg);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   4. High-Fidelity 8-Beat Dog Choreographies
   -------------------------------------------------------------------------- */

/* Enzo: 8-Beat Rockstar Funk, Jump & Ear-Whip Routine */
.enzo-character-wrap.is-music-dancing.dog--enzo:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-avatar,
.enzo-character-wrap.is-music-dancing[data-dog-id="enzo"]:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-avatar,
.enzo-character-wrap.is-music-dancing.dog--enzo:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-co-avatar,
.enzo-character-wrap.is-music-dancing[data-dog-id="enzo"]:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-co-avatar {
  animation: enzoMusicDance 2.16s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  transform-origin: bottom center;
}

@keyframes enzoMusicDance {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1);
  }
  6% {
    transform: translate3d(-2px, 3px, 0) rotate(-1deg) scale(1.04, 0.96);
  }
  12.5% {
    transform: translate3d(-12px, -8px, 0) rotate(-8deg) scale(0.96, 1.04);
  }
  18% {
    transform: translate3d(-8px, -2px, 0) rotate(-4deg) scale(1.02, 0.98);
  }
  25% {
    transform: translate3d(-3px, 4px, 0) rotate(-2deg) scale(1.08, 0.92);
  }
  31% {
    transform: translate3d(4px, -6px, 0) rotate(2deg) scale(0.97, 1.03);
  }
  37.5% {
    transform: translate3d(14px, -10px, 0) rotate(9deg) scale(0.95, 1.05);
  }
  44% {
    transform: translate3d(10px, 2px, 0) rotate(5deg) scale(1.04, 0.96);
  }
  50% {
    transform: translate3d(0, 4px, 0) rotate(0deg) scale(1.1, 0.9);
  }
  56% {
    transform: translate3d(0, -6px, 0) rotate(2deg) scale(0.98, 1.02);
  }
  62.5% {
    transform: translate3d(0, 7px, 0) rotate(-2deg) scale(1.15, 0.85);
  }
  72% {
    transform: translate3d(0, -28px, 0) rotate(-7deg) scale(0.88, 1.15);
  }
  78% {
    transform: translate3d(4px, -24px, 0) rotate(6deg) scale(0.94, 1.06);
  }
  84% {
    transform: translate3d(2px, -10px, 0) rotate(2deg) scale(0.98, 1.02);
  }
  90% {
    transform: translate3d(0, 6px, 0) rotate(-1deg) scale(1.14, 0.86);
  }
  95% {
    transform: translate3d(0, 2px, 0) rotate(0deg) scale(1.03, 0.97);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1);
  }
}

/* Doodle: 8-Beat Lo-Fi Couch Groove, Double Chin Nod & Hip Roll */
.enzo-character-wrap.is-music-dancing.dog--doodle:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-avatar,
.enzo-character-wrap.is-music-dancing[data-dog-id="doodle"]:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-avatar,
.enzo-character-wrap.is-music-dancing.dog--doodle:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-co-avatar,
.enzo-character-wrap.is-music-dancing[data-dog-id="doodle"]:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-co-avatar {
  animation: doodleMusicDance 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transform-origin: center bottom;
}

@keyframes doodleMusicDance {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1);
  }
  8% {
    transform: translate3d(-6px, 2px, 0) rotate(-2deg) scale(1.02, 0.98);
  }
  14% {
    transform: translate3d(-16px, -4px, 0) rotate(-6deg) scale(0.98, 1.02);
  }
  22% {
    transform: translate3d(-12px, 6px, 0) rotate(-3deg) scale(1.07, 0.93);
  }
  30% {
    transform: translate3d(-2px, -6px, 0) rotate(0deg) scale(0.97, 1.03);
  }
  38% {
    transform: translate3d(16px, -4px, 0) rotate(6deg) scale(0.98, 1.02);
  }
  46% {
    transform: translate3d(12px, 6px, 0) rotate(3deg) scale(1.07, 0.93);
  }
  54% {
    transform: translate3d(4px, 0, 0) rotate(1deg) scale(1, 1);
  }
  62% {
    transform: translate3d(0, -9px, 0) rotate(-4deg) scale(0.96, 1.04);
  }
  68% {
    transform: translate3d(0, 7px, 0) rotate(2deg) scale(1.1, 0.9);
  }
  76% {
    transform: translate3d(0, -6px, 0) rotate(-2deg) scale(0.97, 1.03);
  }
  84% {
    transform: translate3d(0, 6px, 0) rotate(1deg) scale(1.09, 0.91);
  }
  92% {
    transform: translate3d(0, 2px, 0) rotate(0deg) scale(1.03, 0.97);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1);
  }
}

/* Mariah: 8-Beat Haute Couture Runway Voguing, Catwalk Cross-Steps & Hip Pivots */
.enzo-character-wrap.is-music-dancing.dog--mariah:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-avatar,
.enzo-character-wrap.is-music-dancing[data-dog-id="mariah"]:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-avatar,
.enzo-character-wrap.is-music-dancing.dog--mariah:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-co-avatar,
.enzo-character-wrap.is-music-dancing[data-dog-id="mariah"]:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-co-avatar {
  animation: mariahMusicDance 2.4s cubic-bezier(0.25, 0.8, 0.25, 1) infinite;
  transform-origin: 50% 85%;
}

@keyframes mariahMusicDance {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) skewX(0deg) scale(1, 1);
  }
  7% {
    transform: translate3d(0, -4px, 0) rotate(1deg) scale(0.98, 1.02);
  }
  13% {
    transform: translate3d(-15px, -8px, 0) rotate(-10deg) skewX(-6deg) scale(0.95, 1.05);
  }
  20% {
    transform: translate3d(-14px, -6px, 0) rotate(-8deg) skewX(-4deg) scale(0.97, 1.03);
  }
  26% {
    transform: translate3d(-8px, 5px, 0) rotate(-4deg) skewX(-2deg) scale(1.08, 0.92);
  }
  33% {
    transform: translate3d(2px, -14px, 0) rotate(3deg) skewX(2deg) scale(0.94, 1.06);
  }
  40% {
    transform: translate3d(16px, -9px, 0) rotate(11deg) skewX(6deg) scale(0.95, 1.05);
  }
  47% {
    transform: translate3d(14px, -6px, 0) rotate(9deg) skewX(4deg) scale(0.97, 1.03);
  }
  54% {
    transform: translate3d(8px, 4px, 0) rotate(4deg) skewX(2deg) scale(1.07, 0.93);
  }
  61% {
    transform: translate3d(-6px, -10px, 0) rotate(-6deg) skewX(-3deg) scale(0.96, 1.04);
  }
  68% {
    transform: translate3d(6px, -10px, 0) rotate(6deg) skewX(3deg) scale(0.96, 1.04);
  }
  76% {
    transform: translate3d(0, -22px, 0) rotate(-8deg) skewX(-2deg) scale(0.91, 1.1);
  }
  84% {
    transform: translate3d(0, 5px, 0) rotate(2deg) skewX(1deg) scale(1.12, 0.88);
  }
  92% {
    transform: translate3d(0, -2px, 0) rotate(0deg) scale(0.99, 1.01);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) skewX(0deg) scale(1, 1);
  }
}

/* Stella: 8-Beat Joyful Puppy Tippy-Tap Pop & Twist */
.enzo-character-wrap.is-music-dancing.dog--stella:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-avatar,
.enzo-character-wrap.is-music-dancing[data-dog-id="stella"]:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-avatar,
.enzo-character-wrap.is-music-dancing.dog--stella:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-co-avatar,
.enzo-character-wrap.is-music-dancing[data-dog-id="stella"]:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-co-avatar {
  animation: stellaMusicDance 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
  transform-origin: bottom center;
}

@keyframes stellaMusicDance {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1);
  }
  6% {
    transform: translate3d(-8px, -4px, 0) rotate(-7deg) scale(0.97, 1.03);
  }
  12% {
    transform: translate3d(-5px, 3px, 0) rotate(-4deg) scale(1.08, 0.92);
  }
  18% {
    transform: translate3d(8px, -4px, 0) rotate(7deg) scale(0.97, 1.03);
  }
  24% {
    transform: translate3d(5px, 3px, 0) rotate(4deg) scale(1.08, 0.92);
  }
  30% {
    transform: translate3d(0, -14px, 0) rotate(-3deg) scale(0.93, 1.07);
  }
  36% {
    transform: translate3d(0, 4px, 0) rotate(2deg) scale(1.12, 0.88);
  }
  42% {
    transform: translate3d(-6px, -8px, 0) rotate(-12deg) scale(0.96, 1.04);
  }
  48% {
    transform: translate3d(6px, -8px, 0) rotate(12deg) scale(0.96, 1.04);
  }
  56% {
    transform: translate3d(0, 8px, 0) rotate(0deg) scale(1.2, 0.8);
  }
  66% {
    transform: translate3d(0, -32px, 0) rotate(14deg) scale(0.85, 1.18);
  }
  74% {
    transform: translate3d(4px, -26px, 0) rotate(-12deg) scale(0.9, 1.12);
  }
  82% {
    transform: translate3d(-2px, -8px, 0) rotate(4deg) scale(0.98, 1.02);
  }
  88% {
    transform: translate3d(0, 7px, 0) rotate(-2deg) scale(1.18, 0.82);
  }
  94% {
    transform: translate3d(0, -3px, 0) rotate(1deg) scale(0.98, 1.02);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1);
  }
}

/* Robert Growlet: Suave Vegas Baritone Swag Groove */
.enzo-character-wrap.is-music-dancing.dog--growlet:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-avatar,
.enzo-character-wrap.is-music-dancing[data-dog-id="growlet"]:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-avatar,
.enzo-character-wrap.is-music-dancing.dog--growlet:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-co-avatar,
.enzo-character-wrap.is-music-dancing[data-dog-id="growlet"]:not(.enzo-petting):not(.dog-waiting-for-bone):not(.dog-happy-dance):not(.dog-sleeping):not(.dog-wake-stretch):not(.dog-dance-spin) .enzo-co-avatar {
  animation: growletMusicDance 1.9s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
  transform-origin: bottom center;
}

@keyframes growletMusicDance {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1, 1);
  }
  15% {
    transform: translate3d(-5px, -6px, 0) rotate(-5deg) scale(0.98, 1.03);
  }
  30% {
    transform: translate3d(-3px, 3px, 0) rotate(-2deg) scale(1.06, 0.94);
  }
  50% {
    transform: translate3d(0, -10px, 0) rotate(0deg) scale(1.02, 0.98);
  }
  65% {
    transform: translate3d(5px, -6px, 0) rotate(5deg) scale(0.98, 1.03);
  }
  80% {
    transform: translate3d(3px, 3px, 0) rotate(2deg) scale(1.06, 0.94);
  }
}

/* ==========================================================================
   ROBERT GROWLER: THE UNHINGED CROONER (SPECIAL CHARACTER ENGINE)
   ========================================================================== */

/* Character Container in Robert Growler Mode */
.enzo-character-wrap.dog--growlet {
  position: fixed;
  z-index: 99995;
  will-change: transform, left, bottom;
}

/* 1. Peeking Entrance from Bottom Canvas */
.enzo-character-wrap.growler-peeking-mode {
  transition: bottom 1.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s ease;
  cursor: pointer;
}

.enzo-character-wrap.growler-peeking-mode .enzo-avatar {
  filter: drop-shadow(0 -4px 18px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 12px rgba(251, 191, 36, 0.25));
  animation: growlerPeekingBreath 2.4s ease-in-out infinite alternate;
  max-width: 210px !important;
}

@keyframes growlerPeekingBreath {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

/* 2. Full Glory Belting Mode */
.enzo-character-wrap.growler-belting-mode .enzo-avatar {
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 28px rgba(251, 191, 36, 0.45));
  animation: growlerBeltingPassion 1.8s ease-in-out infinite;
  transform-origin: bottom center;
  max-width: 220px !important;
}

@keyframes growlerBeltingPassion {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.03, 0.98) rotate(-2deg); }
  50% { transform: scale(0.99, 1.04) rotate(0deg) translateY(-6px); }
  75% { transform: scale(1.02, 0.99) rotate(2deg); }
}

/* ==========================================================================
   Robert Growler: 3D Volumetric Stage Spotlight Rig
   ========================================================================== */
.growler-spotlight {
  display: none !important;
}

.growler-3d-spotlight-rig {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99990;
  opacity: 1;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible;
}

.growler-3d-spotlight-rig.spotlight-igniting {
  animation: spotlightIgnitionSurge 0.52s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.growler-3d-spotlight-rig.spotlight-fading-out {
  opacity: 0 !important;
  transition: opacity 0.45s ease-out !important;
}

/* 1. Overhead Stage Truss & Fresnel Fixture Housing */
.spotlight-truss-fixture {
  position: absolute;
  top: -4px;
  width: 68px;
  height: 30px;
  margin-left: -34px;
  background: linear-gradient(180deg, #090d16 0%, #1e293b 50%, #0f172a 100%);
  border-radius: 4px 4px 10px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  z-index: 5;
  transform-origin: 50% 6px;
  transition: left 0.45s cubic-bezier(0.25, 1, 0.5, 1), transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.spotlight-truss-fixture::before {
  /* Mounting bracket clamp */
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 8px;
  background: #334155;
  border-radius: 2px;
  border: 1px solid #475569;
}

/* Fixture Lens & Blazing Filament Core */
.spotlight-fixture-lens {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 14px;
  border-radius: 50%;
  background: var(--spot-lens-bg, radial-gradient(ellipse at 50% 50%, #ffffff 0%, #fef08a 40%, #f59e0b 80%, rgba(245, 158, 11, 0) 100%));
  box-shadow: 0 0 26px 8px var(--spot-flare-color, rgba(254, 240, 138, 0.95)), 0 0 54px 20px var(--spot-rim-color, rgba(251, 191, 36, 0.7));
  filter: drop-shadow(0 0 16px #ffffff);
}

/* Anamorphic Lens Flare & Corona */
.spotlight-lens-flare {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: var(--spot-corona-bg, radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(254, 240, 138, 0.45) 20%, rgba(251, 191, 36, 0.15) 50%, transparent 75%));
  pointer-events: none;
  mix-blend-mode: screen;
}

.spotlight-lens-flare::after {
  /* Anamorphic horizontal streak */
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  height: 3px;
  background: var(--spot-streak-bg, linear-gradient(90deg, transparent 0%, rgba(254, 240, 138, 0.2) 20%, #ffffff 50%, rgba(254, 240, 138, 0.2) 80%, transparent 100%));
  box-shadow: 0 0 14px var(--spot-flare-color, rgba(254, 240, 138, 0.8));
}

/* 2. Volumetric Conical 3D Light Cone */
.spotlight-volumetric-beam {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: var(--spot-beam-bg, linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.65) 0%,
    rgba(254, 240, 138, 0.38) 12%,
    rgba(251, 191, 36, 0.20) 45%,
    rgba(245, 158, 11, 0.10) 80%,
    rgba(245, 158, 11, 0.03) 96%,
    transparent 100%
  ));
  mix-blend-mode: screen;
  filter: blur(2px);
  transition: clip-path 0.45s cubic-bezier(0.25, 1, 0.5, 1), background 0.45s ease;
}

/* Inner High-Intensity Beam Core */
.spotlight-beam-core {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: var(--spot-core-bg, linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(254, 243, 199, 0.45) 20%,
    rgba(251, 191, 36, 0.18) 60%,
    rgba(245, 158, 11, 0.04) 92%,
    transparent 100%
  ));
  mix-blend-mode: screen;
  filter: blur(3.5px);
  transition: clip-path 0.45s cubic-bezier(0.25, 1, 0.5, 1), background 0.45s ease;
}

/* 3. Theatrical Golden Floating Dust Motes */
.spotlight-motes-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: screen;
}

.spotlight-mote {
  position: absolute;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px 2px var(--spot-flare-color, rgba(254, 240, 138, 0.85));
  opacity: 0;
  animation: spotlightMoteDrift linear infinite;
}

.spotlight-mote:nth-child(1) { width: 4px; height: 4px; animation-duration: 4.2s; animation-delay: 0.1s; }
.spotlight-mote:nth-child(2) { width: 3px; height: 3px; animation-duration: 5.1s; animation-delay: 1.2s; }
.spotlight-mote:nth-child(3) { width: 5px; height: 5px; animation-duration: 4.8s; animation-delay: 2.1s; }
.spotlight-mote:nth-child(4) { width: 3.5px; height: 3.5px; animation-duration: 5.6s; animation-delay: 0.8s; }
.spotlight-mote:nth-child(5) { width: 4.5px; height: 4.5px; animation-duration: 4.5s; animation-delay: 2.8s; }

@keyframes spotlightMoteDrift {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  25% { opacity: 0.9; transform: translateY(-40px) translateX(6px) scale(1); }
  75% { opacity: 0.7; transform: translateY(-110px) translateX(-5px) scale(0.9); }
  100% { transform: translateY(-170px) translateX(4px) scale(0.4); opacity: 0; }
}

/* 4. 3D Stage Floor Light Oval Pool */
.spotlight-stage-floor {
  position: absolute;
  bottom: -28px;
  width: 440px;
  height: 150px;
  margin-left: -220px;
  transform-origin: center center;
  border-radius: 50%;
  background: var(--spot-floor-bg, radial-gradient(
    ellipse at 50% 50%,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(254, 240, 138, 0.82) 28%,
    rgba(251, 191, 36, 0.48) 55%,
    rgba(245, 158, 11, 0.16) 78%,
    transparent 100%
  ));
  box-shadow: 
    0 0 60px 24px var(--spot-rim-color, rgba(251, 191, 36, 0.48)),
    0 0 110px 40px var(--spot-ambient-color, rgba(245, 158, 11, 0.28)),
    inset 0 0 45px rgba(255, 255, 255, 0.85);
  mix-blend-mode: screen;
  filter: blur(2px);
  animation: growlerFloorPulse 3.4s ease-in-out infinite alternate;
  transition: left 0.45s cubic-bezier(0.25, 1, 0.5, 1), transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

/* High-wattage Ignition Strike Flash Keyframes */
@keyframes spotlightIgnitionSurge {
  0% {
    opacity: 0;
    filter: brightness(0.2);
    transform: scaleY(0.08);
  }
  4% {
    opacity: 1;
    filter: brightness(3.2) drop-shadow(0 0 45px #ffffff);
    transform: scaleY(1.04);
  }
  10% {
    opacity: 0.55;
    filter: brightness(1.2);
    transform: scaleY(0.98);
  }
  16% {
    opacity: 1;
    filter: brightness(2.1) drop-shadow(0 0 25px rgba(254, 240, 138, 0.9));
    transform: scaleY(1.02);
  }
  24% {
    opacity: 0.88;
    filter: brightness(1.1);
    transform: scaleY(1);
  }
  32% {
    opacity: 1;
    filter: brightness(1);
    transform: scaleY(1);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
    transform: scaleY(1);
  }
}

/* Floor Pool Theatrical Breathing Pulse */
@keyframes growlerFloorPulse {
  0% {
    transform: rotateX(68deg) scale(0.96);
    opacity: 0.88;
  }
  100% {
    transform: rotateX(68deg) scale(1.05);
    opacity: 1;
  }
}

/* 3. Creepy Prowling Mode */
.enzo-character-wrap.growler-creeping-mode .enzo-avatar {
  filter: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.85));
  animation: growlerCreepyStalk 0.45s steps(2, end) infinite;
  transform-origin: center bottom;
  max-width: 250px !important;
}

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

/* Creepy Tremor Spasm */
.growler-twitching .enzo-avatar {
  animation: growlerNervousTwitch 0.22s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite !important;
}

@keyframes growlerNervousTwitch {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-2.5px, 2px) rotate(-1.5deg); }
  40% { transform: translate(2.5px, -2px) rotate(1.5deg); }
  60% { transform: translate(-2px, -1px) rotate(-1deg); }
  80% { transform: translate(2px, 2px) rotate(1deg); }
}

/* Growler Effects Overlay: Houses Eyes, Drool, Cigarette Ember, Smoke & Notes */
.growler-effects-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Buggy Eyes Twitching Layer - dropped per user request */
.growler-buggy-eye,
.growler-pupil {
  display: none !important;
}

/* Constant Drool Particle System */
.growler-drool-drop {
  position: absolute;
  width: 6px;
  height: 9px;
  background: radial-gradient(ellipse at 40% 35%, #ffffff 0%, rgba(210, 245, 255, 0.95) 50%, rgba(160, 220, 250, 0.8) 100%);
  border-radius: 50% 50% 60% 60%;
  box-shadow: 0 0 6px rgba(160, 220, 255, 0.7), inset 0 0 2px #ffffff;
  pointer-events: none;
  animation: droolFall 0.85s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes droolFall {
  0% { transform: translateY(0) scale(0.7, 1.4); opacity: 1; }
  85% { transform: translateY(140px) scale(0.9, 1.2); opacity: 0.9; }
  100% { transform: translateY(180px) scale(1.8, 0.3); opacity: 0; }
}

.growler-drool-splash {
  position: absolute;
  width: 14px;
  height: 4px;
  border-radius: 50%;
  border: 1.5px solid rgba(200, 240, 255, 0.85);
  box-shadow: 0 0 8px rgba(180, 230, 255, 0.8);
  pointer-events: none;
  animation: droolSplash 0.35s ease-out forwards;
}

@keyframes droolSplash {
  0% { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* Cigarette Lit Ember */
.growler-cig-ember {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #ff5722 45%, #d84315 80%, rgba(191, 54, 12, 0) 100%);
  box-shadow: 0 0 8px #ff3d00, 0 0 16px #ff6e40, 0 0 24px rgba(255, 87, 34, 0.6);
  pointer-events: none;
  animation: cigEmberGlow 1.8s ease-in-out infinite alternate;
}

@keyframes cigEmberGlow {
  0% { transform: scale(0.85); opacity: 0.8; box-shadow: 0 0 6px #ff3d00, 0 0 12px #ff6e40; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #ff3d00, 0 0 24px #ff6e40, 0 0 32px rgba(255, 110, 64, 0.85); }
  100% { transform: scale(0.95); opacity: 0.85; box-shadow: 0 0 7px #ff3d00, 0 0 14px #ff6e40; }
}

/* Smoke Particle Canvas */
.growler-smoke-canvas {
  position: absolute;
  top: -160px;
  left: -80px;
  width: 320px;
  height: 260px;
  pointer-events: none;
  z-index: 15;
}

/* Musical Notes Emitter */
.growler-note {
  position: absolute;
  font-size: 1.35rem;
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.8), 0 0 16px rgba(245, 158, 11, 0.5);
  pointer-events: none;
  user-select: none;
  animation: growlerNoteFloat 2.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes growlerNoteFloat {
  0% { transform: translate(0, 0) scale(0.4) rotate(0deg); opacity: 0; }
  15% { opacity: 1; transform: translate(-8px, -25px) scale(1.1) rotate(-15deg); }
  50% { transform: translate(12px, -70px) scale(1) rotate(15deg); }
  85% { opacity: 0.9; transform: translate(-10px, -115px) scale(1.05) rotate(-10deg); }
  100% { transform: translate(8px, -160px) scale(0.8) rotate(20deg); opacity: 0; }
}

/* ==========================================================================
   Robert Growler: Coy Smile, Big Kiss & Flamboyant Walk-Off
/* Robert Growler: Move & Giggle Bounce */
.enzo-character-wrap.growler-giggle-bounce {
  animation: growlerGiggleHop 0.72s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes growlerGiggleHop {
  0% {
    transform: scale(1) translateY(0) rotate(0deg);
  }
  20% {
    transform: scale(1.14, 0.92) translateY(-32px) rotate(8deg);
  }
  40% {
    transform: scale(0.94, 1.08) translateY(-6px) rotate(-7deg);
  }
  60% {
    transform: scale(1.08, 0.96) translateY(-20px) rotate(5deg);
  }
  80% {
    transform: scale(0.98, 1.02) translateY(-4px) rotate(-3deg);
  }
  100% {
    transform: scale(1) translateY(0) rotate(0deg);
  }
}

/* Floating giggle particles */
.growler-giggle-particle {
  position: fixed;
  z-index: 100095;
  font-size: 1.8rem;
  line-height: 1;
  pointer-events: none;
  animation: growlerGiggleFloat 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  filter: drop-shadow(0 2px 8px rgba(244, 114, 182, 0.5));
}

@keyframes growlerGiggleFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -80%) scale(1.25) rotate(var(--rot, 12deg));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 20px)), -160%) scale(0.85) rotate(calc(var(--rot, 12deg) * 2));
  }
}

/* 1. Coy Smile Pose */
.enzo-character-wrap.growler-coy-smile {
  animation: growlerCoySway 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

@keyframes growlerCoySway {
  0% {
    transform: scale(1) rotate(0deg);
  }
  40% {
    transform: scale(1.09) rotate(-6deg) translateY(-8px);
  }
  100% {
    transform: scale(1.07) rotate(-5deg) translateY(-6px);
  }
}

/* 2. Puckers Up for Big Kiss */
.enzo-character-wrap.growler-pucker-kiss {
  animation: growlerPuckerLean 1.15s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards !important;
}

@keyframes growlerPuckerLean {
  0% {
    transform: scale(1.07) rotate(-5deg) translateY(-6px);
  }
  30% {
    transform: scale(1.22) rotate(3deg) translateY(-20px);
  }
  48% {
    /* The big kiss release pop forward */
    transform: scale(1.32) rotate(-2deg) translateY(-28px);
  }
  75% {
    transform: scale(1.18) rotate(1deg) translateY(-14px);
  }
  100% {
    transform: scale(1.08) rotate(0deg) translateY(0);
  }
}

/* Big Kiss Theatrical Projectile Burst */
.growler-big-kiss-burst {
  position: fixed;
  z-index: 100099;
  font-size: 5.5rem;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.2);
  filter: drop-shadow(0 0 25px rgba(244, 63, 94, 0.95)) drop-shadow(0 0 50px rgba(251, 191, 36, 0.85));
  animation: growlerBigKissAnim 1.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes growlerBigKissAnim {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(-18deg);
  }
  22% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(2.0) rotate(8deg);
  }
  45% {
    opacity: 1;
    transform: translate(-50%, calc(-50% - 35px)) scale(2.7) rotate(-5deg);
  }
  75% {
    opacity: 0.95;
    transform: translate(-50%, calc(-50% - 65px)) scale(2.9) rotate(4deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 105px)) scale(3.4) rotate(0deg);
  }
}

/* Floating Kiss Scatter Particles */
.growler-kiss-particle {
  position: fixed;
  z-index: 100098;
  font-size: 2.2rem;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.4);
  animation: growlerKissParticleFloat 1.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  filter: drop-shadow(0 0 12px rgba(255, 105, 180, 0.85));
}

@keyframes growlerKissParticleFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3) rotate(0deg);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -80px))) scale(var(--scale, 1.2)) rotate(var(--rot, 20deg));
  }
}

/* 3. Flamboyant Walk-Off Cabaret Strut */
.enzo-character-wrap.growler-flamboyant-walk {
  animation: growlerCabaretStrut 0.42s ease-in-out infinite alternate !important;
  pointer-events: none !important;
}

@keyframes growlerCabaretStrut {
  0% {
    transform: translateY(0) rotate(-8deg);
  }
  50% {
    transform: translateY(-18px) rotate(0deg) scaleY(1.06);
  }
  100% {
    transform: translateY(0) rotate(8deg);
  }
}

/* --------------------------------------------------------------------------
   5. Dog Fun Departure & Celebratory Spin on Click
   -------------------------------------------------------------------------- */
.enzo-character-wrap.dog-fun-departure {
  animation: dogFunDepartureSpin 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
  pointer-events: none !important;
  z-index: 100065 !important;
}

.enzo-character-wrap.dog-fun-departure .enzo-avatar,
.enzo-character-wrap.dog-fun-departure .enzo-co-avatar {
  filter: drop-shadow(0 0 28px rgba(251, 191, 36, 0.75)) drop-shadow(0 16px 32px rgba(0, 0, 0, 0.65)) !important;
  transition: filter 0.25s ease !important;
}

@keyframes dogFunDepartureSpin {
  0% {
    transform: translate3d(0, 0, 0) scale(1, 1) rotate(0deg);
  }
  14% {
    transform: translate3d(0, 10px, 0) scale(1.2, 0.8) rotate(-8deg);
  }
  42% {
    transform: translate3d(0, -52px, 0) scale(0.88, 1.18) rotate(180deg);
  }
  68% {
    transform: translate3d(0, -26px, 0) scale(1.1, 0.92) rotate(360deg);
  }
  84% {
    transform: translate3d(0, 8px, 0) scale(1.16, 0.86) rotate(360deg);
  }
  92% {
    transform: translate3d(0, -4px, 0) scale(0.96, 1.04) rotate(360deg);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1, 1) rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   6. Respect User Motion Preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .dog-summon-dock.is-music-dancing .dog-summon-avatar,
  .dog-summon-dock.is-music-dancing .dog-summon-btn,
  .enzo-character-wrap.is-music-dancing .enzo-avatar,
  .enzo-character-wrap.is-music-dancing .enzo-co-avatar,
  .enzo-character-wrap.dog-fun-departure,
  .enzo-character-wrap.is-music-dancing::before,
  .enzo-character-wrap.is-music-dancing::after,
  .dog-summon-dock.is-music-dancing::after,
  .dog-dance-floor,
  .dog-music-particle {
    animation: none !important;
  }
}
