/* ======== PET BATTLE ======== */
.pb-screen, .pb-arena { max-width: 640px; margin: 0 auto; padding: var(--space-3); }
.pb-top { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.pb-title { font-family: var(--font-display); margin: 0; }

.pb-btn {
  padding: 10px 22px; border-radius: var(--radius-md); border: 1px solid var(--color-border);
  background: var(--color-surface-2); color: var(--color-text); font-weight: 700; font-size: 1rem; cursor: pointer;
}
.pb-btn.primary { background: var(--color-primary); color: #fff; border-color: transparent; }
.pb-btn:active { transform: translateY(1px); }

/* No-pet prompt */
.pb-nopet { text-align: center; padding: var(--space-6) var(--space-4); color: var(--color-text-secondary); }
.pb-nopet-emoji { font-size: 3rem; margin-bottom: var(--space-2); }

/* Pet card */
.pb-petcard { display: flex; align-items: center; gap: var(--space-3); background: var(--color-surface-2);
  border-radius: var(--radius-lg); padding: var(--space-3); margin-bottom: var(--space-3); }
.pb-petcard .pb-pet-sprite { width: 64px; height: 64px; font-size: 3rem; line-height: 64px; }
.pb-petcard-name { font-weight: 800; font-size: 1.15rem; }
.pb-petcard-sub { color: var(--color-text-secondary); font-size: 0.9rem; margin-top: 2px; }

/* Focus picker */
.pb-focus { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-4); }
.pb-focus-label { font-weight: 700; color: var(--color-text-secondary); font-size: 0.9rem; }
.pb-chip { padding: 7px 14px; border-radius: 999px; border: 2px solid var(--color-border);
  background: var(--color-surface); color: var(--color-text); font-weight: 700; font-size: 0.88rem; cursor: pointer; }
.pb-chip.active { background: var(--color-primary); color: #fff; border-color: transparent; }

/* Fighter picker */
.pb-fighters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-3); }
.pb-fighter-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 68px;
  padding: 6px 4px; border-radius: var(--radius-md); border: 2px solid var(--color-border);
  background: var(--color-surface); cursor: pointer; }
