/* ============================================================
   CART-CADE — the holiday events (holiday.js): the frozen crate, the
   ornament wheel, the 12 days, the hidden elves, the community tree and
   the December badge. Built on the site's own colors (--panel-bg, --ink,
   --candle, --line …) so it sits inside Neon Snow and Christmas alike,
   with a few holiday accents of its own. Only transform and opacity ever
   move; nothing moves with fx-lite / fx-off / reduced motion, and things
   scrolled off screen (.is-away) pause.
   ============================================================ */
:root {
  --hol-ice: #bfe6ff;
  --hol-red: #d4213a;
  --hol-green: #23915a;
  --hol-gold: #ffd36b;
  --hol-snow: #f4fbff;
  --hol-ball: #0d2a44;
  --hol-tree: #1d6b45;
}
html[data-theme="winter"] { --hol-ball: #0b2440; --hol-tree: #1a5a5c; }
html[data-theme="christmas"] { --hol-ball: #4a0b16; --hol-tree: #1d6b45; }

/* ---------- the arcade panels ---------- */
.hol-arcade { display: grid; gap: 22px; margin: 22px auto 0; max-width: 1120px; }
.hol-arcade[hidden], .hol[hidden], .hol-duo[hidden] { display: none; }
.hol { position: relative; text-align: center; }
.hol__kicker { margin: 0 0 4px; font: 900 11px/1 var(--ui); letter-spacing: .22em; color: var(--hol-ice); }
html[data-theme="christmas"] .hol__kicker { color: var(--hol-gold); }
.hol__h { margin-bottom: 8px; }
.hol__desc { margin: 0 auto 10px; max-width: 46ch; color: var(--ink-dim); font-size: 15px; line-height: 1.45; }
.hol__desc a, .hol__note a, .xt__you a, .hol-badges a { color: var(--candle); font-weight: 800; }
.hol__note { min-height: 1.3em; margin: 10px auto 0; max-width: 46ch; color: var(--ink-dim); font-size: 14px; line-height: 1.45; }
.hol__note b { color: var(--candle); }
.hol__note:empty { display: none; }
.hol__btn { margin-top: 6px; }
.hol__btn[hidden] { display: none; }
.hol__reveal { margin-top: 10px; }
.hol__test { display: inline-block; padding: 2px 7px; border-radius: 999px; font: 900 10px/1.4 var(--ui); letter-spacing: .14em; color: #1a1205; background: var(--hol-gold); vertical-align: 1px; }

/* ❄️ the crate */
.hol-crate { display: flex; align-items: center; gap: 22px; max-width: 820px; width: 100%; margin: 0 auto; text-align: left; border-color: rgb(191 230 255 / .35); overflow: hidden; }
.hol-crate .hol__body { flex: 1; min-width: 0; }
.hol-crate .hol__desc, .hol-crate .hol__note { margin-left: 0; }
.hol-crate .panel__h { text-align: left; }
.hol-crate__art { flex: none; width: 190px; }
.hc-svg { display: block; width: 100%; height: auto; overflow: visible; }
.hc-shadow { fill: rgb(0 0 0 / .35); }
.hc-q { font: 900 40px var(--ui); fill: #5c3415; opacity: .55; }
.hc-glow { opacity: 0; transition: opacity .5s; }
.hc-ice__l, .hc-ice__r, .hc-lid { transform-box: fill-box; transform-origin: center; transition: transform .65s cubic-bezier(.2, .8, .3, 1), opacity .55s .08s; }
.hc-snow, .hc-shine, .hc-frost, .hc-outline { transition: opacity .4s; }
.hc-crack { stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0; transition: stroke-dashoffset 1.1s ease-out, opacity .2s; }
.hc-shards path { opacity: 0; transform: translate(100px, 112px); }
.hol-crate.is-ready .hc-glow { opacity: .45; animation: hcBreathe 2.6s ease-in-out infinite; }
.is-shaking .hc-svg { animation: hcShake .13s linear infinite alternate; }
.is-shaking .hc-crack { stroke-dashoffset: 0; opacity: 1; }
.is-cracked .hc-crack { opacity: 0; transition-duration: .2s; }
.is-cracked .hc-ice__l { transform: translate(-38px, 14px) rotate(-16deg); opacity: 0; }
.is-cracked .hc-ice__r { transform: translate(38px, 14px) rotate(16deg); opacity: 0; }
.is-cracked .hc-snow, .is-cracked .hc-shine, .is-cracked .hc-frost, .is-cracked .hc-outline { opacity: 0; }
.is-cracked .hc-lid { transform: translate(-6px, -24px) rotate(-14deg); }
.is-cracked .hc-glow { opacity: .9; animation: none; }
.is-burst .hc-shards path { animation: hcShard .9s cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes hcBreathe { 50% { opacity: .75; } }
@keyframes hcShake { from { transform: translateX(-3px) rotate(-1.6deg); } to { transform: translateX(3px) rotate(1.6deg); } }
@keyframes hcShard {
  0% { opacity: 1; transform: translate(100px, 112px) rotate(0); }
  100% { opacity: 0; transform: translate(calc(100px + var(--dx)), calc(112px + var(--dy))) rotate(var(--r)); }
}
.hol-pips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.hol-pips[hidden] { display: none; }
.hol-pip { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgb(191 230 255 / .35); background: rgb(255 255 255 / .05); }
.hol-pip::after { content: "\2744\FE0E"; font: 700 13px/1 var(--ui); color: rgb(191 230 255 / .35); }
.hol-pip.is-on { border-color: var(--hol-ice); background: rgb(191 230 255 / .22); box-shadow: 0 0 10px rgb(191 230 255 / .45); }
.hol-pip.is-on::after { color: var(--hol-snow); }
.hol-crate__count { margin: 2px 0 6px; color: var(--ink-dim); font-size: 14px; }
.hol-crate__count b { color: var(--hol-ice); font-size: 20px; }
.hol-crate.is-open .hol-crate__count b { color: var(--candle); }

/* the wheel and the gifts, side by side on wide screens */
.hol-duo { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.hol-duo > .hol { margin: 0; }

/* 🎄 the ornament wheel */
.hol-wheel__art { width: min(100%, 300px); margin: 4px auto 6px; }
.hw-svg { display: block; width: 100%; height: auto; overflow: visible; }
.hw-ball { fill: var(--hol-ball); stroke: #e0a93a; stroke-width: 4; }
.hw-label { font: 800 21px var(--ui); fill: #fff; paint-order: stroke; stroke: rgb(0 0 0 / .25); stroke-width: 2px; }
.hw-label.is-dark { fill: #2a1a12; stroke: none; }
.hw-dot { fill: #fff6e0; opacity: .85; }
.hw-pointer { fill: var(--candle); }
.hol-wheel__res { min-height: 1.4em; margin: 8px 0 0; font-weight: 800; color: var(--candle); font-size: 17px; }
.hol-wheel__res:empty { display: none; }

/* 🎁 the 12 days */
.hol-days { list-style: none; margin: 10px auto 6px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; max-width: 520px; }
.hol-day { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: 6px 4px 2px; border-radius: 12px; border: 1px solid var(--line); background: rgb(255 255 255 / .04); color: var(--ink); cursor: default; font: inherit; }
.hol-day svg { width: 78%; height: auto; display: block; }
.hol-day__n { position: absolute; top: 3px; left: 6px; font: 800 12px/1 var(--ui); color: var(--ink-dim); }
.hol-day__ok { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--hol-green); color: #fff; font: 900 12px/1 var(--ui); box-shadow: 0 0 0 2px rgb(0 0 0 / .35); }
.hol-day:disabled { opacity: 1; }
.hol-day.is-locked, .hol-day.is-missed { --gift-box: #4b4b5c !important; --gift-rib: #75758a !important; }
.hol-day.is-locked { opacity: .55; }
.hol-day.is-missed { opacity: .32; }
.hol-day.is-today, .hol-day.is-test { cursor: pointer; border-color: var(--candle); background: rgb(var(--candle-rgb) / .1); }
.hol-day.is-today:not(.is-shut) { box-shadow: 0 0 0 2px rgb(var(--candle-rgb) / .35), 0 0 18px rgb(var(--candle-rgb) / .35); animation: holGlow 1.8s ease-in-out infinite; }
.hol-day.is-today .hol-day__n, .hol-day.is-test .hol-day__n { color: var(--candle); }
.hol-day.is-test { border-style: dashed; }
.hol-day.is-claimed { border-color: rgb(35 145 90 / .55); }
.hol-day.is-opening svg { animation: holWiggle .25s linear infinite alternate; }
.hol-day.is-pop svg { animation: holPop .6s cubic-bezier(.3, 1.6, .5, 1); }
.hol-twelve__line { margin: 8px auto 0; max-width: 42ch; font-size: 16px; font-style: italic; color: var(--ink); line-height: 1.45; }
@keyframes holGlow { 50% { box-shadow: 0 0 0 2px rgb(var(--candle-rgb) / .6), 0 0 26px rgb(var(--candle-rgb) / .55); } }
@keyframes holWiggle { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes holPop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* 🧝 the elf hunt panel */
.hol-elves { max-width: 820px; width: 100%; margin: 0 auto; padding: 16px 20px; }
.hol-elves__top { display: flex; align-items: center; justify-content: center; gap: 6px 14px; flex-wrap: wrap; }
.hol-elves__h { margin: 0; font: 900 15px/1.2 var(--ui); letter-spacing: .14em; color: var(--ink); }
.hol-elves__count { font: 900 15px/1.2 var(--ui); color: var(--candle); }
.hol-elves__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin: 10px 0 8px; }
.hol-elfdot { width: 28px; height: 28px; }
@media (max-width: 380px) { .hol-elfdot { width: 26px; height: 26px; } }
.hol-elfdot svg { display: block; width: 100%; height: 100%; }
.hol-elfdot:not(.is-found) { --elf-hat: #4a4a5c; --elf-skin: #36364a; --elf-pom: #55556b; --elf-mitt: #36364a; --elf-eye: #36364a; --elf-cheek: transparent; opacity: .55; }
.hol-elves .hol__desc { margin-bottom: 0; font-size: 14px; }

/* ---------- the elves themselves, peeking over an edge ---------- */
.hol-elf-host { position: relative; }
.hol-elf {
  position: absolute; z-index: 6; bottom: calc(100% - 11px); right: 14px;
  width: 46px; height: 46px; padding: 0; margin: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.hol-elf svg { display: block; width: 100%; height: 100%; transform-origin: 50% 100%; animation: holPeek 8s ease-in-out var(--elf-delay, 0s) infinite; }
.hol-elf:hover svg, .hol-elf:focus-visible svg { animation: none; transform: translateY(-4px) rotate(-6deg); }
.hol-elf:focus-visible { outline: 2px solid var(--candle); outline-offset: 2px; border-radius: 10px; }
.hol-elf.is-wave svg { animation: holWave .9s ease-in-out; }
.hol-elf.is-found { pointer-events: none; }
.hol-elf.is-found svg { animation: holPoof .6s ease-in forwards; }
@keyframes holPeek { 0%, 72%, 100% { transform: translateY(0); } 78% { transform: translateY(7px); } 86% { transform: translateY(-3px) rotate(-7deg); } 93% { transform: translateY(0) rotate(5deg); } }
@keyframes holWave { 25% { transform: rotate(-12deg); } 50% { transform: rotate(10deg); } 75% { transform: rotate(-8deg); } }
@keyframes holPoof { 30% { transform: translateY(-14px) scale(1.15); opacity: 1; } 100% { transform: translateY(-30px) scale(.4); opacity: 0; } }
/* where each one hides */
.hol-elf--home { right: auto; left: 8%; bottom: auto; top: 46px; }
.hol-elf--shop { right: 10px; }
.hol-elf--product { right: auto; left: 14px; bottom: auto; top: 8px; width: 40px; height: 40px; }
.hol-elf--cart { right: auto; left: 22px; }
.hol-elf--arcade { right: -38px; bottom: calc(100% - 26px); }
.hol-elf--booth { right: 6px; bottom: -18px; }
.hol-elf--cards { right: auto; left: 22px; }
.hol-elf--faq { right: 12%; }
.hol-elf--footer { right: auto; left: 12%; }
.hol-elf--account { right: auto; left: 14px; bottom: auto; top: 8px; width: 40px; height: 40px; }

/* ---------- 🌲 the community tree (home page) ---------- */
.holiday-slot { display: grid; justify-items: center; gap: 14px; max-width: 560px; margin: 26px auto 0; }
.holiday-slot[hidden], .holiday-slot__tree[hidden] { display: none; }
.holiday-slot__tree { width: 100%; }
.xt { display: flex; align-items: center; gap: 16px; padding: 12px 18px 12px 12px; border-radius: 18px; border: 1px solid var(--line); background: rgb(0 0 0 / .3); text-align: left; }
.xt__art { flex: none; width: 150px; }
.xt-svg { display: block; width: 100%; height: auto; overflow: visible; }
.xt__text { min-width: 0; }
.xt__kicker { margin: 0 0 6px; font: 900 11px/1.2 var(--ui); letter-spacing: .2em; color: var(--hol-ice); }
html[data-theme="christmas"] .xt__kicker { color: var(--hol-gold); }
.xt__count { margin: 0; font: 700 17px/1.35 var(--ui); color: var(--ink); }
.xt__count b { color: var(--candle); }
.xt__you { margin: 8px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink-dim); }
.xt-ground { fill: rgb(255 255 255 / .1); }
.xt-trunk { fill: #6b3f1d; }
.xt-tier { fill: var(--hol-tree); stroke: rgb(0 0 0 / .18); stroke-width: 1.5; }
.xt-snow { fill: var(--hol-snow); opacity: .92; display: none; }
html[data-theme="winter"] .xt-snow { display: inline; }
.xt-garland, .xt-lights, .xt-gifts { display: none; }
.xt-garland path { stroke: var(--hol-gold); stroke-width: 2.4; stroke-dasharray: .1 5.5; stroke-linecap: round; }
.xt-lights circle { fill: #fff3b0; }
.xt-gift1 { fill: var(--hol-red); } .xt-gift2 { fill: #2b5aa8; } .xt-gift3 { fill: var(--hol-green); } .xt-rib { fill: var(--hol-gold); }
.xt-star path { fill: rgb(255 255 255 / .12); stroke: var(--hol-gold); stroke-width: 1.6; stroke-linejoin: round; }
.xt-star__glow { fill: var(--hol-gold); opacity: 0; }
.xt-orn { display: none; }
.xt-orn.is-on { display: inline; }
.xt-orn circle:first-child { stroke: rgb(0 0 0 / .25); stroke-width: .8; }
.xt-c0 circle:first-child { fill: #e23b4a; }
.xt-c1 circle:first-child { fill: #f2c14e; }
.xt-c2 circle:first-child { fill: #4aa3ff; }
.xt-c3 circle:first-child { fill: #e9eef5; }
.xt-c4 circle:first-child { fill: #c46be0; }
.xt-shine { fill: #fff; opacity: .75; }
.xt-orn.is-new { transform-box: fill-box; transform-origin: center; animation: holPop .7s cubic-bezier(.3, 1.6, .5, 1) both; }
/* the tree grows up with the visits: lights → garland → the star → presents → all lit */
#xmasTree:not([data-level="0"]) .xt-lights { display: inline; }
#xmasTree[data-level="2"] .xt-garland, #xmasTree[data-level="3"] .xt-garland, #xmasTree[data-level="4"] .xt-garland, #xmasTree[data-level="5"] .xt-garland { display: inline; }
#xmasTree[data-level="3"] .xt-star path, #xmasTree[data-level="4"] .xt-star path, #xmasTree[data-level="5"] .xt-star path { fill: var(--hol-gold); }
#xmasTree[data-level="3"] .xt-star__glow, #xmasTree[data-level="4"] .xt-star__glow { opacity: .22; }
#xmasTree[data-level="4"] .xt-gifts, #xmasTree[data-level="5"] .xt-gifts { display: inline; }
#xmasTree[data-level="5"] .xt-star__glow { opacity: .3; animation: xtGlow 2.4s ease-in-out infinite; }
.xt-lights--a { animation: xtTwinkle 1.9s ease-in-out infinite alternate; }
.xt-lights--b { animation: xtTwinkle 1.9s ease-in-out .95s infinite alternate; }
@keyframes xtTwinkle { from { opacity: 1; } to { opacity: .25; } }
@keyframes xtGlow { 50% { opacity: .55; } }

/* ---------- 🏅 badges on the account panel ---------- */
.hol-badges { margin: 12px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgb(255 255 255 / .04); text-align: left; }
.hol-badges__h { margin: 0 0 8px; font: 900 11px/1.2 var(--ui); letter-spacing: .2em; color: var(--candle); }
.hol-badges__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hol-badge { display: flex; align-items: center; gap: 10px; }
.hol-badge svg { flex: none; width: 34px; height: 40px; }
.hol-badge b { display: block; font: 900 14px/1.2 var(--ui); letter-spacing: .06em; color: var(--ink); }
.hol-badge small { display: block; font-size: 12px; line-height: 1.35; color: var(--ink-dim); }
.hol-badges__next { margin: 8px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink-dim); }
.hol-badges__next b { color: var(--candle); }

/* ---------- the celebration card ---------- */
.hol-pop { position: fixed; inset: 0; z-index: 450; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / .55); opacity: 0; transition: opacity .3s; cursor: pointer; }
.hol-pop.is-on { opacity: 1; }
.hol-pop__card { width: min(100%, 360px); padding: 22px 20px 16px; border-radius: 22px; text-align: center; background: var(--panel-bg); border: 1px solid var(--line); box-shadow: var(--shadow); transform: scale(.9); transition: transform .35s cubic-bezier(.3, 1.5, .5, 1); }
.hol-pop.is-on .hol-pop__card { transform: scale(1); }
.hol-pop__art { width: 86px; height: 96px; margin: 0 auto 6px; }
.hol-pop__art svg { width: 100%; height: 100%; }
.hol-pop__kicker { margin: 0; font: 900 12px/1.2 var(--ui); letter-spacing: .22em; color: var(--hol-ice); }
.hol-pop__title { margin: 6px 0 0; font-family: var(--spooky); font-size: 30px; line-height: 1.05; color: var(--candle); }
.hol-pop__line { margin: 8px 0 0; font-size: 14px; font-style: italic; color: var(--ink-dim); }
.hol-pop__res { margin: 10px 0 0; font-weight: 800; color: var(--ink); }
.hol-pop__tap { margin: 12px 0 0; font-size: 11px; letter-spacing: .14em; color: var(--ink-mute); text-transform: uppercase; }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .hol-crate { flex-direction: column; text-align: center; gap: 8px; }
  .hol-crate .panel__h { text-align: center; }
  .hol-crate .hol__desc, .hol-crate .hol__note { margin-left: auto; }
  .hol-crate__art { width: 160px; }
  .hol-pips { justify-content: center; }
  .hol-days { gap: 6px; }
  .hol-day { border-radius: 10px; }
  .xt { flex-direction: column; text-align: center; gap: 6px; padding: 12px 14px; }
  .xt__art { width: 150px; }
  .hol-elf--arcade { right: -30px; }
}

/* ---------- calm: no moving decoration (the features all stay) ---------- */
.is-away .hc-glow, .is-away .hol-day, .is-away .xt-lights, .is-away .xt-star__glow,
.is-away.hol-crate .hc-glow { animation-play-state: paused !important; }
html.fx-lite .hol-elf svg, html.fx-off .hol-elf svg,
html.fx-lite .xt-lights, html.fx-off .xt-lights, html.fx-lite .xt-star__glow, html.fx-off .xt-star__glow,
html.fx-lite .hol-crate.is-ready .hc-glow, html.fx-off .hol-crate.is-ready .hc-glow,
html.fx-off .hol-day.is-today { animation: none !important; }
html.fx-off .hc-shards { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hol-elf svg, .xt-lights, .xt-star__glow, .hol-crate.is-ready .hc-glow, .hol-day.is-today, .is-shaking .hc-svg,
  .hol-day.is-opening svg, .xt-orn.is-new, .hol-day.is-pop svg { animation: none !important; }
  .hc-shards { display: none; }
  .hc-ice__l, .hc-ice__r, .hc-lid, .hol-pop, .hol-pop__card { transition-duration: .01s !important; }
}
