/* ===========================================================
   Birthday countdown banner (top of the Home page)
   =========================================================== */
.bday-banner {
  position: relative;
  overflow: hidden;
  margin: 10px 0 26px;
  padding: 18px 22px 22px;
  border-radius: var(--radius, 22px);
  background:
    radial-gradient(circle at 8% 20%, rgba(255,255,255,.55) 0 3px, transparent 4px) 0 0/46px 46px,
    radial-gradient(circle at 60% 70%, rgba(255,217,61,.7) 0 3px, transparent 4px) 0 0/58px 58px,
    linear-gradient(120deg, #ff6fb5, #c77dff 50%, #4cc9f0);
  color: #fff;
  box-shadow: 0 8px 0 rgba(61, 44, 92, .18);
  text-align: center;
}
.bday-banner .bday-title {
  color: #fff;
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 4vw, 2.3rem);
  text-shadow: 0 3px 0 rgba(61, 44, 92, .35);
  animation: bday-wobble 2.6s ease-in-out infinite;
}
@keyframes bday-wobble { 50% { transform: rotate(-2deg) scale(1.04); } }

.bday-balloon {
  position: absolute;
  font-size: 2.6rem;
  animation: bday-bob 3s ease-in-out infinite alternate;
  pointer-events: none;
}
.bday-balloon.b1 { left: 2%; top: 8%; }
.bday-balloon.b2 { left: 7%; top: 55%; animation-delay: -1s; filter: hue-rotate(200deg); }
.bday-balloon.b3 { right: 2%; top: 10%; animation-delay: -2s; filter: hue-rotate(90deg); }
.bday-balloon.b4 { right: 7%; top: 58%; animation-delay: -.5s; filter: hue-rotate(260deg); }
@keyframes bday-bob { to { transform: translateY(-16px) rotate(6deg); } }

.bday-grid {
  display: grid;
  grid-template-columns: 200px 1fr 210px;
  gap: 18px;
  align-items: center;
}