.pb-fighter-pick.active { border-color: var(--color-primary); background: var(--color-primary-light, #eef); }
.pb-fighter-pick .pb-pet-sprite { width: 40px; height: 40px; font-size: 2rem; line-height: 40px; }
.pb-fighter-pick-name { font-size: 0.72rem; font-weight: 700; color: var(--color-text); max-width: 60px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pb-section { font-family: var(--font-display); margin: var(--space-4) 0 var(--space-2); }

/* Monster ladder */
.pb-ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.pb-mon-card { position: relative; background: var(--color-surface-2); border-radius: var(--radius-md);
  padding: 8px 6px 10px; text-align: center; border: 2px solid transparent; }
.pb-mon-card.unlocked { cursor: pointer; border-color: var(--color-primary); }
.pb-mon-card.unlocked:hover { transform: translateY(-2px); }
.pb-mon-card.defeated { opacity: 0.55; }
.pb-mon-card.locked { filter: grayscale(1); opacity: 0.5; }
.pb-mon-card.boss { background: linear-gradient(160deg, var(--color-surface-2), #fff3cf); }
.pb-mon-art { width: 70px; height: 70px; margin: 0 auto; }
.pb-mon-art svg { width: 100%; height: 100%; display: block; }
.pb-mon-art .pb-mon-img { width: 100%; height: 100%; object-fit: contain; display: block; image-rendering: pixelated; }
.pb-mon-name { font-weight: 800; font-size: 0.82rem; margin-top: 2px; }
.pb-mon-meta { font-size: 0.72rem; color: var(--color-text-secondary); }
.pb-mon-badge { position: absolute; top: 4px; right: 6px; font-size: 0.9rem; }

/* Arena */
.pb-arena-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-2); }
.pb-combo { font-weight: 800; color: var(--color-text-secondary); font-size: 0.9rem; }
.pb-combo.hot { color: #e0603a; animation: pb-pulse 0.7s ease-in-out infinite; }

/* Diagonal arena: monster faces off from the upper-right, pet from the lower-left,
   so the fighters read as confronting each other while staying portrait-friendly. */
.pb-fighter { text-align: center; }
.pb-fighter-name { font-weight: 800; margin-bottom: 4px; }
.pb-monster { margin-bottom: 2px; width: 72%; margin-left: auto; }
.pb-pet { width: 72%; margin-right: auto; }
.pb-vs { text-align: center; font-size: 1.4rem; margin: -14px 0; opacity: 0.7; transform: rotate(45deg); }
.pb-big { position: relative; display: inline-block; }
.pb-monster .pb-big { width: 150px; height: 150px; }
.pb-monster .pb-big svg { width: 100%; height: 100%; }
.pb-monster .pb-big .pb-mon-img { width: 100%; height: 100%; }
.pb-pet .pb-big { width: 110px; height: 110px; }
.pb-pet-sprite { width: 110px; height: 110px; font-size: 5rem; line-height: 110px; text-align: center; }
.pb-pet-sprite .pet-img, .pb-petcard .pet-img { width: 100%; height: 100%; object-fit: contain; }

/* HP bars */
.pb-hp-bar { position: relative; width: 240px; max-width: 80%; height: 20px; margin: 0 auto 4px;
  background: var(--color-surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--color-border); }
.pb-hp-fill { height: 100%; border-radius: 999px; transition: width 0.5s ease; }
.pb-hp-hi { background: #4caf50; }
.pb-hp-mid { background: #f5a623; }
.pb-hp-lo { background: #e0484d; }
.pb-hp-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* Damage popups */
.pb-dmg { position: absolute; top: 10%; left: 50%; transform: translateX(-50%); font-weight: 900;
  font-size: 1.4rem; color: #e0484d; text-shadow: 0 2px 4px rgba(0,0,0,.25); animation: pb-float 1s ease-out forwards; pointer-events: none; }
.pb-dmg-pet { color: #d1584f; }
.pb-dmg-mon { color: #fff; -webkit-text-stroke: 1px #e0484d; }
.pb-dmg.crit { color: #ffd447; -webkit-text-stroke: 1px #e0603a; font-size: 1.7rem; }

/* Question card */
.pb-qcard { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-3); margin-top: var(--space-3); }
.pb-question { font-size: 1.15rem; font-weight: 700; text-align: center; margin-bottom: var(--space-3); line-height: 1.5; }
.pb-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pb-feedback { margin-top: var(--space-3); text-align: center; font-weight: 700; }
.pb-feedback.correct { color: var(--color-primary); font-size: 1.2rem; }
.pb-feedback.wrong { color: var(--color-text); }
.pb-explain { font-weight: 500; color: var(--color-text-secondary); font-size: 0.92rem; margin: 6px 0 12px; }

/* Result screens */
.pb-result { text-align: center; padding: var(--space-6) var(--space-4); max-width: 460px; margin: 0 auto; }
.pb-result-emoji { font-size: 3.5rem; }
.pb-result h2 { font-family: var(--font-display); margin: var(--space-2) 0; }
.pb-reward { font-weight: 800; color: var(--color-primary); margin: var(--space-3) 0; font-size: 1.1rem; }
.pb-result-btns { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: var(--space-3); }
.pb-allclear { font-weight: 800; }

/* SVG monster idle bob + animations */
.pb-sprite-svg .pb-body { transform-box: fill-box; transform-origin: center; animation: pb-bob 2.4s ease-in-out infinite; }
.pb-shake { animation: pb-shake 0.4s ease; }
.pb-flash svg .pb-body { animation: pb-hitflash 0.4s ease; }
.pb-flash .pb-mon-img { animation: pb-hitflash 0.4s ease; }

@keyframes pb-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes pb-shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
@keyframes pb-hitflash { 0%,100% { filter: none; } 40% { filter: brightness(2.2) saturate(0.3); } }
@keyframes pb-float { 0% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -30px); } }
@keyframes pb-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* ---- Juice pass animations ---- */
.pb-monhit { animation: pb-monhit 0.45s ease; }
@keyframes pb-monhit {
  0%   { transform: translateX(0) scale(1, 1); }
  20%  { transform: translateX(-8px) scale(1.15, 0.85); }
  40%  { transform: translateX(7px) scale(0.9, 1.1); }
  65%  { transform: translateX(-4px) scale(1.05, 0.96); }
  100% { transform: translateX(0) scale(1, 1); }
}
/* Pet charges diagonally up-right toward the monster */
.pb-lunge-up { animation: pb-lunge-up 0.5s ease; }
@keyframes pb-lunge-up {
  0% { transform: translate(0, 0) scale(1); }
  35% { transform: translate(22px, -24px) scale(1.06); }
  55% { transform: translate(18px, -20px) scale(1.04); }
  100% { transform: translate(0, 0) scale(1); }
}
/* Monster dives diagonally down-left toward the pet */
.pb-lunge-down { animation: pb-lunge-down 0.5s ease; }
@keyframes pb-lunge-down {
  0% { transform: translate(0, 0); }
  35% { transform: translate(-20px, 20px); }
  55% { transform: translate(-16px, 16px); }
  100% { transform: translate(0, 0); }
}
.pb-projectile { position: absolute; top: -6px; left: 50%; font-size: 1.8rem; pointer-events: none;
  animation: pb-projectile 0.5s ease-out forwards; z-index: 5; }
.pb-projectile.crit { font-size: 2.4rem; }
@keyframes pb-projectile {
  0%   { opacity: 0; transform: translate(-50%, 10px) scale(0.5); }
  25%  { opacity: 1; transform: translate(calc(-50% + 30px), -24px) scale(1.1); }
  100% { opacity: 0; transform: translate(calc(-50% + 150px), -160px) scale(1.5); }
}
/* Projectile launches partway through the wind-up so the throw follows the swing */
.pb-projectile { animation-delay: 0.22s; animation-fill-mode: both; }

/* Monster winces: eyes squeeze shut during the hit recoil */
.pb-monhit svg .pb-eye { transform-box: fill-box; transform-origin: center; animation: pb-eye-squint 0.45s ease; }
@keyframes pb-eye-squint { 15%, 70% { transform: scaleY(0.2); } 0%, 100% { transform: scaleY(1); } }

/* Pet getting hit: knockback + red flinch tint (replaces the old plain shake) */
.pb-hurt { animation: pb-hurt 0.55s ease; }
@keyframes pb-hurt {
  0%   { transform: translate(0, 0) rotate(0deg); filter: none; }
  18%  { transform: translate(10px, 6px) rotate(4deg); filter: brightness(1.6) sepia(0.5) hue-rotate(-40deg) saturate(2); }
  40%  { transform: translate(-6px, 3px) rotate(-2deg); filter: brightness(1.25) sepia(0.3) hue-rotate(-40deg) saturate(1.6); }
  70%  { transform: translate(3px, 1px) rotate(1deg); filter: none; }
  100% { transform: translate(0, 0) rotate(0deg); filter: none; }
}

/* Monster's counter-move emoji dives from the monster down toward the pet */
.pb-projectile-down { position: absolute; bottom: -4px; left: 50%; font-size: 1.8rem; pointer-events: none;
  animation: pb-projectile-down 0.5s ease-in 0.1s both; z-index: 5; }
@keyframes pb-projectile-down {
  0%   { opacity: 0; transform: translate(-50%, -6px) scale(0.6); }
  25%  { opacity: 1; transform: translate(calc(-50% - 26px), 20px) scale(1.1); }
  100% { opacity: 0; transform: translate(calc(-50% - 140px), 150px) scale(1.4); }
}

/* Impact burst — radial particles spawned over the monster at the hit moment */
.pb-impact-burst { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.pb-impact-piece { position: absolute; left: 50%; top: 55%; width: 8px; height: 8px; border-radius: 2px;
  animation: pb-impact-radial 0.6s ease-out both; }
@keyframes pb-impact-radial {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1.2) rotate(0deg); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.3) rotate(200deg); }
}

/* Shield block: the bubble flares bright for the blocked hit */
.pb-shield-flash::after { animation: pb-shield-flash 0.6s ease !important; }
@keyframes pb-shield-flash {
  0%   { opacity: 0.4; transform: scale(1); box-shadow: 0 0 0 rgba(90, 184, 255, 0); }
  25%  { opacity: 1; transform: scale(1.15); box-shadow: 0 0 26px rgba(90, 184, 255, 0.9); }
  100% { opacity: 0.5; transform: scale(1); box-shadow: 0 0 0 rgba(90, 184, 255, 0); }
}
.pb-dmg.pb-block { color: #2f8fdd; font-weight: 800; }

/* Sound toggle in the arena top bar */
.pb-sfx-btn { background: none; border: none; font-size: 1.15rem; cursor: pointer; padding: 2px 6px; line-height: 1; }

.pb-quake { animation: pb-quake 0.4s ease; }
@keyframes pb-quake {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-4px, 3px); }
  40% { transform: translate(5px, -2px); }
  60% { transform: translate(-3px, 2px); }
  80% { transform: translate(3px, -1px); }
}
.pb-victory-pet { display: inline-block; margin: 4px auto; animation: pb-victory 0.9s ease infinite; }
.pb-victory-pet .pb-pet-sprite { width: 80px; height: 80px; font-size: 4rem; line-height: 80px; }
@keyframes pb-victory {
  0%,100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-14px) rotate(4deg); }
}

/* ---- Per-creature idle motion (medium tier) ---- */
.pb-eye { transform-box: fill-box; transform-origin: center; animation: pb-blink 4.2s infinite; }
@keyframes pb-blink { 0%, 93%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(0.12); } }
.pb-leg { transform-box: fill-box; transform-origin: center; animation: pb-legwiggle 1.6s ease-in-out infinite; }
@keyframes pb-legwiggle { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.pb-tentacle { transform-box: fill-box; transform-origin: top center; animation: pb-tentaclesway 2s ease-in-out infinite; }
@keyframes pb-tentaclesway { 0%,100% { transform: translateY(0) skewX(-6deg); } 50% { transform: translateY(2px) skewX(6deg); } }
.pb-wing { transform-box: fill-box; transform-origin: center; animation: pb-flap 0.85s ease-in-out infinite; }
@keyframes pb-flap { 0%,100% { transform: scaleX(1) scaleY(1); } 50% { transform: scaleX(0.84) scaleY(1.05); } }
.pb-antenna { transform-box: fill-box; transform-origin: bottom center; animation: pb-antenna 1.8s ease-in-out infinite; }
@keyframes pb-antenna { 0%,100% { transform: translateX(0); } 50% { transform: translateX(2px); } }
.pb-tongue { transform-box: fill-box; transform-origin: top center; animation: pb-tongue 2.4s ease-in-out infinite; }
@keyframes pb-tongue { 0%,80%,100% { transform: scaleY(1); } 88% { transform: scaleY(1.5); } }

@media (max-width: 480px) {
  .pb-ladder { grid-template-columns: repeat(3, 1fr); }
  .pb-monster .pb-big { width: 128px; height: 128px; }
  .pb-options { grid-template-columns: 1fr; }
}

/* ---- Signature moves: super meter, banners, status effects ---- */
.pb-super { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: center; }
.pb-pip { width: 11px; height: 11px; border-radius: 50%; background: var(--color-surface-2); border: 2px solid var(--color-border); display: inline-block; transition: all .25s; }
.pb-pip.full { background: #ffd447; border-color: #e8a010; box-shadow: 0 0 8px rgba(255, 212, 71, .8); }
.pb-super-btn { border: none; border-radius: 999px; padding: 5px 12px; font-weight: 800; font-size: .78rem; cursor: pointer; color: #4a3200;
  background: linear-gradient(135deg, #ffd447, #ff9f2e); animation: pb-super-pulse 0.9s ease-in-out infinite; }
@keyframes pb-super-pulse { 0%,100% { transform: scale(1); box-shadow: 0 0 6px rgba(255,180,40,.55); } 50% { transform: scale(1.07); box-shadow: 0 0 18px rgba(255,180,40,.95); } }
.pb-super-armed { font-weight: 800; font-size: .78rem; color: #e8890c; animation: pb-armed-flash 0.6s ease-in-out infinite; }
@keyframes pb-armed-flash { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.pb-move-banner { text-align: center; font-size: .95rem; padding: 6px 12px; border-radius: 999px; margin: 4px auto; width: fit-content; max-width: 94%;
  background: var(--color-surface-2); border: 1px solid var(--color-border); animation: pb-banner-in .3s ease-out; }
@keyframes pb-banner-in { from { transform: translateY(-8px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.pb-move-banner.super { background: linear-gradient(135deg, #ffd447, #ff9f2e); color: #4a3200; border: none; font-size: 1.05rem; box-shadow: 0 0 20px rgba(255,180,40,.6); }
.pb-move-banner.enemy { border-color: rgba(224, 72, 77, .5); }
.pb-move-banner.rage { background: linear-gradient(135deg, #e0484d, #a02025); color: #fff; border: none; }
.pb-move-banner.note { font-size: .85rem; color: var(--color-text-muted); }

.pb-chips { min-height: 20px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pb-status { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--color-surface-2); border: 1px solid var(--color-border); }
.pb-status.burn { color: #e0603a; border-color: rgba(224, 96, 58, .5); }
.pb-status.shield { color: #3a7bd5; border-color: rgba(58, 123, 213, .5); }
.pb-status.stun { color: #b06fd6; border-color: rgba(176, 111, 214, .5); }
.pb-status.weak { color: #8a8f99; }

/* burning monster flickers */
.pb-burning .pb-sprite-svg { animation: pb-burnflicker 0.5s ease-in-out infinite; }
@keyframes pb-burnflicker { 0%,100% { filter: none; } 50% { filter: sepia(.4) saturate(2) hue-rotate(-18deg) brightness(1.08); } }

/* shielded pet gets a blue bubble */
.pb-shielded { position: relative; }
.pb-shielded::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid rgba(58, 123, 213, .55);
  background: radial-gradient(circle, rgba(58,123,213,.08) 55%, rgba(58,123,213,.22)); animation: pb-shieldpulse 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes pb-shieldpulse { 0%,100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.05); opacity: 1; } }

/* multi-hit pops rain down with a stagger; heal pops green */
.pb-dmg-multi { animation: pb-dmg-multi .8s ease-out both; font-size: 1.05rem; }
@keyframes pb-dmg-multi { 0% { transform: translateY(6px) scale(.6); opacity: 0; } 25% { transform: translateY(-6px) scale(1.15); opacity: 1; } 100% { transform: translateY(-26px) scale(1); opacity: 0; } }
.pb-dmg.super { font-size: 1.5rem; color: #ff9f2e; text-shadow: 0 0 10px rgba(255,180,40,.8); }
.pb-dmg-burn { color: #e0603a; font-size: 1rem; }
.pb-heal { color: #35b26a; font-weight: 800; animation: pb-dmg-multi 1s ease-out both; }

.pb-petcard-moves { font-size: .78rem; color: var(--color-text-muted); margin-top: 3px; }
.pb-super-tag { font-weight: 800; color: #e8890c; }
.pb-fighter-pick-move { display: block; font-size: .62rem; color: var(--color-text-muted); max-width: 86px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* scratchpad toggle row in the battle question card */
.pb-scratch-row { display: flex; justify-content: center; margin-top: 8px; }

/* ---- Pet idle life ----
   Two composed layers so the PNG reads as a living creature, not a floating
   picture:
   1. The inner image BREATHES — squash & stretch anchored at the feet.
   2. The wrapper runs a long behavior loop — mostly calm, then a weight
      shift, a playful double-hop with a squashed landing, a curious tilt.
   The ground shadow follows the same loop so the hops feel physical. */
.pb-pet-sprite .pet-img {
  transform-origin: center bottom;
  animation: pb-pet-breathe 3.2s ease-in-out infinite;
  will-change: transform;
}
@keyframes pb-pet-breathe {
  0%, 100% { transform: scale(1, 1); }
  50%      { transform: scale(0.988, 1.045); }
}
.pb-pet-sprite { animation: pb-pet-life 7.6s ease-in-out infinite; transform-origin: center bottom; will-change: transform; }
@keyframes pb-pet-life {
  0%, 24%  { transform: translate(0, 0) rotate(0deg) scale(1, 1); }
  29%, 37% { transform: translateX(-2.5px) rotate(-2.6deg) scale(1, 1); }  /* shift weight, look left */
  42%, 55% { transform: translate(0, 0) rotate(0deg) scale(1, 1); }
  58%      { transform: translateY(-8px) scale(0.97, 1.05); }              /* hop! */
  61%      { transform: translateY(0) scale(1.06, 0.92); }                 /* squashy landing */
  64%      { transform: translateY(-3.5px) scale(0.99, 1.02); }            /* little second hop */
  67%      { transform: translateY(0) scale(1.03, 0.97); }
  70%      { transform: translate(0, 0) rotate(0deg) scale(1, 1); }
  76%, 84% { transform: translateX(2.5px) rotate(2.2deg) scale(1, 1); }    /* curious tilt right */
  90%, 100% { transform: translate(0, 0) rotate(0deg) scale(1, 1); }
}
/* Hot combo → the pet gets hyped: fast bouncy squash-and-stretch hops */
.pb-pet-sprite.pb-excited { animation: pb-pet-excited 0.55s ease-in-out infinite; }
@keyframes pb-pet-excited {
  0%, 100% { transform: translateY(0) scale(1.04, 0.94); }
  50%      { transform: translateY(-9px) scale(0.96, 1.06); }
}
/* Victory dance */
.pb-victory-pet .pb-pet-sprite { animation: pb-pet-party 0.7s ease-in-out infinite; }
@keyframes pb-pet-party {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-12px) rotate(6deg); }
}
/* Soft ground shadow under the arena pet — tracks the behavior loop above:
   slides with weight shifts, shrinks mid-hop, spreads on landing. */
.pb-pet .pb-big::before {
  content: ""; position: absolute; left: 50%; bottom: -4px; width: 64px; height: 10px;
  transform: translateX(-50%); border-radius: 50%; background: rgba(0, 0, 0, 0.16);
  animation: pb-pet-shadow 7.6s ease-in-out infinite;
}
@keyframes pb-pet-shadow {
  0%, 24%  { transform: translateX(-50%) scaleX(1); opacity: .52; }
  29%, 37% { transform: translateX(-54%) scaleX(0.94); opacity: .46; }
  42%, 55% { transform: translateX(-50%) scaleX(1); opacity: .52; }
  58%      { transform: translateX(-50%) scaleX(0.76); opacity: .3; }
  61%      { transform: translateX(-50%) scaleX(1.08); opacity: .6; }
  64%      { transform: translateX(-50%) scaleX(0.88); opacity: .4; }
  67%      { transform: translateX(-50%) scaleX(1.04); opacity: .56; }
  76%, 84% { transform: translateX(-46%) scaleX(0.94); opacity: .46; }
  90%, 100% { transform: translateX(-50%) scaleX(1); opacity: .52; }
}
/* Keep the pad + card sprites subtle: slower, smaller motion via shorter travel is
   handled by the shared keyframes; respect reduced-motion users. */
@media (prefers-reduced-motion: reduce) {
  .pb-pet-sprite, .pb-pet-sprite .pet-img, .pb-victory-pet .pb-pet-sprite, .pb-pet .pb-big::before { animation: none; }
  .pb-quake, .pb-hurt, .pb-impact-piece, .pb-monhit, .pb-lunge-up, .pb-lunge-down { animation: none; }
}

/* move picker — strike vs trick */
.pb-moves { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; flex-wrap: wrap; }
.pb-move-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; border-radius: 12px;
  border: 2px solid var(--color-border); background: var(--color-surface-2); cursor: pointer; min-width: 130px; }
.pb-move-chip.active { border-color: #7c5cd6; background: rgba(124, 92, 214, 0.12); box-shadow: 0 0 8px rgba(124, 92, 214, 0.35); }
.pb-move-chip-name { font-weight: 800; font-size: 0.85rem; }
.pb-move-chip-desc { font-size: 0.68rem; color: var(--color-text-muted); }

/* APNG pets self-animate; disable the CSS breathe/bob for them in battle */
.pb-pet-sprite .pet-img[src*="-px."] { animation: none; }
.pb-pet-sprite:has(.pet-img[src*="-px."]) { animation: none; }
