/* The family service uses the original pet-machine scene: a CSS-drawn companion,
   its home, ride, equipment and level-up animation. */

.pet-stage {
  height: 220px;
}

.pet-stage .pet-wrap {
  --home-roof: #cf784f;
  --home-wall: #ffedc6;
  --home-door: #9c5c46;
  --home-window: #9dcfe0;
  --home-trim: #fff8dc;
  --home-ground: #80be85;
  --home-path: #ead09a;
  position: absolute;
  z-index: 2;
  top: -21px;
  left: 50%;
  width: 235px;
  height: 235px;
  padding: 0;
  border: 0;
  background: none;
  transform: translateX(-50%) scale(.78);
  transform-origin: 50% 100%;
}

.pet-stage .pet-wrap[data-pet="rescue"] { --home-roof: #6081aa; --home-wall: #d8ebf4; --home-door: #cd6a5b; --home-window: #91cde0; --home-trim: #f9ffff; --home-ground: #7bb88d; --home-path: #e9d9b3; }
.pet-stage .pet-wrap[data-pet="rabbit"] { --home-roof: #8f9872; --home-wall: #f4ecd8; --home-door: #a87576; --home-window: #a9cfb8; --home-trim: #fff7e7; --home-ground: #7bb68f; --home-path: #eadfbd; }
.pet-stage .pet-wrap[data-pet="robot"] { --home-roof: #415a78; --home-wall: #e8f0f6; --home-door: #e18465; --home-window: #8dddec; --home-trim: #f9fcff; --home-ground: #87b58d; --home-path: #e9d8b4; }

.pet-stage .pet-wrap:hover { filter: brightness(1.03); }
.pet-stage .pet-wrap:focus-visible { outline: 3px solid rgba(239, 128, 101, .35); outline-offset: 4px; border-radius: 28px; }

.pet-stage .pet-shadow {
  position: absolute;
  z-index: 1;
  left: 52px;
  bottom: 35px;
  width: 130px;
  height: 28px;
  border-radius: 50%;
  background: rgba(110, 83, 57, .16);
}

.pet-stage .pet {
  position: absolute;
  z-index: 2;
  top: 5px;
  left: 37px;
  width: 160px;
  height: 180px;
  pointer-events: none;
  transition: transform .7s cubic-bezier(.2, .9, .25, 1.25), filter .3s;
  transform: scale(var(--pet-size, 1));
  transform-origin: 50% 100%;
}

.pet-stage .pet.positive { animation: parent-pet-positive .85s ease; }
.pet-stage .pet.positive .tail { animation: parent-tail-wag .16s ease-in-out 5 alternate; }
.pet-stage .pet.level-up { animation: parent-pet-grow 1.7s cubic-bezier(.2, .8, .2, 1); }
.pet-stage .pet.level-up .badge { animation: parent-badge-shine .35s ease 4 alternate; }
.pet-stage .pet.negative { animation: parent-pet-negative .85s ease; filter: saturate(.72); }
.pet-stage .pet.negative .ear.left { animation: parent-ear-droop .85s ease; }
.pet-stage .pet.negative .ear.right { animation: parent-ear-droop-right .85s ease; }

.pet-stage .pet .police-hat,
.pet-stage .pet .collar,
.pet-stage .pet .badge,
.pet-stage .pet .cape,
.pet-stage .pet .backpack,
.pet-stage .pet .crown { visibility: hidden; }
.pet-stage .pet[data-stage]:not([data-stage="0"]) .collar { visibility: visible; }
.pet-stage .pet[data-stage="2"] .police-hat,
.pet-stage .pet[data-stage="3"] .police-hat,
.pet-stage .pet[data-stage="4"] .police-hat,
.pet-stage .pet[data-stage="5"] .police-hat,
.pet-stage .pet[data-stage="6"] .police-hat,
.pet-stage .pet[data-stage="7"] .police-hat,
.pet-stage .pet[data-stage="8"] .police-hat { visibility: visible; }
.pet-stage .pet[data-stage="3"] .badge,
.pet-stage .pet[data-stage="4"] .badge,
.pet-stage .pet[data-stage="5"] .badge,
.pet-stage .pet[data-stage="6"] .badge,
.pet-stage .pet[data-stage="7"] .badge,
.pet-stage .pet[data-stage="8"] .badge { visibility: visible; }
.pet-stage .pet[data-stage="4"] .cape,
.pet-stage .pet[data-stage="5"] .cape,
.pet-stage .pet[data-stage="6"] .cape,
.pet-stage .pet[data-stage="7"] .cape,
.pet-stage .pet[data-stage="8"] .cape { visibility: visible; }
.pet-stage .pet[data-stage="5"] .backpack,
.pet-stage .pet[data-stage="6"] .backpack,
.pet-stage .pet[data-stage="7"] .backpack,
.pet-stage .pet[data-stage="8"] .backpack { visibility: visible; }
.pet-stage .pet[data-stage="7"] .crown,
.pet-stage .pet[data-stage="8"] .crown { visibility: visible; }
.pet-stage .pet[data-stage="9"] .police-hat,
.pet-stage .pet[data-stage="9"] .badge,
.pet-stage .pet[data-stage="9"] .cape,
.pet-stage .pet[data-stage="9"] .backpack,
.pet-stage .pet[data-stage="9"] .crown { visibility: visible; }

.pet-stage .egg-shell { display: none; position: absolute; left: 24px; top: 18px; width: 112px; height: 142px; background: linear-gradient(145deg, #fffdf4, #f1dfb5); border-radius: 54% 54% 47% 47%; box-shadow: inset -12px -15px 0 rgba(213, 178, 113, .18), 0 13px 20px rgba(91, 63, 35, .18); }
.pet-stage .egg-shell::before, .pet-stage .egg-shell::after { position: absolute; background: #e1bd79; border-radius: 10px; content: ''; }
.pet-stage .egg-shell::before { width: 5px; height: 36px; left: 55px; top: 52px; transform: rotate(-29deg); }
.pet-stage .egg-shell::after { width: 5px; height: 28px; left: 68px; top: 75px; transform: rotate(32deg); }
.pet-stage .egg-shell i { position: absolute; left: 51px; top: 82px; width: 19px; height: 5px; border-radius: 5px; background: #e1bd79; transform: rotate(-18deg); }
.pet-stage .egg-shell b { position: absolute; top: 20px; left: 44px; color: #d4a85c; font-size: 27px; }
.pet-stage .pet[data-stage="0"] { --pet-size: 1; }
.pet-stage .pet[data-stage="0"] > span:not(.egg-shell) { visibility: hidden; }
.pet-stage .pet[data-stage="0"] .egg-shell { display: block; }

.pet-stage .police-hat { position: absolute; z-index: 6; top: -2px; left: 43px; width: 78px; height: 36px; border-radius: 40px 40px 10px 10px; background: #38759b; box-shadow: inset 0 -7px 0 #285d7e; transform: rotate(-2deg); }
.pet-stage .police-hat::before { position: absolute; bottom: -7px; left: -10px; width: 98px; height: 12px; border-radius: 50%; background: #204e6b; content: ''; }
.pet-stage .police-hat i { position: absolute; z-index: 2; top: 7px; left: 31px; display: grid; width: 18px; height: 19px; place-items: center; color: #fff; background: #ffd867; font-size: 10px; font-style: normal; clip-path: polygon(50% 0,95% 20%,85% 75%,50% 100%,15% 75%,5% 20%); }
.pet-stage .collar { position: absolute; z-index: 3; top: 2px; left: 7px; width: 98px; height: 15px; border-radius: 9px; background: #34769d; }
.pet-stage .badge { position: absolute; z-index: 5; top: 10px; left: 46px; display: grid; width: 22px; height: 25px; place-items: center; color: #fff; background: #ffd45f; font-size: 11px; font-style: normal; clip-path: polygon(50% 0,95% 20%,85% 75%,50% 100%,15% 75%,5% 20%); }
.pet-stage .body .belly { top: 18px; }
.pet-stage .cape { position: absolute; z-index: -1; top: 86px; left: 18px; width: 126px; height: 86px; background: linear-gradient(135deg, #f47468, #c8414d); clip-path: polygon(18% 0,82% 0,100% 100%,50% 82%,0 100%); filter: drop-shadow(0 5px 4px rgba(108,48,48,.18)); }
.pet-stage .backpack { position: absolute; z-index: 1; top: 98px; right: -4px; width: 42px; height: 62px; border: 6px solid #8a6748; border-radius: 15px; background: #d69a55; box-shadow: inset 0 9px 0 #f1bd73; }
.pet-stage .crown { position: absolute; z-index: 8; top: -30px; left: 52px; display: grid; width: 58px; height: 38px; place-items: center; color: #e7a923; font-size: 42px; line-height: 1; filter: drop-shadow(0 3px 2px rgba(118,82,20,.2)); }

/* Base body geometry from the parent project. */
.pet-stage .ear { position: absolute; z-index: 0; top: 7px; width: 61px; height: 70px; border-radius: 70% 15% 55% 35%; background: #dd9c69; }
.pet-stage .ear::after { position: absolute; inset: 12px; border-radius: inherit; background: #f3b49e; content: ''; }
.pet-stage .ear.left { left: 9px; transform: rotate(-22deg); }
.pet-stage .ear.right { right: 9px; transform: scaleX(-1) rotate(-22deg); }
.pet-stage .face { position: absolute; z-index: 2; top: 25px; left: 19px; width: 122px; height: 105px; border-radius: 52% 52% 45% 45%; background: #f0b57f; }
.pet-stage .face::before { position: absolute; bottom: 7px; left: 23px; width: 76px; height: 58px; border-radius: 50%; background: #fff2dd; content: ''; }
.pet-stage .eye { position: absolute; z-index: 2; top: 40px; width: 11px; height: 15px; border-radius: 50%; background: #514036; }
.pet-stage .eye::after { position: absolute; top: 2px; left: 2px; width: 3px; height: 4px; border-radius: 50%; background: #fff; content: ''; }
.pet-stage .eye.left { left: 32px; }
.pet-stage .eye.right { right: 32px; }
.pet-stage .nose { position: absolute; z-index: 3; top: 65px; left: 56px; width: 10px; height: 8px; border-radius: 60% 60% 50% 50%; background: #5a4036; }
.pet-stage .nose::after { position: absolute; top: 1px; left: -5px; content: '︶'; font-size: 17px; }
.pet-stage .blush { position: absolute; top: 65px; width: 16px; height: 8px; border-radius: 50%; background: #ee8f87; opacity: .6; }
.pet-stage .blush.left { left: 20px; }
.pet-stage .blush.right { right: 20px; }
.pet-stage .body { position: absolute; bottom: 4px; left: 24px; width: 112px; height: 93px; border-radius: 48% 48% 38% 38%; background: #eaaa73; }
.pet-stage .belly { position: absolute; top: 10px; left: 21px; width: 70px; height: 65px; border-radius: 50%; background: #f9dfb9; }
.pet-stage .paw { position: absolute; bottom: -3px; width: 37px; height: 23px; border-radius: 50%; background: #f2bc86; }
.pet-stage .paw.left { left: -1px; transform: rotate(9deg); }
.pet-stage .paw.right { right: -1px; transform: rotate(-9deg); }
.pet-stage .tail { position: absolute; z-index: -1; right: -31px; bottom: 24px; width: 65px; height: 38px; border: 16px solid #dc9b65; border-right-color: #dc9b65; border-bottom-color: transparent; border-left-color: transparent; border-radius: 50%; transform: rotate(19deg); }

/* Companion variants used by the English family service. */
.pet-stage .stripe { display: none; }
.pet-stage .pet[data-pet="garfield"] .police-hat,
.pet-stage .pet[data-pet="garfield"] .collar,
.pet-stage .pet[data-pet="garfield"] .badge { display: none; }
.pet-stage .pet[data-pet="garfield"] .ear { top: 11px; width: 48px; height: 55px; border-radius: 12% 75% 40% 45%; background: #e98536; }
.pet-stage .pet[data-pet="garfield"] .ear::after { inset: 9px; background: #f6a68d; }
.pet-stage .pet[data-pet="garfield"] .ear.left { left: 16px; transform: rotate(-10deg); }
.pet-stage .pet[data-pet="garfield"] .ear.right { right: 16px; transform: scaleX(-1) rotate(-10deg); }
.pet-stage .pet[data-pet="garfield"] .face { left: 15px; width: 130px; border-radius: 52% 52% 48% 48%; background: #ee8f3d; }
.pet-stage .pet[data-pet="garfield"] .face::before { left: 21px; width: 88px; height: 54px; background: #ffd6a5; }
.pet-stage .pet[data-pet="garfield"] .eye { top: 40px; width: 15px; height: 13px; }
.pet-stage .pet[data-pet="garfield"] .eye.left { left: 32px; }
.pet-stage .pet[data-pet="garfield"] .eye.right { right: 32px; }
.pet-stage .pet[data-pet="garfield"] .nose { left: 60px; background: #b65f58; }
.pet-stage .pet[data-pet="garfield"] .body { background: #e98536; }
.pet-stage .pet[data-pet="garfield"] .belly { background: #ffc987; }
.pet-stage .pet[data-pet="garfield"] .paw { background: #f29d4f; }
.pet-stage .pet[data-pet="garfield"] .tail { right: -37px; bottom: 20px; width: 73px; height: 57px; border-color: #e98536; border-bottom-color: transparent; border-left-color: transparent; }
.pet-stage .pet[data-pet="garfield"] .stripe { position: absolute; z-index: 4; top: 2px; display: block; width: 5px; height: 19px; border-radius: 4px; background: #a95127; }
.pet-stage .pet[data-pet="garfield"] .stripe-one { left: 56px; transform: rotate(-10deg); }
.pet-stage .pet[data-pet="garfield"] .stripe-two { right: 56px; transform: rotate(10deg); }

.pet-stage .pet[data-pet="rabbit"] .police-hat,
.pet-stage .pet[data-pet="rabbit"] .collar,
.pet-stage .pet[data-pet="rabbit"] .badge { display: none; }
.pet-stage .pet[data-pet="rabbit"] .ear { top: -31px; width: 34px; height: 92px; border-radius: 55% 55% 28% 28%; background: #f6e9df; }
.pet-stage .pet[data-pet="rabbit"] .ear::after { inset: 8px; background: #efb7bd; }
.pet-stage .pet[data-pet="rabbit"] .ear.left { left: 35px; transform: rotate(-7deg); }
.pet-stage .pet[data-pet="rabbit"] .ear.right { right: 35px; transform: scaleX(-1) rotate(-7deg); }
.pet-stage .pet[data-pet="rabbit"] .face { background: #fff5e9; }
.pet-stage .pet[data-pet="rabbit"] .face::before { background: #fff; }
.pet-stage .pet[data-pet="rabbit"] .nose { background: #e98992; }
.pet-stage .pet[data-pet="rabbit"] .body { background: #f5e8dc; }
.pet-stage .pet[data-pet="rabbit"] .belly { background: #fff; }
.pet-stage .pet[data-pet="rabbit"] .paw { background: #fff6ee; }
.pet-stage .pet[data-pet="rabbit"] .tail { right: -20px; bottom: 31px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #fff; box-shadow: inset -5px -4px 0 #eee0d5; }

.pet-stage .robot-antenna,
.pet-stage .robot-side,
.pet-stage .robot-core { display: none; }
.pet-stage .pet[data-pet="robot"] .ear,
.pet-stage .pet[data-pet="robot"] .tail,
.pet-stage .pet[data-pet="robot"] .stripe,
.pet-stage .pet[data-pet="robot"] .eye,
.pet-stage .pet[data-pet="robot"] .nose,
.pet-stage .pet[data-pet="robot"] .blush,
.pet-stage .pet[data-pet="robot"] .collar { display: none; }
.pet-stage .pet[data-pet="robot"] .robot-antenna { position: absolute; z-index: 4; top: -13px; left: 76px; display: block; width: 8px; height: 25px; border-radius: 5px; background: linear-gradient(90deg, #71849c, #d9e4ed, #71849c); }
.pet-stage .pet[data-pet="robot"] .robot-antenna::before { position: absolute; top: -7px; left: -4px; width: 16px; height: 16px; border: 3px solid #f9fcff; border-radius: 50%; background: #ff956f; box-shadow: 0 0 10px rgba(255,149,111,.55); content: ''; }
.pet-stage .pet[data-pet="robot"] .robot-side { position: absolute; z-index: 1; top: 55px; display: block; width: 19px; height: 29px; border: 3px solid #74869c; border-radius: 8px; background: linear-gradient(130deg, #f8fbff, #b9c9d9); box-shadow: inset 0 0 0 2px #e9f0f6; }
.pet-stage .pet[data-pet="robot"] .robot-side.left { left: 3px; }
.pet-stage .pet[data-pet="robot"] .robot-side.right { right: 3px; }
.pet-stage .pet[data-pet="robot"] .face { z-index: 2; top: 25px; left: 15px; width: 130px; height: 100px; border: 4px solid #71839a; border-radius: 27px; background: linear-gradient(145deg, #f9fcff, #b9c9d9 85%); box-shadow: inset 0 -7px 0 rgba(81,103,128,.16), 0 5px 9px rgba(42,59,78,.18); }
.pet-stage .pet[data-pet="robot"] .face::before { bottom: 19px; left: 13px; width: 96px; height: 48px; border: 2px solid #536c85; border-radius: 16px; background: radial-gradient(circle at 27px 18px, #80edff 0 4px, rgba(128,237,255,.27) 5px 8px, transparent 9px), radial-gradient(circle at 65px 18px, #80edff 0 4px, rgba(128,237,255,.27) 5px 8px, transparent 9px), linear-gradient(145deg, #1c3550, #102238); box-shadow: inset 0 2px 7px rgba(0,0,0,.35), 0 0 12px rgba(90,218,244,.23); }
.pet-stage .pet[data-pet="robot"] .face::after { position: absolute; z-index: 4; top: 80px; left: 55px; width: 13px; height: 5px; border-bottom: 3px solid #ff9a73; border-radius: 0 0 8px 8px; content: ''; }
.pet-stage .pet[data-pet="robot"] .body { bottom: 4px; left: 24px; width: 112px; height: 91px; border: 4px solid #77899e; border-radius: 23px; background: linear-gradient(145deg, #edf3f8 0%, #bdcad8 58%, #8799ad 100%); box-shadow: inset 0 -8px 0 rgba(63,82,103,.15), 0 6px 10px rgba(49,65,83,.15); }
.pet-stage .pet[data-pet="robot"] .belly { top: 20px; left: 29px; width: 46px; height: 45px; border: 3px solid #889bb0; border-radius: 12px; background: linear-gradient(145deg, #dce7ef, #f8fbff); box-shadow: inset 0 -4px 0 rgba(99,121,145,.12); }
.pet-stage .pet[data-pet="robot"] .robot-core { position: absolute; z-index: 4; top: 29px; left: 42px; display: block; width: 23px; height: 23px; border: 4px solid #f9fbff; border-radius: 50%; background: radial-gradient(circle, #ffe4a1 0 22%, #ff986f 42% 69%, #d55f55 73%); box-shadow: 0 0 10px rgba(255,144,101,.65); }
.pet-stage .pet[data-pet="robot"] .paw { width: 32px; height: 24px; border: 3px solid #74869b; border-radius: 9px; background: linear-gradient(145deg, #dce6ef, #8397ad); }
.pet-stage .pet[data-pet="robot"] .police-hat { top: -7px; left: 43px; width: 74px; height: 25px; border: 3px solid #f9fbff; border-radius: 13px 13px 6px 6px; background: linear-gradient(100deg, #f18a6a, #ffb17a); box-shadow: inset 0 -5px 0 rgba(189,82,64,.24), 0 3px 6px rgba(47,65,87,.2); }
.pet-stage .pet[data-pet="robot"] .police-hat::before { bottom: -7px; left: -7px; width: 82px; height: 8px; border: 2px solid #f9fbff; background: #405976; }
.pet-stage .pet[data-pet="robot"] .police-hat i { top: 1px; left: 27px; width: 14px; height: 14px; background: #76e7f4; font-size: 8px; }
.pet-stage .pet[data-pet="robot"] .badge { background: #ff986f; filter: drop-shadow(0 1px 2px rgba(120,65,47,.25)); }
.pet-stage .pet[data-pet="robot"] .backpack { border-color: #536a83; border-radius: 12px; background: #e28a69; box-shadow: inset 0 8px 0 #ffc18c; }
.pet-stage .pet[data-pet="robot"].level-up .robot-core { animation: parent-robot-core-charge .35s ease-in-out 4 alternate; }

/* The original house and ride layers. */
.pet-stage .pet-house { position: absolute; z-index: 0; top: 42px; left: 50%; width: 154px; height: 145px; margin-left: -77px; pointer-events: none; filter: drop-shadow(0 5px 4px rgba(84,62,43,.13)); transform: scale(1.6); transform-origin: 50% 100%; }
.pet-stage .house-chimney { position: absolute; z-index: 1; top: 12px; left: 101px; width: 17px; height: 36px; border: 3px solid var(--home-trim); border-bottom: 0; border-radius: 5px 5px 0 0; background: var(--home-roof); }
.pet-stage .house-wall { position: absolute; z-index: 2; top: 39px; right: 0; left: 16px; height: 82px; border: 3px solid var(--home-trim); border-radius: 8px 8px 5px 5px; background: linear-gradient(160deg, rgba(255,255,255,.3), transparent 55%), var(--home-wall); box-shadow: inset 0 -6px 0 rgba(128,91,53,.08); }
.pet-stage .house-roof { position: absolute; z-index: 3; top: 0; left: 0; width: 154px; height: 66px; background: var(--home-roof); clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(0 3px 0 rgba(96,63,42,.18)); }
.pet-stage .house-window { position: absolute; z-index: 1; top: 17px; width: 16px; height: 17px; border: 3px solid var(--home-trim); border-radius: 5px; background: var(--home-window); box-shadow: inset 0 0 0 1px rgba(58,91,104,.1); }
.pet-stage .house-window-left { left: 27px; }
.pet-stage .house-window-right { right: 34px; }
.pet-stage .house-door { position: absolute; z-index: 2; right: 8px; bottom: 0; width: 56px; height: 66px; border: 3px solid var(--home-trim); border-bottom: 0; border-radius: 25px 25px 0 0; background: var(--home-door); box-shadow: inset 0 0 0 2px rgba(255,255,255,.14); }
.pet-stage .house-door::after { position: absolute; top: 24px; right: 4px; width: 4px; height: 4px; border-radius: 50%; background: #ffe9a8; content: ''; }
.pet-stage .house-sign { position: absolute; z-index: 2; top: -3px; right: 51px; display: grid; width: 22px; height: 20px; place-items: center; border: 2px solid var(--home-trim); border-radius: 7px; color: var(--home-trim); background: var(--home-roof); font-size: 11px; line-height: 1; }
.pet-stage .house-ground { position: absolute; z-index: 0; right: -7px; bottom: 10px; left: 1px; height: 23px; border-radius: 50%; background: var(--home-ground); }
.pet-stage .house-path { position: absolute; z-index: 1; right: 1px; bottom: 0; width: 39px; height: 19px; border-radius: 50% 50% 0 0; background: var(--home-path); transform: rotate(-10deg); }
.pet-stage .house-flower { position: absolute; z-index: 2; bottom: 20px; color: #fff5bd; font-size: 13px; line-height: 1; text-shadow: 0 1px 2px rgba(82,66,39,.18); }
.pet-stage .flower-one { left: 5px; }
.pet-stage .flower-two { right: -2px; bottom: 25px; color: #f8b5ad; }
.pet-stage .pet-wrap::after { position: absolute; z-index: 3; top: 42px; left: 50%; width: 116px; height: 142px; border: 7px solid var(--home-trim); border-bottom: 0; border-radius: 58px 58px 0 0; box-shadow: inset 0 9px 14px rgba(62,44,30,.14), 0 4px 6px rgba(66,48,35,.14); content: ''; pointer-events: none; transform: translateX(-50%); }

.pet-stage .pet-vehicle { position: absolute; z-index: 4; right: -1px; bottom: 12px; width: 90px; height: 44px; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(45,55,47,.2)); }
.pet-stage .vehicle-scooter { position: absolute; right: 19px; bottom: 2px; width: 58px; height: 35px; color: #4e7184; }
.pet-stage .scooter-wheel { position: absolute; bottom: 0; width: 11px; height: 11px; border: 3px solid #354653; border-radius: 50%; background: #e8f0ec; }
.pet-stage .scooter-wheel.rear { left: 4px; }
.pet-stage .scooter-wheel.front { right: 2px; }
.pet-stage .scooter-deck { position: absolute; bottom: 6px; left: 6px; width: 43px; height: 5px; border-radius: 5px; background: linear-gradient(#99d5df, #518da4); box-shadow: 0 1px 0 #365f72; }
.pet-stage .scooter-stem { position: absolute; right: 8px; bottom: 13px; width: 4px; height: 20px; border-radius: 4px; background: linear-gradient(90deg, #567b8e, #d8eced); transform: rotate(-16deg); transform-origin: bottom; }
.pet-stage .scooter-handle { position: absolute; top: 1px; right: 3px; width: 15px; height: 4px; border-radius: 4px; background: #435b69; }
.pet-stage .scooter-lamp { position: absolute; top: 8px; right: 0; width: 5px; height: 5px; border-radius: 50%; background: #ffe9a1; box-shadow: 0 0 5px #fff2bd; }
.pet-stage .vehicle-car { --car-width: 72px; --car-color: #8ea7a5; --car-window: #d9f3f2; --car-trim: #f8fcf5; --wheel-accent: #52636c; display: none; position: absolute; right: 0; bottom: 1px; width: var(--car-width); height: 40px; }
.pet-stage .car-body { position: absolute; z-index: 2; bottom: 6px; left: 0; width: var(--car-width); height: 14px; border: 1px solid rgba(52,67,73,.22); border-radius: 5px 11px 5px 5px; background: linear-gradient(180deg, rgba(255,255,255,.54), transparent 45%), var(--car-color); box-shadow: inset 0 -3px 0 rgba(50,60,66,.12); }
.pet-stage .car-roof { position: absolute; z-index: 1; bottom: 18px; left: var(--roof-left, 19px); width: var(--roof-width, 37px); height: var(--roof-height, 13px); border-radius: 12px 12px 2px 2px; background: var(--car-color); clip-path: polygon(21% 0,78% 0,100% 100%,0 100%); }
.pet-stage .car-window { position: absolute; z-index: 3; bottom: 20px; left: calc(var(--roof-left, 19px) + 5px); width: calc(var(--roof-width, 37px) - 10px); height: 8px; border-radius: 8px 8px 1px 1px; background: linear-gradient(140deg, #f5ffff, var(--car-window) 50%, #a9c9d2); clip-path: polygon(20% 0,78% 0,100% 100%,0 100%); }
.pet-stage .car-wheel { position: absolute; z-index: 4; bottom: 1px; left: 10px; width: 12px; height: 12px; border: 3px solid #35414a; border-radius: 50%; background: #dce4df; box-shadow: inset 0 0 0 1px var(--wheel-accent); }
.pet-stage .car-wheel.front { left: calc(var(--car-width) - 21px); }
.pet-stage .car-light { position: absolute; z-index: 3; bottom: 10px; width: 5px; height: 4px; border-radius: 3px; }
.pet-stage .car-light.front { right: 1px; background: #fff3b3; box-shadow: 0 0 4px #fff6c7; }
.pet-stage .car-light.rear { left: 0; background: #ff8174; }
.pet-stage .car-body::after { position: absolute; top: 3px; left: 50%; width: 1px; height: 8px; background: rgba(52,67,73,.2); content: ''; }
.pet-stage .pet-wrap:is([data-level="8"],[data-level="9"],[data-level="10"],[data-level="11"],[data-level="12"],[data-level="13"],[data-level="14"],[data-level="15"],[data-level="16"],[data-level="17"],[data-level="18"],[data-level="19"],[data-level="20"]) .vehicle-scooter { display: none; }
.pet-stage .pet-wrap:is([data-level="8"],[data-level="9"],[data-level="10"],[data-level="11"],[data-level="12"],[data-level="13"],[data-level="14"],[data-level="15"],[data-level="16"],[data-level="17"],[data-level="18"],[data-level="19"],[data-level="20"]) .vehicle-car { display: block; }
.pet-stage .pet-wrap[data-level="8"] .vehicle-car { --car-width: 68px; --car-color: #79aa8a; --roof-left: 18px; --roof-width: 35px; --roof-height: 12px; --wheel-accent: #47755b; }
.pet-stage .pet-wrap[data-level="9"] .vehicle-car { --car-width: 71px; --car-color: #78a8c8; --roof-left: 19px; --roof-width: 37px; --wheel-accent: #4e758e; }
.pet-stage .pet-wrap[data-level="10"] .vehicle-car { --car-width: 74px; --car-color: #d76c57; --roof-left: 20px; --roof-width: 37px; --wheel-accent: #954b43; }
.pet-stage .pet-wrap[data-level="11"] .vehicle-car { --car-width: 78px; --car-color: #619c72; --roof-left: 19px; --roof-width: 43px; --roof-height: 15px; --wheel-accent: #416849; }
.pet-stage .pet-wrap[data-level="12"] .vehicle-car { --car-width: 79px; --car-color: #d9a655; --roof-left: 17px; --roof-width: 47px; --roof-height: 17px; --wheel-accent: #94733d; }
.pet-stage .pet-wrap[data-level="13"] .vehicle-car { --car-width: 81px; --car-color: #42a99d; --roof-left: 19px; --roof-width: 45px; --roof-height: 16px; --wheel-accent: #337e77; }
.pet-stage .pet-wrap[data-level="14"] .vehicle-car { --car-width: 80px; --car-color: #aab6c0; --roof-left: 22px; --roof-width: 39px; --wheel-accent: #667581; }
.pet-stage .pet-wrap[data-level="15"] .vehicle-car { --car-width: 82px; --car-color: #ece9dc; --car-window: #b8dce3; --roof-left: 23px; --roof-width: 40px; --wheel-accent: #a27948; }
.pet-stage .pet-wrap[data-level="16"] .vehicle-car { --car-width: 84px; --car-color: #dd5548; --roof-left: 27px; --roof-width: 35px; --roof-height: 10px; --wheel-accent: #a43d35; }
.pet-stage .pet-wrap[data-level="17"] .vehicle-car { --car-width: 84px; --car-color: #e7b848; --roof-left: 33px; --roof-width: 28px; --roof-height: 5px; --wheel-accent: #9c7733; }
.pet-stage .pet-wrap[data-level="17"] .car-window { height: 4px; bottom: 21px; }
.pet-stage .pet-wrap[data-level="18"] .vehicle-car { --car-width: 86px; --car-color: #eb7647; --roof-left: 29px; --roof-width: 34px; --roof-height: 8px; --wheel-accent: #a95035; }
.pet-stage .pet-wrap[data-level="19"] .vehicle-car { --car-width: 88px; --car-color: #496fc0; --car-window: #b7f3ed; --roof-left: 31px; --roof-width: 35px; --roof-height: 9px; --wheel-accent: #c3a660; }
.pet-stage .pet-wrap[data-level="20"] .vehicle-car { --car-width: 90px; --car-color: #734da9; --car-window: #a9f4f1; --roof-left: 32px; --roof-width: 36px; --roof-height: 10px; --wheel-accent: #edca76; filter: drop-shadow(0 0 5px rgba(138,102,213,.45)); }
.pet-stage .pet-wrap:is([data-level="18"],[data-level="19"],[data-level="20"]) .vehicle-car::before { position: absolute; z-index: 3; bottom: 19px; left: 3px; width: 13px; height: 4px; border-radius: 3px 0 0 0; background: var(--car-color); box-shadow: -1px -2px 0 var(--car-trim); content: ''; }

/* Parent project tap-play choreography, used when a child taps the companion. */
.pet-stage .pet.tap-play { animation: parent-pet-run-circle 1.8s cubic-bezier(.42,0,.58,1) 1.1s both; will-change: translate, rotate; }
.pet-stage .pet.tap-play .face { animation: parent-pet-head-shake .82s ease-in-out both; }
.pet-stage .pet.tap-play .ear { animation: parent-pet-ear-shake .82s ease-in-out both; }
.pet-stage .pet.tap-play .tail { animation: parent-pet-tail-wag .14s ease-in-out .15s 20 alternate; }
.pet-stage .pet.tap-play .paw.left { animation: parent-pet-run-paw .14s ease-in-out 1.1s 12 alternate; }
.pet-stage .pet.tap-play .paw.right { animation: parent-pet-run-paw .14s ease-in-out 1.17s 12 alternate; }

@keyframes parent-pet-positive { 0%,100% { transform: scale(var(--pet-size,1)) translateY(0) rotate(0); } 30% { transform: scale(var(--pet-size,1)) translateY(-22px) rotate(-4deg); } 58% { transform: scale(var(--pet-size,1)) translateY(-8px) rotate(5deg); } 75% { transform: scale(var(--pet-size,1)) translateY(-13px) rotate(-2deg); } }
@keyframes parent-tail-wag { to { transform: rotate(45deg) scaleX(.9); } }
@keyframes parent-pet-negative { 0%,100% { transform: scale(var(--pet-size,1)) translateY(0); } 25% { transform: scale(var(--pet-size,1)) translateY(6px) rotate(-3deg); } 50% { transform: scale(var(--pet-size,1)) translateY(8px) rotate(3deg); } 75% { transform: scale(var(--pet-size,1)) translateY(6px) rotate(-2deg); } }
@keyframes parent-ear-droop { 50% { transform: rotate(-38deg) translateY(8px); } }
@keyframes parent-ear-droop-right { 50% { transform: scaleX(-1) rotate(-38deg) translateY(8px); } }
@keyframes parent-pet-grow { 0% { transform: scale(calc(var(--pet-size,1) * .72)); filter: brightness(1); } 35% { transform: scale(calc(var(--pet-size,1) * 1.38)) rotate(-5deg); filter: brightness(1.4); } 58% { transform: scale(calc(var(--pet-size,1) * .95)) rotate(4deg); } 78% { transform: scale(calc(var(--pet-size,1) * 1.1)); } 100% { transform: scale(var(--pet-size,1)); filter: brightness(1); } }
@keyframes parent-badge-shine { to { filter: brightness(1.8); transform: scale(1.35) rotate(8deg); } }
@keyframes parent-robot-core-charge { to { transform: scale(1.22); filter: brightness(1.45); box-shadow: 0 0 19px rgba(255,144,101,.9); } }
@keyframes parent-pet-head-shake { 0%,100% { translate: 0 0; rotate: 0deg; } 18%,52% { translate: -3px 0; rotate: -8deg; } 35%,69% { translate: 3px 0; rotate: 8deg; } 84% { translate: -1px 0; rotate: -3deg; } }
@keyframes parent-pet-ear-shake { 0%,100% { rotate: 0deg; } 25%,65% { rotate: -12deg; } 45%,82% { rotate: 12deg; } }
@keyframes parent-pet-tail-wag { from { rotate: -8deg; } to { rotate: 38deg; } }
@keyframes parent-pet-run-paw { to { translate: 0 -6px; } }
@keyframes parent-pet-run-circle { 0%,100% { translate: 0 0; rotate: 0deg; } 16% { translate: 48px -2px; rotate: 58deg; } 32% { translate: 50px 27px; rotate: 116deg; } 48% { translate: 5px 39px; rotate: 174deg; } 64% { translate: -44px 24px; rotate: 232deg; } 80% { translate: -48px -12px; rotate: 290deg; } 92% { translate: -20px -28px; rotate: 334deg; } }

@media (prefers-reduced-motion: reduce) {
  .pet-stage .pet, .pet-stage .pet * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
