/* Jamun Christmas Magic – everything is click-through */
#jxl-root {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; max-width: 100%; height: 100%;
  overflow: hidden;
  pointer-events: none;
  user-select: none; -webkit-user-select: none;
  z-index: 999990;
  contain: layout paint;
  --s: 1; --off: 0px; --abar: 0px;
}
body.admin-bar #jxl-root { --abar: 32px; }
@media (max-width: 782px) { body.admin-bar #jxl-root { --abar: 46px; } }
#jxl-root, #jxl-root * { box-sizing: border-box; }
#jxl-root * { pointer-events: none !important; }

/* ---------- String lights ---------- */
#jxl-root .jxl-lights {
  --bw: 14px; --bh: 22px; --sw: 8px; --sh: 6px;
  position: absolute; left: 0; width: 100%; height: 44px; overflow: hidden;
  top: calc(var(--abar) + var(--off));
}
.jxl-wire { position: absolute; top: 0; left: 0; width: 100%; height: 14px; overflow: visible; }
.jxl-wire path { fill: none; stroke: #1b1b1b; stroke-width: 2; stroke-linecap: round; }
.jxl-bulb { position: absolute; top: 4px; width: var(--bw); transform-origin: 50% 0; display: flex; flex-direction: column; align-items: center; }
.jxl-socket { display: block; width: var(--sw); height: var(--sh); background: linear-gradient(90deg,#2b2b2b,#5a5a5a 50%,#2b2b2b); border-radius: 2px 2px 1px 1px; }
.jxl-glass {
  display: block; width: var(--bw); height: var(--bh); margin-top: -1px;
  background: radial-gradient(ellipse at 35% 25%, rgba(255,255,255,.75) 0, rgba(255,255,255,0) 35%), var(--c);
  border-radius: 45% 45% 50% 50% / 30% 30% 70% 70%;
  box-shadow: 0 0 10px 3px var(--c);
  animation: jxl-tw-a 1.8s ease-in-out infinite;
}
.jxl-bulb.v-b .jxl-glass { animation-name: jxl-tw-b; animation-duration: 2.4s; }
.jxl-bulb.v-c .jxl-glass { animation-name: jxl-tw-c; animation-duration: 1.3s; }
@keyframes jxl-tw-a { 0%,100%{opacity:1;box-shadow:0 0 12px 4px var(--c);filter:brightness(1.15)} 50%{opacity:.45;box-shadow:0 0 3px 1px var(--c);filter:brightness(.8)} }
@keyframes jxl-tw-b { 0%,100%{opacity:.5;box-shadow:0 0 4px 1px var(--c);filter:brightness(.85)} 40%,60%{opacity:1;box-shadow:0 0 12px 4px var(--c);filter:brightness(1.2)} }
@keyframes jxl-tw-c { 0%,100%{opacity:1;box-shadow:0 0 10px 3px var(--c)} 30%{opacity:.4;box-shadow:0 0 2px 0 var(--c)} 60%{opacity:.9;box-shadow:0 0 9px 3px var(--c)} }

/* ---------- Snow ---------- */
.jxl-snow { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.jxl-ground { position: absolute; left: 0; bottom: 0; width: 100%; height: calc(clamp(16px, 3vw, 34px) * var(--s)); filter: drop-shadow(0 -2px 4px rgba(255,255,255,.35)); }

/* ---------- Trees & gifts ---------- */
.jxl-deco { --th: calc(clamp(110px, 20vw, 210px) * var(--s)); position: absolute; bottom: 0; display: flex; align-items: flex-end; gap: 4px; }
.jxl-deco.left { left: 1vw; }
.jxl-deco.right { right: 1vw; flex-direction: row-reverse; }
.jxl-tree { height: var(--th); width: calc(var(--th) * .6667); display: block; overflow: visible; }
.jxl-gifts { height: calc(var(--th) * .3); width: auto; aspect-ratio: 140 / 60; display: block; margin-bottom: 2px; }
.jxl-dot { animation: jxl-dot 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes jxl-dot { 0%,100%{opacity:1;transform:scale(1.25)} 50%{opacity:.25;transform:scale(.8)} }
.jxl-star { animation: jxl-star 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 4px #ffd700); }
@keyframes jxl-star { 0%,100%{transform:scale(1)} 50%{transform:scale(1.18)} }

/* ---------- Hanging baubles ---------- */
.jxl-orn { position: absolute; top: calc(var(--abar) + var(--off)); transform-origin: 50% 0; display: flex; flex-direction: column; align-items: center; animation: jxl-swing 3.6s ease-in-out infinite alternate; }
.jxl-orn i { display: block; width: 1px; background: rgba(255,255,255,.55); }
.jxl-orn b { display: block; width: 6px; height: 4px; background: #d4a017; border-radius: 1px; }
.jxl-orn span { display: block; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff 0, rgba(255,255,255,.1) 14%, transparent 15%), radial-gradient(circle at 50% 40%, var(--c), rgba(0,0,0,.45) 140%); box-shadow: 0 2px 6px rgba(0,0,0,.35); }
@keyframes jxl-swing { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }

/* ---------- Santa ---------- */
.jxl-santa { position: absolute; left: 0; top: 14%; opacity: 0; width: calc(clamp(150px, 24vw, 300px) * var(--s)); filter: drop-shadow(0 0 6px rgba(255,255,200,.45)); will-change: transform; }
.jxl-santa svg { width: 100%; height: auto; display: block; }

/* ---------- Santa hat ---------- */
.jxl-hat { position: absolute; transform: rotate(-16deg); transform-origin: 20% 100%; transition: opacity .3s; }
.jxl-hat svg { width: 100%; height: auto; display: block; }

/* ---------- Sparkles, trail, burst ---------- */
.jxl-spark { position: absolute; opacity: 0; clip-path: polygon(50% 0,60% 40%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 40%); animation: jxl-spark 1.8s ease-in-out forwards; }
@keyframes jxl-spark { 0%{opacity:0;transform:scale(.2) rotate(0)} 45%{opacity:1;transform:scale(1) rotate(45deg)} 100%{opacity:0;transform:scale(.3) rotate(90deg)} }
.jxl-bit { position: absolute; line-height: 1; text-shadow: 0 0 6px currentColor; will-change: transform, opacity; }

/* ---------- Greeting card ---------- */
.jxl-banner {
  --bn-bg: linear-gradient(135deg,#6d0e20,#b3162f); --bn-fg: #fff; --bn-ac: #ffd27a;
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  max-width: min(92%, 520px); padding: 10px 14px 10px 12px;
  background: var(--bn-bg); color: var(--bn-fg);
  border-radius: 16px; border: 1px solid color-mix(in srgb, var(--bn-ac) 60%, transparent);
  box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 3px rgba(255,255,255,.06);
  overflow: hidden;
  animation: jxl-rise .9s cubic-bezier(.2,1.2,.4,1) backwards;
  transition: opacity .5s, transform .5s;
}
.jxl-banner.jxl-bottom { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.jxl-banner.jxl-top { top: calc(var(--abar) + var(--off) + 52px); }
#jxl-root.jxl-dev-m .jxl-banner.jxl-top { top: calc(var(--abar) + var(--off) + 40px); }
.jxl-banner::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent); animation: jxl-shine 6s ease-in-out 1.2s infinite; }
.jxl-bn-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--bn-ac);
  background: rgba(255,255,255,.12); border: 1px solid color-mix(in srgb, var(--bn-ac) 70%, transparent); }
.jxl-bn-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.jxl-bn-tx b { font: 700 clamp(14px, 1.5vw, 17px)/1.25 Georgia, "Times New Roman", serif; letter-spacing: .2px; }
.jxl-bn-tx em { font: 600 10.5px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-style: normal; text-transform: uppercase; letter-spacing: .14em; color: var(--bn-ac); margin-top: 2px; }
#jxl-root .jxl-bn-x {
  pointer-events: auto !important; flex: none; width: 26px; height: 26px; margin: 0 0 0 4px; padding: 0;
  display: grid; place-items: center; cursor: pointer; border-radius: 50%;
  background: rgba(255,255,255,.14); color: var(--bn-fg); border: 1px solid rgba(255,255,255,.3);
  font: 400 18px/1 system-ui, sans-serif; box-shadow: none; text-shadow: none;
}
#jxl-root .jxl-bn-x:hover, #jxl-root .jxl-bn-x:focus-visible { background: rgba(255,255,255,.3); outline: none; }
.jxl-banner.jxl-hide { opacity: 0; transform: translateX(-50%) translateY(16px); }
.jxl-banner.jxl-top.jxl-hide { transform: translateX(-50%) translateY(-16px); }
@keyframes jxl-rise { from { opacity: 0; transform: translateX(-50%) translateY(28px) scale(.92); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes jxl-shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
#jxl-root.jxl-dev-m .jxl-banner { gap: 9px; padding: 8px 10px 8px 9px; border-radius: 14px; }
#jxl-root.jxl-dev-m .jxl-bn-ic { width: 30px; height: 30px; }

/* ---------- Front-end control panel (outside the root) ---------- */
.jxl-pw { position: fixed; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); font: 14px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #f3f4f6; }
.jxl-pw.left { left: 12px; } .jxl-pw.right { right: 12px; }
.jxl-pw .jxl-pbtn { width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer;
  border: 2px solid rgba(255,255,255,.8); background: linear-gradient(135deg,#b3162f,#1d6b40); color: #fff; font-size: 20px; line-height: 1; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.jxl-pw .jxl-panel { position: absolute; bottom: 54px; width: min(320px, calc(100vw - 24px)); max-height: min(72vh, 540px); overflow: auto; padding: 14px 14px 12px;
  background: #161a22; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.5); }
.jxl-pw.left .jxl-panel { left: 0; } .jxl-pw.right .jxl-panel { right: 0; }
.jxl-pw .jxl-panel[hidden] { display: none; }
.jxl-phead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.jxl-phead strong { font-size: 15px; color: #fff; } .jxl-phead span { font-size: 12px; color: #9aa3b2; } .jxl-phead b { color: #ffd27a; }
.jxl-pw .jxl-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 2px; margin: 0; border-bottom: 1px solid rgba(255,255,255,.07); cursor: pointer; color: #f3f4f6; font-size: 14px; }
.jxl-pw .jxl-row.jxl-master { font-weight: 700; border-bottom-color: rgba(255,255,255,.2); }
.jxl-pw .jxl-row input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.jxl-sw { flex: none; position: relative; width: 38px; height: 22px; border-radius: 999px; background: #4b5563; transition: background .2s; }
.jxl-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.jxl-pw .jxl-row input:checked + .jxl-sw { background: #22c55e; }
.jxl-pw .jxl-row input:checked + .jxl-sw::after { transform: translateX(16px); }
.jxl-pw .jxl-row input:focus-visible + .jxl-sw { outline: 2px solid #fff; outline-offset: 2px; }
.jxl-pfoot { padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.jxl-pw .jxl-psave, .jxl-pw .jxl-preset { padding: 9px 12px; border: 0; border-radius: 10px; cursor: pointer; font: 600 13px/1.2 system-ui, sans-serif; color: #fff; background: #1d6b40; }
.jxl-pw .jxl-preset { background: #374151; }
.jxl-pw .jxl-plink { color: #ffd27a; font-size: 12.5px; text-decoration: none; }
.jxl-pstat { min-height: 16px; font-size: 12px; color: #8be39b; }

/* ---------- Device sizing ---------- */
#jxl-root.jxl-dev-m .jxl-lights { --bw: 10px; --bh: 16px; --sw: 6px; --sh: 5px; height: 32px; }
#jxl-root.jxl-dev-m .jxl-glass { box-shadow: 0 0 7px 2px var(--c); }
#jxl-root.jxl-dev-m .jxl-deco { --th: calc(clamp(80px, 28vw, 140px) * var(--s)); }
#jxl-root.jxl-dev-t .jxl-deco { --th: calc(clamp(110px, 18vw, 170px) * var(--s)); }

/* ---------- Reduced motion ---------- */
#jxl-root.jxl-calm * { animation: none !important; }
#jxl-root.jxl-calm .jxl-spark { display: none; }
@media (prefers-reduced-motion: reduce) { .jxl-calm .jxl-glass { opacity: 1; } }
