:root {
  --cream: #FFF9F3;
  --soft-white: #FFFCF8;
  --blue: #8FA7FF;
  --light-blue: #DCE5FF;
  --purple: #A98AFB;
  --light-purple: #E9DEFF;
  --pink: #FFB8D2;
  --light-pink: #FFE3ED;
  --gold: #F4C96B;
  --dark-text: #3D365C;
  --soft-text: #716A88;
  --card: rgba(255, 255, 255, 0.82);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--dark-text);
  background:
    radial-gradient(circle at 15% 15%, #FFE3ED 0, transparent 30%),
    radial-gradient(circle at 85% 20%, #DCE5FF 0, transparent 32%),
    radial-gradient(circle at 50% 85%, #E9DEFF 0, transparent 35%),
    #FFF9F3;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 15%, #FFE3ED 0, transparent 30%),
    radial-gradient(circle at 85% 20%, #DCE5FF 0, transparent 32%),
    radial-gradient(circle at 50% 85%, #E9DEFF 0, transparent 35%),
    #FFF9F3;
}

button {
  min-height: 44px;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

.section {
  position: relative;
  min-height: 100svh;
  padding: calc(env(safe-area-inset-top) + 72px) 18px calc(env(safe-area-inset-bottom) + 56px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.primary-btn,
.secondary-btn {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 12px 26px rgba(143, 167, 255, 0.28);
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, #8FA7FF, #A98AFB 55%, #FFB8D2);
}

.secondary-btn {
  color: var(--dark-text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(143, 167, 255, 0.34);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

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

.balloon,
.star,
.confetti {
  position: absolute;
  opacity: 0.72;
}

.balloon {
  width: 24px;
  height: 31px;
  border-radius: 50% 50% 45% 45%;
  background: var(--light-blue);
  animation: floatUp 8s ease-in-out infinite;
}

.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -15px;
  width: 1px;
  height: 18px;
  background: rgba(113, 106, 136, 0.26);
}

.b1 { left: 8%; top: 74%; background: var(--light-pink); animation-delay: -2s; }
.b2 { left: 82%; top: 70%; background: var(--light-purple); animation-delay: -5s; }
.b3 { left: 72%; top: 24%; transform: scale(.72); animation-delay: -3s; }
.b4 { left: 17%; top: 22%; transform: scale(.65); animation-delay: -6s; }
.b5 { left: 44%; top: 86%; transform: scale(.55); animation-delay: -1s; }
.b6 { left: 91%; top: 46%; transform: scale(.5); animation-delay: -4s; }
.b7 { left: 5%; top: 46%; transform: scale(.5); animation-delay: -7s; }
.b8 { left: 54%; top: 26%; transform: scale(.42); animation-delay: -3.8s; }

.star {
  color: var(--gold);
  font-size: 18px;
  animation: twinkle 2.8s ease-in-out infinite;
}

.s1 { left: 18%; top: 17%; }
.s2 { left: 76%; top: 16%; animation-delay: -.6s; }
.s3 { left: 84%; top: 39%; animation-delay: -1s; }
.s4 { left: 14%; top: 58%; animation-delay: -1.8s; }
.s5 { left: 48%; top: 11%; animation-delay: -.9s; }
.s6 { left: 38%; top: 77%; animation-delay: -1.3s; }
.s7 { left: 67%; top: 82%; animation-delay: -2.1s; }
.s8 { left: 29%; top: 37%; animation-delay: -1.6s; }
.s9 { left: 58%; top: 48%; animation-delay: -.4s; }
.s10 { left: 92%; top: 68%; animation-delay: -2.5s; }

.confetti {
  width: 8px;
  height: 18px;
  border-radius: 3px;
  background: var(--blue);
  transform: rotate(18deg);
  animation: confettiDrop 3.8s ease-in-out infinite;
}

.c1 { left: 13%; top: -10%; background: var(--pink); animation-delay: -.2s; }
.c2 { left: 27%; top: -8%; background: var(--gold); animation-delay: -1.3s; }
.c3 { left: 42%; top: -12%; background: var(--purple); animation-delay: -.8s; }
.c4 { left: 56%; top: -10%; background: var(--blue); animation-delay: -1.9s; }
.c5 { left: 72%; top: -9%; background: var(--pink); animation-delay: -2.4s; }
.c6 { left: 86%; top: -11%; background: var(--gold); animation-delay: -1.1s; }
.c7 { left: 20%; top: -16%; background: var(--light-purple); animation-delay: -2.8s; }
.c8 { left: 64%; top: -18%; background: var(--light-blue); animation-delay: -3s; }
.c9 { left: 36%; top: -14%; background: var(--pink); animation-delay: -2s; }
.c10 { left: 93%; top: -18%; background: var(--purple); animation-delay: -1.6s; }
.c11 { left: 6%; top: -20%; background: var(--light-blue); animation-delay: -2.2s; }
.c12 { left: 49%; top: -24%; background: var(--gold); animation-delay: -2.6s; }
.c13 { left: 78%; top: -22%; background: var(--pink); animation-delay: -3.1s; }
.c14 { left: 32%; top: -26%; background: var(--purple); animation-delay: -3.4s; }

.decor:not(.burst) .confetti {
  opacity: .32;
}

.burst .confetti {
  animation-duration: 1.5s;
  opacity: .95;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.eyebrow {
  font-size: clamp(24px, 8vw, 38px);
  line-height: 1.12;
  font-weight: 900;
  max-width: 12em;
  white-space: nowrap;
}

.tiny-note,
.section-head p,
.reveal-copy p,
.success-text span,
.profile-basic,
.talent {
  color: var(--soft-text);
}

.gift-box {
  position: relative;
  width: 150px;
  height: 128px;
  margin: 18px 0 8px;
  border-radius: 18px 18px 22px 22px;
  background: linear-gradient(135deg, var(--blue), var(--purple) 62%, var(--pink));
  box-shadow: 0 24px 55px rgba(143, 167, 255, .35), inset 0 -14px 0 rgba(61, 54, 92, .08);
  overflow: visible;
  transition: transform .35s ease, filter .35s ease;
}

.gift-box:hover {
  transform: translateY(-2px) rotate(-1deg);
}

.gift-opening .gift-box {
  animation: giftShake .72s ease both;
  filter: saturate(1.08) brightness(1.03);
}

.gift-box .lid {
  position: absolute;
  left: -12px;
  top: -28px;
  width: 174px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--light-blue), var(--light-purple), var(--light-pink));
  box-shadow: 0 12px 20px rgba(61, 54, 92, .12);
  transform-origin: right bottom;
  transition: transform .7s cubic-bezier(.2, .85, .25, 1.25), opacity .5s;
}

.gift-box .lid i {
  position: absolute;
  left: 50%;
  top: -20px;
  width: 22px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  transform: translateX(-50%);
}

.gift-opened .gift-box .lid {
  transform: translate(12px, -46px) rotate(14deg);
}

.bow {
  position: absolute;
  top: -48px;
  z-index: 2;
  width: 46px;
  height: 34px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border: 5px solid rgba(255, 255, 255, .5);
  box-shadow: 0 12px 24px rgba(61, 54, 92, .12);
}

.bow.left {
  left: 31px;
  border-radius: 70% 28% 70% 35%;
  transform: rotate(-22deg);
}

.bow.right {
  right: 31px;
  border-radius: 28% 70% 35% 70%;
  transform: rotate(22deg);
}

.gift-opened .bow.left {
  transform: translate(-8px, -36px) rotate(-38deg);
  transition: transform .7s cubic-bezier(.2, .85, .25, 1.2);
}

.gift-opened .bow.right {
  transform: translate(8px, -36px) rotate(38deg);
  transition: transform .7s cubic-bezier(.2, .85, .25, 1.2);
}

.ribbon {
  position: absolute;
  background: rgba(255, 255, 255, .58);
}

.ribbon.vertical {
  inset: 0 auto 0 62px;
  width: 25px;
}

.ribbon.horizontal {
  left: 0;
  right: 0;
  top: 48px;
  height: 24px;
}

.gift-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .72), transparent 62%);
  transform: translate(-50%, -50%) scale(.6);
  opacity: .35;
  animation: glowPulse 1.9s ease-in-out infinite;
}

.unwrapping {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .64);
  border: 1px solid rgba(169, 138, 251, .22);
  box-shadow: 0 14px 28px rgba(61, 54, 92, .1);
  animation: popIn .25s ease both;
}

.unwrapping span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: dotBlink .75s ease-in-out infinite alternate;
}

.unwrapping span:last-child {
  animation-delay: .22s;
}

.reveal-copy {
  animation: birthdayReveal .65s ease both;
}

.reveal-copy h1 {
  margin: 8px 0;
  font-size: clamp(42px, 13vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.reveal-copy h1 span {
  font-size: .62em;
}

.section-head {
  text-align: center;
  align-self: end;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(25px, 8vw, 42px);
  line-height: 1.12;
}

.section-head p {
  margin: 0;
  font-size: 15px;
}

.cake-section {
  align-content: center;
}

.cake-stage {
  position: relative;
  width: min(92vw, 360px);
  height: 356px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin: 0 auto;
}

.cake-sparkles {
  position: absolute;
  top: 44px;
  color: var(--gold);
  font-size: 24px;
  letter-spacing: 10px;
  animation: twinkle 2.2s ease-in-out infinite;
}

.number-candle {
  position: absolute;
  top: 42px;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
}

.number-candle span {
  font-size: 56px;
  font-weight: 950;
  line-height: 1;
  color: var(--purple);
  text-shadow: 2px 2px 0 white, 0 8px 16px rgba(169, 138, 251, .22);
}

.flame {
  width: 16px;
  height: 24px;
  margin-bottom: -3px;
  border-radius: 70% 30% 70% 30%;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 18px rgba(244, 201, 107, .95);
  animation: flameDance .55s ease-in-out infinite alternate;
}

.blown .flame {
  opacity: 0;
  transform: translateY(-8px) scale(.3) rotate(45deg);
  transition: .4s ease;
}

.smoke {
  position: absolute;
  top: -14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border-top: 3px solid rgba(113, 106, 136, .35);
  opacity: 0;
}

.blown .smoke {
  animation: smokeUp 1.1s ease forwards;
}

.cake-plate {
  position: absolute;
  bottom: 22px;
  width: 330px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), var(--light-blue));
  box-shadow: 0 20px 36px rgba(61, 54, 92, .14);
}

.pretty-cake {
  position: relative;
  z-index: 2;
  width: 314px;
  height: 230px;
  display: grid;
  align-content: end;
  justify-items: center;
  transition: transform .65s ease;
}

.cake-layer {
  position: relative;
  height: 58px;
  border-radius: 28px 28px 18px 18px;
  box-shadow: 0 16px 24px rgba(61, 54, 92, .11), inset 0 -10px 0 rgba(61, 54, 92, .06);
  transition: transform .7s ease;
}

.cake-layer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -13px;
  height: 27px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .84);
  box-shadow: inset 0 -4px 0 rgba(169, 138, 251, .08);
}