/* ---- the cake ---- */
.bday-cake {
  position: relative;
  height: 200px;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.bday-cake:hover { transform: scale(1.04); }
.bday-cake .tier {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 14px 14px 10px 10px;
  border: 3px solid #3d2c5c;
}
.bday-cake .tier.bottom {
  bottom: 34px; width: 160px; height: 58px;
  background:
    radial-gradient(circle, #ffd93d 0 3px, transparent 4px) 6px 26px/26px 22px,
    radial-gradient(circle, #4cc9f0 0 3px, transparent 4px) 18px 34px/30px 22px,
    #ff9fd0;
}
.bday-cake .tier.top {
  bottom: 90px; width: 118px; height: 46px;
  background:
    radial-gradient(circle, #ff6fb5 0 3px, transparent 4px) 8px 22px/24px 20px,
    #e3d3ff;
}
.bday-cake .tier::before {                 /* frosting drips */
  content: "";
  position: absolute; left: -3px; right: -3px; top: -3px; height: 16px;
  border-radius: 12px 12px 0 0;
  border: 3px solid #3d2c5c; border-bottom: 0;
  background:
    radial-gradient(circle at 50% 100%, #fff 0 8px, transparent 9px) 0 6px/22px 16px repeat-x,
    #fff;
}
.bday-cake .plate {
  position: absolute; left: 50%; bottom: 26px;
  transform: translateX(-50%);
  width: 190px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #3d2c5c;
}
.bday-cake small {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-weight: 700;
  font-size: .95rem;
}
.bday-cake .candles {
  position: absolute;
  left: 50%; bottom: 134px;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}
.bday-candle {
  position: relative;
  width: 10px; height: 34px;
  border-radius: 4px;
  border: 2px solid #3d2c5c;
  background: repeating-linear-gradient(135deg, #fff 0 5px, #ff6fb5 5px 10px);
}
.bday-flame {
  position: absolute;
  left: 50%; bottom: 100%;
  width: 12px; height: 20px;
  margin-left: -6px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff7b0 0 25%, #ffd93d 45%, #ff9f43 75%);
  box-shadow: 0 0 12px 4px rgba(255, 217, 61, .7);
  transform-origin: 50% 100%;
  animation: bday-flicker .5s ease-in-out infinite alternate;
}
.bday-candle:nth-child(2n) .bday-flame { animation-delay: -.25s; }
@keyframes bday-flicker {
  from { transform: rotate(-5deg) scaleY(1); }
  to   { transform: rotate(5deg) scaleY(1.15); }
}
.bday-cake.out .bday-flame { opacity: 0; transform: scale(0); transition: .25s; animation: none; }
.bday-smoke {
  position: absolute;
  left: 50%; bottom: 100%;
  margin-left: -10px;
  font-size: 1.2rem;
  pointer-events: none;
  animation: bday-smoke 1.4s ease-out forwards;
}
@keyframes bday-smoke { to { transform: translateY(-50px) scale(1.6); opacity: 0; } }
.bday-cake.singing { animation: bday-dance .5s ease-in-out infinite alternate; }
@keyframes bday-dance { to { transform: rotate(3deg) translateY(-4px); } }

/* ---- the countdown ---- */
.bday-tiles {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bday-tile {
  min-width: 72px;
  padding: 6px 10px;
  border-radius: 16px;
  background: #fff;
  color: #3d2c5c;
  border: 4px solid #3d2c5c;
  box-shadow: 0 6px 0 rgba(61, 44, 92, .3);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 700;
  line-height: 1.05;
  animation: bday-flip .5s ease-out both;
}
.bday-tile:nth-child(2) { animation-delay: .1s; background: #fff6c7; }
.bday-tile:nth-child(3) { animation-delay: .2s; background: #e3f7ff; }
.bday-tile.word { font-size: clamp(1.6rem, 5vw, 2.8rem); padding: 14px 18px; }
@keyframes bday-flip { from { transform: rotateX(90deg); } }
.bday-label {
  margin: 10px 0 8px;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 700;
  text-shadow: 0 2px 0 rgba(61, 44, 92, .35);
}
.bday-track {
  position: relative;
  height: 22px;
  margin: 16px 34px 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .45);
  border: 3px solid #fff;
}
.bday-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd93d, #ff9f43, #ff6fb5);
  transition: width 1.6s cubic-bezier(.2, .8, .3, 1);
}
.bday-runner {
  position: absolute;
  top: 50%;
  left: 0;
  font-size: 2rem;
  transform: translate(-50%, -62%) scaleX(-1);   /* face toward the cake */
  transition: left 1.6s cubic-bezier(.2, .8, .3, 1);
  animation: bday-gallop .35s ease-in-out infinite alternate;
}
@keyframes bday-gallop { to { margin-top: -5px; } }
.bday-goal {
  position: absolute;
  right: -34px; top: 50%;
  transform: translateY(-58%);
  font-size: 2rem;
}
.bday-date { margin: 6px 0 0; font-weight: 600; opacity: .95; }

/* ---- "I'm 4!" ---- */
.bday-age { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bday-age-num {
  width: 120px; height: 120px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #ffd93d;
  color: #3d2c5c;
  border: 5px solid #fff;
  box-shadow: 0 0 0 4px #3d2c5c, 0 8px 0 4px rgba(61, 44, 92, .3);
  font-size: 4.6rem;
  font-weight: 700;
  animation: bday-pulse 1.6s ease-in-out infinite;
}
@keyframes bday-pulse { 50% { transform: scale(1.08) rotate(-4deg); } }
.bday-age-btn {
  font-size: 1.15rem !important;
  line-height: 1.2;
  background: #fff !important;
  color: #ff3f9e !important;
  border: 3px solid #3d2c5c !important;
}
.bday-age-btn small { display: block; font-size: .85rem; color: #9b5de5; }

/* ---- big "I'm 4 → next year 5" pop-up ---- */
.bday-pop {
  position: fixed;
  inset: 0;
  z-index: 99;     /* over the menu, under the confetti */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: radial-gradient(circle, rgba(255, 227, 241, .97), rgba(239, 228, 255, .97));
  color: #3d2c5c;
  cursor: pointer;
  text-align: center;
}
.bday-pop.hidden { display: none; }
.bday-pop-now, .bday-pop-next { font-weight: 700; line-height: 1.05; }
.bday-pop-now { font-size: clamp(2.2rem, 7vw, 4rem); animation: bday-zoom .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.bday-pop-now b, .bday-pop-next b {
  display: block;
  font-size: clamp(7rem, 28vw, 14rem);
  color: #ff6fb5;
  text-shadow: 0 8px 0 #3d2c5c33;
}
.bday-pop-next b { color: #9b5de5; }
.bday-pop-arrow { font-size: 2.6rem; opacity: 0; }
.bday-pop-next { font-size: clamp(1.8rem, 6vw, 3.4rem); opacity: 0; }
.bday-pop.step2 .bday-pop-now { font-size: clamp(1.4rem, 4vw, 2.2rem); }
.bday-pop.step2 .bday-pop-now b { font-size: clamp(3rem, 12vw, 6rem); }
.bday-pop.step2 .bday-pop-arrow { opacity: 1; animation: bday-bob .5s ease-in-out infinite alternate; }
.bday-pop.step2 .bday-pop-next { opacity: 1; animation: bday-zoom .7s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes bday-zoom { from { transform: scale(0) rotate(-20deg); } }
.bday-pop .tap-close { position: absolute; bottom: 20px; font-weight: 600; opacity: .7; }

@media (max-width: 760px) {
  .bday-grid { grid-template-columns: 1fr; }
  .bday-cake { width: 200px; margin: 0 auto; }
  .bday-balloon { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bday-title, .bday-balloon, .bday-flame, .bday-runner, .bday-age-num { animation: none; }
}
