.birthday-content {
  padding: 0;
  overflow: hidden;
}

.birthday-builder {
  min-height: 100%;
  padding: clamp(18px, 2.6vw, 34px);
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 174, 226, 0.14), transparent 34%),
    radial-gradient(circle at 12% 90%, rgba(79, 215, 255, 0.13), transparent 32%),
    linear-gradient(145deg, rgba(27, 33, 79, 0.83), rgba(26, 19, 66, 0.82));
}

.birthday-builder-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  margin-bottom: 24px;
}

.birthday-builder-header h2 {
  margin: 7px 0 7px;
  font-size: clamp(28px, 3.1vw, 44px);
  letter-spacing: -0.04em;
}

.birthday-builder-header p {
  max-width: 680px;
}

.birthday-local-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(122, 226, 255, 0.24);
  border-radius: 999px;
  color: rgba(219, 244, 255, 0.9);
  background: rgba(45, 178, 208, 0.1);
  font-size: 12px;
  justify-self: end;
}

.birthday-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(300px, 0.94fr);
  gap: clamp(18px, 2.4vw, 30px);
  align-items: stretch;
}

.birthday-form,
.birthday-preview-card {
  border: 1px solid rgba(163, 176, 255, 0.2);
  border-radius: 22px;
  background: rgba(13, 18, 51, 0.56);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 24px 54px rgba(1, 3, 20, 0.25);
}

.birthday-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: clamp(18px, 2vw, 26px);
}

.birthday-field {
  position: relative;
  min-width: 0;
}

.birthday-field-wide {
  grid-column: 1 / -1;
}

.birthday-field label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: rgba(244, 245, 255, 0.92);
  font-size: 13px;
  font-weight: 650;
}