.cake-layer span {
  position: absolute;
  left: 11%;
  right: 11%;
  top: 20px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .52);
}

.top-layer {
  width: 178px;
  background: linear-gradient(180deg, var(--light-pink), var(--pink));
}

.middle-layer {
  width: 244px;
  background: linear-gradient(180deg, var(--light-purple), var(--purple));
}

.bottom-layer {
  width: 314px;
  background: linear-gradient(180deg, var(--light-blue), var(--blue));
}

.cream-drops {
  position: absolute;
  z-index: 4;
  top: 60px;
  width: 210px;
  height: 34px;
}

.cream-drops i {
  position: absolute;
  top: 0;
  width: 24px;
  height: 34px;
  border-radius: 0 0 999px 999px;
  background: rgba(255, 255, 255, .9);
}

.cream-drops i:nth-child(1) { left: 8px; height: 22px; }
.cream-drops i:nth-child(2) { left: 52px; }
.cream-drops i:nth-child(3) { left: 95px; height: 26px; }
.cream-drops i:nth-child(4) { left: 135px; height: 31px; }
.cream-drops i:nth-child(5) { left: 178px; height: 21px; }

.sprinkle-field {
  position: absolute;
  z-index: 5;
  inset: 105px 34px 34px;
  pointer-events: none;
}

