.track{overflow:visible;clip-path:inset(-45px 0 -12px 0)}
.track .sleigh{z-index:3}
.snow-wake{display:none}
.snow-magic{position:absolute;left:0;top:-40px;width:100%;height:78px;z-index:2;pointer-events:none}
.snow-drift{position:absolute;z-index:1;right:5px;bottom:1px;width:96px;height:25px;background:url('snowdrift.png') center bottom/100% 100% no-repeat;opacity:0;pointer-events:none;animation:snow-arrival 1.2s ease-out 3.1s forwards;filter:drop-shadow(0 1px 1px rgba(111,129,142,.22))}
@keyframes snow-arrival{from{opacity:0;transform:translateY(5px) scaleX(.7)}to{opacity:.9;transform:translateY(0) scaleX(1)}}
@media(prefers-reduced-motion:reduce){.snow-magic{display:none}.snow-drift{animation:none;opacity:.9}}
/* Soften the snow at both ends and let a ridge overlap the runners. */
.snow-drift{right:3px;bottom:0;width:110px;height:27px;mask-image:radial-gradient(ellipse 50% 50% at 50% 48%,#000 38%,transparent 98%);-webkit-mask-image:radial-gradient(ellipse 50% 50% at 50% 48%,#000 38%,transparent 98%)}
.track::after{content:'';position:absolute;z-index:4;right:11px;bottom:1px;width:70px;height:8px;pointer-events:none;border-radius:50% 55% 40% 45%;background:radial-gradient(ellipse at 50% 15%,#fff 4%,#ecf3f6 48%,rgba(214,226,232,0) 76%);opacity:0;animation:snow-ridge .7s ease-out 3.45s forwards}
@keyframes snow-ridge{from{opacity:0;transform:scaleX(.5) translateY(3px)}to{opacity:.95;transform:scaleX(1) translateY(0)}}
@keyframes sleigh-ride{0%{right:100%;transform:scaleX(-1) translateY(-2px);opacity:0}12%{opacity:1}65%{transform:scaleX(-1) translateY(-3px)}88%{right:25px;transform:scaleX(-1) translateY(-2px) rotate(-2deg)}94%{right:22px;transform:scaleX(-1) translateY(2px) rotate(7deg)}100%{right:22px;transform:scaleX(-1) translateY(1px) rotate(3deg);opacity:1}}
@media(prefers-reduced-motion:reduce){.track::after{animation:none;opacity:.95}}

.snow-drift{animation:snow-arrival 1.2s ease-out 3.1s forwards,snow-impact-glow 1.15s ease-out 3.75s both}
@keyframes snow-impact-glow{0%{filter:drop-shadow(0 1px 1px rgba(111,129,142,.22))}25%{filter:brightness(1.25) drop-shadow(0 0 5px rgba(246,213,144,.9))}100%{filter:drop-shadow(0 1px 1px rgba(111,129,142,.22))}}
@media(prefers-reduced-motion:reduce){.snow-drift{animation:none;opacity:.9}}

.snow-impact-flash{position:absolute;right:11px;bottom:-4px;width:82px;height:48px;z-index:2;pointer-events:none;opacity:0;background:radial-gradient(ellipse at center,rgba(255,255,255,1) 0%,rgba(255,226,155,.9) 15%,rgba(255,231,174,.5) 35%,transparent 72%);animation:impact-flash 1.4s ease-out 3.7s both}
@keyframes impact-flash{0%{opacity:0;transform:scale(.3)}18%{opacity:1;transform:scale(1.2)}36%{opacity:.8;transform:scale(1)}100%{opacity:0;transform:scale(1.6)}}
@media(prefers-reduced-motion:reduce){.snow-impact-flash{display:none}}
/* Uneven snow piled in front of the runners. */
.track::after{right:6px;bottom:-5px;width:105px;height:18px;border-radius:0;background:radial-gradient(ellipse 26px 8px at 25px 11px,#fff 35%,rgba(241,247,249,.96) 70%,transparent 100%),radial-gradient(ellipse 19px 9px at 45px 10px,#fff 35%,rgba(238,245,248,.98) 70%,transparent 100%),radial-gradient(ellipse 25px 7px at 67px 12px,#fff 38%,rgba(236,243,247,.95) 68%,transparent 100%),radial-gradient(ellipse 25px 8px at 83px 12px,#fff 30%,rgba(239,246,249,.94) 66%,transparent 100%);filter:drop-shadow(0 2px 2px rgba(170,190,201,.16))}
.track-tree{position:absolute;right:103px;bottom:5px;width:31px;height:40px;object-fit:contain;object-position:center bottom;z-index:1;pointer-events:none;filter:drop-shadow(0 2px 2px rgba(94,100,84,.12))}
/* The snowbank is already in place when the sleigh arrives. */
.snow-drift{opacity:.9;animation:snow-impact-glow 1.15s ease-out 3.75s both}
.track::after{opacity:.95;animation:none}
@media(prefers-reduced-motion:reduce){.snow-drift{animation:none;opacity:.9}}

.track-tree{right:0;bottom:5px;width:25px;height:34px;z-index:2}
/* Soft, uneven snow along the sleigh's path. */
.track:before{bottom:6px;height:8px;background:radial-gradient(ellipse 35px 4px at 4% 95%,rgba(221,233,239,.9) 0%,transparent 100%),radial-gradient(ellipse 44px 5px at 22% 100%,rgba(220,233,239,.9) 0%,transparent 100%),radial-gradient(ellipse 38px 5px at 43% 100%,rgba(216,230,236,.85) 0%,transparent 100%),radial-gradient(ellipse 52px 5px at 65% 100%,rgba(222,234,239,.95) 0%,transparent 100%),radial-gradient(ellipse 47px 5px at 86% 100%,rgba(217,230,237,.9) 0%,transparent 100%),linear-gradient(to bottom,transparent 0%,rgba(255,255,255,.9) 48%,rgba(217,229,235,.7) 75%,transparent 100%);filter:drop-shadow(0 1px 1px rgba(166,185,196,.16));pointer-events:none}
/* A little light on the tree completes the sleigh's journey. */
.tree-lights{position:absolute;right:0;bottom:5px;width:25px;height:34px;z-index:4;pointer-events:none}
.tree-lights::before{content:'✦';position:absolute;top:-5px;left:8px;color:#ffe095;font:11px/1 Georgia,serif;text-shadow:0 0 3px #fff,0 0 8px #ffc447,0 0 13px #f5af31;opacity:0;transform:scale(.4);animation:tree-star 1.2s ease-out 4.3s forwards}
.tree-lights::after{content:'';position:absolute;top:15px;left:8px;width:2px;height:2px;border-radius:50%;background:#ffe5a2;box-shadow:5px 3px 2px #ffc945,-2px 6px 2px #ffdd75,8px 9px 2px #ffca57,1px 13px 2px #ffd364,12px 13px 2px #fff0a5;opacity:0;animation:tree-twinkle 2.1s ease-in-out 4.5s forwards}
@keyframes tree-star{0%{opacity:0;transform:scale(.4)}55%{opacity:1;transform:scale(1.35)}100%{opacity:.9;transform:scale(1)}}
@keyframes tree-twinkle{0%{opacity:0}25%{opacity:1}45%{opacity:.3}65%{opacity:1}100%{opacity:.8}}
@media(prefers-reduced-motion:reduce){.tree-lights::before,.tree-lights::after{animation:none;opacity:.8;transform:none}}
/* Keep the approach lively, then make the sleigh bounce into the snow. */
.track .sleigh{animation-timing-function:linear}
@keyframes sleigh-ride{0%{right:100%;transform:scaleX(-1) translateY(-2px);opacity:0}12%{opacity:1}65%{transform:scaleX(-1) translateY(-3px)}88%{right:calc(22px + 9%);transform:scaleX(-1) translateY(-2px) rotate(-2deg)}94%{right:18px;transform:scaleX(-1) translateY(3px) rotate(12deg)}97%{right:24px;transform:scaleX(-1) translateY(-1px) rotate(-4deg)}100%{right:22px;transform:scaleX(-1) translateY(1px) rotate(3deg);opacity:1}}
.tree-lights::before{color:#ed0b20;text-shadow:0 0 2px #fff,0 0 5px #ff1828,0 0 11px #ff2331,0 0 17px #ef0015}
/* The Snow Maiden and her friendly yeti hurry to the sleigh after the impact. */
.snow-rescue{position:absolute;z-index:3;bottom:5px;left:-75px;width:68px;height:34px;pointer-events:none;opacity:0;animation:rescue-arrival 2.8s linear 4.05s forwards}
.snow-rescue img{display:block;width:100%;height:100%;object-fit:contain;animation:rescue-running .3s ease-in-out 4.05s 9 alternate}
@keyframes rescue-arrival{0%{left:-75px;opacity:0}4%{opacity:1}88%{left:calc(100% - 150px)}100%{left:calc(100% - 144px);opacity:1}}
@keyframes rescue-running{from{transform:translateY(0) rotate(-3deg)}to{transform:translateY(-3px) rotate(3deg)}}
@media(prefers-reduced-motion:reduce){.snow-rescue{animation:none;left:calc(100% - 144px);opacity:1}.snow-rescue img{animation:none}}
.snow-runner{position:absolute;z-index:3;bottom:6px;left:-35px;width:23px;height:23px;pointer-events:none;opacity:0}
.snow-runner span{display:block;width:100%;height:100%;background-image:url('snow-rescue.webp');background-repeat:no-repeat;background-size:200% 100%;animation:rescue-running .3s ease-in-out 4.05s 10 alternate}
.snow-runner-maiden{animation:maiden-arrival 2.4s linear 4.05s forwards}.snow-runner-maiden span{background-position:right center}
.snow-runner-yeti{animation:yeti-arrival 3.1s linear 4.35s forwards}.snow-runner-yeti span{background-position:left center;animation-delay:4.35s}
@keyframes maiden-arrival{0%{left:-35px;opacity:0}5%{opacity:1}90%{left:calc(100% - 105px)}100%{left:calc(100% - 100px);opacity:1}}
@keyframes yeti-arrival{0%{left:-35px;opacity:0}5%{opacity:1}90%{left:calc(100% - 135px)}100%{left:calc(100% - 130px);opacity:1}}
@media(prefers-reduced-motion:reduce){.snow-runner{animation:none;opacity:1}.snow-runner-maiden{left:calc(100% - 100px)}.snow-runner-yeti{left:calc(100% - 130px)}.snow-runner span{animation:none}}
/* Five seconds after everyone arrives, the tree becomes the final scene. */
.track .sleigh{animation:sleigh-ride 4s linear both,scene-characters-away .7s ease 12.5s forwards}
.snow-runner-maiden{animation:maiden-arrival 2.4s linear 4.05s forwards,scene-characters-away .7s ease 12.5s forwards}
.snow-runner-yeti{animation:yeti-arrival 3.1s linear 4.35s forwards,scene-characters-away .7s ease 12.5s forwards}
.track-tree,.tree-lights{animation:tree-center 1.5s cubic-bezier(.25,.7,.25,1) 13.15s forwards}
@keyframes scene-characters-away{from{opacity:1}to{opacity:0;visibility:hidden}}
@keyframes tree-center{from{right:0}to{right:calc(50% - 12.5px)}}
.gift-burst{position:absolute;left:50%;bottom:7px;z-index:4;pointer-events:none}
.gift-burst i{position:absolute;bottom:0;width:9px;height:8px;border-radius:1px;background:var(--gift);box-shadow:inset 0 -1px 2px rgba(70,40,40,.2),0 1px 2px rgba(80,60,40,.15);opacity:0;transform:translate(0,0) scale(.3);animation:gift-scatter .85s cubic-bezier(.15,.7,.3,1) var(--delay) forwards}
.gift-burst i::before{content:'';position:absolute;left:3px;top:0;width:2px;height:100%;background:rgba(255,241,192,.94)}
.gift-burst i::after{content:'';position:absolute;left:-1px;top:2px;width:11px;height:2px;background:rgba(255,241,192,.94)}
.gift-burst i:nth-child(1){--gift:#c71a35;--x:-27px;--y:-9px;--delay:14.3s}.gift-burst i:nth-child(2){--gift:#3a92a7;--x:19px;--y:-13px;--delay:14.4s}.gift-burst i:nth-child(3){--gift:#dda424;--x:-42px;--y:-15px;--delay:14.5s}.gift-burst i:nth-child(4){--gift:#8762ab;--x:35px;--y:-10px;--delay:14.6s}.gift-burst i:nth-child(5){--gift:#cf597c;--x:-57px;--y:-7px;--delay:14.7s}.gift-burst i:nth-child(6){--gift:#2f9b76;--x:50px;--y:-15px;--delay:14.8s}
@keyframes gift-scatter{0%{opacity:0;transform:translate(0,0) scale(.3) rotate(0)}35%{opacity:1;transform:translate(calc(var(--x) * .65),var(--y)) scale(1.1) rotate(16deg)}100%{opacity:1;transform:translate(var(--x),0) scale(1) rotate(0)}}
@media(prefers-reduced-motion:reduce){.track .sleigh,.snow-runner{animation:none;opacity:0;visibility:hidden}.track-tree,.tree-lights{animation:none;right:calc(50% - 12.5px)}.gift-burst i{animation:none;opacity:1;transform:translate(var(--x),0)}}
/* The tree gently breathes while small presents stack on either side. */
.track-tree,.tree-lights{transform-origin:50% 100%;animation:tree-center 1.5s cubic-bezier(.25,.7,.25,1) 13.15s forwards,tree-breathe 2.8s ease-in-out 14.65s infinite}
@keyframes tree-breathe{0%,100%{transform:scale(1)}45%{transform:scale(1.08,1.1)}}
.gift-burst i{bottom:var(--base,0px)}
.gift-burst i:nth-child(7){--gift:#4094c0;--x:-33px;--y:-15px;--base:7px;--delay:15s}
.gift-burst i:nth-child(8){--gift:#d44c4a;--x:25px;--y:-16px;--base:7px;--delay:15.1s}
.gift-burst i:nth-child(9){--gift:#ac6db2;--x:-48px;--y:-19px;--base:7px;--delay:15.2s}
.gift-burst i:nth-child(10){--gift:#e5a82c;--x:41px;--y:-17px;--base:7px;--delay:15.3s}
@media(prefers-reduced-motion:reduce){.track-tree,.tree-lights{animation:none;right:calc(50% - 12.5px);transform:none}}
/* A larger breathing tree and friends sitting at the sides of the snow path. */
.track-tree{animation:tree-center-large 1.5s cubic-bezier(.25,.7,.25,1) 13.15s forwards,tree-breathe 2.8s ease-in-out 14.65s infinite}
.tree-lights{scale:1.5;transform-origin:50% 100%}
@keyframes tree-center-large{from{right:0;width:25px;height:34px}to{right:calc(50% - 19px);width:38px;height:51px}}
.sitting-friend{position:absolute;bottom:-11px;width:30px;height:40px;z-index:3;opacity:0;pointer-events:none;animation:sit-appear .8s ease-out 15.8s forwards}
.sitting-maiden{left:calc(50% - 105px)}.sitting-yeti{left:calc(50% + 75px)}
.sitting-friend i,.sitting-friend b{position:absolute;inset:0;display:block;background:url('sitting-friends.webp') no-repeat;background-size:200% 100%}
.sitting-maiden i,.sitting-maiden b{background-position:left center}.sitting-yeti i,.sitting-yeti b{background-position:right center}
.sitting-friend i{clip-path:inset(0 0 35% 0)}.sitting-friend b{clip-path:inset(64% 0 0 0);transform-origin:50% 65%;animation:legs-swing 1.15s ease-in-out 16.5s infinite alternate}
.sitting-yeti b{animation-delay:16.8s}
@keyframes sit-appear{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
@keyframes legs-swing{from{transform:rotate(-8deg)}to{transform:rotate(8deg)}}
@media(prefers-reduced-motion:reduce){.track-tree{animation:none;right:calc(50% - 19px);width:38px;height:51px}.sitting-friend{animation:none;opacity:1}.sitting-friend b{animation:none}}
/* The tree travels at its original size; it grows only after reaching center. */
.track-tree,.tree-lights{transform-origin:50% 100%;scale:1;animation:tree-center 1.5s cubic-bezier(.25,.7,.25,1) 13.15s forwards,tree-grow .8s ease-out 14.65s forwards,tree-breathe-large 2.8s ease-in-out 15.45s infinite}
@keyframes tree-grow{from{transform:scale(1)}to{transform:scale(1.52)}}
@keyframes tree-breathe-large{0%,100%{transform:scale(1.52)}45%{transform:scale(1.62,1.67)}}
.sitting-santa{left:calc(50% - 138px)}.sitting-snowman{left:calc(50% + 108px);animation:snowman-emerge 1.1s ease-out 16s forwards}
.sitting-santa i,.sitting-santa b,.sitting-snowman i,.sitting-snowman b{background-image:url('santa-snowman.webp')}
.sitting-santa i,.sitting-santa b{background-position:left center}.sitting-snowman i,.sitting-snowman b{background-position:right center}
.sitting-santa b{animation-delay:16.65s}.sitting-snowman b{animation-delay:17s}
@keyframes snowman-emerge{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.track-tree,.tree-lights{animation:none;right:calc(50% - 12.5px);width:25px;height:34px;transform:scale(1.52)}.sitting-friend{animation:none;opacity:1}}
