/* Luvto monster rig, used with monster-rig.js + monster-scenes.js.
   Each monster is a stack of 420x325 layers cut from the logo sprite (assets/sprites/parts/). */
.has-rig { -webkit-tap-highlight-color: transparent; }
.lv { position: absolute; left: 0; right: 0; margin-inline: auto; width: 64%; bottom: 14%; aspect-ratio: 420 / 325; z-index: 2; pointer-events: none; }
.lv-root, .lv-sq { position: absolute; inset: 0; transform-origin: 50% 100%; }
.lv-l { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; user-select: none; -webkit-user-drag: none; }
img.lv-body { border-radius: 0 0 50% 50% / 0 0 14.2% 14.2%; }
.lv-shadow { position: absolute; left: 11%; width: 78%; height: 13.3%; bottom: -9.8%; border-radius: 50%; background: rgba(94, 70, 54, .13); transform-origin: 50% 50%; }
.lv-fx { position: absolute; inset: 0; pointer-events: none; }
.fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.lv-open > .fx-layer { overflow: visible; }

/* placement per spot */
.lv-in-hero { width: 86%; bottom: 14%; }
.lv-in-peekaboo { bottom: 20%; }
.lv-in-peekCard { width: 100%; bottom: 0; }
.lv-in-peekaboo .lv-shadow, .lv-in-peekCard .lv-shadow { display: none; }
.lv-costume, .lv-veil { pointer-events: none; }
.lv-costume svg, .lv-veil svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* two monsters share a card: groom / partner on the left, bride / collaborator on the right */
.lv-in-wedding, .lv-in-collab { width: 56%; bottom: 8%; margin: 0; }
.lv-in-wedding:not(.lv-mate), .lv-in-collab:not(.lv-mate) { left: -4%; right: auto; }
.lv-in-wedding.lv-mate, .lv-in-collab.lv-mate { left: auto; right: -4%; }
.lv-in-party { width: 70%; bottom: 12%; }
.lv-in-baby:not(.lv-mate) { width: 53%; bottom: 4%; left: -7%; right: auto; margin: 0; }
.lv-in-baby.lv-mate { width: 44%; left: auto; right: 8.7%; bottom: 29.5%; margin: 0; z-index: 3; }
.lv-in-baby.lv-mate .lv-shadow { display: none; }
.lv-in-office { width: 68%; bottom: 30%; }
.lv-in-collab { width: 62%; bottom: 12%; margin: 0; }
.lv-in-collab:not(.lv-mate) { left: -2%; right: auto; }
.lv-in-collab.lv-mate { left: auto; right: -2%; }
.lv-in-home { width: 62%; bottom: 10%; left: auto; right: -2%; margin: 0; }

/* site: a peeking monster rises above the card edge; only its bottom is clipped by the edge */
.peek.has-rig { overflow: visible; aspect-ratio: 420 / 289; clip-path: inset(-80% -50% 0 -50%); }

