/* ===============================================================
   MASCOT STYLES
   A small fixed-position companion, independent of the .page system
   so it persists across every page/transition. New keyframes only —
   nothing here overrides or edits any existing animation.
   =============================================================== */

.mascot {
  --ham-fur: #ddb174;
  --ham-fur-dark: #c79754;
  --ham-fur-light: #e8c997;
  --ham-cheek: #e4bbba;
  --ham-belly: #ede0c5;

  position: fixed;
  right: 3.9rem;
  bottom: 1.2rem;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.mascot.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
#mascot {
  z-index: 2147483647;
}
.mascot * { pointer-events: auto; }

@keyframes mascotBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-1.5deg); }
}
@keyframes mascotWiggle {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(7deg); }
  60% { transform: rotate(-5deg); }
  80% { transform: rotate(3deg); }
}
@keyframes mascotBounce {
  0% { transform: scale(1); }
  35% { transform: scale(0.88, 1.1); }
  60% { transform: scale(1.08, 0.94); }
  100% { transform: scale(1); }
}
@keyframes mascotPawWave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@keyframes mascotEarTwitch {
  0%, 92%, 100% { transform: rotate(0deg); }
  95% { transform: rotate(10deg); }
}

.mascot-body {
  position: relative;
  width: 70px;
  height: 66px;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 34% 30%, var(--ham-fur-light), var(--ham-fur) 62%, var(--ham-fur-dark) 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(212,159,85,0.38), 0 0 0 4px var(--white);
  animation: mascotBob 3.4s ease-in-out infinite;
  transition: box-shadow 0.2s;
}
.mascot-body:hover { box-shadow: 0 14px 30px rgba(212,159,85,0.46), 0 0 0 4px var(--white); }
.mascot.bounce .mascot-body { animation: mascotBob 3.4s ease-in-out infinite, mascotBounce 0.42s ease; }
.mascot.wiggle .mascot-body { animation: mascotBob 3.4s ease-in-out infinite, mascotWiggle 0.7s ease; }

/* little belly patch */
.mascot-body::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  width: 30px;
  height: 22px;
  border-radius: 50%;
  background: var(--ham-belly);
  opacity: 0.9;
}

.mascot-ears { position: absolute; top: -7px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 8px; z-index: 2; }
.mascot-ears span {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--ham-cheek);
  box-shadow: inset 0 0 0 4px var(--ham-fur);
  transform-origin: bottom center;
  animation: mascotEarTwitch 6s ease-in-out infinite;
}
.mascot-ears span:last-child { animation-delay: 0.3s; }

.mascot-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; z-index: 3; }
.mascot-eyes { display: flex; gap: 13px; margin-bottom: 1px; }
.mascot-eye { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); display: block; transition: transform 0.08s linear; box-shadow: -1px -1px 0 rgba(255,255,255,0.5) inset; }
.mascot-nose { width: 5px; height: 4px; border-radius: 50%; background: #B5607A; margin-top: 3px; }
.mascot-mouth { width: 10px; height: 5px; border-bottom: 1.5px solid var(--ink-mid); border-radius: 0 0 8px 8px; margin-top: 1px; opacity: 0.6; }

.mascot-cheeks { position: absolute; top: 30px; left: -4px; right: -4px; display: flex; justify-content: space-between; z-index: 1; }
.mascot-cheeks span {
  width: 17px;
  height: 14px;
  border-radius: 50%;
  background: var(--ham-cheek);
  opacity: 0.75;
}

.mascot-whiskers { position: absolute; top: 33px; display: flex; flex-direction: column; gap: 3px; z-index: 2; }
.mascot-whiskers-l { left: -12px; align-items: flex-end; }
.mascot-whiskers-r { right: -12px; align-items: flex-start; }
.mascot-whiskers span { width: 11px; height: 1px; background: rgba(92,82,73,0.4); display: block; }
.mascot-whiskers-l span:last-child { width: 8px; }
.mascot-whiskers-r span:last-child { width: 8px; }

.mascot-paws { position: absolute; bottom: -4px; left: 0; right: 0; display: flex; justify-content: center; gap: 14px; }
.mascot-paws span {
  width: 12px;
  height: 9px;
  border-radius: 50%;
  background: var(--ham-fur-light);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  animation: mascotPawWave 3.4s ease-in-out infinite;
}
.mascot-paws span:last-child { animation-delay: 0.25s; }

/* ---- Speech bubble ---- */
.mascot-bubble {
  max-width: 240px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 14px 14px 4px 14px;
  padding: 0.85rem 1rem;
  box-shadow: 0 14px 34px rgba(60,45,40,0.14);
  opacity: 0;
  transform: translateY(8px) scale(0.94);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  margin-right: 2.6rem;
}
.mascot-bubble.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.mascot-bubble-text { font-size: 0.82rem; color: var(--ink-mid); line-height: 1.55; margin: 0; }
.mascot-bubble-cta {
  display: inline-flex;
  margin-top: 0.6rem;
  background: none;
  border: none;
  color: var(--rose);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.02em;
}
.mascot-bubble-cta:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .mascot { right: 2rem; bottom: 1.5rem; }
  .mascot-body { width: 56px; height: 56px; }
  .mascot-bubble { max-width: 220px; }
}
