/* Replacement artwork inside the existing motion character frame. */
.motion-tin-art {
    width: 100%;
    transform: translate(var(--tin-pointer-x, 0px), var(--tin-pointer-y, 0px))
        rotate(var(--tin-pointer-tilt, 0deg));
    transition: transform 220ms ease-out;
}

.motion-tin-art .coffee-render {
    position: relative;
    width: 100%;
    aspect-ratio: 6 / 7;
    margin-inline: auto;
    container-type: inline-size;
}

.motion-tin-art .coffee-render-pose {
    position: absolute;
    inset: 0;
}

.motion-tin-art .coffee-render-shadow {
    position: absolute;
    inset: 89% 24% 6%;
    background: #41192455;
    border-radius: 50%;
    filter: blur(7px);
}

.motion-tin-art .coffee-tin.has-photo {
    position: absolute;
    z-index: 2;
    inset: 12% 11% 16%;
}

.character-wrap .motion-tin-art .coffee-tin img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    filter: drop-shadow(0 10px 12px #301b1d36);
}

.motion-tin-art .coffee-eyes {
    position: absolute;
    top: 26%;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 4.1cqw;
    transform: translateX(-50%);
}

.motion-tin-art .coffee-eyes i {
    width: 4cqw;
    height: 5.5cqw;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, #fff 0 9%, #2d2a26 12% 68%, #191513 93%);
    box-shadow: 0 0 0 .45cqw #fff5e2c9;
}

.motion-tin-art .coffee-mouth {
    position: absolute;
    top: 35%;
    left: 50%;
    width: 4.2cqw;
    height: 2.5cqw;
    border-bottom: .56cqw solid #2d2a26;
    border-radius: 0 0 65% 65%;
    transform: translateX(-50%);
}

.motion-tin-art .coffee-arm,
.motion-tin-art .coffee-leg {
    position: absolute;
    background: linear-gradient(90deg, #f8ecd5, #dec39f);
    border: 1px solid #33251e;
    border-radius: 100px;
}

.motion-tin-art .coffee-arm {
    top: 56%;
    width: 18%;
    height: 3.4%;
}

.motion-tin-art .coffee-arm::after,
.motion-tin-art .coffee-leg::after {
    position: absolute;
    content: '';
    border: inherit;
}

.motion-tin-art .coffee-arm::after {
    top: -42%;
    width: 28%;
    height: 190%;
    border-radius: 50%;
    background: #f8ecd5;
}

.motion-tin-art .coffee-arm-left {
    left: 8%;
    transform-origin: right center;
    transform: rotate(calc(var(--arm-left, -10) * 1deg));
}

.motion-tin-art .coffee-arm-left::after { left: 0; }

.motion-tin-art .coffee-arm-right {
    right: 8%;
    transform-origin: left center;
    transform: rotate(calc(var(--arm-right, 10) * 1deg));
}

.motion-tin-art .coffee-arm-right::after { right: 0; }

.motion-tin-art .coffee-leg {
    top: 71%;
    width: 3.5%;
    height: 16%;
    transform-origin: top;
}

.motion-tin-art .coffee-leg-left {
    left: 39%;
    transform: rotate(calc(var(--leg-left, 8) * 1deg));
}

.motion-tin-art .coffee-leg-right {
    right: 37%;
    transform: rotate(calc(var(--leg-right, -8) * 1deg));
}

.motion-tin-art .coffee-leg::after {
    left: -65%;
    bottom: -6%;
    width: 235%;
    height: 33%;
    border-radius: 80% 47% 50% 50%;
    background: var(--flavour-accent, #eae6e3);
}

.motion-tin-art[data-tin="sea-salt-caramel"] .coffee-eyes { gap: 5.2cqw; }
.motion-tin-art[data-tin="sea-salt-caramel"] .coffee-eyes i:first-child { height: 3.3cqw; }
.motion-tin-art[data-tin="sea-salt-caramel"] .coffee-arm-right { z-index: 3; top: 55%; right: 6%; }

.motion-tin-art[data-tin="oat-latte"] .coffee-eyes i { width: 4.2cqw; height: 4.2cqw; }
.motion-tin-art[data-tin="oat-latte"] .coffee-mouth {
    width: 3.7cqw;
    height: 2.9cqw;
    border: .46cqw solid #2d2a26;
    border-radius: 50%;
}

@media (max-width: 600px) and (max-height: 630px) {
    .hero-character .motion-tin-art .coffee-render { width: min(100%, 48svh); }
    .showcase-character .motion-tin-art .coffee-render { width: min(100%, 49svh); }
}

.motion-off .motion-tin-art {
    transform: none;
    transition: none;
}

@media (prefers-reduced-motion: reduce) {
    .motion-tin-art {
        transform: none;
        transition: none;
    }
}