.sprinkle-field i {
  position: absolute;
  width: 9px;
  height: 17px;
  border-radius: 999px;
  background: var(--gold);
  transform: rotate(28deg);
}

.sprinkle-field i:nth-child(1) { left: 7%; top: 5%; background: var(--pink); }
.sprinkle-field i:nth-child(2) { left: 28%; top: 34%; background: var(--light-blue); transform: rotate(-22deg); }
.sprinkle-field i:nth-child(3) { left: 47%; top: 12%; background: var(--gold); }
.sprinkle-field i:nth-child(4) { left: 70%; top: 42%; background: var(--light-pink); transform: rotate(-35deg); }
.sprinkle-field i:nth-child(5) { left: 84%; top: 13%; background: var(--light-purple); }
.sprinkle-field i:nth-child(6) { left: 18%; top: 68%; background: white; transform: rotate(45deg); }

.cut .pretty-cake {
  transform: translateY(3px) rotate(-1deg);
}

.cut .top-layer { transform: translateX(-20px) rotate(-4deg); }
.cut .middle-layer { transform: translateX(20px) rotate(2deg); }
.cut .bottom-layer { transform: translateX(-8px); }

.cake-secret {
  position: absolute;
  right: 8px;
  bottom: 22px;
  z-index: 5;
  width: 122px;
  padding: 8px;
  border-radius: 6px;
  background: white;
  box-shadow: 0 18px 34px rgba(61, 54, 92, .18);
  transform: rotate(6deg);
  animation: popIn .45s ease both;
}

