/* ==========================================================================
   CC Games — Christmas theme
   Loaded after site.css, and only while Christmas is the live theme
   (portal: Dashboard → Site Theme). Same layout; it recolours the site and
   adds decorations. The decoration markup is includes/themes/christmas.php.

   Everything is scoped under html.theme-christmas (or the theme's own xm-
   classes), so it outranks site.css and can never leak into another theme.

   Built to stay fast, even on PCs that draw web pages without a graphics
   card (software rendering, e.g. Firefox on many Linux PCs):
   - Every animation is transform or opacity only, so the browser moves
     finished pictures around instead of drawing anything again. Nothing
     animates inside an SVG; anything that moves on its own is its own
     element (so no main-thread repaints, ever).
   - The two decoration layers (.xm-sky behind the page, .xm-fx in front)
     are redrawn every frame while the snow falls, so everything in them is
     a picture: small SVG tiles and drawings (the browser draws each once,
     then repeats and slides it). No CSS gradients, shadows, masks, filters
     or blend modes there, and only single pictures fade (a fading layer of
     many tiles would be drawn off-screen first, every frame).
   - Measured in Firefox with software rendering at 1920×1080: ~37 ms of
     rendering per frame, against ~48 ms for the Halloween theme.
   - It all starts from the first painted frame (no JS) and switches off for
     visitors who ask for reduced motion.
   ========================================================================== */

