/* Viewport decoration only: no shop, tile, form or product selectors. */
.mk-page-motion {
  position: fixed;
  inset: 0;
  z-index: 8; /* Below NOVA sticky/navigation 1000+ and modal/backdrop 1040+. */
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  contain: layout paint;
  --mk-motion-tone: #d4af57;
}

.mk-page-motion,
.mk-page-motion * {
  pointer-events: none;
}

.mk-page-motion[data-scene="advent"] { --mk-motion-tone: #d9ae4e; }
.mk-page-motion[data-scene="winter"] { --mk-motion-tone: #79b4cd; }
.mk-page-motion[data-scene="autumn"] { --mk-motion-tone: #bb6937; }
.mk-page-motion[data-scene="spring"] { --mk-motion-tone: #cb8ca7; }
.mk-page-motion[data-scene="summer"] { --mk-motion-tone: #dbaa38; }
.mk-page-motion[data-scene="easter"] { --mk-motion-tone: #82a85f; }
.mk-page-motion[data-scene="martin"] { --mk-motion-tone: #c7993d; }
.mk-page-motion[data-scene="carnival"] { --mk-motion-tone: #b874ae; }

.mk-page-particle {
  position: absolute;
  top: -3rem;
  left: var(--mk-x, 5%);
  display: block;
  color: var(--mk-motion-tone);
  font-family: "Segoe UI Symbol", "Apple Color Emoji", sans-serif;
  font-size: clamp(12px, var(--mk-size, 21px), 30px);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  text-shadow: 0 1px 2px rgba(255, 255, 255, .65);
  transform-origin: center;
  animation: mk-page-fall var(--mk-duration, 19s) linear var(--mk-delay, 0s) infinite;
}

.mk-page-particle[data-kind="star"],
.mk-page-particle[data-kind="spark"] {
  text-shadow: 0 0 7px rgba(244, 208, 111, .35), 0 1px 2px rgba(255, 255, 255, .75);
}

.mk-page-particle[data-kind="flake"] {
  color: #79b4cd;
  text-shadow: 0 1px 3px rgba(255, 255, 255, .9);
}

.mk-page-particle[data-kind="leaf"] { color: #bb6937; }
.mk-page-particle[data-kind="petal"] { color: #cb8ca7; }
.mk-page-particle[data-kind="confetti"]:nth-child(3n + 1) { color: #ba6395; }
.mk-page-particle[data-kind="confetti"]:nth-child(3n + 2) { color: #549aa9; }
.mk-page-particle[data-kind="confetti"]:nth-child(3n) { color: #c6a13c; }

@keyframes mk-page-fall {
  0% {
    transform: translate3d(0, -3rem, 0) rotate(-18deg);
    opacity: 0;
  }
  9% { opacity: clamp(.05, var(--mk-opacity, .34), .6); }
  88% { opacity: clamp(.05, var(--mk-opacity, .34), .6); }
  100% {
    transform: translate3d(var(--mk-drift, 35px), calc(100vh + 6rem), 0) rotate(142deg);
    opacity: 0;
  }
}

.mk-page-motion[data-paused="true"] {
  display: none;
}

.mk-page-motion-toggle {
  position: fixed;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 990; /* Below existing NOVA sticky headers and all modal layers. */
  min-width: 44px;
  min-height: 44px;
  max-width: calc(100vw - 28px);
  padding: 11px 15px;
  border: 1px solid #b6d3d9;
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 4px 18px rgba(36, 62, 69, .12);
  color: #244d58;
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

.mk-page-motion-toggle:hover { background: #eaf5f7; }
.mk-page-motion-toggle:focus-visible {
  outline: 3px solid #167e91;
  outline-offset: 3px;
}

html.mk-page-motion-mounted .mk-season-pause {
  display: none;
}

body.modal-open .mk-page-motion,
body.modal-open .mk-page-motion-toggle,
body:has(dialog[open]) .mk-page-motion,
body:has(dialog[open]) .mk-page-motion-toggle {
  display: none;
}

@media (max-width: 767.98px) {
  .mk-page-particle {
    left: var(--mk-x-mobile, var(--mk-x, 5%));
    font-size: clamp(12px, var(--mk-size, 19px), 25px);
  }
  .mk-page-motion-toggle { font-size: .75rem; padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .mk-page-motion,
  .mk-page-motion-toggle {
    display: none !important;
  }
  .mk-page-particle { animation: none !important; }
}

@media print {
  .mk-page-motion,
  .mk-page-motion-toggle {
    display: none !important;
  }
}
