/* Seasonal touches (decor.js). Same file in kiosk/payload/files/ui and server/public/gp (make-bundle.sh checks).
   Only transform and opacity are animated; everything stops with .decor-paused and with reduced motion. */
/* behind all page content (z-index -1 in the root stacking context), in front of the page background */
.decor { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
/* the card gets its own stacking context: the frost sits between its background and its content */
.card { position: relative; isolation: isolate; }

/* falling / rising pieces */
.dp { position: absolute; top: -24px; width: var(--size, 8px); height: var(--size, 8px); display: block;
  animation: dp-fall var(--dur, 16s) linear var(--delay, 0s) infinite; will-change: transform; }
.dp-rise { top: auto; bottom: -24px; animation-name: dp-rise; }
@keyframes dp-fall { from { transform: translate3d(0, 0, 0) rotate(0deg); } to { transform: translate3d(var(--drift, 0), 110vh, 0) rotate(360deg); } }
@keyframes dp-rise { 0% { transform: translate3d(0, 0, 0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate3d(var(--drift, 0), -110vh, 0); opacity: 0; } }
.dp-flake { border-radius: 50%; background: rgba(255, 255, 255, .95); box-shadow: 0 0 4px rgba(160, 200, 230, .9); }
.decor-light .dp-flake { background: #b8d5ee; box-shadow: none; }        /* on a light page (the /GP start page) */
.dp-petal { border-radius: 70% 0 70% 0; background: #f7c6d9; }
.dp-leaf { border-radius: 0 80% 0 80%; background: var(--c, #d9822b); }
.dp-confetti { width: calc(var(--size, 8px) * .6); border-radius: 1px; background: var(--c, #e5484d); }
.dp-nut { border-radius: 50%; background: var(--c, #a0612f); box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .18); }
.dp-spark { background: var(--c, #f2c94c); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.dp-heart { background: var(--c, #e5484d); clip-path: path('M5 9 C1 6 0 4 0 2.5 A2.5 2.5 0 0 1 5 2 A2.5 2.5 0 0 1 10 2.5 C10 4 9 6 5 9 Z'); }

/* winter: frosted card edge */
.card.dc-frost { box-shadow: 0 0 0 2px rgba(210, 232, 248, .95), 0 0 22px rgba(170, 210, 240, .55), 0 10px 30px rgba(16, 36, 26, .12); }
.card.dc-frost::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(circle at 0 0, rgba(196, 224, 246, .75), transparent 56px), radial-gradient(circle at 100% 0, rgba(196, 224, 246, .6), transparent 48px),
              radial-gradient(circle at 0 100%, rgba(196, 224, 246, .5), transparent 40px), radial-gradient(circle at 100% 100%, rgba(196, 224, 246, .7), transparent 56px); }
.card.dc-orange { box-shadow: 0 0 0 2px rgba(242, 140, 40, .55), 0 10px 30px rgba(16, 36, 26, .12); }

/* drawings on the card */
.dc-corner { position: absolute; width: 74px; height: 74px; pointer-events: none; z-index: 2; }
.dc-tl { left: -18px; top: -18px; } .dc-tr { right: -16px; top: -30px; } .dc-bl { left: -10px; bottom: -14px; } .dc-br { right: -14px; bottom: -14px; }
.dc-wreath { width: 112px; height: 112px; top: -52px; right: -22px; }
.dc-bunting { position: absolute; left: 10px; top: -8px; width: calc(100% - 20px); height: 30px; pointer-events: none; z-index: 2; overflow: visible; }
.dc-bunting { top: -6px; height: 34px; }
.dc-lights { position: absolute; left: 8px; right: 8px; top: -10px; height: 30px; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse 52% 30px at 50% -6px, transparent 96%, #2f5d45 97%, #2f5d45 99%, transparent 100%) no-repeat; }
.dc-bulb { position: absolute; width: 9px; height: 12px; margin-left: -4px; border-radius: 50% 50% 45% 45%; background: var(--c, #f2c94c);
  box-shadow: 0 0 8px var(--c, #f2c94c); animation: dc-blink 3.2s ease-in-out infinite; }
.dc-bulb::before { content: ""; position: absolute; left: 2px; top: -3px; width: 5px; height: 4px; border-radius: 1px; background: #2f5d45; } .dc-bulb.b1 { animation-delay: -.8s; } .dc-bulb.b2 { animation-delay: -1.6s; } .dc-bulb.b3 { animation-delay: -2.4s; }
@keyframes dc-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
/* the three light strings: colourful twinkle (default above), warm white glow, icy chase */
.v-warm .dc-bulb { width: 7px; height: 10px; margin-left: -3px; animation: dc-glow 5s ease-in-out infinite; box-shadow: 0 0 10px 2px var(--c); }
.v-warm .dc-bulb.b1 { animation-delay: -1.2s; } .v-warm .dc-bulb.b2 { animation-delay: -2.5s; } .v-warm .dc-bulb.b3 { animation-delay: -3.7s; }
@keyframes dc-glow { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
.v-chase .dc-bulb { width: 8px; height: 11px; animation: dc-chase 2.34s linear infinite; }
@keyframes dc-chase { 0%, 70%, 100% { opacity: .3; box-shadow: none; } 10%, 25% { opacity: 1; box-shadow: 0 0 10px 2px var(--c); } }
.dc-star { width: 58px; height: 58px; left: -16px; top: -22px; }
.dc-twinkle { transform-origin: center; transform-box: fill-box; animation: dc-pulse 3s ease-in-out infinite; }
.dc-flame { transform-origin: center bottom; transform-box: fill-box; animation: dc-flicker 1.8s ease-in-out infinite; }
.dc-flame.f1 { animation-delay: -.5s; } .dc-flame.f2 { animation-delay: -1s; } .dc-flame.f3 { animation-delay: -1.4s; }
@keyframes dc-flicker { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(.85, 1.12); } }
.dc-bloom { transform-origin: 21px 21px; animation: dc-sway 6s ease-in-out infinite; }
@keyframes dc-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.dc-lantern { position: absolute; width: 54px; height: 72px; top: -44px; pointer-events: none; z-index: 2; }
.dc-lantern.dc-tl { left: 18px; } .dc-lantern.dc-tr { right: 18px; }
.dc-swing { transform-origin: 30px 16px; transform-box: view-box; animation: dc-sway 5s ease-in-out infinite; }
.dc-glow { animation: dc-blink 4s ease-in-out infinite; }
.dc-sun { position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 102, .55), rgba(255, 214, 102, .18) 45%, transparent 70%); animation: dc-pulse 9s ease-in-out infinite; }
@keyframes dc-pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: 1; } }

/* easter egg */
.dc-burst { position: fixed; width: 0; height: 0; pointer-events: none; z-index: 50; }
.dc-burst .dp { top: 0; left: 0; animation: dc-fly 1.6s cubic-bezier(.2, .7, .3, 1) forwards; }
.dc-celebrate { z-index: 60; }
.dc-celebrate .dp { animation: dc-cheer 1.7s cubic-bezier(.12, .8, .3, 1) both; }
.dc-celebrate .dp-flake { background: #bcdcf3; box-shadow: 0 0 6px rgba(140, 190, 230, .8); }
@keyframes dc-cheer { 0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; } 65% { opacity: 1; }
  100% { transform: translate(var(--tx), calc(var(--ty) + 40px)) scale(1) rotate(200deg); opacity: 0; } }
.dc-greet { display: block; margin: -14px 0 18px; font-size: 15px; font-weight: 600; color: var(--brand, #1a7f4b); letter-spacing: .01em; }
.dc-greet.hidden { display: none; }
@keyframes dc-fly { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--tx), var(--ty)) rotate(220deg); opacity: 0; } }
.dc-egg { position: fixed; z-index: 51; max-width: 320px; padding: 10px 14px; border-radius: 12px; background: #17221c; color: #fff;
  font-size: 14px; line-height: 1.4; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); pointer-events: none; animation: dc-pop 3.6s ease forwards; }
@keyframes dc-pop { 0% { opacity: 0; transform: translateY(6px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* rest: during a session, after a while without input, and for people who prefer less motion */
.decor-paused .decor *, .decor-paused .card *, .decor-paused .decor { animation-play-state: paused !important; }
.decor-session .decor { display: none; }
@media (prefers-reduced-motion: reduce) {
  .decor *, .card [class^="dc-"], .card [class*=" dc-"], .dc-burst .dp { animation: none !important; }
  .dc-burst { display: none; }
  .decor .dp { display: none; }
}