.cake-secret img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  background: white;
}

.cake-secret b {
  display: block;
  margin-top: 6px;
  font-size: 11px;
}

.cake-actions {
  min-height: 126px;
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 12px;
}

.success-text {
  display: grid;
  gap: 4px;
  text-align: center;
  animation: popIn .35s ease both;
}

.success-text b {
  font-size: 24px;
}

.photos-section {
  display: block;
  padding-left: 14px;
  padding-right: 14px;
}

.gallery-next {
  display: block;
  margin: 28px auto 0;
}

.photo-grid {
  width: min(100%, 860px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.photo-card {
  width: 100%;
  min-width: 0;
  padding: 8px 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(169, 138, 251, .16);
  box-shadow: 0 14px 28px rgba(61, 54, 92, .11);
  transform: rotate(var(--tilt));
  animation: fadeLift .45s ease both;
  animation-delay: var(--delay);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  background: #fff;
}

.photo-card span {
  display: block;
  padding-top: 8px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
}

.modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(61, 54, 92, .38);
  backdrop-filter: blur(12px);
}

.modal-card {
  position: relative;
  width: min(100%, 440px);
  max-height: calc(100svh - 36px);
  overflow: auto;
  padding: 12px;
  border-radius: 18px;
  background: var(--soft-white);
  box-shadow: 0 24px 60px rgba(61, 54, 92, .26);
}

.modal-card img {
  width: 100%;
  max-height: calc(100svh - 130px);
  object-fit: contain;
  border-radius: 12px;
  background: white;
}

.modal-card p {
  margin: 10px 4px 0;
  text-align: center;
  font-weight: 800;
}

.close-btn {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--dark-text);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 18px rgba(61, 54, 92, .18);
}

