.christmas-scene {
  position: relative;
  isolation: isolate;
  height: 112px;
  margin: -12px -14px 9px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 112%, #7044a744 0, transparent 54%),
    linear-gradient(180deg, #10092300 0%, #1309239c 100%);
  border-bottom: 1px solid #a88dce38;
}
.christmas-sky,
.christmas-flakes,
.christmas-snowbank,
.snowdrift-glow { position: absolute; inset: 0; pointer-events: none; }
.christmas-sky {
  background: radial-gradient(ellipse at 50% 100%, #d4e9ff0c 0, transparent 58%);
}
.christmas-flakes { z-index: 1; overflow: hidden; }
.christmas-flakes i {
  position: absolute;
  top: -8px;
  left: var(--flake-x);
  width: var(--flake-size);
  height: var(--flake-size);
  border-radius: 50%;
  background: #f1f6ff;
  box-shadow: 0 0 5px #d7e9ffb0;
  opacity: 0;
  animation: christmas-fall var(--flake-duration) linear var(--flake-delay) infinite;
}
.christmas-snowbank { z-index: 2; top: auto; bottom: -1px; width: 100%; height: 39px; transform-origin: bottom; animation: snow-build 36s linear infinite; }
.snowbank-shadow { fill: #bacff0; opacity: .42; }
.snowbank-top { fill: #f1f6ff; }
.snowdrift-glow {
  z-index: 2;
  top: auto;
  bottom: 7px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e3eeffb8 20%, #fff 50%, #e3eeffb8 80%, transparent);
  filter: drop-shadow(0 0 7px #e3eeffb8);
}
.christmas-traveller {
  --travel-y: 0px;
  position: absolute;
  z-index: 3;
  bottom: 12px;
  left: 0;
  width: 92px;
  opacity: 0;
  transform: translateX(-190px);
  animation: santa-cross 36s linear infinite;
  filter: drop-shadow(0 4px 5px #07041480);
}
.christmas-traveller svg { display: block; width: 100%; height: auto; overflow: visible; }
.traveller-walk { animation-name: walk-cross, santa-bob; animation-duration: 36s, .42s; animation-timing-function: linear, ease-in-out; animation-iteration-count: infinite; animation-delay: 0s, 0s; }
.traveller-sleigh { width: 143px; animation-name: sleigh-cross, sleigh-glide; animation-duration: 36s, 1.3s; animation-timing-function: linear, ease-in-out; animation-iteration-count: infinite; animation-delay: 0s, 0s; }
.traveller-van { width: 139px; animation-name: van-cross, van-roll; animation-duration: 36s, .9s; animation-timing-function: linear, linear; animation-iteration-count: infinite; animation-delay: 0s, 0s; }
.snow-gust {
  position: absolute;
  z-index: -1;
  left: 60%;
  bottom: 5px;
  width: 115px;
  height: 34px;
  opacity: 0;
  transform-origin: left center;
  animation: gust-blow 36s ease-out infinite;
  pointer-events: none;
}
.snow-gust::before,
.snow-gust::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 18px;
  border-top: 2px solid #f6faff;
  border-radius: 50%;
  filter: drop-shadow(0 0 5px #eaf3ff);
}
.snow-gust::before { top: 3px; transform: rotate(-9deg); }
.snow-gust::after { top: 12px; width: 78%; transform: rotate(6deg); opacity: .65; }
.gust-sleigh { width: 155px; }
.gust-van { width: 150px; }
@keyframes christmas-fall {
  0% { transform: translate3d(0,-8px,0); opacity: 0; }
  12% { opacity: .8; }
  88% { opacity: .7; }
  100% { transform: translate3d(18px,calc(100dvh + 8px),0); opacity: 0; }
}
@keyframes snow-build {
  0%, 2% { transform: scaleY(.72); }
  24% { transform: scaleY(1.15); }
  30% { transform: scaleY(.66); }
  57% { transform: scaleY(1.15); }
  63% { transform: scaleY(.66); }
  90% { transform: scaleY(1.15); }
  96% { transform: scaleY(.66); }
  100% { transform: scaleY(.72); }
}
@keyframes walk-cross {
  0% { transform: translateX(-190px); opacity: 0; }
  3% { opacity: 1; }
  27% { transform: translateX(calc(100vw + 190px)); opacity: 1; }
  30% { opacity: 0; }
  100% { transform: translateX(calc(100vw + 190px)); opacity: 0; }
}
@keyframes sleigh-cross {
  0%, 33% { transform: translateX(-210px); opacity: 0; }
  36% { opacity: 1; }
  60% { transform: translateX(calc(100vw + 210px)); opacity: 1; }
  63% { opacity: 0; }
  100% { transform: translateX(calc(100vw + 210px)); opacity: 0; }
}
@keyframes van-cross {
  0%, 66% { transform: translateX(-205px); opacity: 0; }
  69% { opacity: 1; }
  93% { transform: translateX(calc(100vw + 205px)); opacity: 1; }
  96% { opacity: 0; }
  100% { transform: translateX(calc(100vw + 205px)); opacity: 0; }
}
@keyframes gust-blow {
  0%, 4%, 33%, 37%, 66%, 70%, 100% { opacity: 0; transform: scaleX(.4) translateX(-5px); }
  10%, 20%, 43%, 53%, 76%, 86% { opacity: .78; transform: scaleX(1) translateX(0); }
  29%, 62%, 95% { opacity: 0; transform: scaleX(1.15) translateX(18px); }
}
@keyframes santa-bob { 0%,100% { margin-bottom: 0; } 50% { margin-bottom: 3px; } }
@keyframes sleigh-glide { 0%,100% { margin-bottom: 0; } 50% { margin-bottom: 4px; } }
@keyframes van-roll { to { filter: brightness(1.06); } }
@media (max-width: 600px) {
  .christmas-scene { height: 91px; margin: -11px -10px 8px; }
  .christmas-traveller { width: 72px; bottom: 10px; }
  .traveller-sleigh { width: 112px; }
  .traveller-van { width: 110px; }
  .christmas-snowbank { height: 29px; }
  .snow-gust { width: 85px; height: 27px; }
  .gust-sleigh,.gust-van { width: 105px; }
}
@media (prefers-reduced-motion: reduce) {
  .christmas-flakes i,
  .christmas-snowbank,
  .christmas-traveller,
  .snow-gust,
  .christmas-traveller { display: none; }
  .traveller-walk { display: block; left: calc(50% - 46px); bottom: 11px; width: 78px; opacity: 1; transform: none; }
  .christmas-flakes i { opacity: .65; }
}


.has-christmas-scene { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.christmas-scene {
  position: fixed;
  z-index: 40;
  inset: auto 0 0;
  height: calc(112px + env(safe-area-inset-bottom));
  margin: 0;
  pointer-events: none;
  background: linear-gradient(180deg,#170a2e00,#190a32dd 68%,#10061e);
}
.christmas-flakes { position: fixed; inset: 0; z-index: 39; }
.christmas-flakes i { background: #fff; box-shadow: 0 0 5px #dce8ff99; }
.christmas-art {
  display: block;
  width: 100%;
  background: url('/assets/christmas-reference.png') no-repeat;
}
.traveller-walk { width: 78px; }
.traveller-walk .christmas-art {
  aspect-ratio: 200/199;
  background-size: 836% 472.36%;
  background-position: 31.79% 14.44%;
  clip-path: polygon(1% 37%,16% 29%,15% 14%,36% 8%,38% 0,54% 4%,80% 0,91% 12%,98% 28%,95% 38%,79% 47%,78% 61%,85% 75%,81% 90%,93% 98%,57% 100%,51% 88%,55% 78%,42% 81%,30% 94%,33% 100%,9% 100%,10% 93%,22% 72%,12% 66%,15% 57%,1% 49%);
}
.traveller-sleigh { width: 152px; }
.traveller-sleigh .christmas-art {
  aspect-ratio: 310/179;
  background-size: 539.35% 525.14%;
  background-position: 30.10% 55.20%;
  clip-path: polygon(0 36%,6% 31%,9% 16%,28% 8%,38% 11%,45% 2%,65% 0,78% 11%,81% 29%,75% 44%,82% 55%,89% 66%,92% 78%,99% 72%,100% 87%,94% 100%,0 100%,0 89%,12% 90%,8% 68%,5% 47%,0 47%);
}
.traveller-van { width: 121px; }
.traveller-van .christmas-art {
  aspect-ratio: 325/237;
  background-size: 514.46% 396.62%;
  background-position: 26.50% 95.02%;
  clip-path: polygon(1% 65%,4% 40%,9% 27%,17% 20%,17% 12%,35% 8%,35% 2%,56% 0,65% 10%,74% 13%,76% 21%,84% 27%,92% 48%,95% 65%,100% 72%,100% 88%,92% 92%,84% 93%,80% 100%,67% 100%,62% 93%,29% 93%,23% 100%,12% 100%,8% 93%,0 90%,0 74%);
}
@media(max-width:600px) {
  .has-christmas-scene { padding-bottom: calc(91px + env(safe-area-inset-bottom)); }
  .christmas-scene { height: calc(91px + env(safe-area-inset-bottom)); margin:0; }
  .traveller-walk { width: 61px; }
  .traveller-sleigh { width: 117px; }
  .traveller-van { width: 94px; }
}
@media(prefers-reduced-motion:reduce) {
  .christmas-flakes { display: none; }
}

.christmas-weather {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 41;
  pointer-events: none;
}
.christmas-snowbank, .snowdrift-glow, .snow-gust { display: none; }
.christmas-traveller { bottom: 3px; }
.traveller-walk .christmas-art { animation: santa-stride .55s ease-in-out infinite; transform-origin: 55% 95%; }
.traveller-sleigh .christmas-art { animation: santa-sway 1.65s ease-in-out infinite; }
.traveller-van .christmas-art { animation: santa-sway 1.15s ease-in-out infinite; }
@keyframes santa-stride {
  0%, 100% { transform: rotate(-3deg) scaleY(.98); }
  50% { transform: rotate(3deg) scaleY(1.015); }
}
@keyframes santa-sway {
  0%, 100% { transform: rotate(-1.2deg); }
  50% { transform: rotate(1.2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .christmas-traveller .christmas-art { animation: none; }
}

.christmas-scene .christmas-traveller {
  animation: none;
  left: 0;
  bottom: 0;
  margin: 0;
  display: block;
}
.christmas-traveller canvas { width: 100%; height: auto; display: block; }
.christmas-scene .traveller-walk { width: 91px; }
.christmas-scene .traveller-sleigh { width: 165px; }
.christmas-scene .traveller-van { width: 135px; }
@media (max-width: 600px) {
  .christmas-scene .traveller-walk { width: 55.5px; }
  .christmas-scene .traveller-sleigh { width: 96.75px; }
  .christmas-scene .traveller-van { width: 81.75px; }
}

