:root {
  --bg-top: #fff3bf;
  --bg-bottom: #ffd8a8;
  --card-top: rgba(255, 255, 255, 0.94);
  --card-bottom: rgba(255, 248, 231, 0.92);
  --ink: #4a2d1f;
  --accent: #ff7b7b;
  --accent-strong: #ff5d73;
  --gold: #ffcf5c;
  --mint: #9fe6c3;
  --shadow: rgba(117, 67, 29, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Fredoka", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.65), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255, 196, 140, 0.35), transparent 28%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.card-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  position: relative;
  width: min(92vw, 640px);
  overflow: hidden;
  border-radius: 32px;
  padding: 32px 28px 220px;
  text-align: center;
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
  box-shadow: 0 26px 60px var(--shadow);
}

.sky {
  position: absolute;
  top: -28px;
  width: 160px;
  height: 80px;
  background: rgba(255, 255, 255, 0.7);
  filter: blur(2px);
  border-radius: 999px;
}

.sky::before,
.sky::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: inherit;
}

.sky::before {
  width: 90px;
  height: 90px;
  left: 18px;
  top: -18px;
}

.sky::after {
  width: 100px;
  height: 100px;
  right: 18px;
  top: -22px;
}

.sky-left {
  left: -24px;
}

.sky-right {
  right: -24px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b56f3f;
}

h1 {
  margin: 0;
  font-family: "Baloo 2", cursive;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 0.95;
}

.message,
.signature {
  margin: 0 auto;
  max-width: 470px;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.55;
}

.message {
  margin-top: 18px;
}

.signature {
  margin-top: 10px;
  color: #8d5a37;
}

.cheer-button {
  margin-top: 24px;
  margin-bottom: 18px;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 600;
  color: #fffaf0;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 28px rgba(255, 93, 115, 0.28);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cheer-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(255, 93, 115, 0.32);
}

.cheer-button:active {
  transform: translateY(1px) scale(0.99);
}

.characters {
  position: absolute;
  inset: auto 0 14px;
  height: 150px;
}

.portrait-badge {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 170px;
  display: grid;
  justify-items: center;
  transform: translateX(-50%);
  animation: floaty 3.2s ease-in-out infinite;
}

.portrait-ring {
  width: 150px;
  height: 150px;
  padding: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fffef5, #ffd7ae 52%, #ff9fb4);
  box-shadow: 0 16px 30px rgba(141, 90, 55, 0.22);
}

.portrait-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.82);
}

.star {
  position: absolute;
  width: 22px;
  aspect-ratio: 1;
  background: var(--gold);
  clip-path: polygon(50% 0%, 62% 35%, 100% 35%, 69% 57%, 80% 100%, 50% 72%, 20% 100%, 31% 57%, 0% 35%, 38% 35%);
  animation: bob 2.8s ease-in-out infinite;
}

.star-one {
  left: 22%;
  bottom: 42px;
}

.star-two {
  right: 24%;
  bottom: 98px;
  animation-delay: 0.5s;
}

.star-three {
  right: 14%;
  bottom: 38px;
  width: 16px;
  animation-delay: 1s;
}

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

.confetti-piece {
  position: absolute;
  top: -10%;
  width: 10px;
  height: 18px;
  border-radius: 999px;
  animation: fall linear forwards;
}

@keyframes fall {
  from {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  to {
    transform: translateY(118vh) rotate(540deg);
    opacity: 0.1;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-9px);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

@media (max-width: 560px) {
  .card {
    padding: 28px 20px 198px;
    border-radius: 28px;
  }

  .characters {
    height: 140px;
  }

  .portrait-badge {
    width: 150px;
  }

  .portrait-ring {
    width: 132px;
    height: 132px;
  }
}