/* particles spawned by the scenes */
.fx { position: absolute; pointer-events: none; }
.fx-dust { width: 4.6%; aspect-ratio: 1; margin: -2.3% 0 0 -2.3%; border-radius: 50%; background: #FFF8E8; box-shadow: inset 0 -2px 0 rgba(94, 70, 54, .08); animation: fx-dust .7s ease-out forwards; }
@keyframes fx-dust { from { transform: translate(0, 0) scale(calc(var(--s) * .4)); opacity: .95; } to { transform: translate(var(--dx), var(--dy)) scale(var(--s)); opacity: 0; } }
.fx-heart { width: 8%; aspect-ratio: 1; margin-left: -4%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23CC4644' d='M12 21s-7-4.6-9.3-9A5.3 5.3 0 0112 6a5.3 5.3 0 019.3 6c-2.3 4.4-9.3 9-9.3 9z'/%3E%3C/svg%3E") center / contain no-repeat; animation: fx-heart 1.5s ease-out forwards; }
@keyframes fx-heart { 0% { transform: translate(0, 0) scale(0); opacity: 0; } 14% { transform: translate(calc(var(--dx) * .15), -6px) scale(var(--s)) rotate(-8deg); opacity: 1; } 55% { transform: translate(calc(var(--dx) * .6), -44px) scale(var(--s)) rotate(8deg); } 100% { transform: translate(var(--dx), -84px) scale(var(--s)) rotate(-6deg); opacity: 0; } }
.fx-nom { font: 700 1rem var(--font-head); color: var(--brown, #5E4636); white-space: nowrap; animation: fx-nom .9s ease-out forwards; }
@keyframes fx-nom { 0% { transform: translate(-50%, 6px) rotate(var(--r)) scale(.4); opacity: 0; } 25% { transform: translate(-50%, 0) rotate(var(--r)) scale(1.15); opacity: 1; } 40% { transform: translate(-50%, 0) rotate(var(--r)) scale(1); } 100% { transform: translate(-50%, -14px) rotate(var(--r)) scale(1); opacity: 0; } }
.fx-drop { width: 2.2%; aspect-ratio: 1; margin: -1.1% 0 0 -1.1%; background: #7DB4EC; border-radius: 0 50% 50% 50%; animation: fx-drop .65s cubic-bezier(.4, 0, 1, 1) forwards; }
@keyframes fx-drop { 0% { transform: translate(0, 0) rotate(45deg) scale(.5); opacity: .95; } 100% { transform: translate(var(--dx), var(--fall)) rotate(45deg) scale(1); opacity: 0; } }
.fx-spray { width: 3.4%; aspect-ratio: 1; margin: -1.7% 0 0 -1.7%; background: #6FA9E6; border-radius: 0 50% 50% 50%; box-shadow: inset -1px -1px 0 rgba(255, 255, 255, .45); animation: fx-spray .8s ease-out forwards; }
@keyframes fx-spray { 0% { transform: translate(0, 0) rotate(45deg) scale(.4); opacity: 1; } 40% { transform: translate(calc(var(--dx) * .6), var(--up)) rotate(45deg) scale(1); } 100% { transform: translate(var(--dx), var(--fall)) rotate(45deg) scale(.9); opacity: 0; } }
.fx-drip { width: 2.6%; aspect-ratio: 1; margin: -1.3% 0 0 -1.3%; background: var(--blue, #609DD9); border-radius: 0 50% 50% 50%; animation: fx-drip .9s cubic-bezier(.5, 0, 1, 1) forwards; }
@keyframes fx-drip { 0% { transform: translate(0, 0) rotate(45deg) scale(.2); } 25% { transform: translate(0, 4px) rotate(45deg) scale(1, 1.3); } 92% { transform: translate(0, var(--fall)) rotate(45deg) scale(.9, 1.4); opacity: 1; } 100% { transform: translate(0, var(--fall)) rotate(45deg) scale(1.8, .3); opacity: 0; } }
.fx-z { font: 700 1.5rem var(--font-head); color: var(--blue, #609DD9); opacity: 0; animation: fx-z 2.6s ease-in var(--d, 0s) forwards; }
@keyframes fx-z { 0% { transform: translate(0, 0) scale(calc(var(--s) * .5)) rotate(-10deg); opacity: 0; } 20% { opacity: 1; } 60% { transform: translate(calc(var(--dx) * .5), calc(var(--dy) * .6)) scale(calc(var(--s) * .9)) rotate(12deg); } 100% { transform: translate(var(--dx), var(--dy)) scale(var(--s)) rotate(-6deg); opacity: 0; } }
.fx-flower { width: 8%; aspect-ratio: 1; margin: -4% 0 0 -4%; background: center / contain no-repeat; animation: fx-fly .95s ease-out forwards; }
.fx-flower.b { background-image: var(--spr-flower-blue); }
.fx-flower.y { background-image: var(--spr-flower-yellow); }
@keyframes fx-fly { from { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--rot)); opacity: 0; } }
.fx-puddle { position: absolute; width: 32%; height: 9%; margin: -4.5% 0 0 -16%; border-radius: 50%; background: #6FA9E6; box-shadow: inset 0 -3px 0 rgba(47, 90, 140, .18); transform: scale(.1); opacity: .95; transition: transform .55s cubic-bezier(.3, 1.4, .5, 1), opacity .6s ease; }
.fx-puddle::after { content: ""; position: absolute; left: 22%; top: 22%; width: 30%; height: 34%; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.fx-puddle.on { transform: scale(1); }
.fx-puddle.off { transform: scale(1.12); opacity: 0; }
.fx-bubble { position: absolute; top: 9%; right: 8%; background: #fff; color: var(--red, #CC4644); font: 700 .95rem var(--font-head); padding: 6px 14px; border-radius: 999px; box-shadow: 0 8px 24px rgba(94, 70, 54, .10); animation: fx-say .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.fx-bubble.bye { animation: fx-unsay .25s ease-in forwards; }
@keyframes fx-say { from { opacity: 0; transform: scale(.4) rotate(8deg); } to { opacity: 1; transform: scale(1) rotate(-3deg); } }
@keyframes fx-unsay { from { opacity: 1; transform: scale(1) rotate(-3deg); } to { opacity: 0; transform: scale(.6) rotate(4deg); } }
@media (max-width: 520px) { .fx-bubble { font-size: .8rem; padding: 4px 10px; } }

/* rolling cart (parade): the cart cut into layers, with the live monster riding in it */
.parade.has-cart { height: calc(clamp(130px, 24vw, 220px) * 688 / 560 + 34px); }   /* tall enough for the whole umbrella */
.parade.has-cart .drive { display: none; }
.cart-rig { position: absolute; left: calc(50% - clamp(130px, 24vw, 220px) / 2); bottom: 8px; width: clamp(130px, 24vw, 220px); aspect-ratio: 560 / 688; transform-origin: 50% 50%; z-index: 2; will-change: transform; }
.cart-l { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.cart-sus, .cart-mon { position: absolute; inset: 0; }
.cart-sus { transform-origin: 52.68% 91.06%; }                 /* between the axles */
.cart-pole, .cart-canopy { transform-origin: 74.64% 63.37%; }  /* where the pole enters the cart */
.cart-wheel-l { transform-origin: 26.96% 90.99%; }
.cart-wheel-r { transform-origin: 70.54% 91.13%; }
/* the rider sits exactly where the monster is drawn in the cart, behind the cart front (DOM order) */
.lv-in-parade { left: 15.95%; right: auto; margin: 0; width: 70.64%; bottom: 36.77%; z-index: auto; }
.lv-in-parade .lv-shadow { display: none; }
.lv-in-parade img.lv-body { border-radius: 0; }   /* sits straight down into the cart; the rounded foot is only for standing monsters */
img.lv-skirt { top: 100%; bottom: auto; height: 12.31%; }

/* newborn: the pacifier gives a tiny suck */
.lv-paci { transform-box: fill-box; transform-origin: 50% 30%; animation: lv-suck 1.3s ease-in-out infinite; }
@keyframes lv-suck { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(2px) scale(1.03, .96); } }
