.birthday-cake-art {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
}
.birthday-cake-art .cake-night-overlay { opacity: 0; transition: opacity .6s ease; }
.birthday-cake-art .cake-light-halo { opacity: .35; transition: opacity .6s; }
.birthday-cake-art .cake-wick-fire {
  transform-box: fill-box;
  transform-origin: 52% 100%;
  animation: cake-flicker 1.35s ease-in-out infinite alternate;
}
.birthday-cake-art .cake-smoke, .birthday-cake-art .cake-fire-dust { opacity: 0; }
.birthday-cake-art .cake-lick { animation: cake-tongue 4.6s steps(1) infinite; }
.birthday-cake-art .cake-paw { animation: cake-reach 5s ease-in-out infinite; }
.birthday-cake-art .cake-eyes { animation: cake-watch 4s ease-in-out infinite; }
#cake:is([data-phase="wish"],[data-phase="blowing"],[data-phase="smoke"]) .cake-night-overlay { opacity: 1; }
#cake[data-phase="wish"] .cake-light-halo { opacity: 1; }
#cake:not([data-phase="lit"]) :is(.cake-eyes,.cake-lick,.cake-paw) { animation: none; }
#cake:not([data-phase="lit"]) .cake-lick { opacity: 0; }
#cake[data-phase="blowing"] .cake-wick-fire { animation: cake-wind .65s ease-out forwards; }
#cake[data-phase="blowing"] .cake-fire-dust { animation: cake-sparks .45s .24s ease-out both; }
#cake:is([data-phase="smoke"],[data-phase="relight"]) :is(.cake-wick-fire,.cake-light-halo) { opacity: 0; animation: none; }
#cake[data-phase="smoke"] .cake-smoke { animation: cake-smoke-rise 1.15s ease-out both; }
#cake[data-phase="relight"] .cake-night-overlay { transition-duration: 1.2s; }
@keyframes cake-flicker { from {transform: rotate(-3deg) scale(.97,1)} to {transform: rotate(4deg) scale(1.02,.94)} }
@keyframes cake-tongue { 0%,68%,76%,100% {opacity:0} 70%,75% {opacity:1} }
@keyframes cake-reach { 0%,46%,78%,100% {transform:translate(0,0)} 59%,66% {transform:translate(6px,-1px)} }
@keyframes cake-watch { 0%,100% {transform:translateX(-.5px)} 50% {transform:translateX(1px)} }
@keyframes cake-wind { 0% {transform:none;opacity:1} 38% {transform:skewX(-37deg) scale(.85,.85);opacity:1} 77% {transform:skewX(-62deg) scale(.45,.56);opacity:.8} 100% {transform:skewX(-68deg) scale(.05,.18);opacity:0} }
@keyframes cake-sparks { 0% {opacity:0;transform:translate(-4px,2px)} 35% {opacity:.95} 100% {opacity:0;transform:translate(14px,-6px)} }
@keyframes cake-smoke-rise { 0% {opacity:0;stroke-dasharray:3 70} 25% {opacity:.9} 65% {opacity:.75;stroke-dasharray:42 70} 100% {opacity:0;transform:translate(5px,-9px);stroke-dasharray:64 70} }
@media (prefers-reduced-motion: reduce) {
  .birthday-cake-art :is(.cake-wick-fire,.cake-lick,.cake-eyes,.cake-paw) { animation: none; }
}
.cake-pixels{image-rendering:pixelated}
#cake[data-phase="relight"] .cake-lulu{animation:lulu-stroll 1.25s .5s steps(8,end) forwards}
#cake[data-phase="relight"] .cake-direction{transform-box:fill-box;transform-origin:center;animation:lulu-turn 1.5s .4s steps(1,end) forwards}
#cake[data-phase="relight"] .cake-paw{animation:lulu-paw .27s .5s steps(2,end) 4}
@keyframes lulu-stroll{0%{transform:translate(-6px,0)}27%{transform:translate(-3px,-2px)}55%{transform:translate(2px,0)}78%{transform:translate(5px,-2px)}100%{transform:translate(7px,0)}}
@keyframes lulu-turn{0%,85%{transform:scaleX(-1)}100%{transform:scaleX(1)}}
@keyframes lulu-paw{50%{transform:translate(2px,-1px)}}

.cake-rim-light{opacity:0;transition:opacity .45s}
#cake[data-phase=wish] .cake-rim-light{opacity:.95}
#cake[data-phase=smoke] .cake-night-overlay{mask:none}