/* ── Palette: midnight-blue winter night, holly green, Santa red, snow ──── */
.theme-christmas {
  --bg:         #16284d;
  --bg-elev:    #1a2e57;
  --surface:    #1d3360;
  --surface-2:  #233b6c;
  --surface-3:  #2a4479;
  /* Solid, never rgba (no fringe pixels on rounded corners). */
  --line:        #27416f;
  --line-strong: #34518a;
  --line-hover:  #d9485a;

  --text:   #f6f9ff;
  --text-2: #d2dcf0;
  --muted:  #a2b3d4;

  --brand:    #e0303f;
  --brand-hi: #ff8a94;
  --violet:   #3ddc84;
  --pink:     #ff5a6a;

  --grad:      linear-gradient(135deg, #ff5f6f 0%, #d61f37 100%);
  --grad-soft: linear-gradient(135deg, rgba(61, 220, 132, 0.24), rgba(255, 255, 255, 0.08));
  --glow:      0 30px 50px -28px rgba(61, 220, 132, 0.6), 0 18px 36px -24px rgba(224, 48, 63, 0.55);

  scrollbar-color: #3e5d9a #16284d;
}
.theme-christmas ::selection { background: rgba(224, 48, 63, 0.5); color: #fff; }

/* ── Buttons, chips, badges: holly-green buttons, candy-cane headline ──── */
.theme-christmas .btn-primary {
  background: linear-gradient(120deg, #3fdc86 0%, #1fae5f 40%, #158a4b 70%, #1fae5f 100%) no-repeat;
  background-size: 200% 100%;
  background-origin: border-box;
  box-shadow: 0 10px 28px -10px rgba(20, 150, 80, 0.9);
}
.theme-christmas .btn-primary:hover { background-position: 100% 0; box-shadow: 0 16px 36px -12px rgba(63, 220, 134, 0.75); }
.theme-christmas .nav-link[aria-current="page"] { background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1px #4f6ca6; }
.theme-christmas .chip { background: rgba(255, 255, 255, 0.08); border-color: #3e5b93; }
.theme-christmas .chip-btn[aria-pressed="true"],
.theme-christmas .game-rank { box-shadow: 0 8px 22px -10px rgba(214, 31, 55, 0.9); }
.theme-christmas .game-play { box-shadow: 0 10px 24px -8px rgba(214, 31, 55, 0.95); }
.theme-christmas .success-mark { box-shadow: 0 18px 44px -14px rgba(61, 220, 132, 0.8); }
/* Red into snow white into green, like a candy cane / a Christmas card. */
.theme-christmas .text-gradient {
  background: linear-gradient(100deg, #ff4f62 0%, #ff8d99 30%, #ffffff 52%, #9af3c0 72%, #3ddc84 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.25));
}

/* ── Header: holly in both corners, a Santa hat on the logo ──────────────── */
.theme-christmas .site-header { background: rgba(22, 40, 77, 0.62); }
.theme-christmas .site-header.is-scrolled,
.theme-christmas.nav-open .site-header { background: rgba(22, 40, 77, 0.96); }
.theme-christmas .site-header::before,
.theme-christmas .site-header::after {
  content: '';
  position: absolute;
  top: 0;
  width: 70px;
  height: 70px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 70'%3E%3Cg transform='translate(5 4) rotate(50) scale(1.18)'%3E%3Cpath d='M0 0C3-4 6-5.6 8.6-4.4L10.8-8.4 13-4.8C16-7.4 18.6-7.6 21-6.4L23.4-9.6 25-5.4C28-5.4 31-3 34 0C31 3 28 5.4 25 5.4L23.4 9.6 21 6.4C18.6 7.6 16 7.4 13 4.8L10.8 8.4 8.6 4.4C6 5.6 3 4 0 0Z' fill='%2317663a'/%3E%3Cpath d='M1.4 0H31' stroke='%234fbf7c' stroke-width='.9' stroke-linecap='round'/%3E%3C/g%3E%3Cg transform='translate(5 4) rotate(14) scale(1.32)'%3E%3Cpath d='M0 0C3-4 6-5.6 8.6-4.4L10.8-8.4 13-4.8C16-7.4 18.6-7.6 21-6.4L23.4-9.6 25-5.4C28-5.4 31-3 34 0C31 3 28 5.4 25 5.4L23.4 9.6 21 6.4C18.6 7.6 16 7.4 13 4.8L10.8 8.4 8.6 4.4C6 5.6 3 4 0 0Z' fill='%231d7a44'/%3E%3Cpath d='M1.4 0H31' stroke='%234fbf7c' stroke-width='.9' stroke-linecap='round'/%3E%3C/g%3E%3Cg transform='translate(5 4) rotate(84) scale(1.26)'%3E%3Cpath d='M0 0C3-4 6-5.6 8.6-4.4L10.8-8.4 13-4.8C16-7.4 18.6-7.6 21-6.4L23.4-9.6 25-5.4C28-5.4 31-3 34 0C31 3 28 5.4 25 5.4L23.4 9.6 21 6.4C18.6 7.6 16 7.4 13 4.8L10.8 8.4 8.6 4.4C6 5.6 3 4 0 0Z' fill='%231a7040'/%3E%3Cpath d='M1.4 0H31' stroke='%234fbf7c' stroke-width='.9' stroke-linecap='round'/%3E%3C/g%3E%3Ccircle cx='9.6' cy='9' r='4' fill='%23c81a34'/%3E%3Ccircle cx='16.4' cy='7' r='3.6' fill='%23e0223c'/%3E%3Ccircle cx='12.4' cy='15' r='3.6' fill='%23d81e38'/%3E%3Ccircle cx='8.4' cy='7.8' r='1.2' fill='%23ff9aa6'/%3E%3Ccircle cx='15.4' cy='5.9' r='1.1' fill='%23ff9aa6'/%3E%3Ccircle cx='11.4' cy='13.9' r='1.1' fill='%23ff9aa6'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  pointer-events: none;
}
.theme-christmas .site-header::before { left: 0; }
.theme-christmas .site-header::after { right: 0; transform: scaleX(-1); }

.theme-christmas .brand { position: relative; }
.theme-christmas .brand::before {
  content: '';
  position: absolute;
  left: 10px;
  top: -14px;
  z-index: 1;
  width: 38px;
  height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 30'%3E%3Cpath d='M6 21C7 12 13 4.5 23.5 3.2C31 2.4 36 6.6 36.8 13.6L33.8 14.6C33 10.4 30.6 8.4 27.4 9C30.2 12.2 31.2 16.6 31.2 21Z' fill='%23d6203a'/%3E%3Cpath d='M10.4 20C11.6 13.4 15.6 8 22 5.6C17.6 9.6 15 14.4 14.4 20Z' fill='%23f0455a'/%3E%3Cpath d='M27.4 9C30.2 12.2 31.2 16.6 31.2 21H28.6C28.8 16.4 28.2 12.4 27.4 9Z' fill='%23a8142b'/%3E%3Crect x='3' y='18.6' width='31' height='8' rx='4' fill='%23f3f6fb'/%3E%3Cpath d='M3.2 23.4C8 25.6 29 25.6 33.8 23.4C33.4 25.6 31.6 26.6 30 26.6H7C5.4 26.6 3.6 25.6 3.2 23.4Z' fill='%23d3dce8'/%3E%3Ccircle cx='36' cy='16.2' r='3.8' fill='%23f7f9fc'/%3E%3Cpath d='M33.2 17.6C34 19.6 37.4 19.8 39 18.2C38.2 20.4 34.6 20.8 33.2 17.6Z' fill='%23d3dce8'/%3E%3C/svg%3E") no-repeat center / contain;
  transform: rotate(-12deg);
  transform-origin: 40% 90%;
  pointer-events: none;
  transition: transform 0.4s var(--ease-spring);
}
.theme-christmas .brand:hover::before { transform: rotate(-22deg) translate(-1px, -4px); }
.theme-christmas .brand span { text-shadow: 0 0 18px rgba(255, 255, 255, 0.25); }

/* ── Hero glows: holly green left, moonlight right ─────────────────────────
   (No soft red glows: red fading over the background muddies it. Red is
   kept for crisp accents - buttons, the headline, icons, lights, the hat.) */
.theme-christmas .hero::before,
.theme-christmas .page-hero::before {
  background:
    radial-gradient(38% 46% at 14% 22%, rgba(61, 220, 132, 0.18), transparent 70%),
    radial-gradient(34% 42% at 86% 12%, rgba(215, 232, 255, 0.16), transparent 70%),
    radial-gradient(30% 38% at 68% 80%, rgba(255, 255, 255, 0.06), transparent 70%);
}
.theme-christmas .hero::after,
.theme-christmas .page-hero::after {
  background-image:
    linear-gradient(rgba(200, 220, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 220, 255, 0.06) 1px, transparent 1px);
}
.theme-christmas .hero-card::after { background: linear-gradient(180deg, transparent 50%, rgba(14, 26, 50, 0.85)); }
.theme-christmas .hero-card--3 { box-shadow: var(--shadow-lg), 0 24px 90px -24px rgba(61, 220, 132, 0.45); }
.theme-christmas .hero-card-label,
.theme-christmas .game-live { background: rgba(14, 26, 50, 0.86); border-color: #34508a; }
.theme-christmas .hero-badge { background: rgba(29, 51, 96, 0.96); }
.theme-christmas .article-hero { box-shadow: var(--shadow-lg), 0 30px 120px -40px rgba(120, 170, 255, 0.4); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.theme-christmas .stat-card,
.theme-christmas .value-card {
  background:
    radial-gradient(180px circle at 100% 0%, rgba(255, 255, 255, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}
.theme-christmas .stat-card::after,
.theme-christmas .value-card::after {
  background: radial-gradient(280px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.1), transparent 65%);
}
@media (hover: hover) {
  .theme-christmas .stat-card:hover,
  .theme-christmas .value-card:hover {
    box-shadow: 0 28px 50px -30px rgba(61, 220, 132, 0.7), 0 14px 30px -24px rgba(224, 48, 63, 0.6);
  }
  .theme-christmas .stat-card:hover .stat-icon,
  .theme-christmas .value-card:hover .stat-icon { box-shadow: 0 12px 26px -10px rgba(214, 31, 55, 0.9); }
}
.theme-christmas .stat-icon { border-color: #2f6a66; }
.theme-christmas .game-thumb { background: #132447; }

.theme-christmas .cta-band {
  background:
    radial-gradient(60% 120% at 0% 0%, rgba(61, 220, 132, 0.22), transparent 60%),
    radial-gradient(55% 110% at 100% 100%, rgba(255, 255, 255, 0.1), transparent 60%),
    linear-gradient(135deg, #20386d 0%, #182c57 100%);
  background-clip: padding-box;
}
.theme-christmas .cta-band .lede { color: #e1e9f8; }
.theme-christmas .social-tile { background: rgba(12, 22, 44, 0.5); border-color: #3a5690; }
.theme-christmas .social-tile:hover { background: rgba(12, 22, 44, 0.72); border-color: #d9485a; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.theme-christmas .input,
.theme-christmas .textarea,
.theme-christmas .seg-option label { background: rgba(12, 22, 44, 0.6); }
.theme-christmas .input:hover, .theme-christmas .textarea:hover { border-color: #4a68a6; }
.theme-christmas .input:focus,
.theme-christmas .textarea:focus { background: rgba(12, 22, 44, 0.85); box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.22); }
.theme-christmas .seg-option input:checked + label { background: rgba(61, 220, 132, 0.1); box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.14); }
.theme-christmas .react-picker { background: #233b6c; }
.theme-christmas .react-tip { background: #16284d; }

/* ── Footer: a snowy village stands on its top edge ──────────────────────── */
.theme-christmas .site-footer {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(61, 220, 132, 0.04));
}
.theme-christmas .site-footer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 84px;
  margin-bottom: 1px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 80'%3E%3Cdefs%3E%3CradialGradient id='w'%3E%3Cstop offset='0' stop-color='%23ffc85a' stop-opacity='.5'/%3E%3Cstop offset='1' stop-color='%23ffc85a' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M0 80V60Q70 50 140 56T280 54T420 51T540 56T600 60V80Z' fill='%235f7891'/%3E%3Crect x='36.2' y='56.6' width='3.6' height='7.4' fill='%232a1c14'/%3E%3Cpath d='M38 18L47.2 39.2H28.8Z' fill='%230f2c20'/%3E%3Cpath d='M28.8 39.2Q38 34.8 47.2 39.2L44.8 37Q38 32.6 31.2 37Z' fill='%23d9e5ef'/%3E%3Cpath d='M38 29L51.3 48.4H24.7Z' fill='%230f2c20'/%3E%3Cpath d='M24.7 48.4Q38 44 51.3 48.4L48.9 46.2Q38 41.8 27.1 46.2Z' fill='%23d9e5ef'/%3E%3Cpath d='M38 40.1L55.5 57.6H20.5Z' fill='%230f2c20'/%3E%3Cpath d='M20.5 57.6Q38 53.2 55.5 57.6L53.1 55.4Q38 51 22.9 55.4Z' fill='%23d9e5ef'/%3E%3Cpath d='M38 18L41.2 23.5H34.8Z' fill='%23e6eef6'/%3E%3Crect x='64.2' y='61.2' width='3.6' height='4.8' fill='%232a1c14'/%3E%3Cpath d='M66 36L72 49.8H60Z' fill='%230f2c20'/%3E%3Cpath d='M60 49.8Q66 45.4 72 49.8L69.6 47.6Q66 43.2 62.4 47.6Z' fill='%23d9e5ef'/%3E%3Cpath d='M66 43.2L74.7 55.8H57.3Z' fill='%230f2c20'/%3E%3Cpath d='M57.3 55.8Q66 51.4 74.7 55.8L72.3 53.6Q66 49.2 59.7 53.6Z' fill='%23d9e5ef'/%3E%3Cpath d='M66 50.4L77.4 61.8H54.6Z' fill='%230f2c20'/%3E%3Cpath d='M54.6 61.8Q66 57.4 77.4 61.8L75 59.6Q66 55.2 57 59.6Z' fill='%23d9e5ef'/%3E%3Cpath d='M66 36L68.1 39.6H63.9Z' fill='%23e6eef6'/%3E%3Crect x='184.2' y='57.6' width='3.6' height='6.4' fill='%232a1c14'/%3E%3Cpath d='M186 24L194 42.4H178Z' fill='%230f2c20'/%3E%3Cpath d='M178 42.4Q186 38 194 42.4L191.6 40.2Q186 35.8 180.4 40.2Z' fill='%23d9e5ef'/%3E%3Cpath d='M186 33.6L197.6 50.4H174.4Z' fill='%230f2c20'/%3E%3Cpath d='M174.4 50.4Q186 46 197.6 50.4L195.2 48.2Q186 43.8 176.8 48.2Z' fill='%23d9e5ef'/%3E%3Cpath d='M186 43.2L201.2 58.4H170.8Z' fill='%230f2c20'/%3E%3Cpath d='M170.8 58.4Q186 54 201.2 58.4L198.8 56.2Q186 51.8 173.2 56.2Z' fill='%23d9e5ef'/%3E%3Cpath d='M186 24L188.8 28.8H183.2Z' fill='%23e6eef6'/%3E%3Crect x='466.2' y='53.4' width='3.6' height='8.6' fill='%232a1c14'/%3E%3Cpath d='M468 8L478.8 32.8H457.2Z' fill='%230f2c20'/%3E%3Cpath d='M457.2 32.8Q468 28.4 478.8 32.8L476.4 30.6Q468 26.2 459.6 30.6Z' fill='%23d9e5ef'/%3E%3Cpath d='M468 21L483.7 43.6H452.3Z' fill='%230f2c20'/%3E%3Cpath d='M452.3 43.6Q468 39.2 483.7 43.6L481.3 41.4Q468 37 454.7 41.4Z' fill='%23d9e5ef'/%3E%3Cpath d='M468 33.9L488.5 54.4H447.5Z' fill='%230f2c20'/%3E%3Cpath d='M447.5 54.4Q468 50 488.5 54.4L486.1 52.2Q468 47.8 449.9 52.2Z' fill='%23d9e5ef'/%3E%3Cpath d='M468 8L471.8 14.5H464.2Z' fill='%23e6eef6'/%3E%3Crect x='500.2' y='58.6' width='3.6' height='5.4' fill='%232a1c14'/%3E%3Cpath d='M502 30L508.8 45.6H495.2Z' fill='%230f2c20'/%3E%3Cpath d='M495.2 45.6Q502 41.2 508.8 45.6L506.4 43.4Q502 39 497.6 43.4Z' fill='%23d9e5ef'/%3E%3Cpath d='M502 38.2L511.9 52.4H492.1Z' fill='%230f2c20'/%3E%3Cpath d='M492.1 52.4Q502 48 511.9 52.4L509.5 50.2Q502 45.8 494.5 50.2Z' fill='%23d9e5ef'/%3E%3Cpath d='M502 46.3L514.9 59.2H489.1Z' fill='%230f2c20'/%3E%3Cpath d='M489.1 59.2Q502 54.8 514.9 59.2L512.5 57Q502 52.6 491.5 57Z' fill='%23d9e5ef'/%3E%3Cpath d='M502 30L504.4 34.1H499.6Z' fill='%23e6eef6'/%3E%3Crect x='570.2' y='61.5' width='3.6' height='4.5' fill='%232a1c14'/%3E%3Cpath d='M572 38L577.6 50.9H566.4Z' fill='%230f2c20'/%3E%3Cpath d='M566.4 50.9Q572 46.5 577.6 50.9L575.2 48.7Q572 44.3 568.8 48.7Z' fill='%23d9e5ef'/%3E%3Cpath d='M572 44.7L580.1 56.5H563.9Z' fill='%230f2c20'/%3E%3Cpath d='M563.9 56.5Q572 52.1 580.1 56.5L577.7 54.3Q572 49.9 566.3 54.3Z' fill='%23d9e5ef'/%3E%3Cpath d='M572 51.4L582.6 62.1H561.4Z' fill='%230f2c20'/%3E%3Cpath d='M561.4 62.1Q572 57.7 582.6 62.1L580.2 59.9Q572 55.5 563.8 59.9Z' fill='%23d9e5ef'/%3E%3Cpath d='M572 38L574 41.4H570Z' fill='%23e6eef6'/%3E%3Ccircle cx='328' cy='60' r='26' fill='url(%23w)'/%3E%3Crect x='305' y='51' width='46' height='23' fill='%232c1d16'/%3E%3Cpath d='M340 46V33.6H346.4V46Z' fill='%233b2a22'/%3E%3Cpath d='M339 34.4Q343.2 31 347.4 34.4V35.6H339Z' fill='%23e6eef6'/%3E%3Cpath d='M298.6 53 328 32.4 357.4 53Z' fill='%233b2a22'/%3E%3Cpath d='M296.4 53.4 328 30.6 359.6 53.4 355.2 55 328 35.6 300.8 55Z' fill='%23e6eef6'/%3E%3Crect x='311' y='57' width='9' height='8' rx='1' fill='%23ffd06a'/%3E%3Crect x='336' y='57' width='9' height='8' rx='1' fill='%23ffd06a'/%3E%3Cpath d='M315.5 57V65M311 61H320M340.5 57V65M336 61H345' stroke='%232c1d16' stroke-width='1.1'/%3E%3Crect x='324' y='61' width='8' height='13' rx='1' fill='%235a2a1c'/%3E%3Ccircle cx='328' cy='64.4' r='2.2' fill='none' stroke='%232fbf71' stroke-width='1.3'/%3E%3Ccircle cx='328' cy='66.4' r='.8' fill='%23ff3348'/%3E%3Ccircle cx='402' cy='42' r='16' fill='url(%23w)'/%3E%3Crect x='400.8' y='44' width='2.4' height='28' fill='%231c2633'/%3E%3Crect x='397.6' y='37.6' width='8.8' height='8' rx='1.6' fill='%23ffd98a'/%3E%3Cpath d='M396.8 37.8H407.2L402 34.4Z' fill='%231c2633'/%3E%3Cg transform='translate(0 -6)'%3E%3Crect x='226' y='61' width='17' height='13' rx='1' fill='%23d8253a'/%3E%3Crect x='233.4' y='61' width='2.4' height='13' fill='%23ffd45c'/%3E%3Crect x='226' y='66.4' width='17' height='2.4' fill='%23ffd45c'/%3E%3Cpath d='M234.6 61C231 56.6 228.4 58.6 230.6 60.6ZM234.6 61C238.2 56.6 240.8 58.6 238.6 60.6Z' fill='%23ffd45c'/%3E%3Crect x='243' y='65' width='13' height='9' rx='1' fill='%231f9d5a'/%3E%3Crect x='248.4' y='65' width='2.2' height='9' fill='%23ff4d61'/%3E%3C/g%3E%3Cg transform='translate(0 -5)'%3E%3Crect x='118' y='64' width='11' height='10' rx='1' fill='%234fb3ff'/%3E%3Crect x='122.4' y='64' width='2.2' height='10' fill='%23fff'/%3E%3Crect x='118' y='68' width='11' height='2' fill='%23fff'/%3E%3C/g%3E%3Cpath d='M0 80V67Q50 61 100 65T210 67T330 70T450 64T600 67V80Z' fill='%23c3d3e1'/%3E%3Cpath d='M0 67Q50 61 100 65T210 67T330 70T450 64T600 67' fill='none' stroke='%23eef4fa' stroke-width='1.6'/%3E%3Cpath d='M0 80V73Q80 70 160 72.6T330 74T480 72T600 73V80Z' fill='%23a3b8ca'/%3E%3C/svg%3E") repeat-x left bottom / auto 84px,
    radial-gradient(60% 100% at 50% 100%, rgba(255, 220, 150, 0.08), transparent 70%);
  pointer-events: none;
}

/* ══ Decorations (includes/themes/christmas.php) ═══════════════════════════ */

/* Behind everything: the night sky, twinkling stars, aurora, moon and two
   layers of snow. z-index -1 puts the layer under the page's content but
   over the page background. */
.xm-sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
/* The sky is redrawn every frame (the snow in it moves), so everything in
   it is a plain picture: no CSS gradients or shadows (drawn pixel by pixel
   each time), and no layer with its own opacity or fade unless it is a
   single picture (the browser can then fade it while drawing it; a fading
   layer of many tiles has to be drawn off-screen first, every frame). */
.xm-stars {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='380' height='280' viewBox='0 0 380 280'%3E%3Cdefs%3E%3CradialGradient id='h'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.38'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cg opacity='.57' fill='%23fff'%3E%3Ccircle cx='262.1' cy='216.4' r='1.8' fill='url(%23h)'/%3E%3Ccircle cx='262.1' cy='216.4' r='.6'/%3E%3C/g%3E%3Cg opacity='.68' fill='%23fff'%3E%3Ccircle cx='225' cy='201.6' r='2.2' fill='url(%23h)'/%3E%3Ccircle cx='225' cy='201.6' r='.7'/%3E%3C/g%3E%3Cg opacity='.35' fill='%23fff'%3E%3Ccircle cx='296.3' cy='207.4' r='2.5' fill='url(%23h)'/%3E%3Ccircle cx='296.3' cy='207.4' r='.8'/%3E%3C/g%3E%3Cg opacity='.62' fill='%23ffecc0'%3E%3Ccircle cx='114.2' cy='251' r='1.9' fill='url(%23h)'/%3E%3Ccircle cx='114.2' cy='251' r='.6'/%3E%3C/g%3E%3Cg opacity='.42' fill='%23fff'%3E%3Ccircle cx='96.4' cy='5.3' r='2.7' fill='url(%23h)'/%3E%3Ccircle cx='96.4' cy='5.3' r='.9'/%3E%3C/g%3E%3Cg opacity='.43' fill='%23fff'%3E%3Ccircle cx='46.8' cy='131.6' r='3' fill='url(%23h)'/%3E%3Ccircle cx='46.8' cy='131.6' r='1'/%3E%3C/g%3E%3Cg opacity='.7' fill='%23fff'%3E%3Ccircle cx='322.5' cy='88.8' r='2.1' fill='url(%23h)'/%3E%3Ccircle cx='322.5' cy='88.8' r='.7'/%3E%3C/g%3E%3Cg opacity='.61' fill='%23cfe2ff'%3E%3Ccircle cx='146.7' cy='60.8' r='2.8' fill='url(%23h)'/%3E%3Ccircle cx='146.7' cy='60.8' r='.9'/%3E%3C/g%3E%3Cg opacity='.39' fill='%23ffecc0'%3E%3Ccircle cx='194.4' cy='225.4' r='2.5' fill='url(%23h)'/%3E%3Ccircle cx='194.4' cy='225.4' r='.8'/%3E%3C/g%3E%3Cg opacity='.57' fill='%23fff'%3E%3Ccircle cx='219.5' cy='88.3' r='2.7' fill='url(%23h)'/%3E%3Ccircle cx='219.5' cy='88.3' r='.9'/%3E%3C/g%3E%3Cg opacity='.71' fill='%23fff'%3E%3Ccircle cx='66.6' cy='233.4' r='1.9' fill='url(%23h)'/%3E%3Ccircle cx='66.6' cy='233.4' r='.6'/%3E%3C/g%3E%3Cg opacity='.58' fill='%23fff'%3E%3Ccircle cx='133.4' cy='212.4' r='2' fill='url(%23h)'/%3E%3Ccircle cx='133.4' cy='212.4' r='.7'/%3E%3C/g%3E%3Cg opacity='.43' fill='%23cfe2ff'%3E%3Ccircle cx='30.4' cy='205.8' r='2.3' fill='url(%23h)'/%3E%3Ccircle cx='30.4' cy='205.8' r='.8'/%3E%3C/g%3E%3Cg opacity='.69' fill='%23ffecc0'%3E%3Ccircle cx='325.5' cy='237.1' r='2.4' fill='url(%23h)'/%3E%3Ccircle cx='325.5' cy='237.1' r='.8'/%3E%3C/g%3E%3Cg opacity='.54' fill='%23fff'%3E%3Ccircle cx='205.3' cy='30.8' r='1.9' fill='url(%23h)'/%3E%3Ccircle cx='205.3' cy='30.8' r='.6'/%3E%3C/g%3E%3Cg opacity='.37' fill='%23fff'%3E%3Ccircle cx='95.8' cy='214.7' r='1.7' fill='url(%23h)'/%3E%3Ccircle cx='95.8' cy='214.7' r='.6'/%3E%3C/g%3E%3Cg opacity='.62' fill='%23fff'%3E%3Ccircle cx='363.6' cy='91.4' r='2.6' fill='url(%23h)'/%3E%3Ccircle cx='363.6' cy='91.4' r='.9'/%3E%3C/g%3E%3Cg opacity='.38' fill='%23fff'%3E%3Ccircle cx='297.7' cy='260.9' r='2.4' fill='url(%23h)'/%3E%3Ccircle cx='297.7' cy='260.9' r='.8'/%3E%3C/g%3E%3Cg opacity='.68' fill='%23fff'%3E%3Ccircle cx='153.1' cy='14.5' r='2.1' fill='url(%23h)'/%3E%3Ccircle cx='153.1' cy='14.5' r='.7'/%3E%3C/g%3E%3Cg opacity='.38' fill='%23fff'%3E%3Ccircle cx='291.4' cy='14.6' r='2.7' fill='url(%23h)'/%3E%3Ccircle cx='291.4' cy='14.6' r='.9'/%3E%3C/g%3E%3Cg opacity='.43' fill='%23fff'%3E%3Ccircle cx='252.1' cy='71.2' r='2.5' fill='url(%23h)'/%3E%3Ccircle cx='252.1' cy='71.2' r='.8'/%3E%3C/g%3E%3Cg opacity='.61' fill='%23fff'%3E%3Ccircle cx='374.2' cy='180.1' r='2.2' fill='url(%23h)'/%3E%3Ccircle cx='374.2' cy='180.1' r='.7'/%3E%3C/g%3E%3Cg opacity='.44' fill='%23fff'%3E%3Ccircle cx='69.6' cy='76.3' r='2.7' fill='url(%23h)'/%3E%3Ccircle cx='69.6' cy='76.3' r='.9'/%3E%3C/g%3E%3Cg opacity='.41' fill='%23fff'%3E%3Ccircle cx='255.1' cy='119.3' r='2.4' fill='url(%23h)'/%3E%3Ccircle cx='255.1' cy='119.3' r='.8'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 380px 280px;
}

/* Bright stars twinkle one by one: each is its own little picture. */
.xm-glints i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s, 14px);
  height: var(--s, 14px);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.55'/%3E%3Cstop offset='1' stop-color='%23dbe8ff' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle r='6' fill='url(%23g)'/%3E%3Cpath d='M0-10Q.7-.7 10 0Q.7.7 0 10Q-.7.7-10 0Q-.7-.7 0-10Z' fill='%23eef4ff'/%3E%3Ccircle r='1.5' fill='%23fff'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  animation: xm-glint var(--t, 3s) ease-in-out var(--d, 0s) infinite alternate;
}
.xm-glints i:nth-child(1)  { --x: 7%;  --y: 16%; --s: 16px; --t: 2.6s; --d: -0.4s; }
.xm-glints i:nth-child(2)  { --x: 19%; --y: 44%; --s: 11px; --t: 3.4s; --d: -2.1s; }
.xm-glints i:nth-child(3)  { --x: 28%; --y: 9%;  --s: 13px; --t: 2.9s; --d: -1.2s; }
.xm-glints i:nth-child(4)  { --x: 41%; --y: 31%; --s: 10px; --t: 3.8s; --d: -0.7s; }
.xm-glints i:nth-child(5)  { --x: 53%; --y: 13%; --s: 15px; --t: 3.1s; --d: -2.6s; }
.xm-glints i:nth-child(6)  { --x: 62%; --y: 52%; --s: 10px; --t: 2.4s; --d: -1.6s; }
.xm-glints i:nth-child(7)  { --x: 71%; --y: 24%; --s: 12px; --t: 3.6s; --d: -0.2s; }
.xm-glints i:nth-child(8)  { --x: 83%; --y: 41%; --s: 14px; --t: 2.8s; --d: -1.9s; }
.xm-glints i:nth-child(9)  { --x: 92%; --y: 11%; --s: 11px; --t: 3.3s; --d: -2.9s; }
.xm-glints i:nth-child(10) { --x: 35%; --y: 63%; --s: 9px;  --t: 4s;   --d: -1s; }
.xm-glints i:nth-child(11) { --x: 76%; --y: 68%; --s: 10px; --t: 3s;   --d: -2.3s; }
.xm-glints i:nth-child(12) { --x: 12%; --y: 74%; --s: 12px; --t: 3.5s; --d: -0.9s; }
@keyframes xm-glint { from { opacity: 0.12; transform: scale(0.55) rotate(-20deg); } to { opacity: 1; transform: scale(1) rotate(20deg); } }

/* The aurora is one tiny picture stretched across the sky (it is meant to
   be soft), breathing and drifting sl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KkGFNt61X82lgMALMJmbeuD43zxSYSKmw2llKk5UqLeh9uvvmfr7/+4svP/m78F4FRN1yon5yddMI8u85hcRik2OgCn9dpFNg8xJxnkxfzoYDKpUF+MNdaGaYidkZUUdEn00ozTRpmrIDR2ncr8doTtQu+uMS6rcPu9rtv/vt3X/7JF382/naQSYofN3Y0ey58kt7B4tDzNs2FpbTYIw8HRBIbehCps9ZJ1gmaPhCKGsPKytYBSRsZvG1iXjGbytm0B1q9USVjRXsZMdqgteT5sLupkD//5V/9w6AcNleQORKXHJeO1esvdrv9cc4Psptih+7OAGMdN60TvTWKzzJRu7k62moyqz80t14VsD2+DnHcW56xRSl007NPPv/iy5+/3KR/ilfXmDlRyXn/zT//+s2rV69vd4fjUljvAbeQc99q9JkXJ1VaHeqijuoEQdcArQfLxas/8oHI/act+q7p9AoZDfLLTz/77GcvtkMk575NPs+H/ZtXN9/d3NzuDvMZ7wUxVTUCnUtZtPq7AVZrYZsr4TzHfq9R/uMPGfRHPksCCmncmsa9eLbpE4FYqNy+url5dbvbn5Z8kSM4a75fITv3yvEK2CYvfAk9cE8+Hvk//fgLyKd+3F49227HLqCW+XC3u32z2x9O7XDSR05pAmqRgW3m0kY3/ADvB/ow7R6EqVzq+n7okkfHeT4drczJT+XocZVrWlRnopbVreU43/xhAa/5Rz7YVMlKidJaNHlHfp/rGvt2jWRd2VX3RwF8cXWVolo8qfyIGjXUZyl4okQfHvC9Iq7Koj+aMWcleNga/VEBP9zoJ2vRhxGEj9fH6+P18fp4fbw+Xv9Pr/8FMiKcMCJ0vfIAAAAASUVORK5CYII=") 0 0 / 100% 100% no-repeat;
  opacity: 0.5;
  transform-origin: 50% 0;
  will-change: transform, opacity;
  animation: xm-aurora 14s ease-in-out infinite alternate;
}
@keyframes xm-aurora {
  from { opacity: 0.32; transform: translateX(-3%) scaleY(0.92); }
  to   { opacity: 0.66; transform: translateX(3%) scaleY(1.06); }
}

/* The moon picture includes its halo, so the box is 2.6 moons wide and
   pulled back by 0.8 of a moon on each side. */
.xm-moon {
  --mw: clamp(80px, 10vw, 150px);
  position: absolute;
  top: calc(var(--header-h) + clamp(28px, 6vh, 64px) - var(--mw) * 0.8);
  right: calc(clamp(18px, 7vw, 120px) - var(--mw) * 0.8);
  width: calc(var(--mw) * 2.6);
  aspect-ratio: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 260'%3E%3Cdefs%3E%3CradialGradient id='h'%3E%3Cstop offset='.36' stop-color='%23cde1ff' stop-opacity='.34'/%3E%3Cstop offset='.44' stop-color='%23b4ceff' stop-opacity='.2'/%3E%3Cstop offset='.62' stop-color='%2386b0ff' stop-opacity='.09'/%3E%3Cstop offset='.82' stop-color='%2378aaff' stop-opacity='.035'/%3E%3Cstop offset='1' stop-color='%2378aaff' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='m' cx='.38' cy='.34' r='.72'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.45' stop-color='%23e8f0fa'/%3E%3Cstop offset='1' stop-color='%23b8c9de'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='130' cy='130' r='130' fill='url(%23h)'/%3E%3Ccircle cx='130' cy='130' r='50' fill='url(%23m)'/%3E%3Cg fill='%238ca2c4'%3E%3Ccircle cx='114' cy='118' r='8.6' opacity='.42'/%3E%3Ccircle cx='142' cy='144' r='12.4' opacity='.36'/%3E%3Ccircle cx='146' cy='110' r='5.6' opacity='.3'/%3E%3Ccircle cx='110' cy='150' r='4.6' opacity='.26'/%3E%3C/g%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
}
.xm-moon::after {
  content: '';
  position: absolute;
  inset: 15.4%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23bed7ff' stop-opacity='.22'/%3E%3Cstop offset='.55' stop-color='%23bed7ff' stop-opacity='.1'/%3E%3Cstop offset='1' stop-color='%23bed7ff' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='50' cy='50' r='50' fill='url(%23g)'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  animation: xm-glow 5s ease-in-out infinite alternate;
}
@keyframes xm-glow { from { opacity: 0.45; transform: scale(0.94); } to { opacity: 1; transform: scale(1.06); } }

/* Snow: each layer is one tile repeated over the screen (plus one tile of
   spare above it), sliding down exactly one tile and starting again, so
   the loop is seamless. Its wrapper sways it sideways. Far flakes are small
   and slow, near ones big and quick. */
.xm-drift {
  position: absolute;
  inset: 0;
  will-change: transform;
  animation: xm-sway 9s ease-in-out infinite alternate;
}
.xm-drift--mid  { animation-duration: 7s; animation-delay: -3s; }
.xm-drift--near { animation-duration: 6s; animation-delay: -1s; }
@keyframes xm-sway { from { transform: translateX(-26px); } to { transform: translateX(26px); } }

.xm-snow {
  position: absolute;
  left: -60px;
  right: -60px;
  bottom: 0;
  will-change: transform;
}
.xm-snow--far {
  top: -240px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='%23f6faff'%3E%3Ccircle cx='122.8' cy='127.2' r='1.1' opacity='.58'/%3E%3Ccircle cx='129.1' cy='19.2' r='1.1' opacity='.59'/%3E%3Ccircle cx='115.2' cy='202.4' r='1' opacity='.61'/%3E%3Ccircle cx='38.6' cy='42.8' r='.9' opacity='.51'/%3E%3Ccircle cx='202.6' cy='193.3' r='1.2' opacity='.49'/%3E%3Ccircle cx='60.4' cy='13.5' r='1.2' opacity='.71'/%3E%3Ccircle cx='35.2' cy='178.5' r='1' opacity='.57'/%3E%3Ccircle cx='202.9' cy='34.4' r='1.2' opacity='.66'/%3E%3Ccircle cx='6.1' cy='18.4' r='1.2' opacity='.55'/%3E%3Ccircle cx='64.9' cy='120.5' r='1.2' opacity='.41'/%3E%3Ccircle cx='10.8' cy='106.7' r='1.1' opacity='.71'/%3E%3Ccircle cx='111.9' cy='84.7' r='.8' opacity='.63'/%3E%3Ccircle cx='182.3' cy='72.1' r='1.1' opacity='.5'/%3E%3Ccircle cx='156.4' cy='156.2' r='1.3' opacity='.62'/%3E%3Ccircle cx='159.4' cy='118.2' r='1.1' opacity='.46'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 240px 240px;
  animation: xm-fall-far 18s linear infinite;
}
.xm-snow--mid {
  top: -380px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='380' height='380' viewBox='0 0 380 380'%3E%3Cg fill='%23f6faff'%3E%3Ccircle cx='35.2' cy='26' r='2.2' opacity='.71'/%3E%3Ccircle cx='81.4' cy='194.6' r='2.5' opacity='.89'/%3E%3Ccircle cx='269.3' cy='79.3' r='1.7' opacity='.94'/%3E%3Ccircle cx='179.5' cy='281.7' r='1.6' opacity='.76'/%3E%3Ccircle cx='374.5' cy='80.9' r='2.4' opacity='.68'/%3E%3Ccircle cx='359.5' cy='290.7' r='2.4' opacity='.92'/%3E%3Ccircle cx='340.3' cy='361.7' r='2.3' opacity='.83'/%3E%3Ccircle cx='258.4' cy='340.6' r='2.3' opacity='.6'/%3E%3Ccircle cx='209.5' cy='116.7' r='1.7' opacity='.89'/%3E%3Ccircle cx='236.1' cy='223.3' r='2.2' opacity='.85'/%3E%3Ccircle cx='167.5' cy='24' r='1.8' opacity='.6'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 380px 380px;
  animation: xm-fall-mid 13s linear infinite;
}
.xm-snow--near {
  top: -600px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cdefs%3E%3CradialGradient id='f'%3E%3Cstop offset='.66' stop-color='%23f8fbff'/%3E%3Cstop offset='.8' stop-color='%23f8fbff' stop-opacity='.55'/%3E%3Cstop offset='1' stop-color='%23f8fbff' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cg fill='url(%23f)'%3E%3Ccircle cx='309.8' cy='-1.7' r='4.5' opacity='.74'/%3E%3Ccircle cx='309.8' cy='598.3' r='4.5' opacity='.74'/%3E%3Ccircle cx='529.6' cy='576.8' r='5' opacity='.7'/%3E%3Ccircle cx='65.3' cy='284.7' r='4.8' opacity='.72'/%3E%3Ccircle cx='452.2' cy='187.5' r='6' opacity='.67'/%3E%3Ccircle cx='246.7' cy='472.1' r='6.1' opacity='.67'/%3E%3Ccircle cx='49' cy='441' r='5.6' opacity='.63'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 600px 600px;
  animation: xm-fall-near 10s linear infinite;
}
@keyframes xm-fall-far  { to { transform: translate3d(0, 240px, 0); } }
@keyframes xm-fall-mid  { to { transform: translate3d(0, 380px, 0); } }
@keyframes xm-fall-near { to { transform: translate3d(0, 600px, 0); } }

/* In front: fairy lights, the near snow, snowflakes, Santa's sleigh,
   baubles and a snowman. Under the header (z 100) and never in the way of
   a click. */
.xm-fx {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
}

/* Fairy lights hang along the header's bottom edge. The wire and bulbs are
   one picture; two layers of lit bulbs (alternate bulbs) breathe at
   different speeds, and a third flashes a few bulbs white now and then. */
.xm-lights {
  position: absolute;
  top: calc(var(--header-h) + 1px);
  left: 0;
  right: 0;
  height: 50px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='40' viewBox='0 0 200 40'%3E%3Cpath d='M0 1.5Q100 22.5 200 1.5' fill='none' stroke='%232b4a37' stroke-width='1.3'/%3E%3Cg transform='translate(20 5.3) rotate(8)'%3E%3Cpath d='M-3.4 3.6C-4.4 8.6-1.8 13.6 0 15.2C1.8 13.6 4.4 8.6 3.4 3.6Z' fill='%23a5243a'/%3E%3Crect x='-2.3' y='-.8' width='4.6' height='5' rx='1.2' fill='%23173022'/%3E%3C/g%3E%3Cpath transform='translate(20 5.3) rotate(8)' d='M-1.8 5.4C-2.4 8.2-1.4 10.8-.4 12.2' fill='none' stroke='%23fff' stroke-opacity='.4' stroke-width='.9' stroke-linecap='round'/%3E%3Cg transform='translate(60 10.3) rotate(-5)'%3E%3Cpath d='M-3.4 3.6C-4.4 8.6-1.8 13.6 0 15.2C1.8 13.6 4.4 8.6 3.4 3.6Z' fill='%231e7d49'/%3E%3Crect x='-2.3' y='-.8' width='4.6' height='5' rx='1.2' fill='%23173022'/%3E%3C/g%3E%3Cpath transform='translate(60 10.3) rotate(-5)' d='M-1.8 5.4C-2.4 8.2-1.4 10.8-.4 12.2' fill='none' stroke='%23fff' stroke-opacity='.4' stroke-width='.9' stroke-linecap='round'/%3E%3Cg transform='translate(100 12) rotate(6)'%3E%3Cpath d='M-3.4 3.6C-4.4 8.6-1.8 13.6 0 15.2C1.8 13.6 4.4 8.6 3.4 3.6Z' fill='%23a87d21'/%3E%3Crect x='-2.3' y='-.8' width='4.6' height='5' rx='1.2' fill='%23173022'/%3E%3C/g%3E%3Cpath transform='translate(100 12) rotate(6)' d='M-1.8 5.4C-2.4 8.2-1.4 10.8-.4 12.2' fill='none' stroke='%23fff' stroke-opacity='.4' stroke-width='.9' stroke-linecap='round'/%3E%3Cg transform='translate(140 10.3) rotate(-7)'%3E%3Cpath d='M-3.4 3.6C-4.4 8.6-1.8 13.6 0 15.2C1.8 13.6 4.4 8.6 3.4 3.6Z' fill='%232a5fa3'/%3E%3Crect x='-2.3' y='-.8' width='4.6' height='5' rx='1.2' fill='%23173022'/%3E%3C/g%3E%3Cpath transform='translate(140 10.3) rotate(-7)' d='M-1.8 5.4C-2.4 8.2-1.4 10.8-.4 12.2' fill='none' stroke='%23fff' stroke-opacity='.4' stroke-width='.9' stroke-linecap='round'/%3E%3Cg transform='translate(180 5.3) rotate(5)'%3E%3Cpath d='M-3.4 3.6C-4.4 8.6-1.8 13.6 0 15.2C1.8 13.6 4.4 8.6 3.4 3.6Z' fill='%23952a83'/%3E%3Crect x='-2.3' y='-.8' width='4.6' height='5' rx='1.2' fill='%23173022'/%3E%3C/g%3E%3Cpath transform='translate(180 5.3) rotate(5)' d='M-1.8 5.4C-2.4 8.2-1.4 10.8-.4 12.2' fill='none' stroke='%23fff' stroke-opacity='.4' stroke-width='.9' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 50% 0 / 250px 50px;
}
.xm-lights i {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='40' viewBox='0 0 200 40'%3E%3Cdefs%3E%3C/defs%3E%3Cg transform='translate(20 5.3) rotate(8)'%3E%3Ccircle cy='9' r='15' fill='url(%23red)'/%3E%3Cpath d='M-3.4 3.6C-4.4 8.6-1.8 13.6 0 15.2C1.8 13.6 4.4 8.6 3.4 3.6Z' fill='%23ff4d61'/%3E%3Crect x='-2.3' y='-.8' width='4.6' height='5' rx='1.2' fill='%23173022'/%3E%3C/g%3E%3Cellipse transform='translate(20 5.3) rotate(8)' cy='8.6' rx='1.5' ry='3.4' fill='%23fff' opacity='.8'/%3E%3Cg transform='translate(100 12) rotate(6)'%3E%3Ccircle cy='9' r='15' fill='url(%23gold)'/%3E%3Cpath d='M-3.4 3.6C-4.4 8.6-1.8 13.6 0 15.2C1.8 13.6 4.4 8.6 3.4 3.6Z' fill='%23ffd45c'/%3E%3Crect x='-2.3' y='-.8' width='4.6' height='5' rx='1.2' fill='%23173022'/%3E%3C/g%3E%3Cellipse transform='translate(100 12) rotate(6)' cy='8.6' rx='1.5' ry='3.4' fill='%23fff' opacity='.8'/%3E%3Cg transform='translate(180 5.3) rotate(5)'%3E%3Ccircle cy='9' r='15' fill='url(%23magenta)'/%3E%3Cpath d='M-3.4 3.6C-4.4 8.6-1.8 13.6 0 15.2C1.8 13.6 4.4 8.6 3.4 3.6Z' fill='%23ff70d8'/%3E%3Crect x='-2.3' y='-.8' width='4.6' height='5' rx='1.2' fill='%23173022'/%3E%3C/g%3E%3Cellipse transform='translate(180 5.3) rotate(5)' cy='8.6' rx='1.5' ry='3.4' fill='%23fff' opacity='.8'/%3E%3C/svg%3E") repeat-x 50% 0 / 250px 50px;
  animation: xm-bulbs 1.9s ease-in-out infinite alternate;
}
.xm-lights i + i {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='40' viewBox='0 0 200 40'%3E%3Cdefs%3E%3C/defs%3E%3Cg transform='translate(60 10.3) rotate(-5)'%3E%3Ccircle cy='9' r='15' fill='url(%23green)'/%3E%3Cpath d='M-3.4 3.6C-4.4 8.6-1.8 13.6 0 15.2C1.8 13.6 4.4 8.6 3.4 3.6Z' fill='%234dffa0'/%3E%3Crect x='-2.3' y='-.8' width='4.6' height='5' rx='1.2' fill='%23173022'/%3E%3C/g%3E%3Cellipse transform='translate(60 10.3) rotate(-5)' cy='8.6' rx='1.5' ry='3.4' fill='%23fff' opacity='.8'/%3E%3Cg transform='translate(140 10.3) rotate(-7)'%3E%3Ccircle cy='9' r='15' fill='url(%23blue)'/%3E%3Cpath d='M-3.4 3.6C-4.4 8.6-1.8 13.6 0 15.2C1.8 13.6 4.4 8.6 3.4 3.6Z' fill='%2362ccff'/%3E%3Crect x='-2.3' y='-.8' width='4.6' height='5' rx='1.2' fill='%23173022'/%3E%3C/g%3E%3Cellipse transform='translate(140 10.3) rotate(-7)' cy='8.6' rx='1.5' ry='3.4' fill='%23fff' opacity='.8'/%3E%3C/svg%3E");
  animation-duration: 2.7s;
  animation-delay: -1.2s;
}
.xm-lights i + i + i {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='40' viewBox='0 0 600 40'%3E%3Cdefs%3E%3CradialGradient id='w'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.8'/%3E%3Cstop offset='.3' stop-color='%23fff6d8' stop-opacity='.28'/%3E%3Cstop offset='1' stop-color='%23fff6d8' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='140' cy='19.3' r='20' fill='url(%23w)'/%3E%3Cellipse cx='140' cy='18.9' rx='2.2' ry='4.4' fill='%23fff'/%3E%3Ccircle cx='260' cy='19.3' r='20' fill='url(%23w)'/%3E%3Cellipse cx='260' cy='18.9' rx='2.2' ry='4.4' fill='%23fff'/%3E%3Ccircle cx='580' cy='14.3' r='20' fill='url(%23w)'/%3E%3Cellipse cx='580' cy='13.9' rx='2.2' ry='4.4' fill='%23fff'/%3E%3C/svg%3E") repeat-x 50% 0 / 750px 50px;
  animation: xm-flash 4.6s linear -0.8s infinite;
}
@keyframes xm-bulbs { from { opacity: 0.18; } to { opacity: 1; } }
@keyframes xm-flash {
  0%, 62%, 100% { opacity: 0; }
  68%           { opacity: 1; }
  80%           { opacity: 0; }
}

/* Baubles swing on their strings from the lights, in the left margin
   (wide screens only, so they never hang over the page). */
.xm-baubles {
  position: absolute;
  top: calc(var(--header-h) + 6px);
  left: calc((100vw - var(--container)) / 4 - 62px);
  width: 124px;
  display: none;
}
.xm-bauble {
  position: absolute;
  top: 0;
  left: var(--x);
  width: var(--w, 30px);
  height: calc(var(--len) + var(--w, 30px) * 4 / 3);
  transform-origin: 50% 0;
  animation: xm-swing var(--t) ease-in-out var(--d) infinite alternate;
}
.xm-bauble::before {
  content: '';
  position: absolute;
  left: calc(50% - 0.5px);
  top: 0;
  width: 1px;
  height: calc(var(--len) + var(--w, 30px) * 0.2);
  background: #c9b27a;
}
.xm-bauble::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 40'%3E%3Cdefs%3E%3CradialGradient id='r' cx='.38' cy='.34' r='.75'%3E%3Cstop offset='0' stop-color='%23ff9aa6'/%3E%3Cstop offset='.45' stop-color='%23e3223d'/%3E%3Cstop offset='1' stop-color='%2386091e'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='15' cy='25' r='13.6' fill='url(%23r)'/%3E%3Cpath d='M2.4 22.6Q15 28.4 27.6 22.6' fill='none' stroke='%23ffd45c' stroke-width='1.6' stroke-dasharray='.1 3.4' stroke-linecap='round'/%3E%3Cpath d='M2 27.4Q15 33 28 27.4' fill='none' stroke='%23ffd45c' stroke-width='1' opacity='.8'/%3E%3Cellipse cx='9.6' cy='18.6' rx='2.6' ry='4.4' transform='rotate(-28 9.6 18.6)' fill='%23fff' opacity='.55'/%3E%3Crect x='11' y='7.6' width='8' height='5.2' rx='1.2' fill='%23e8bf55'/%3E%3Crect x='11' y='10.4' width='8' height='1.2' fill='%23b88a2a'/%3E%3Cpath d='M13 7.8Q15 3 17 7.8' fill='none' stroke='%23e8bf55' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
}
.xm-bauble--1 { --x: 0px;  --len: 46px; --t: 3.4s; --d: -1.1s; }
.xm-bauble--2 { --x: 44px; --len: 96px; --t: 4.3s; --d: -2.6s; --w: 36px; }
.xm-bauble--3 { --x: 92px; --len: 22px; --t: 3.8s; --d: -0.4s; }
.xm-bauble--2::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 40'%3E%3Cdefs%3E%3CradialGradient id='g' cx='.38' cy='.34' r='.75'%3E%3Cstop offset='0' stop-color='%23fff3be'/%3E%3Cstop offset='.45' stop-color='%23f2b52c'/%3E%3Cstop offset='1' stop-color='%238f620c'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='15' cy='25' r='13.6' fill='url(%23g)'/%3E%3Cpath d='M2.4 22.6Q15 28.4 27.6 22.6' fill='none' stroke='%23fff' stroke-width='1.6' stroke-dasharray='.1 3.4' stroke-linecap='round'/%3E%3Cpath d='M2 27.4Q15 33 28 27.4' fill='none' stroke='%23fff' stroke-width='1' opacity='.8'/%3E%3Cellipse cx='9.6' cy='18.6' rx='2.6' ry='4.4' transform='rotate(-28 9.6 18.6)' fill='%23fff' opacity='.55'/%3E%3Crect x='11' y='7.6' width='8' height='5.2' rx='1.2' fill='%23e8bf55'/%3E%3Crect x='11' y='10.4' width='8' height='1.2' fill='%23b88a2a'/%3E%3Cpath d='M13 7.8Q15 3 17 7.8' fill='none' stroke='%23e8bf55' stroke-width='1.2'/%3E%3C/svg%3E"); }
.xm-bauble--3::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 40'%3E%3Cdefs%3E%3CradialGradient id='n' cx='.38' cy='.34' r='.75'%3E%3Cstop offset='0' stop-color='%239cf5c0'/%3E%3Cstop offset='.45' stop-color='%231fa85e'/%3E%3Cstop offset='1' stop-color='%2308502c'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='15' cy='25' r='13.6' fill='url(%23n)'/%3E%3Cpath d='M2.4 22.6Q15 28.4 27.6 22.6' fill='none' stroke='%23ffd45c' stroke-width='1.6' stroke-dasharray='.1 3.4' stroke-linecap='round'/%3E%3Cpath d='M2 27.4Q15 33 28 27.4' fill='none' stroke='%23ffd45c' stroke-width='1' opacity='.8'/%3E%3Cellipse cx='9.6' cy='18.6' rx='2.6' ry='4.4' transform='rotate(-28 9.6 18.6)' fill='%23fff' opacity='.55'/%3E%3Crect x='11' y='7.6' width='8' height='5.2' rx='1.2' fill='%23e8bf55'/%3E%3Crect x='11' y='10.4' width='8' height='1.2' fill='%23b88a2a'/%3E%3Cpath d='M13 7.8Q15 3 17 7.8' fill='none' stroke='%23e8bf55' stroke-width='1.2'/%3E%3C/svg%3E"); }
@keyframes xm-swing { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@media (min-width: 1480px) { .xm-baubles { display: block; } }

/* Snowflake crystals tumble down the screen. Each one is a different size,
   place, speed and start time; a negative delay means it is already on its
   way when the page opens. */
.xm-flake {
  position: absolute;
  top: 0;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  opacity: var(--o, 0.85);
  will-change: transform;
  animation: xm-flake-fall var(--t) linear var(--d) infinite;
}
.xm-flake::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24'%3E%3Cg fill='none' stroke='%23eef6ff' stroke-width='1.25' stroke-linecap='round'%3E%3Cpath d='M0 0V-10.6M0-4.6-2.8-7M0-4.6 2.8-7M0-7.8-1.9-9.4M0-7.8 1.9-9.4'/%3E%3Cg transform='rotate(60)'%3E%3Cpath d='M0 0V-10.6M0-4.6-2.8-7M0-4.6 2.8-7M0-7.8-1.9-9.4M0-7.8 1.9-9.4'/%3E%3C/g%3E%3Cg transform='rotate(120)'%3E%3Cpath d='M0 0V-10.6M0-4.6-2.8-7M0-4.6 2.8-7M0-7.8-1.9-9.4M0-7.8 1.9-9.4'/%3E%3C/g%3E%3Cg transform='rotate(180)'%3E%3Cpath d='M0 0V-10.6M0-4.6-2.8-7M0-4.6 2.8-7M0-7.8-1.9-9.4M0-7.8 1.9-9.4'/%3E%3C/g%3E%3Cg transform='rotate(240)'%3E%3Cpath d='M0 0V-10.6M0-4.6-2.8-7M0-4.6 2.8-7M0-7.8-1.9-9.4M0-7.8 1.9-9.4'/%3E%3C/g%3E%3Cg transform='rotate(300)'%3E%3Cpath d='M0 0V-10.6M0-4.6-2.8-7M0-4.6 2.8-7M0-7.8-1.9-9.4M0-7.8 1.9-9.4'/%3E%3C/g%3E%3C/g%3E%3Ccircle r='1.5' fill='%23eef6ff'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  animation: xm-flake-sway var(--w) ease-in-out infinite alternate;
}
.xm-flake--1 { --x: 5%;  --s: 22px; --t: 19s; --d: -3s;  --w: 3.6s; }
.xm-flake--2 { --x: 17%; --s: 15px; --t: 24s; --d: -14s; --w: 4.4s; --o: 0.6; }
.xm-flake--3 { --x: 31%; --s: 28px; --t: 17s; --d: -9s;  --w: 3.2s; }
.xm-flake--4 { --x: 49%; --s: 18px; --t: 22s; --d: -18s; --w: 4s;   --o: 0.7; }
.xm-flake--5 { --x: 64%; --s: 24px; --t: 20s; --d: -6s;  --w: 3.8s; }
.xm-flake--6 { --x: 79%; --s: 16px; --t: 26s; --d: -21s; --w: 4.6s; --o: 0.6; }
.xm-flake--7 { --x: 92%; --s: 26px; --t: 18s; --d: -12s; --w: 3.4s; }
@keyframes xm-flake-fall { from { transform: translate3d(0, -12vh, 0); } to { transform: translate3d(0, 108vh, 0); } }
@keyframes xm-flake-sway { from { transform: translateX(-24px) rotate(-60deg); } to { transform: translateX(24px) rotate(60deg); } }

/* Santa's sleigh crosses the sky (past the moon) every 32 seconds, bobbing
   on the way, with Rudolph's nose glowing and a trail of sparkles. */
.xm-sleigh {
  position: absolute;
  left: 0;
  top: calc(var(--header-h) + 6vh);
  width: clamp(165px, 14.5vw, 270px);
  aspect-ratio: 3 / 1;
  will-change: transform;
  animation: xm-sleigh 32s linear -3s infinite;
}
@keyframes xm-sleigh {
  0%        { transform: translate3d(-100%, 46px, 0); }
  42%, 100% { transform: translate3d(100vw, -34px, 0); }
}
.xm-sleigh-bob {
  position: relative;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 80'%3E%3Cpath d='M58 45Q82 39 104 42M104 41Q128 34 152 35M152 34Q176 27 200 28' fill='none' stroke='%23f0cd7a' stroke-width='1' stroke-linecap='round'/%3E%3Cg transform='translate(86 22)'%3E%3Cpath d='M14 23 6 25.4 2.6 24M16.4 24.4 9.6 30.4H6.4' fill='none' stroke='%235f3a22' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.6 18.4 5.6 15.6 7 19.4Z' fill='%23efe2cf'/%3E%3Cellipse cx='22' cy='20' rx='12.4' ry='6.6' fill='%238e5b35'/%3E%3Cellipse cx='22.6' cy='23.2' rx='9' ry='3' fill='%23b98a5c'/%3E%3Cpath d='M29.4 17.4 36.6 8.8 41 11 35.4 21.6Z' fill='%238e5b35'/%3E%3Cellipse cx='40.4' cy='9.6' rx='5.2' ry='3.5' transform='rotate(-12 40.4 9.6)' fill='%238e5b35'/%3E%3Cellipse cx='45' cy='10.8' rx='2.8' ry='2.1' fill='%237a4a2a'/%3E%3Cpath d='M37.2 7.2 33.8 5.2 35.8 8.6Z' fill='%236e4326'/%3E%3Cpath d='M39 6.4 37 .8M38.2 3.6 35 2.4M41.2 6 43.4.4M42.4 2.6 45.4 1.6' fill='none' stroke='%23e0c08e' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M31 23 39 26.2 42.2 25.2M29.2 24.4 35 30.4H38.2' fill='none' stroke='%236e4428' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M17.6 13.8Q20.2 20 17.6 26.2' fill='none' stroke='%23c81e3a' stroke-width='2.2'/%3E%3Ccircle cx='17.6' cy='27.4' r='1.7' fill='%23ffd45c'/%3E%3Ccircle cx='41.6' cy='8.6' r='.75' fill='%231a0f0a'/%3E%3Ccircle cx='47.4' cy='10.6' r='1.1' fill='%232a160c'/%3E%3C/g%3E%3Cg transform='translate(134 15)'%3E%3Cpath d='M14 23 6 25.4 2.6 24M16.4 24.4 9.6 30.4H6.4' fill='none' stroke='%235f3a22' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.6 18.4 5.6 15.6 7 19.4Z' fill='%23efe2cf'/%3E%3Cellipse cx='22' cy='20' rx='12.4' ry='6.6' fill='%238e5b35'/%3E%3Cellipse cx='22.6' cy='23.2' rx='9' ry='3' fill='%23b98a5c'/%3E%3Cpath d='M29.4 17.4 36.6 8.8 41 11 35.4 21.6Z' fill='%238e5b35'/%3E%3Cellipse cx='40.4' cy='9.6' rx='5.2' ry='3.5' transform='rotate(-12 40.4 9.6)' fill='%238e5b35'/%3E%3Cellipse cx='45' cy='10.8' rx='2.8' ry='2.1' fill='%237a4a2a'/%3E%3Cpath d='M37.2 7.2 33.8 5.2 35.8 8.6Z' fill='%236e4326'/%3E%3Cpath d='M39 6.4 37 .8M38.2 3.6 35 2.4M41.2 6 43.4.4M42.4 2.6 45.4 1.6' fill='none' stroke='%23e0c08e' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M31 23 39 26.2 42.2 25.2M29.2 24.4 35 30.4H38.2' fill='none' stroke='%236e4428' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M17.6 13.8Q20.2 20 17.6 26.2' fill='none' stroke='%23c81e3a' stroke-width='2.2'/%3E%3Ccircle cx='17.6' cy='27.4' r='1.7' fill='%23ffd45c'/%3E%3Ccircle cx='41.6' cy='8.6' r='.75' fill='%231a0f0a'/%3E%3Ccircle cx='47.4' cy='10.6' r='1.1' fill='%232a160c'/%3E%3C/g%3E%3Cg transform='translate(182 8)'%3E%3Cpath d='M14 23 6 25.4 2.6 24M16.4 24.4 9.6 30.4H6.4' fill='none' stroke='%235f3a22' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.6 18.4 5.6 15.6 7 19.4Z' fill='%23efe2cf'/%3E%3Cellipse cx='22' cy='20' rx='12.4' ry='6.6' fill='%238e5b35'/%3E%3Cellipse cx='22.6' cy='23.2' rx='9' ry='3' fill='%23b98a5c'/%3E%3Cpath d='M29.4 17.4 36.6 8.8 41 11 35.4 21.6Z' fill='%238e5b35'/%3E%3Cellipse cx='40.4' cy='9.6' rx='5.2' ry='3.5' transform='rotate(-12 40.4 9.6)' fill='%238e5b35'/%3E%3Cellipse cx='45' cy='10.8' rx='2.8' ry='2.1' fill='%237a4a2a'/%3E%3Cpath d='M37.2 7.2 33.8 5.2 35.8 8.6Z' fill='%236e4326'/%3E%3Cpath d='M39 6.4 37 .8M38.2 3.6 35 2.4M41.2 6 43.4.4M42.4 2.6 45.4 1.6' fill='none' stroke='%23e0c08e' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M31 23 39 26.2 42.2 25.2M29.2 24.4 35 30.4H38.2' fill='none' stroke='%236e4428' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M17.6 13.8Q20.2 20 17.6 26.2' fill='none' stroke='%23c81e3a' stroke-width='2.2'/%3E%3Ccircle cx='17.6' cy='27.4' r='1.7' fill='%23ffd45c'/%3E%3Ccircle cx='41.6' cy='8.6' r='.75' fill='%231a0f0a'/%3E%3Ccircle cx='47.6' cy='10.8' r='2.1' fill='%23ff3348'/%3E%3Ccircle cx='47' cy='10.2' r='.7' fill='%23ffc2c8'/%3E%3C/g%3E%3Cg transform='translate(0 22)'%3E%3Cpath d='M4 52H66C76 52 80 44 73.6 38.4M18 44V52M52 44V52' fill='none' stroke='%23ffcf5a' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M19 30.6C16.6 22 20.4 13.6 27.4 13C33.6 12.6 35.8 20 34.6 30.6Z' fill='%237a5232'/%3E%3Crect x='21' y='9.6' width='7.4' height='6.4' rx='1' fill='%232fbf71'/%3E%3Crect x='24' y='9.6' width='1.6' height='6.4' fill='%23ffd45c'/%3E%3Crect x='27.4' y='7.6' width='6.4' height='6.4' rx='1' fill='%234fb3ff' transform='rotate(10 30.6 10.8)'/%3E%3Cpath d='M28 24C32 21 44 20 51 23L50 34H33Z' fill='%23e0263c'/%3E%3Crect x='33' y='27.4' width='17.6' height='2.6' fill='%231b1b22'/%3E%3Crect x='39.6' y='27' width='3.6' height='3.4' rx='.6' fill='none' stroke='%23ffd45c' stroke-width='.9'/%3E%3Ccircle cx='44' cy='15.4' r='5' fill='%23f2c4a0'/%3E%3Cpath d='M38.8 15.2C38.6 22.4 42.6 24.4 45 24.4C48.4 24.4 50.4 20.2 49.6 15.2C47.4 17.4 41.2 17.4 38.8 15.2Z' fill='%23f5f7fb'/%3E%3Cpath d='M39.4 13.4C39.8 7.2 45 5 50.2 7.8C53.4 9.6 54.6 12.8 53.8 15.4L51 14.2C50.6 12.4 49.6 11.4 48.4 11.2L49.8 13.2Z' fill='%23d6203a'/%3E%3Crect x='38.4' y='11.6' width='12.4' height='3.2' rx='1.6' fill='%23f3f6fb'/%3E%3Ccircle cx='54' cy='15.8' r='2.1' fill='%23fff'/%3E%3Cpath d='M47 25.4 56.4 23' fill='none' stroke='%23e0263c' stroke-width='3.4' stroke-linecap='round'/%3E%3Ccircle cx='57' cy='22.8' r='1.9' fill='%231f3a2b'/%3E%3Cpath d='M8.4 46C3.6 40 4 24 10.2 18C13.6 14.8 18 16.4 17.6 20.4C17.4 23 14.6 23.4 14.4 26.4L16.4 32.4H58.4C64.4 32.4 66.6 36.4 70.4 38.4C72.8 40.2 72.6 44.2 70.6 46Z' fill='%23d8253a'/%3E%3Cpath d='M15.6 36.4H62.8C65.6 37.4 66.6 40.4 65.6 43H13.8C12.2 40.4 13.2 37.4 15.6 36.4Z' fill='%23b01a30'/%3E%3Cpath d='M14.4 26.4 16.4 32.4H58.4C64.4 32.4 66.6 36.4 70.4 38.4' fill='none' stroke='%23ffcf5a' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M10.6 22.4C9 28 9.4 36 11.4 42' fill='none' stroke='%23ff6070' stroke-width='1.2' stroke-linecap='round' opacity='.7'/%3E%3C/g%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  animation: xm-bob 1.8s ease-in-out infinite alternate;
}
@keyframes xm-bob { from { transform: translateY(-5px) rotate(-4deg); } to { transform: translateY(6px) rotate(-1deg); } }
.xm-nose {
  position: absolute;
  left: 95.7%;
  top: 23.5%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 70, 90, 0.95), rgba(255, 50, 72, 0.35) 45%, rgba(255, 50, 72, 0));
  animation: xm-nose 1.1s ease-in-out infinite alternate;
}
@keyframes xm-nose { from { opacity: 0.35; transform: scale(0.7); } to { opacity: 1; transform: scale(1.15); } }
.xm-spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23ffe7a0' stop-opacity='.7'/%3E%3Cstop offset='1' stop-color='%23ffe7a0' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle r='8' fill='url(%23g)'/%3E%3Cpath d='M0-10Q1.1-1.1 10 0Q1.1 1.1 0 10Q-1.1 1.1-10 0Q-1.1-1.1 0-10Z' fill='%23fff4cc'/%3E%3Ccircle r='1.8' fill='%23fff'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  animation: xm-spark 0.9s ease-in-out var(--d) infinite alternate;
}
.xm-spark--1 { --x: -3%;  --y: 70%; --s: 16px; --d: 0s; }
.xm-spark--2 { --x: -10%; --y: 58%; --s: 13px; --d: -0.3s; }
.xm-spark--3 { --x: -16%; --y: 80%; --s: 11px; --d: -0.6s; }
.xm-spark--4 { --x: -23%; --y: 66%; --s: 9px;  --d: -0.15s; }
.xm-spark--5 { --x: -30%; --y: 86%; --s: 7px;  --d: -0.45s; }
.xm-spark--6 { --x: -37%; --y: 74%; --s: 6px;  --d: -0.75s; }
@keyframes xm-spark { from { opacity: 0.1; transform: scale(0.45) rotate(0deg); } to { opacity: 1; transform: scale(1) rotate(45deg); } }

/* A snowman peeks up from the bottom-left corner and waves now and then
   (only where the page's left margin is wide enough for him, so he never
   stands in front of a button). */
.xm-snowman {
  display: none;
  position: absolute;
  left: 16px;
  bottom: -18px;
  width: 86px;
  aspect-ratio: 80 / 96;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 96'%3E%3Cdefs%3E%3CradialGradient id='s' cx='.36' cy='.3' r='.8'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.62' stop-color='%23e4edf6'/%3E%3Cstop offset='1' stop-color='%23a9bccf'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M21 70 4.6 57.6M10.4 62 6.6 66.6M8.6 60.4 3.4 61' fill='none' stroke='%236b4a2b' stroke-width='2.4' stroke-linecap='round'/%3E%3Ccircle cx='40' cy='84' r='27' fill='url(%23s)'/%3E%3Ccircle cx='40' cy='41' r='17.4' fill='url(%23s)'/%3E%3Cpath d='M23.4 53.6C31 59.4 49 59.4 56.6 53.6L57.4 60C49 65.4 31 65.4 22.6 60Z' fill='%23d6203a'/%3E%3Cpath d='M25.6 56.8C32 60.4 48 60.4 54.4 56.8' fill='none' stroke='%23ffd45c' stroke-width='1.4' stroke-dasharray='2.4 2.4'/%3E%3Cpath d='M45.4 59.4 51.6 77.6 44.6 79 41.6 60.4Z' fill='%23bd1830'/%3E%3Cpath d='M44.8 76.4 51.4 75.2M44.2 73 50.4 71.8' stroke='%23ffd45c' stroke-width='1.1'/%3E%3Crect x='21.4' y='22' width='37.2' height='4.8' rx='2.2' fill='%231b1f2a'/%3E%3Crect x='26.6' y='3.6' width='26.8' height='20' rx='2.4' fill='%23232a3b'/%3E%3Crect x='26.6' y='16.8' width='26.8' height='4.4' fill='%23d6203a'/%3E%3Cpath d='M48 17.6C50.6 14.6 54.4 15.6 55 17.6C52.6 17 50.8 18.8 48 17.6ZM48 17.6C47 14 43.6 13.4 42.4 15C44.8 15.4 45.8 17.6 48 17.6Z' fill='%232fbf71'/%3E%3Ccircle cx='48' cy='18.6' r='1.6' fill='%23ff3348'/%3E%3Ccircle cx='34' cy='37.4' r='2.1' fill='%231b1f2a'/%3E%3Ccircle cx='46.4' cy='37.4' r='2.1' fill='%231b1f2a'/%3E%3Cpath d='M40.4 41.6 55.4 45.2 40.4 46.4Z' fill='%23ff8a1f'/%3E%3Cpath d='M40.4 44.2 52 45.6' stroke='%23d8640c' stroke-width='.8'/%3E%3Ccircle cx='32.4' cy='49' r='1.2' fill='%231b1f2a'/%3E%3Ccircle cx='36.2' cy='51.2' r='1.2' fill='%231b1f2a'/%3E%3Ccircle cx='40.4' cy='51.8' r='1.2' fill='%231b1f2a'/%3E%3Ccircle cx='44.6' cy='51.2' r='1.2' fill='%231b1f2a'/%3E%3Ccircle cx='40' cy='71' r='2.3' fill='%231b1f2a'/%3E%3Ccircle cx='40' cy='81' r='2.3' fill='%231b1f2a'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  transform-origin: 50% 100%;
  animation: xm-wobble 5s ease-in-out infinite;
}
.xm-snowman::after {
  content: '';
  position: absolute;
  left: 72.5%;
  top: 41.7%;
  width: 37.5%;
  aspect-ratio: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M2 28 25 6M20 11 27 11.4M23 8.2 22.4 1.6' fill='none' stroke='%236b4a2b' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  transform-origin: 6.7% 93.3%;
  animation: xm-wave 4.4s ease-in-out infinite;
}
@keyframes xm-wobble {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg) translateY(-3px); }
}
@media (min-width: 1420px) { .xm-snowman { display: block; } }
@keyframes xm-wave {
  0%, 52%, 100% { transform: rotate(0deg); }
  10%, 30%      { transform: rotate(-26deg); }
  20%, 40%      { transform: rotate(6deg); }
}

/* ── Smaller screens: fewer, smaller decorations, nothing over the text ── */
@media (max-width: 760px) {
  .xm-flake--2, .xm-flake--4, .xm-flake--6 { display: none; }
  .xm-lights, .xm-lights i { background-size: 180px 36px; height: 36px; }
  .xm-lights i + i + i { background-size: 540px 36px; }
  .xm-moon { --mw: 64px; top: calc(var(--header-h) + 44px - var(--mw) * 0.8); right: calc(14px - var(--mw) * 0.8); }
  .theme-christmas .site-header::before,
  .theme-christmas .site-header::after { width: 48px; height: 48px; }
  .theme-christmas .site-footer::before { height: 60px; background-size: auto 60px, auto; }
}

/* ── Reduced motion: keep the look, drop the movement ────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .xm-sleigh, .xm-flake, .xm-baubles, .xm-snowman { display: none; }
  .xm-drift, .xm-snow, .xm-aurora, .xm-glints i, .xm-moon::after,
  .xm-lights i { animation: none; }
  .xm-lights i + i + i { opacity: 0; }
}
