html, body { margin: 0; padding: 0; background: transparent; overflow: hidden; width: 100%; height: 100%;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif; user-select: none; -webkit-user-select: none; }
canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; }
#decor { position: fixed; inset: 0; pointer-events: none; }
.item { position: absolute; pointer-events: auto; cursor: grab; transition: opacity .25s; filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
.item svg { width: 100%; height: 100%; display: block; overflow: visible; }
.item.dragging { cursor: grabbing; filter: drop-shadow(0 10px 14px rgba(0,0,0,.35)); transition: none; }
.item.selected { filter: drop-shadow(0 0 6px rgba(255,236,150,.95)) drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
.item.lantern { transform-origin: 50% 0; animation: swing 4.5s ease-in-out infinite; }
.item.lantern { will-change: transform; filter: none; }
@keyframes swing { 0%,100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } }
@keyframes tail { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes glow { 0%,100% { opacity: .75; } 50% { opacity: 1; } }
.bulb { animation: twinkle 1.6s steps(1) infinite; }
.bulb.b1 { animation-delay: -.55s; } .bulb.b2 { animation-delay: -1.1s; }
@keyframes twinkle { 0% { opacity: 1; } 50% { opacity: .4; } }
.treestar { animation: glow 2.4s steps(2) infinite; }
#toolbar { position: fixed; display: none; gap: 2px; padding: 5px; border-radius: 14px; background: rgba(24,30,46,.92);
  box-shadow: 0 6px 20px rgba(0,0,0,.35); pointer-events: auto; z-index: 10; backdrop-filter: blur(8px); }
#toolbar button { all: unset; width: 32px; height: 32px; display: grid; place-items: center; font-size: 17px; border-radius: 9px; cursor: pointer; }
#toolbar button:hover { background: rgba(255,255,255,.14); }
.note { position: fixed; width: 240px; padding: 14px 16px; border-radius: 16px; background: #fffaf0; color: #3e2723;
  font-size: 16px; font-weight: 600; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: opacity 1s; z-index: 11; }
.note.fade { opacity: 0; }
.confetti { position: fixed; width: 7px; height: 11px; border-radius: 2px; pointer-events: none; z-index: 12; }
.papa-fly { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 5; filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.papa-fly svg { width: 100%; height: 100%; }
.papa-fly .wave { animation: wave .6s ease-in-out infinite alternate; transform-origin: 126px 40px; }
.papa-fly .deer { animation: gallop .5s ease-in-out infinite alternate; }
.papa-fly .d2 { animation-delay: -.25s; }
@keyframes wave { from { transform: rotate(-12deg); } to { transform: rotate(14deg); } }
@keyframes gallop { from { translate: 0 -2px; } to { translate: 0 3px; } }
.spark { position: fixed; width: 5px; height: 5px; border-radius: 50%; background: #fff6c2; box-shadow: 0 0 8px 3px rgba(255,230,120,.8);
  pointer-events: none; animation: spark 1.2s ease-out forwards; }
@keyframes spark { to { opacity: 0; transform: translateY(26px) scale(.3); } }
.falling-gift { position: fixed; left: 0; top: 0; width: 44px; height: 44px; pointer-events: none; z-index: 6; }
.falling-gift svg { width: 100%; height: 100%; }

.buddy { position: fixed; left: 0; top: 0; pointer-events: auto; cursor: pointer; z-index: 4; filter: drop-shadow(0 4px 5px rgba(0,0,0,.25)); }
.buddy video { width: 100%; height: 100%; object-fit: contain; display: block; }
.tip { position: fixed; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: rgba(24,30,46,.92); color: #fff; font-weight: 700; font-size: 13px; pointer-events: none; z-index: 12; animation: tipin .2s ease-out; }
@keyframes tipin { from { opacity: 0; transform: translate(-50%, 6px); } }
#dresscard { position: fixed; display: none; width: 380px; padding: 12px; border-radius: 16px; background: rgba(20,28,46,.96); color: #fff; z-index: 11; pointer-events: auto; box-shadow: 0 14px 40px rgba(0,0,0,.45); font-size: 12.5px; }
#dresscard .dc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 14px; }
#dresscard button { all: unset; cursor: pointer; }
#dresscard .dc-x { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; } #dresscard .dc-x:hover { background: rgba(255,255,255,.12); }
#dresscard .dc-row { margin: 8px 0; } #dresscard .dc-row > span { display: block; color: #9fb0cf; font-weight: 700; margin-bottom: 4px; text-transform: uppercase; font-size: 10.5px; letter-spacing: .06em; }
#dresscard .dc-row div { display: flex; flex-wrap: wrap; gap: 4px; }
#dresscard .dc-row button { padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.08); font-weight: 600; }
#dresscard .dc-row button:hover { background: rgba(255,255,255,.16); } #dresscard .dc-row button.on { background: #ffd54f; color: #2b1d00; }
#dresscard .dc-foot { text-align: right; margin-top: 8px; } #dresscard .dc-reset { padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.2); font-weight: 700; }
.item.hop { animation: hop .5s cubic-bezier(.3,1.8,.5,1); }
@keyframes hop { 30% { transform: translateY(-22px) rotate(-6deg); } 60% { transform: translateY(-8px) rotate(4deg); } }
.fightball { position: fixed; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #c9daf0); pointer-events: none; z-index: 9; }
.item .wavearm { animation: wavearm 1.2s ease-in-out infinite alternate; transform-origin: 102px 90px; transform-box: view-box; }
@keyframes wavearm { from { transform: rotate(-8deg); } to { transform: rotate(10deg); } }
.train { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 5; filter: drop-shadow(0 4px 5px rgba(0,0,0,.25)); }
.train svg { width: 100%; height: 100%; }
.train .loco, .train .wagon { animation: chug .28s ease-in-out infinite alternate; }
.train.stopped .loco, .train.stopped .wagon { animation: none; }
.train .puff { animation: puff 1s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes chug { from { transform: translateY(0); } to { transform: translateY(-1.5px); } }
@keyframes puff { from { opacity: .9; transform: translate(0, 0) scale(.8); } to { opacity: 0; transform: translate(-14px, -14px) scale(1.5); } }
.plough { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 5; filter: drop-shadow(0 4px 5px rgba(0,0,0,.25)); }
.plough svg { width: 100%; height: 100%; } .plough .beacon { animation: glow .5s steps(2) infinite; }