.birthday-field label em,
.birthday-field label span {
  color: rgba(185, 193, 230, 0.68);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.birthday-field label em {
  color: #ff9fcf;
}

.birthday-field input,
.birthday-field textarea {
  width: 100%;
  border: 1px solid rgba(148, 164, 242, 0.23);
  border-radius: 12px;
  outline: 0;
  color: #f9f8ff;
  background: rgba(8, 12, 39, 0.52);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.birthday-field input {
  height: 44px;
  padding: 0 13px;
}

.birthday-field textarea {
  min-height: 136px;
  padding: 12px 13px 28px;
  line-height: 1.65;
  resize: vertical;
}

.birthday-field input:hover,
.birthday-field textarea:hover {
  border-color: rgba(172, 188, 255, 0.4);
}

.birthday-field input:focus,
.birthday-field textarea:focus {
  border-color: var(--sky-blue);
  background: rgba(11, 16, 49, 0.72);
  box-shadow: var(--focus-ring);
}

.birthday-field input[aria-invalid="true"],
.birthday-field textarea[aria-invalid="true"] {
  border-color: var(--semi-color-danger);
  box-shadow: 0 0 0 3px rgba(255, 99, 143, 0.14);
}

.birthday-field-error {
  display: block;
  min-height: 16px;
  padding-top: 4px;
  color: #ff9dbc;
  font-size: 11px;
}

.birthday-character-count {
  position: absolute;
  right: 11px;
  bottom: 22px;
  color: rgba(190, 197, 230, 0.6);
  font-size: 10px;
  pointer-events: none;
}

.birthday-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.birthday-start-button {
  min-width: 150px;
  background: linear-gradient(135deg, #8e63ff, #d35bc8 62%, #ff8da4);
  box-shadow: 0 12px 30px rgba(166, 84, 231, 0.3);
}

.birthday-audio-note {
  margin-top: -6px;
  color: rgba(191, 200, 236, 0.68);
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

.birthday-preview-wrap {
  display: flex;
  min-height: 100%;
}

.birthday-preview-card {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 440px;
  padding: clamp(26px, 3vw, 42px);
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  isolation: isolate;
}

.birthday-preview-card::before,
.birthday-preview-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.birthday-preview-card::before {
  top: -90px;
  right: -60px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255, 124, 205, 0.22), transparent 68%);
}

.birthday-preview-card::after {
  bottom: -90px;
  left: -70px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(70, 213, 255, 0.18), transparent 68%);
}

.birthday-preview-kicker {
  color: #e8c9ff;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.birthday-preview-card h3 {
  margin: 12px 0 9px;
  color: #fff7fd;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(30px, 4vw, 50px);
  text-shadow: 0 0 24px rgba(255, 140, 221, 0.24);
}

.birthday-preview-name {
  color: #ffd7ec;
  font-size: 14px;
}

.birthday-preview-message {
  max-width: 520px;
  margin-top: 22px;
  color: rgba(235, 238, 255, 0.83);
  font-size: 14px;
  line-height: 1.9;
}

.birthday-preview-signature {
  align-self: flex-end;
  margin-top: 18px;
  color: rgba(211, 218, 249, 0.72);
  font-size: 12px;
}

.birthday-preview-candles {
  display: flex;
  max-width: 100%;
  margin-top: 32px;
  gap: 7px;
  justify-content: center;
}

.birthday-preview-candles i {
  position: relative;
  display: block;
  width: 5px;
  height: 22px;
  border-radius: 4px;
  background: repeating-linear-gradient(-35deg, #fbf4ff 0 4px, #a97bff 4px 7px);
}

.birthday-preview-candles i::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 7px;
  height: 10px;
  border-radius: 70% 35% 65% 35%;
  background: #ffd65c;
  box-shadow: 0 0 11px #ff9b50;
  transform: translateX(-50%) rotate(5deg);
}

.birthday-celebration-scene {
  position: fixed;
  z-index: 4000;
  inset: 0;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 50% 14%, rgba(138, 93, 214, 0.3), transparent 31%),
    radial-gradient(circle at 12% 58%, rgba(49, 177, 220, 0.14), transparent 28%),
    radial-gradient(circle at 88% 60%, rgba(244, 99, 187, 0.12), transparent 30%),
    linear-gradient(180deg, #050921 0%, #111648 48%, #2b1850 75%, #10172d 100%);
  isolation: isolate;
}

.birthday-fireworks {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.birthday-stars {
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: 0.72;
  background-image:
    radial-gradient(circle at 12% 18%, #fff 0 1px, transparent 1.6px),
    radial-gradient(circle at 72% 28%, #c9d8ff 0 1px, transparent 1.7px),
    radial-gradient(circle at 36% 10%, #fff1c2 0 1px, transparent 1.5px),
    radial-gradient(circle at 86% 13%, #f1d5ff 0 1.2px, transparent 1.8px);
  background-size: 170px 170px, 230px 230px, 290px 290px, 340px 340px;
  animation: birthdayStarDrift 24s linear infinite;
}

.birthday-aurora {
  position: absolute;
  z-index: 0;
  top: -32%;
  left: 50%;
  width: min(1180px, 92vw);
  height: 74%;
  border-radius: 50%;
  opacity: 0.48;
  background:
    conic-gradient(from 205deg at 50% 100%, transparent 0 21%, rgba(86, 219, 255, 0.22) 26%, rgba(185, 115, 255, 0.26) 33%, rgba(255, 112, 194, 0.16) 40%, transparent 47% 100%);
  filter: blur(38px);
  transform: translateX(-50%);
  animation: birthdayAuroraGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.birthday-firework-backdrop {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.birthday-firework-backdrop > i {
  position: absolute;
  top: var(--burst-y);
  left: var(--burst-x);
  width: var(--burst-size);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.64;
  background: repeating-conic-gradient(
    from 4deg,
    rgba(var(--burst-color), 0.96) 0deg 0.8deg,
    transparent 1.1deg 11deg
  );
  filter: drop-shadow(0 0 7px rgba(var(--burst-color), 0.8));
  -webkit-mask-image: radial-gradient(circle, transparent 0 18%, #000 20% 25%, transparent 27% 38%, #000 40% 53%, transparent 55%);
  mask-image: radial-gradient(circle, transparent 0 18%, #000 20% 25%, transparent 27% 38%, #000 40% 53%, transparent 55%);
  transform: translate(-50%, -50%) scale(0.82) rotate(-5deg);
  animation: birthdayBackdropBurst 3.8s ease-in-out var(--burst-delay) infinite;
}

.birthday-party-decor {
  position: absolute;
  z-index: 5;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.birthday-light-string {
  position: absolute;
  top: -1px;
  left: 50%;
  display: flex;
  width: min(1500px, 108vw);
  height: clamp(42px, 6vw, 76px);
  justify-content: space-around;
  border-top: 2px solid rgba(244, 213, 143, 0.44);
  border-radius: 0 0 50% 50%;
  transform: translateX(-50%);
}

.birthday-light-string i {
  position: relative;
  top: 7px;
  display: block;
  width: 7px;
  height: 11px;
  border-radius: 50% 50% 46% 46%;
  background: hsl(calc(37deg + var(--bulb-index) * 24deg) 94% 71%);
  box-shadow: 0 0 8px currentColor, 0 0 19px currentColor;
  animation: birthdayBulbGlow 1.9s ease-in-out calc(var(--bulb-index) * -0.11s) infinite alternate;
}

.birthday-light-string i:nth-child(5n + 2),
.birthday-light-string i:nth-child(5n + 4) { top: 13px; }
.birthday-light-string i:nth-child(5n + 3) { top: 18px; }

.birthday-light-string i::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 2px;
  width: 3px;
  height: 8px;
  background: rgba(227, 213, 184, 0.66);
}

.birthday-bunting {
  position: absolute;
  top: clamp(22px, 3.6vh, 38px);
  left: 50%;
  display: flex;
  width: min(1320px, 95vw);
  justify-content: space-around;
  border-top: 1px solid rgba(255, 229, 190, 0.32);
  transform: translateX(-50%);
}

.birthday-bunting i {
  display: block;
  width: clamp(18px, 2.2vw, 32px);
  height: clamp(25px, 3.2vw, 44px);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: hsl(calc(264deg + var(--flag-index) * 18deg) 78% 70% / 0.82);
  box-shadow: inset 0 4px rgba(255, 255, 255, 0.22);
  transform-origin: 50% 0;
  animation: birthdayFlagSway 2.8s ease-in-out calc(var(--flag-index) * -0.13s) infinite alternate;
}

.birthday-balloon-cluster {
  position: absolute;
  top: clamp(125px, 18vh, 205px);
  width: clamp(100px, 12vw, 175px);
  height: clamp(180px, 27vh, 300px);
  opacity: 0.9;
}

.birthday-balloon-cluster-left { left: clamp(12px, 3vw, 54px); }
.birthday-balloon-cluster-right { right: clamp(12px, 3vw, 54px); transform: scaleX(-1); }

.birthday-balloon-cluster i {
  position: absolute;
  width: clamp(44px, 5.2vw, 72px);
  aspect-ratio: 0.82;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50% 50% 48% 48%;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.68) 0 5%, transparent 7%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 34%),
    var(--balloon-color, #b77cff);
  box-shadow: inset -10px -12px 20px rgba(55, 21, 91, 0.24), 0 8px 20px rgba(4, 5, 31, 0.2);
  transform-origin: 50% 108%;
  animation: birthdayBalloonFloat 4.6s ease-in-out infinite alternate;
}

.birthday-balloon-cluster i::after {
  content: "";
  position: absolute;
  top: 98%;
  left: 50%;
  width: 1px;
  height: clamp(72px, 12vh, 130px);
  background: linear-gradient(rgba(255, 255, 255, 0.58), transparent);
  transform: rotate(7deg);
  transform-origin: top;
}

.birthday-balloon-cluster i:nth-child(1) { top: 12%; left: 4%; --balloon-color: #9f7cff; transform: rotate(-11deg); }
.birthday-balloon-cluster i:nth-child(2) { top: 0; left: 39%; --balloon-color: #ff74ba; animation-delay: -1.1s; }
.birthday-balloon-cluster i:nth-child(3) { top: 25%; left: 49%; --balloon-color: #55d5ee; animation-delay: -2.4s; transform: rotate(8deg); }
.birthday-balloon-cluster i:nth-child(4) { top: 39%; left: 10%; --balloon-color: #ffc860; animation-delay: -3.2s; transform: rotate(-6deg); }

.birthday-confetti {
  position: absolute;
  z-index: 1;
  inset: 0;
}

.birthday-confetti i {
  position: absolute;
  top: var(--confetti-y);
  left: var(--confetti-x);
  width: 4px;
  height: 10px;
  border-radius: 2px;
  opacity: 0.52;
  background: hsl(calc(194deg + var(--confetti-index) * 29deg) 88% 72%);
  transform: rotate(var(--confetti-rotation));
  animation: birthdayConfettiDrift 5.6s ease-in-out calc(var(--confetti-index) * -0.19s) infinite alternate;
}

.birthday-moon {
  position: absolute;
  z-index: 0;
  top: clamp(34px, 7vh, 76px);
  right: clamp(34px, 8vw, 120px);
  width: clamp(68px, 8vw, 112px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #fffdf1, #ffe8be 64%, #f2c987);
  box-shadow: 0 0 30px rgba(255, 233, 184, 0.45), 0 0 90px rgba(231, 209, 255, 0.25);
}

.birthday-moon::after {
  content: "";
  position: absolute;
  top: 16%;
  left: 20%;
  width: 18%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(203, 180, 151, 0.17);
  box-shadow: 34px 22px 0 4px rgba(203, 180, 151, 0.12), 11px 49px 0 -2px rgba(203, 180, 151, 0.14);
}

.birthday-cloud {
  position: absolute;
  z-index: 0;
  width: 240px;
  height: 34px;
  border-radius: 50%;
  opacity: 0.14;
  background: rgba(218, 221, 255, 0.74);
  filter: blur(10px);
  animation: birthdayCloudFloat 22s ease-in-out infinite alternate;
}

.birthday-cloud-one { top: 23%; left: 2%; }
.birthday-cloud-two { top: 34%; right: 7%; animation-delay: -8s; }

.birthday-horizon {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: 25%;
  opacity: 0.86;
  background:
    linear-gradient(155deg, transparent 0 46%, rgba(12, 17, 37, 0.88) 46.3% 100%) left bottom / 47% 100% no-repeat,
    linear-gradient(205deg, transparent 0 48%, rgba(12, 17, 37, 0.9) 48.3% 100%) right bottom / 58% 100% no-repeat,
    linear-gradient(180deg, transparent, rgba(5, 12, 25, 0.95));
}

.birthday-horizon::after {
  content: "";
  position: absolute;
  right: -5%;
  bottom: -36%;
  left: -5%;
  height: 80%;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, #15233b, #080f20);
}

.birthday-wish-copy {
  position: absolute;
  z-index: 5;
  top: clamp(34px, 6.5vh, 72px);
  left: 50%;
  width: min(82vw, 760px);
  padding: clamp(14px, 2vh, 22px) clamp(18px, 3vw, 36px);
  border: 1px solid rgba(224, 215, 255, 0.15);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(17, 22, 65, 0.52), rgba(65, 31, 91, 0.28));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 20px 54px rgba(3, 5, 24, 0.24);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
  text-align: center;
}

.birthday-wish-copy > span {
  color: rgba(225, 210, 255, 0.72);
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.birthday-wish-copy h2 {
  margin: 7px 0 3px;
  color: #fff8fc;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(30px, 4.3vw, 64px);
  font-weight: 700;
  line-height: 1.12;
  text-shadow: 0 0 24px rgba(255, 144, 216, 0.38), 0 3px 16px rgba(0, 0, 0, 0.32);
}

.birthday-wish-name {
  color: #ffd9ee;
  font-size: clamp(13px, 1.5vw, 18px);
}

.birthday-wish-message {
  max-height: min(14vh, 110px);
  margin-top: 9px;
  overflow: auto;
  color: rgba(240, 242, 255, 0.84);
  font-size: clamp(12px, 1.2vw, 15px);
  line-height: 1.7;
  scrollbar-width: thin;
}

.birthday-wish-signature {
  margin-top: 6px;
  color: rgba(223, 225, 250, 0.66);
  font-size: 11px;
}

.birthday-stage-characters {
  position: absolute;
  z-index: 4;
  bottom: clamp(66px, 8vh, 94px);
  left: 50%;
  width: min(96vw, 1220px);
  height: min(66vh, 680px);
  transform: translateX(-50%);
  pointer-events: none;
}

.birthday-stage-floor {
  position: absolute;
  z-index: 0;
  right: 3%;
  bottom: -3%;
  left: 3%;
  height: 19%;
  border: 1px solid rgba(225, 216, 255, 0.2);
  border-radius: 50%;
  opacity: 0.78;
  background:
    radial-gradient(ellipse, rgba(183, 142, 240, 0.32), rgba(32, 28, 76, 0.72) 62%, transparent 72%);
  box-shadow: 0 -8px 38px rgba(162, 114, 239, 0.18);
  transform: perspective(260px) rotateX(55deg);
}

.birthday-character {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 34%;
  width: auto;
  height: min(59vh, 610px);
  filter: drop-shadow(0 24px 26px rgba(4, 3, 28, 0.46)) drop-shadow(0 0 24px rgba(202, 177, 255, 0.16));
  transform: translateX(-50%);
  object-fit: contain;
}

.birthday-cake {
  position: absolute;
  z-index: 4;
  left: 70%;
  bottom: 1%;
  width: min(42vw, 470px);
  height: min(38vh, 350px);
  transform: translateX(-50%);
  filter: drop-shadow(0 22px 24px rgba(3, 5, 25, 0.48));
}

.birthday-cake::before {
  content: "HAPPY BIRTHDAY";
  position: absolute;
  z-index: 8;
  bottom: 70%;
  left: 50%;
  padding: 4px 10px 3px;
  border: 1px solid rgba(255, 226, 160, 0.58);
  border-radius: 999px;
  color: #fff3c5;
  background: linear-gradient(135deg, rgba(120, 68, 166, 0.92), rgba(217, 91, 161, 0.88));
  box-shadow: 0 4px 12px rgba(38, 16, 64, 0.28);
  font-family: Georgia, serif;
  font-size: clamp(7px, 0.75vw, 10px);
  letter-spacing: 0.09em;
  white-space: nowrap;
  transform: translate(-50%, -2px);
}

.birthday-cake-tier {
  position: absolute;
  left: 50%;
  border: 2px solid rgba(255, 255, 255, 0.48);
  border-radius: 50% / 16%;
  background:
    radial-gradient(ellipse at 50% 7%, #fffefd 0 8%, #fce7ff 44%, #d49eea 100%);
  box-shadow: inset 0 -16px 22px rgba(146, 88, 187, 0.2), inset 0 5px 8px rgba(255, 255, 255, 0.72), 0 8px 14px rgba(11, 10, 47, 0.3);
  transform: translateX(-50%);
}

.birthday-cake-tier::before,
.birthday-cake-tier::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.birthday-cake-tier::before {
  top: 8px;
  right: 7%;
  left: 7%;
  height: 20px;
  border-radius: 50%;
  border-top: 5px solid rgba(255, 255, 255, 0.82);
}

.birthday-cake-tier::after {
  right: 10%;
  bottom: 15%;
  left: 10%;
  height: 10px;
  border-top: 4px dotted rgba(255, 201, 100, 0.96);
  border-bottom: 3px solid rgba(255, 122, 192, 0.68);
}

.birthday-cake-tier span::before,
.birthday-cake-tier span::after {
  content: "✦";
  position: absolute;
  bottom: 26%;
  color: rgba(255, 195, 102, 0.92);
  font-size: 14px;
  text-shadow: 0 0 8px rgba(255, 197, 108, 0.4);
}

.birthday-cake-tier span::before { left: 18%; }
.birthday-cake-tier span::after { right: 18%; }

.birthday-cake-tier-top { bottom: 44%; width: 42%; height: 28%; }
.birthday-cake-tier-middle { bottom: 23%; width: 65%; height: 31%; }
.birthday-cake-tier-bottom { bottom: 2%; width: 88%; height: 34%; }

.birthday-cake-plate {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100%;
  height: 12%;
  border: 2px solid rgba(218, 226, 255, 0.5);
  border-radius: 50%;
  background: linear-gradient(180deg, #dfe7ff, #777fb2);
  transform: translateX(-50%);
}

.birthday-candle-row {
  position: absolute;
  z-index: 6;
  bottom: 70%;
  left: 50%;
  width: 38%;
  height: 23%;
  transform: translateX(-50%);
}

.birthday-gift-stack {
  position: absolute;
  z-index: 5;
  bottom: 1%;
  width: clamp(70px, 9vw, 118px);
  height: clamp(82px, 13vh, 142px);
}

.birthday-gift-stack-left { left: 1%; }
.birthday-gift-stack-right { right: 0; transform: scale(0.84); transform-origin: bottom right; }

.birthday-gift-stack i {
  position: absolute;
  bottom: 0;
  display: block;
  width: 72%;
  height: 48%;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 42%, rgba(255, 223, 149, 0.9) 43% 57%, transparent 58%),
    linear-gradient(145deg, #8669e8, #c458bc);
  box-shadow: 0 10px 18px rgba(5, 4, 32, 0.26);
}

.birthday-gift-stack i::before,
.birthday-gift-stack i::after {
  content: "";
  position: absolute;
  bottom: 96%;
  width: 35%;
  height: 28%;
  border: 5px solid #f6ce7b;
  border-radius: 50% 50% 12% 50%;
}

.birthday-gift-stack i::before { right: 49%; transform: rotate(18deg); }
.birthday-gift-stack i::after { left: 49%; transform: scaleX(-1) rotate(18deg); }
.birthday-gift-stack i:nth-child(2) {
  right: 0;
  bottom: 37%;
  width: 58%;
  height: 38%;
  background:
    linear-gradient(90deg, transparent 41%, rgba(255, 241, 192, 0.9) 42% 58%, transparent 59%),
    linear-gradient(145deg, #3fc5d9, #637bd5);
  transform: rotate(5deg);
}

.birthday-candle {
  position: absolute;
  bottom: 0;
  left: calc(4% + (var(--candle-index) + 0.5) * 92% / var(--candle-count));
  width: clamp(4px, 0.55vw, 7px);
  height: clamp(24px, 3.6vh, 40px);
  border-radius: 5px 5px 2px 2px;
  background: repeating-linear-gradient(-34deg, #fff6fb 0 5px, #b87bff 5px 8px, #ff8fce 8px 11px);
  box-shadow: inset -2px 0 rgba(113, 58, 162, 0.18), 0 2px 4px rgba(45, 20, 74, 0.2);
  transform: translateX(-50%);
}

.birthday-wick {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 1px;
  height: 6px;
  background: #4b2f4b;
  transform: translateX(-50%);
}

.birthday-flame {
  position: absolute;
  z-index: 2;
  top: -17px;
  left: 50%;
  width: 10px;
  height: 15px;
  border-radius: 68% 34% 66% 38%;
  background: radial-gradient(circle at 50% 70%, #fffbe6 0 20%, #ffd45c 38%, #ff934f 68%, rgba(255, 85, 88, 0.28) 100%);
  box-shadow: 0 0 9px #ffcc55, 0 0 22px rgba(255, 142, 75, 0.85), 0 0 44px rgba(255, 189, 91, 0.5);
  transform: translateX(-50%) rotate(3deg);
  transform-origin: 50% 100%;
  animation: birthdayFlameFlicker 0.78s ease-in-out var(--flame-delay) infinite alternate;
}

.birthday-scene-controls {
  position: absolute;
  z-index: 12;
  right: 50%;
  bottom: 16px;
  display: flex;
  max-width: calc(100vw - 24px);
  min-height: 48px;
  padding: 6px;
  gap: 4px;
  align-items: center;
  border: 1px solid rgba(191, 202, 255, 0.2);
  border-radius: 16px;
  background: rgba(8, 12, 38, 0.64);
  box-shadow: 0 12px 34px rgba(0, 0, 20, 0.32), inset 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  transform: translateX(50%);
}

.birthday-scene-controls button {
  display: inline-flex;
  min-width: 56px;
  min-height: 36px;
  padding: 5px 9px;
  gap: 5px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(238, 241, 255, 0.9);
  background: transparent;
  cursor: pointer;
  transition: color var(--ease), border-color var(--ease), background var(--ease), transform var(--ease);
}

.birthday-scene-controls button:hover,
.birthday-scene-controls button:focus-visible {
  border-color: rgba(158, 188, 255, 0.3);
  color: #fff;
  background: rgba(111, 92, 207, 0.28);
  outline: none;
}

.birthday-scene-controls button:active { transform: scale(0.96); }
.birthday-scene-controls button b { font-size: 11px; font-weight: 600; }

.birthday-volume-control {
  display: flex;
  min-width: 112px;
  padding: 0 7px;
  gap: 5px;
  align-items: center;
  color: rgba(218, 224, 255, 0.78);
}

.birthday-volume-control input {
  width: 86px;
  accent-color: #c77cff;
}

.birthday-motion-note {
  position: absolute;
  z-index: 8;
  right: 18px;
  bottom: 76px;
  color: rgba(222, 227, 255, 0.62);
  font-size: 11px;
}

.birthday-celebration-scene.is-paused .birthday-stars,
.birthday-celebration-scene.is-paused .birthday-cloud,
.birthday-celebration-scene.is-paused .birthday-flame,
.birthday-celebration-scene.is-paused .birthday-aurora,
.birthday-celebration-scene.is-paused .birthday-firework-backdrop > i,
.birthday-celebration-scene.is-paused .birthday-light-string i,
.birthday-celebration-scene.is-paused .birthday-bunting i,
.birthday-celebration-scene.is-paused .birthday-balloon-cluster i,
.birthday-celebration-scene.is-paused .birthday-confetti i {
  animation-play-state: paused;
}

@keyframes birthdayFlameFlicker {
  0% { transform: translateX(-50%) rotate(-5deg) scale(0.92, 1.05); filter: brightness(0.94); }
  50% { transform: translateX(-50%) rotate(4deg) scale(1.06, 0.94); filter: brightness(1.12); }
  100% { transform: translateX(-50%) rotate(-2deg) scale(0.96, 1.08); filter: brightness(1.02); }
}

@keyframes birthdayStarDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-24px, 14px, 0); }
}

@keyframes birthdayCloudFloat {
  from { transform: translateX(-18px) scale(0.94); }
  to { transform: translateX(32px) scale(1.06); }
}

@keyframes birthdayAuroraGlow {
  from { opacity: 0.34; transform: translateX(-50%) scaleX(0.94) rotate(-2deg); }
  to { opacity: 0.56; transform: translateX(-50%) scaleX(1.05) rotate(2deg); }
}

@keyframes birthdayBackdropBurst {
  0%, 18% { opacity: 0.08; transform: translate(-50%, -50%) scale(0.28) rotate(-8deg); }
  42%, 76% { opacity: 0.64; transform: translate(-50%, -50%) scale(1) rotate(2deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.12) rotate(7deg); }
}

@keyframes birthdayBulbGlow {
  from { opacity: 0.48; filter: brightness(0.82); transform: scale(0.88); }
  to { opacity: 1; filter: brightness(1.2); transform: scale(1.08); }
}

@keyframes birthdayFlagSway {
  from { transform: rotate(-3deg) skewX(-2deg); }
  to { transform: rotate(4deg) skewX(2deg); }
}

@keyframes birthdayBalloonFloat {
  from { translate: 0 -4px; }
  to { translate: 5px 9px; }
}

@keyframes birthdayConfettiDrift {
  from { translate: -2px -5px; opacity: 0.25; }
  to { translate: 5px 8px; opacity: 0.7; }
}

@media (max-width: 980px) {
  .birthday-builder-grid { grid-template-columns: 1fr; }
  .birthday-preview-card { min-height: 360px; }
  .birthday-stage-characters { width: 100vw; height: min(61vh, 620px); }
  .birthday-character { left: 31%; height: min(53vh, 540px); }
  .birthday-cake { left: 69%; width: min(48vw, 430px); }
  .birthday-balloon-cluster { opacity: 0.72; }
}

@media (max-width: 680px) {
  .birthday-content { overflow: auto; }
  .birthday-builder { padding: 14px; }
  .birthday-builder-header { grid-template-columns: 1fr; gap: 12px; }
  .birthday-local-badge { justify-self: start; }
  .birthday-form { grid-template-columns: 1fr; padding: 15px; }
  .birthday-field { grid-column: 1 / -1; }
  .birthday-form-actions { justify-content: stretch; }
  .birthday-form-actions .fun-button { flex: 1; min-width: 0; }
  .birthday-audio-note { text-align: left; }
  .birthday-preview-card { min-height: 330px; padding: 24px 18px; }

  .birthday-wish-copy {
    top: 16px;
    width: calc(100vw - 24px);
    max-height: 33vh;
    padding: 12px 15px;
    border-radius: 16px;
  }

  .birthday-wish-copy > span { display: none; }
  .birthday-wish-copy h2 { margin-top: 0; font-size: clamp(28px, 10vw, 42px); }
  .birthday-wish-message { max-height: 10vh; margin-top: 5px; font-size: 11px; line-height: 1.5; }
  .birthday-stage-characters { bottom: 62px; width: 100vw; height: 61vh; }
  .birthday-character { bottom: 0; left: 31%; height: min(45vh, 440px); }
  .birthday-cake { bottom: 0; left: 71%; width: min(58vw, 320px); height: min(28vh, 255px); }
  .birthday-cake::before { padding: 3px 6px; font-size: 6px; }
  .birthday-gift-stack { transform: scale(0.72); transform-origin: bottom left; }
  .birthday-gift-stack-right { transform: scale(0.62); transform-origin: bottom right; }
  .birthday-balloon-cluster { top: 27%; opacity: 0.58; transform: scale(0.72); transform-origin: top left; }
  .birthday-balloon-cluster-right { transform: scale(-0.72, 0.72); transform-origin: top right; }
  .birthday-bunting { top: 21px; width: 108vw; }
  .birthday-bunting i { width: 17px; height: 25px; }
  .birthday-moon { top: 30%; right: 24px; }
  .birthday-scene-controls { bottom: 8px; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .birthday-scene-controls::-webkit-scrollbar { display: none; }
  .birthday-scene-controls button { min-width: 48px; padding-inline: 6px; }
  .birthday-scene-controls button b { display: none; }
  .birthday-volume-control { min-width: 92px; }
  .birthday-volume-control input { width: 66px; }
  .birthday-motion-note { right: 10px; bottom: 62px; }
}

@media (max-height: 650px) and (min-width: 681px) {
  .birthday-wish-copy { top: 14px; padding-block: 10px; }
  .birthday-wish-copy h2 { font-size: 34px; }
  .birthday-wish-message { max-height: 55px; }
  .birthday-stage-characters { bottom: 58px; height: 64vh; }
  .birthday-character { bottom: 0; height: 51vh; }
  .birthday-cake { height: 32vh; width: min(40vw, 390px); }
  .birthday-balloon-cluster { top: 20%; transform: scale(0.76); }
  .birthday-scene-controls { bottom: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .birthday-stars,
  .birthday-cloud,
  .birthday-flame,
  .birthday-aurora,
  .birthday-firework-backdrop > i,
  .birthday-light-string i,
  .birthday-bunting i,
  .birthday-balloon-cluster i,
  .birthday-confetti i {
    animation: none !important;
  }

  .birthday-builder *,
  .birthday-celebration-scene * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
