/* cs-xmas v1.1 (no icicles) - Card-Star Christmas decorations. Loaded only while storage/xmas.on exists. */

/* ---------- listing cards ---------- */
.xm-rel{position:relative!important}
.xm-out{overflow:visible!important}
.xm-nozoom{transform:none!important}
.xm-deco{position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;z-index:3;display:block;margin:0!important;padding:0!important;border:0!important;background:none!important}
.xm-deco i{position:absolute;display:block;left:0;right:0;pointer-events:none;background-repeat:round no-repeat;background-position:0 0}

/* snow pile on the top edge */
.xm-snow{top:-7px;height:26px;z-index:3;background-size:120px 26px;
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='26' viewBox='0 0 120 26' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.6' stop-color='%23f7fbff'/%3E%3Cstop offset='1' stop-color='%23d5e8f8'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath transform='translate(0 1.2)' fill='%23284a70' fill-opacity='.22' d='M0,8 C10,2 22,1 34,5 C44,0 58,0 68,4 C80,0 96,1 106,5 C112,6 116,7 120,8 L120,15 C116,17 113,20 109,20 C104,20 104,15 99,15 C95,15 95,25 90,25 C85,25 86,15 81,15 C74,15 72,18 66,18 C60,18 58,14 52,14 C47,14 47,22 42,22 C37,22 38,15 33,15 C26,15 24,19 17,19 C10,19 6,15 0,15 Z'/%3E%3Cpath fill='url(%23g)' stroke='%237fa6cc' stroke-opacity='.55' stroke-width='.7' d='M-2,8 L0,8 C10,2 22,1 34,5 C44,0 58,0 68,4 C80,0 96,1 106,5 C112,6 116,7 120,8 L122,8 L122,15 L120,15 C116,17 113,20 109,20 C104,20 104,15 99,15 C95,15 95,25 90,25 C85,25 86,15 81,15 C74,15 72,18 66,18 C60,18 58,14 52,14 C47,14 47,22 42,22 C37,22 38,15 33,15 C26,15 24,19 17,19 C10,19 6,15 0,15 L-2,15 Z'/%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='1.4' stroke-linecap='round' d='M8,6.5 C14,4 22,3.5 30,6 M42,4.5 C50,2.5 58,2.5 64,5 M76,4.5 C84,2.5 94,3 102,6'/%3E%3C/svg%3E")}
.xm-in .xm-snow{top:0}

/* string lights: wire + two alternating sets of bulbs */
.xm-wire,.xm-la,.xm-lb{top:8px;height:20px;background-size:132px 20px;z-index:2}
.xm-in .xm-wire,.xm-in .xm-la,.xm-in .xm-lb{top:13px}
.xm-wire{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='20' viewBox='0 0 132 20' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23143d26' stroke-width='1.3' d='M0,1 Q16.5,15 33,1 Q49.5,15 66,1 Q82.5,15 99,1 Q115.5,15 132,1'/%3E%3Cg fill='%230d2a1a'%3E%3Crect x='14.7' y='7' width='3.6' height='3.4' rx='.8'/%3E%3Crect x='47.7' y='7' width='3.6' height='3.4' rx='.8'/%3E%3Crect x='80.7' y='7' width='3.6' height='3.4' rx='.8'/%3E%3Crect x='113.7' y='7' width='3.6' height='3.4' rx='.8'/%3E%3C/g%3E%3C/svg%3E")}
.xm-la{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='20' viewBox='0 0 132 20' preserveAspectRatio='none'%3E%3Ccircle cx='16.5' cy='14' r='6' fill='%23ff3b3b' fill-opacity='.28'/%3E%3Cellipse cx='16.5' cy='14' rx='3.1' ry='4.3' fill='%23ff2d2d'/%3E%3Cellipse cx='15.5' cy='12.6' rx='.9' ry='1.5' fill='%23ffffff' fill-opacity='.75'/%3E%3Ccircle cx='82.5' cy='14' r='6' fill='%23ffd21f' fill-opacity='.3'/%3E%3Cellipse cx='82.5' cy='14' rx='3.1' ry='4.3' fill='%23ffc400'/%3E%3Cellipse cx='81.5' cy='12.6' rx='.9' ry='1.5' fill='%23ffffff' fill-opacity='.8'/%3E%3C/svg%3E");animation:xm-twA 1.6s ease-in-out infinite}
.xm-lb{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='20' viewBox='0 0 132 20' preserveAspectRatio='none'%3E%3Ccircle cx='49.5' cy='14' r='6' fill='%2322d45a' fill-opacity='.28'/%3E%3Cellipse cx='49.5' cy='14' rx='3.1' ry='4.3' fill='%2316c24c'/%3E%3Cellipse cx='48.5' cy='12.6' rx='.9' ry='1.5' fill='%23ffffff' fill-opacity='.75'/%3E%3Ccircle cx='115.5' cy='14' r='6' fill='%233b9bff' fill-opacity='.3'/%3E%3Cellipse cx='115.5' cy='14' rx='3.1' ry='4.3' fill='%231e88ff'/%3E%3Cellipse cx='114.5' cy='12.6' rx='.9' ry='1.5' fill='%23ffffff' fill-opacity='.8'/%3E%3C/svg%3E");animation:xm-twB 1.6s ease-in-out infinite}
@keyframes xm-twA{0%,45%{opacity:1}55%,100%{opacity:.3}}
@keyframes xm-twB{0%,45%{opacity:.3}55%,100%{opacity:1}}

/* melt drops */
.xm-deco i.xm-drop{right:auto;width:4px;height:6px;margin-left:-2px;border-radius:50% 50% 50% 50%/35% 35% 65% 65%;background:#bfe3fb;box-shadow:inset -1px -1px 0 rgba(70,140,200,.55),0 0 0 .5px rgba(90,150,205,.5);opacity:0;z-index:4;animation:xm-drip 4s cubic-bezier(.55,0,.9,.6) infinite}
.xm-d1{top:17px}
.xm-in .xm-d1{top:24px}
@keyframes xm-drip{0%{transform:translateY(-3px) scale(.3);opacity:0}18%{transform:translateY(0) scale(1);opacity:1}34%{transform:translateY(1px) scale(1,1.15);opacity:1}62%{transform:translateY(24px) scale(.9,1.2);opacity:.9}70%,100%{transform:translateY(30px) scale(.6);opacity:0}}
.xm-deco:not(.xm-live) i{animation-play-state:paused!important}

/* ---------- garland + tinsel strip under the header ---------- */
.xm-garland{position:relative;display:block;height:36px;width:100%;overflow:hidden;pointer-events:none;background-color:#0f172a;margin:0;padding:0;clear:both}
.xm-garland i{position:absolute;left:0;right:0;top:0;height:36px;display:block;background-repeat:round no-repeat;background-size:160px 36px}
.xm-g-tin1{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36' viewBox='0 0 160 36' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23eef2f7' stroke-width='6' stroke-dasharray='1.1 2.3' d='M0,5 C30,5 55,25 80,27 C105,25 130,5 160,5'/%3E%3C/svg%3E");animation:xm-twA 1.1s steps(2,jump-none) infinite}
.xm-g-tin2{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36' viewBox='0 0 160 36' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23ffd84d' stroke-width='6' stroke-dasharray='1.1 2.3' stroke-dashoffset='1.7' d='M0,5 C30,5 55,25 80,27 C105,25 130,5 160,5'/%3E%3C/svg%3E");animation:xm-twB 1.1s steps(2,jump-none) infinite}
.xm-g-green{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36' viewBox='0 0 160 36' preserveAspectRatio='none'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath stroke='%230f4d2a' stroke-width='11' d='M-6,23 L0,23 C30,23 55,9 80,6 C105,9 130,23 160,23 L166,23'/%3E%3Cpath stroke='%231c7a3e' stroke-width='9' stroke-dasharray='2.2 3.2' d='M-6,23 L0,23 C30,23 55,9 80,6 C105,9 130,23 160,23 L166,23'/%3E%3Cpath stroke='%2335b560' stroke-width='5' stroke-dasharray='1.2 4.6' stroke-dashoffset='2' d='M-6,23 L0,23 C30,23 55,9 80,6 C105,9 130,23 160,23 L166,23'/%3E%3C/g%3E%3Cg fill='%23e11d2e'%3E%3Ccircle cx='22' cy='20.5' r='1.7'/%3E%3Ccircle cx='25.2' cy='22.4' r='1.5'/%3E%3Ccircle cx='136' cy='20.5' r='1.7'/%3E%3Ccircle cx='132.8' cy='22.4' r='1.5'/%3E%3Ccircle cx='58' cy='12' r='1.5'/%3E%3Ccircle cx='102' cy='12' r='1.5'/%3E%3C/g%3E%3Cline x1='40' y1='19' x2='40' y2='25' stroke='%23c9a227' stroke-width='.8'/%3E%3Ccircle cx='40' cy='29' r='4.6' fill='%23f5c518'/%3E%3Ccircle cx='38.4' cy='27.4' r='1.3' fill='%23fff6c9'/%3E%3Cline x1='120' y1='19' x2='120' y2='25' stroke='%239fb7d6' stroke-width='.8'/%3E%3Ccircle cx='120' cy='29' r='4.6' fill='%233b82f6'/%3E%3Ccircle cx='118.4' cy='27.4' r='1.3' fill='%23dbeafe'/%3E%3Cg fill='%23dc2626' stroke='%23991b1b' stroke-width='.6'%3E%3Cpath d='M80,7 C74,0 66,1 68,7 C66,13 74,13 80,7 Z'/%3E%3Cpath d='M80,7 C86,0 94,1 92,7 C94,13 86,13 80,7 Z'/%3E%3Cpath d='M79,8 L74,19 L78,17 L80,9 Z'/%3E%3Cpath d='M81,8 L86,19 L82,17 L80,9 Z'/%3E%3C/g%3E%3Ccircle cx='80' cy='7' r='2.3' fill='%23ef4444' stroke='%23991b1b' stroke-width='.6'/%3E%3C/svg%3E")}

/* tinsel fringe along the top of the footer */
.xm-fringe{position:absolute;left:0;right:0;top:0;height:18px;pointer-events:none;z-index:2;display:block}
.xm-fringe i{position:absolute;left:0;right:0;top:0;height:18px;display:block;background-repeat:round no-repeat;background-size:64px 18px}
.xm-f1{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='18' viewBox='0 0 64 18' preserveAspectRatio='none'%3E%3Cg stroke='%23f1f5f9' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M2,0V12M10,0V16M18,0V9M26,0V14M34,0V17M42,0V10M50,0V15M58,0V11'/%3E%3C/g%3E%3Cpath d='M0,1H64' stroke='%23cbd5e1' stroke-width='2'/%3E%3C/svg%3E");animation:xm-twA 1.3s steps(2,jump-none) infinite}
.xm-f2{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='18' viewBox='0 0 64 18' preserveAspectRatio='none'%3E%3Cg stroke='%23ffd84d' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M6,0V15M14,0V10M22,0V17M30,0V11M38,0V13M46,0V17M54,0V9M62,0V14'/%3E%3C/g%3E%3C/svg%3E");animation:xm-twB 1.3s steps(2,jump-none) infinite}

/* ---------- light snowfall ---------- */
.xm-flakes{position:fixed;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:40;overflow:hidden}
.xm-flakes i{position:absolute;top:-12px;display:block;border-radius:50%;background:#fff;box-shadow:0 0 2px 1px rgba(110,160,215,.55);opacity:.85;animation:xm-fall linear infinite;will-change:transform}
@keyframes xm-fall{0%{transform:translate3d(0,-2vh,0)}25%{transform:translate3d(14px,26vh,0)}50%{transform:translate3d(-8px,54vh,0)}75%{transform:translate3d(12px,80vh,0)}100%{transform:translate3d(0,108vh,0)}}

/* debug readout: add ?xmasdebug=1 to any page */
.xm-dbg{position:fixed;left:6px;bottom:6px;z-index:99999;background:#111;color:#7CFC9A;font:12px/1.3 monospace;padding:5px 8px;border-radius:6px;opacity:.9}

@media (prefers-reduced-motion:reduce){
.xm-la,.xm-lb,.xm-g-tin1,.xm-g-tin2,.xm-f1,.xm-f2{animation:none!important;opacity:1!important}
.xm-drop,.xm-flakes{display:none!important}
}
@media print{.xm-deco,.xm-garland,.xm-fringe,.xm-flakes{display:none!important}}