.profile-card,
.quiz-card,
.birthday-card {
  width: min(100%, 470px);
  border-radius: 24px;
  padding: 24px;
  background: var(--card);
  border: 1px solid rgba(169, 138, 251, .22);
  box-shadow: 0 22px 55px rgba(61, 54, 92, .13);
  backdrop-filter: blur(16px);
}

.profile-card {
  text-align: center;
  overflow: hidden;
  padding-top: 0;
}

.profile-photo-strip {
  width: calc(100% + 48px);
  margin: 0 -24px 0;
  height: 128px;
  overflow: hidden;
  background: var(--light-blue);
}

.profile-photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.98);
}

.avatar-photo {
  width: 88px;
  height: 88px;
  margin: -42px auto 12px;
  border-radius: 30px;
  overflow: hidden;
  border: 5px solid var(--soft-white);
  box-shadow: 0 14px 28px rgba(61, 54, 92, .18);
  transform: rotate(-4deg);
  background: white;
}

.avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card h2 {
  margin: 0 0 6px;
  font-size: 32px;
}

.bio-lines {
  margin: 18px 0;
  padding: 14px;
  text-align: left;
  border-radius: 18px;
  background: rgba(255, 255, 255, .55);
  color: var(--dark-text);
  font-size: 14px;
  line-height: 1.52;
}

.bio-lines p {
  margin: 0 0 7px;
}

.bio-lines p:last-child {
  margin-bottom: 0;
}

.toast {
  margin: 12px auto 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--light-pink);
  color: var(--dark-text);
  font-weight: 800;
  animation: popIn .3s ease both;
}

.quiz-card {
  display: grid;
  gap: 18px;
}

.question-count {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--purple);
  background: var(--light-purple);
  font-weight: 900;
  font-size: 13px;
}

.quiz-card h3 {
  margin: 4px 0 0;
  font-size: 23px;
  line-height: 1.25;
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-option {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border-radius: 16px;
  text-align: left;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(143, 167, 255, .25);
  overflow-wrap: anywhere;
  word-break: break-all;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.quiz-option:active {
  transform: scale(.985);
}

.quiz-option.correct {
  background: var(--light-blue);
  border-color: var(--blue);
  font-weight: 900;
}

.quiz-option.picked {
  background: var(--light-purple);
  border-color: var(--purple);
  font-weight: 900;
  transform: translateX(4px);
}

.quiz-option.wrong {
  background: var(--light-pink);
  border-color: var(--pink);
}

.answer-note,
.result-panel {
  display: grid;
  justify-items: start;
  gap: 12px;
  color: var(--soft-text);
}

.result-panel h3,
.result-panel p {
  margin: 0;
}

.result-panel h3 {
  color: var(--dark-text);
  font-size: 28px;
}

.result-panel b {
  color: var(--dark-text);
  font-size: 20px;
}

.reward {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 18px;
  border-radius: 18px;
  color: var(--dark-text);
  background: linear-gradient(135deg, var(--light-blue), var(--light-purple), var(--light-pink));
  animation: popIn .35s ease both;
}

.answer-list {
  width: 100%;
  display: grid;
  gap: 10px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
}

.answer-list li {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(143, 167, 255, .2);
  color: var(--dark-text);
}

.answer-list li.ok {
  border-color: rgba(143, 167, 255, .55);
}

.answer-list li.bad {
  border-color: rgba(255, 184, 210, .8);
}

.answer-list span {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.mystery-reward {
  position: relative;
  min-height: 178px;
  padding-top: 118px;
  overflow: hidden;
}

.mystery-reward b,
.mystery-reward span:not(.box-lid):not(.box-body) {
  position: relative;
  z-index: 2;
}

.mystery-reward .box-body,
.mystery-reward .box-lid {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--blue), var(--purple) 58%, var(--pink));
  box-shadow: 0 12px 25px rgba(61, 54, 92, .16);
}

.mystery-reward .box-body {
  top: 42px;
  width: 82px;
  height: 56px;
  border-radius: 12px 12px 16px 16px;
}

.mystery-reward .box-body::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 34px;
  width: 14px;
  background: rgba(255, 255, 255, .58);
}

