.capybara-scene {
  display: inline-grid;
  place-items: end center;
  width: 170px;
  height: 170px;
  perspective: 600px;
  vertical-align: middle;
}

.capybara {
  position: relative;
  width: 142px;
  height: 148px;
  transform-style: preserve-3d;
  animation: capybara-breathe 3.2s ease-in-out infinite;
}

.capybara-shadow {
  position: absolute;
  bottom: 1px;
  left: 18px;
  width: 108px;
  height: 16px;
  border-radius: 50%;
  background: rgba(114, 67, 45, .2);
  filter: blur(3px);
  transform: translateZ(-5px);
}

.capybara-body {
  position: absolute;
  bottom: 10px;
  left: 20px;
  width: 102px;
  height: 102px;
  border: 3px solid #70412f;
  border-radius: 49% 49% 43% 43%;
  background: radial-gradient(circle at 36% 22%, #edbf8d 0 5%, transparent 22%),
    linear-gradient(145deg, #d99b66 3%, #bd7447 55%, #8a4d35 100%);
  box-shadow: inset 10px 8px 13px rgba(255, 237, 197, .32), inset -10px -10px 14px rgba(92, 44, 33, .23),
    8px 12px 0 rgba(75, 43, 39, .12);
  transform: rotateX(7deg);
}

.capybara-tummy {
  position: absolute;
  z-index: 2;
  bottom: 17px;
  left: 37px;
  width: 68px;
  height: 68px;
  border-radius: 47% 47% 44% 44%;
  background: linear-gradient(125deg, #f2ca97, #d89560);
  box-shadow: inset 5px 6px 8px rgba(255, 243, 211, .4), inset -7px -8px 10px rgba(136, 75, 48, .16);
}

.capybara-head {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 21px;
  width: 100px;
  height: 91px;
  border: 3px solid #70412f;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 38% 22%, #f0bd87 0 4%, transparent 21%),
    linear-gradient(145deg, #dda06b 3%, #bd7448 68%, #96553a);
  box-shadow: inset 9px 8px 12px rgba(255, 233, 191, .34), inset -9px -10px 14px rgba(90, 43, 33, .2),
    5px 8px 0 rgba(84, 48, 42, .1);
  transform: translateZ(20px);
}

.capybara-ear {
  position: absolute;
  top: -13px;
  width: 23px;
  height: 28px;
  border: 3px solid #70412f;
  border-radius: 57% 50% 45% 45%;
  background: linear-gradient(135deg, #d4945f, #97543a);
  box-shadow: inset 5px 4px 0 #f1bd88;
}

.capybara-ear.left { left: 8px; transform: rotate(-27deg); }
.capybara-ear.right { right: 8px; transform: rotate(27deg); }

.capybara-eye {
  position: absolute;
  top: 32px;
  width: 16px;
  height: 20px;
  border: 2px solid #51332c;
  border-radius: 50%;
  background: #24252b;
  box-shadow: inset 3px 2px 0 #5d5e68;
  animation: capybara-blink 5s infinite;
}

.capybara-eye::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 5px;
  height: 6px;
  border-radius: 50%;
  background: #fffdf3;
  content: "";
}

.capybara-eye.left { left: 21px; }
.capybara-eye.right { right: 21px; }

.capybara-cheek {
  position: absolute;
  top: 57px;
  width: 18px;
  height: 10px;
  border-radius: 50%;
  background: rgba(239, 139, 145, .67);
  filter: blur(.2px);
}

.capybara-cheek.left { left: 9px; transform: rotate(-8deg); }
.capybara-cheek.right { right: 9px; transform: rotate(8deg); }

.capybara-muzzle {
  position: absolute;
  bottom: 10px;
  left: 28px;
  width: 40px;
  height: 29px;
  border-radius: 47%;
  background: linear-gradient(145deg, #c68157, #aa6243);
  box-shadow: inset 4px 4px 5px rgba(249, 206, 164, .33);
}

.capybara-nose {
  position: absolute;
  z-index: 1;
  top: 4px;
  left: 12px;
  width: 16px;
  height: 10px;
  border-radius: 50% 50% 47% 47%;
  background: #46322e;
}

.capybara-mouth {
  position: absolute;
  top: 13px;
  left: 19px;
  width: 1.5px;
  height: 13px;
  background: #46322e;
}

.capybara-mouth::after {
  position: absolute;
  top: 10px;
  left: -9px;
  width: 18px;
  height: 8px;
  border-bottom: 2px solid #46322e;
  border-radius: 0 0 50% 50%;
  content: "";
}

.capybara-paw {
  position: absolute;
  z-index: 4;
  bottom: 35px;
  width: 25px;
  height: 38px;
  border: 3px solid #70412f;
  border-radius: 48% 48% 45% 45%;
  background: linear-gradient(145deg, #d3915e, #9a5639);
  box-shadow: inset 5px 5px 7px rgba(247, 205, 164, .25);
  transform-origin: top center;
}

.capybara-paw.left { left: 21px; transform: rotate(21deg); }
.capybara-paw.right { right: 21px; transform: rotate(-21deg); }

.capybara-foot {
  position: absolute;
  z-index: 4;
  bottom: 5px;
  width: 32px;
  height: 39px;
  border: 3px solid #70412f;
  border-radius: 48% 48% 42% 42%;
  background: linear-gradient(145deg, #a96141, #71402f);
  box-shadow: inset 5px 5px 6px rgba(228, 159, 105, .28);
}

.capybara-foot.left { left: 18px; transform: rotate(-18deg); }
.capybara-foot.right { right: 18px; transform: rotate(18deg); }

.capybara-leaf {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 10px;
  width: 29px;
  height: 15px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #82d988, #3f9b69);
  box-shadow: 7px 7px 0 -3px #318161;
  transform: rotate(-24deg);
  animation: capybara-leaf 2.8s ease-in-out infinite;
}

.capybara-scene.is-happy .capybara { animation: capybara-hop .7s ease-in-out 2; }
.capybara-scene.is-happy .capybara-leaf { animation: capybara-wave .7s ease-in-out 2; }

.capybara-compact {
  transform: scale(.82);
  transform-origin: center bottom;
}

.kit-mascot-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(680px, calc(100% - 24px));
  margin: 14px auto;
  padding: 12px 16px;
  border-radius: 20px;
  background: linear-gradient(120deg, #fff4bd, #e3f8ec);
  box-shadow: 0 10px 24px rgba(49, 68, 103, .12);
  color: #24324a;
  font: 800 14px/1.4 system-ui, sans-serif;
}

.kit-mascot-card p { margin: 0; }
.kit-mascot-card button {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  background: #6558d9;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

@keyframes capybara-breathe {
  0%, 100% { transform: translateY(0) rotateY(-2deg); }
  50% { transform: translateY(-4px) rotateY(2deg); }
}

@keyframes capybara-hop {
  0%, 100% { transform: translateY(0) rotateY(-2deg); }
  45% { transform: translateY(-16px) rotateY(7deg); }
}

@keyframes capybara-blink {
  0%, 91%, 100% { transform: scaleY(1); }
  94% { transform: scaleY(.08); }
}

@keyframes capybara-leaf {
  0%, 100% { transform: rotate(-24deg); }
  50% { transform: rotate(-7deg); }
}

@keyframes capybara-wave {
  0%, 100% { transform: rotate(-24deg); }
  50% { transform: rotate(12deg) translateY(-5px); }
}

@media (max-width: 520px) {
  .kit-mascot-card { align-items: center; }
  .kit-mascot-card .capybara-scene { width: 120px; height: 120px; transform: scale(.72); }
  .kit-mascot-card button { padding: 8px 10px; }
}
