:root {
  color-scheme: light;
  --ink: #2b1a2b;
  --muted: rgba(43, 26, 43, 0.65);
  --accent: #ff7cb6;
  --bg: #fff3fa;
  --panel: rgba(255, 255, 255, 0.78);
  --stroke: rgba(255, 124, 182, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 20%, #ffe2f0, transparent 45%),
    radial-gradient(circle at 85% 10%, #d9f3ff, transparent 45%),
    radial-gradient(circle at 50% 90%, #fff0d6, transparent 50%),
    var(--bg);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(20px, 5vw, 48px) 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
}

.badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 124, 182, 0.4);
  font-size: 0.7rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  color: var(--muted);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

h1 {
  margin: 10px 0 6px;
  font-family: "Fredoka", "Outfit", sans-serif;
  font-size: clamp(1.8rem, 2.6vw + 1rem, 2.8rem);
}

p {
  margin: 0;
  color: var(--muted);
}

.meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hint {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 124, 182, 0.3);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  color: var(--muted);
}

.stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 20px 60px;
}

.pet-zone {
  display: grid;
  place-items: center;
  gap: 18px;
  position: relative;
}

.animal {
  width: clamp(180px, 30vw, 280px);
  height: clamp(160px, 26vw, 240px);
  position: relative;
  display: grid;
  place-items: center;
  transition: transform 0.25s ease;
}

.ears {
  position: absolute;
  top: 2%;
  display: flex;
  justify-content: space-between;
  width: 70%;
}

.ear {
  width: 36px;
  height: 60px;
  border-radius: 60% 60% 50% 50%;
  background: #ffd5e5;
  border: 2px solid rgba(255, 124, 182, 0.4);
  position: relative;
}

.ear::after {
  content: "";
  position: absolute;
  inset: 8px 10px;
  border-radius: 50%;
  background: #ff9ac6;
  opacity: 0.7;
}

.body {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #fff7fb, #ffe2f3);
  border-radius: 45% 45% 40% 40%;
  border: 2px solid rgba(255, 124, 182, 0.35);
  position: relative;
  display: grid;
  place-items: center;
  box-shadow: 0 20px 40px rgba(255, 124, 182, 0.25);
}

.belly {
  position: absolute;
  width: 55%;
  height: 55%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  bottom: 12%;
}

.tail {
  position: absolute;
  right: -10px;
  bottom: 28%;
  width: 60px;
  height: 24px;
  border-radius: 50px;
  background: #ffd5e5;
  border: 2px solid rgba(255, 124, 182, 0.35);
  transform-origin: left center;
}

.face {
  position: absolute;
  top: 26%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
}

.eye {
  width: 18px;
  height: 26px;
  border-radius: 50%;
  background: #2b1a2b;
  box-shadow: inset 0 -4px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.2s ease;
}

.nose {
  position: absolute;
  top: 30px;
  width: 16px;
  height: 12px;
  border-radius: 50%;
  background: #ff9ac6;
}

.mouth {
  position: absolute;
  top: 44px;
  width: 24px;
  height: 12px;
  border-radius: 0 0 12px 12px;
  border-bottom: 3px solid #2b1a2b;
}

.cheek {
  position: absolute;
  width: 22px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 124, 182, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cheek.left {
  left: 20%;
  top: 42%;
}

.cheek.right {
  right: 20%;
  top: 42%;
}

.caption {
  font-weight: 600;
  color: var(--muted);
}

.hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.heart {
  position: absolute;
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  background: #ff7cb6;
  border-radius: 4px;
  animation: float 1.6s ease-out forwards;
  opacity: 0.9;
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff7cb6;
}

.heart::before {
  top: -9px;
  left: 0;
}

.heart::after {
  left: -9px;
  top: 0;
}

.pet-zone.petting .animal {
  transform: translateY(-6px) scale(1.03);
}

.pet-zone.petting .tail {
  animation: wag 0.3s ease-in-out infinite;
}

.pet-zone.petting .eye {
  transform: scaleY(0.4);
}

.pet-zone.petting .cheek {
  opacity: 1;
}

@keyframes wag {
  0% {
    transform: rotate(8deg);
  }
  50% {
    transform: rotate(-12deg);
  }
  100% {
    transform: rotate(8deg);
  }
}

@keyframes float {
  0% {
    transform: translateY(0) scale(1) rotate(45deg);
    opacity: 0.9;
  }
  100% {
    transform: translateY(-80px) scale(1.3) rotate(45deg);
    opacity: 0;
  }
}

@media (max-width: 700px) {
  .animal {
    width: 220px;
    height: 190px;
  }
}