.mystery-reward .box-lid {
  top: 26px;
  width: 96px;
  height: 22px;
  border-radius: 10px;
  animation: blindBoxLid 1.1s ease-in-out infinite alternate;
}

.final-section {
  gap: 24px;
  text-align: center;
}

.birthday-card {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
  gap: 14px;
  background: linear-gradient(145deg, rgba(220, 229, 255, .92), rgba(233, 222, 255, .9) 56%, rgba(255, 227, 237, .88));
  transform-style: preserve-3d;
  transition: transform .5s ease;
}

.birthday-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(61, 54, 92, .24);
  border-radius: 18px;
  pointer-events: none;
}

.birthday-card.open {
  text-align: left;
  place-items: start;
  transform: rotateX(2deg);
}

.birthday-card p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
}

.birthday-card h2 {
  margin: 0;
  font-size: 28px;
}

.card-label {
  font-size: 28px;
  font-weight: 950;
}

.signed-message {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  padding: 22px;
  border-radius: 24px;
  color: white;
  background: linear-gradient(135deg, #8FA7FF, #A98AFB 55%, #FFB8D2);
  box-shadow: 0 24px 58px rgba(169, 138, 251, .32);
  animation: popIn .42s ease both;
}

.big-13 {
  font-size: 72px;
  line-height: .95;
  font-weight: 950;
}

.signed-message h2,
.signed-message p {
  margin: 6px 0 0;
}

@keyframes floatUp {
  0%, 100% { translate: 0 10px; }
  50% { translate: 0 -18px; }
}

@keyframes twinkle {
  0%, 100% { transform: scale(.82) rotate(0deg); opacity: .35; }
  50% { transform: scale(1.18) rotate(8deg); opacity: .95; }
}

@keyframes confettiDrop {
  0% { transform: translateY(-30px) rotate(0deg); opacity: 0; }
  25% { opacity: .82; }
  100% { transform: translateY(115svh) rotate(220deg); opacity: 0; }
}

@keyframes giftShake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
  75% { transform: rotate(-2deg); }
}

@keyframes popIn {
  from { transform: translateY(12px) scale(.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes birthdayReveal {
  from { transform: translateY(16px) scale(.9); opacity: 0; filter: blur(8px); }
  to { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
}

@keyframes glowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(.55); opacity: .24; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: .55; }
}

@keyframes dotBlink {
  from { transform: translateY(0) scale(.7); opacity: .45; }
  to { transform: translateY(-4px) scale(1); opacity: .95; }
}

@keyframes blindBoxLid {
  from { transform: translateX(-50%) translateY(0) rotate(-2deg); }
  to { transform: translateX(-50%) translateY(-12px) rotate(7deg); }
}

@keyframes fadeLift {
  from { transform: translateY(12px) rotate(var(--tilt)); opacity: 0; }
  to { transform: translateY(0) rotate(var(--tilt)); opacity: 1; }
}

@keyframes flameDance {
  from { transform: rotate(39deg) scale(.92); }
  to { transform: rotate(49deg) scale(1.08); }
}

@keyframes smokeUp {
  from { opacity: 0; transform: translateY(8px) scale(.7) rotate(0deg); }
  35% { opacity: .8; }
  to { opacity: 0; transform: translateY(-42px) scale(1.35) rotate(14deg); }
}

@media (min-width: 720px) {
  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .photo-card span {
    font-size: 14px;
  }
}

@media (max-width: 390px) {
  .section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .photo-grid {
    gap: 10px;
  }

  .profile-card,
  .quiz-card,
  .birthday-card {
    padding: 20px;
  }

  .profile-card {
    padding-top: 0;
  }

  .profile-photo-strip {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
  }

  .bio-lines {
    font-size: 13px;
  }
}
