:root {
    --farm-green: #388e3c;
    --farm-light: #81c784;
    --farm-sky: #b3e5fc;
    --farm-soil: #8d6e63;
    --farm-text: #2f3542;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: manipulation;
}

body {
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--farm-sky) 0%, #c8e6c9 42%, #8bc34a 100%);
    color: var(--farm-text);
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
    overflow-x: hidden;
    overflow-y: auto;
    transition: background 0.8s ease, color 0.8s ease;
}

body.farm-night {
    --farm-text: #eef7ff;
    background: linear-gradient(180deg, #172452 0%, #28466f 45%, #2f5f3a 100%);
}

body.farm-night .bg-farm {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%) 0 0 / 44px 44px,
        linear-gradient(225deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%) 0 0 / 44px 44px,
        linear-gradient(180deg, #4f7d33, #294d23);
}

body.farm-night .plot {
    background: rgba(255, 255, 255, 0.42);
    border-color: rgba(255, 255, 255, 0.45);
}

body.farm-night .plot-empty {
    background: rgba(88, 74, 79, 0.5);
    border-color: rgba(255, 255, 255, 0.24);
}

button {
    font: inherit;
}

.bg-farm {
    position: fixed;
    inset: auto 0 0;
    height: 34vh;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18) 25%, transparent 25%) 0 0 / 44px 44px,
        linear-gradient(225deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%) 0 0 / 44px 44px,
        linear-gradient(180deg, #7cb342, #558b2f);
    pointer-events: none;
    z-index: -1;
}

.farm-sky {
    position: relative;
    height: 172px;
    margin-top: 48px;
    pointer-events: none;
    overflow: hidden;
}

.sky-orb {
    position: absolute;
    left: var(--sky-orb-x, 50%);
    top: var(--sky-orb-y, 30%);
    z-index: 2;
    font-size: clamp(3.1rem, 8vw, 4.9rem);
    line-height: 1;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 8px 18px rgba(255, 193, 7, 0.35));
    transition: left 0.8s ease, top 0.8s ease, filter 0.8s ease;
}

body.farm-night .sky-orb {
    filter: drop-shadow(0 8px 20px rgba(220, 238, 255, 0.32));
}

.sky-cloud {
    --cloud-scale: 1;
    position: absolute;
    z-index: 1;
    width: 116px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow:
        24px -12px 0 2px rgba(255, 255, 255, 0.82),
        54px -7px 0 7px rgba(255, 255, 255, 0.82),
        82px 1px 0 -1px rgba(255, 255, 255, 0.82);
    opacity: 0.88;
    transform: translateX(-12vw) scale(var(--cloud-scale));
    animation: cloud-drift 58s linear infinite;
}

.cloud-one {
    top: 44px;
    left: -160px;
}

.cloud-two {
    --cloud-scale: 0.68;
    top: 92px;
    left: -240px;
    opacity: 0.62;
    animation-duration: 82s;
    animation-delay: -28s;
}

body.farm-night .sky-cloud {
    background: rgba(210, 225, 242, 0.28);
    box-shadow:
        24px -12px 0 2px rgba(210, 225, 242, 0.28),
        54px -7px 0 7px rgba(210, 225, 242, 0.28),
        82px 1px 0 -1px rgba(210, 225, 242, 0.28);
}

.bird-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.farm-visitors-layer {
    position: fixed;
    inset: 0;
    z-index: 8;
    pointer-events: none;
    overflow: hidden;
}

.farm-decor-layer {
    position: fixed;
    inset: 0;
    z-index: 7;
    pointer-events: none;
    overflow: hidden;
}

.farm-effects-layer {
    position: fixed;
    inset: 0;
    z-index: 9;
    pointer-events: none;
    overflow: hidden;
}

.farm-effect-particle {
    position: absolute;
    left: var(--effect-x);
    top: var(--effect-y);
    display: block;
    line-height: 1;
    font-size: clamp(1.05rem, 3.8vw, 2rem);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.72));
    animation: farm-effect-float var(--effect-duration) ease-in-out var(--effect-delay) infinite alternate;
    transform: translate(-50%, -50%) scale(var(--effect-scale));
}

.effect-particle-note {
    top: auto;
    bottom: var(--effect-bottom);
    animation-name: farm-note-float;
    filter: drop-shadow(0 4px 5px rgba(59, 31, 120, 0.24));
}

.effect-particle-rainbow {
    animation-name: farm-rainbow-particle;
}

.farm-effect-rainbow {
    position: absolute;
    left: 50%;
    top: 64px;
    z-index: -1;
    font-size: clamp(6rem, 25vw, 12rem);
    line-height: 1;
    opacity: 0.88;
    transform: translateX(-50%);
    filter: drop-shadow(0 12px 22px rgba(96, 74, 210, 0.28));
    animation: farm-rainbow-breathe 3.8s ease-in-out infinite;
}

body.effect-sparkle .plot:not(.plot-empty) .plot-emoji,
body.effect-sparkle .farm-visitor-emoji,
body.effect-sparkle .farm-decor-emoji {
    filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 13px rgba(255, 224, 78, 0.92));
}

body.effect-sparkle .plot:not(.plot-empty) {
    box-shadow: 0 0 0 3px rgba(255, 244, 157, 0.35), 0 0 18px rgba(255, 226, 72, 0.46);
}

body.effect-dance .plot-animal .plot-emoji,
body.effect-dance .farm-visitor:not(.farm-visitor-decor) .farm-visitor-emoji {
    animation: farm-animal-dance 0.82s ease-in-out infinite;
}

body.effect-rainbow-party {
    background: linear-gradient(180deg, #9bdcf8 0%, #d7c3ff 35%, #bdecc1 61%, #80c850 100%);
}

body.effect-rainbow-party.farm-night {
    background: linear-gradient(180deg, #28346f 0%, #604a8f 40%, #365f56 70%, #294d23 100%);
}

body.effect-rainbow-party .plot:not(.plot-empty) .plot-emoji,
body.effect-rainbow-party .farm-visitor-emoji {
    filter: drop-shadow(0 0 7px #fff) drop-shadow(0 0 14px rgba(163, 92, 255, 0.78));
    animation: farm-rainbow-emoji 1.9s ease-in-out infinite;
}

body.effect-dance.effect-rainbow-party .plot-animal .plot-emoji,
body.effect-dance.effect-rainbow-party .farm-visitor:not(.farm-visitor-decor) .farm-visitor-emoji {
    animation: farm-animal-dance 0.82s ease-in-out infinite, farm-rainbow-emoji 1.9s ease-in-out infinite;
}

.farm-visitors-layer.visitors-muted {
    opacity: 0.28;
    pointer-events: none;
}

.farm-decor {
    position: absolute;
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: clamp(2rem, 5.8vw, 3.8rem);
    line-height: 1;
    pointer-events: auto;
    cursor: pointer;
    touch-action: manipulation;
    filter: drop-shadow(0 8px 9px rgba(47, 53, 66, 0.22));
}

.farm-decor-emoji {
    display: block;
    line-height: 1;
    transform-origin: 50% 85%;
}

.farm-decor-prop .farm-decor-emoji {
    animation: decor-idle 3.8s ease-in-out infinite;
}

.farm-decor-floater .farm-decor-emoji {
    animation: decor-float 4.4s ease-in-out infinite;
}

.farm-decor-sky {
    left: 50%;
    top: 112px;
    z-index: 1;
    font-size: clamp(4.5rem, 18vw, 8rem);
    filter: drop-shadow(0 10px 20px rgba(47, 53, 66, 0.18));
    transform: translateX(-50%);
}

.farm-decor-sky .farm-decor-emoji {
    animation: decor-sky-glow 5s ease-in-out infinite;
}

.farm-decor-rainbow .farm-decor-emoji {
    animation: rainbow-shimmer 6s ease-in-out infinite;
}

.farm-decor-rainbow {
    left: 14%;
    top: 72px;
}

.farm-decor-balloon {
    font-size: clamp(2.2rem, 6.6vw, 4.2rem);
}

.farm-decor-fountain {
    font-size: clamp(2.3rem, 6.4vw, 4.1rem);
}

.farm-decor-lantern {
    font-size: clamp(2rem, 5.6vw, 3.6rem);
}

.farm-decor-emoji.visitor-react {
    animation: decor-react-pop 650ms ease-out 1;
}

.farm-decor-balloon .farm-decor-emoji.visitor-react {
    animation: balloon-tap-float 780ms ease-out 1;
}

.farm-decor-rainbow .farm-decor-emoji.visitor-react {
    animation: rainbow-tap-shimmer 900ms ease-out 1;
}

body.farm-night .farm-decor-lantern {
    filter: drop-shadow(0 0 14px rgba(251, 191, 36, 0.85));
}

.farm-decor-arriving .farm-decor-emoji {
    animation: decor-arrive 0.62s cubic-bezier(0.175, 0.885, 0.32, 1.275), decor-idle 3.8s ease-in-out 0.64s infinite;
}

.farm-visitor {
    position: absolute;
    --visitor-scale: 1;
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: clamp(2rem, 5.6vw, 3.8rem);
    line-height: 1;
    pointer-events: auto;
    cursor: pointer;
    touch-action: manipulation;
    filter: drop-shadow(0 7px 8px rgba(47, 53, 66, 0.2));
}

.farm-visitor-emoji {
    display: block;
    line-height: 1;
    transform-origin: 50% 80%;
}

.farm-visitor-flyer {
    left: 0;
    top: 0;
}

.farm-visitor-hopper {
    animation: visitor-hop 4.6s ease-in-out infinite;
}

.farm-visitor-walker {
    animation: visitor-walk 13s linear infinite;
}

.farm-visitor-sitter {
    animation: visitor-breathe 3.2s ease-in-out infinite;
}

.farm-visitor-decor {
    animation: visitor-sway 3.6s ease-in-out infinite;
}

.farm-visitor-flyer-pass {
    --visitor-y: 24vh;
    --visitor-drift: 12vh;
    --visitor-duration: 22s;
    animation-duration: var(--visitor-duration);
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
    animation-iteration-count: 1;
}

.farm-visitor-flyer-pass.fly-right {
    animation-name: visitor-fly-right;
}

.farm-visitor-flyer-pass.fly-left {
    animation-name: visitor-fly-left;
}

.farm-visitor-bee {
    --visitor-scale: 0.74;
    font-size: clamp(1.2rem, 3.6vw, 2.1rem);
}

.farm-visitor-butterfly {
    --visitor-scale: 0.92;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
}

.farm-visitor-frog {
    --visitor-scale: 0.9;
    font-size: clamp(2rem, 5.2vw, 3.4rem);
}

.farm-visitor-duck {
    --visitor-scale: 0.96;
    font-size: clamp(2.1rem, 5.4vw, 3.5rem);
    animation-name: visitor-duck-walk;
    animation-duration: 39s;
    animation-timing-function: ease-in-out;
}

.farm-visitor-cat,
.farm-visitor-dog {
    --visitor-scale: 1;
    font-size: clamp(2.2rem, 5.6vw, 3.7rem);
}

.farm-visitor-flower {
    --visitor-scale: 0.82;
    font-size: clamp(1.9rem, 5vw, 3.1rem);
}

.visitor-slot-2.farm-visitor-hopper {
    animation-delay: -2s;
}

.visitor-slot-2.farm-visitor-walker {
    animation-delay: -6s;
}

.visitor-slot-2.farm-visitor-sitter,
.visitor-slot-2.farm-visitor-decor {
    animation-delay: -1.4s;
}

.farm-visitor-emoji.visitor-react {
    animation: visitor-react-pop 650ms ease-out 1;
}

.visitor-bubble {
    position: fixed;
    z-index: 9999;
    font-size: 1.55rem;
    line-height: 1;
    pointer-events: none;
    animation: visitor-bubble-float 0.82s ease-out forwards;
}

body.farm-night .farm-visitor-butterfly,
body.farm-night .farm-visitor-bee {
    display: none;
}

.farm-bird {
    --bird-y: 34px;
    --bird-duration: 17s;
    position: absolute;
    top: var(--bird-y);
    left: -72px;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    line-height: 1;
    filter: drop-shadow(0 5px 5px rgba(47, 53, 66, 0.18));
    animation: bird-fly var(--bird-duration) linear forwards;
    transform: translateX(-72px) scaleX(-1);
}

.farm-bird.fly-left {
    left: auto;
    right: -72px;
}

body.farm-night .farm-bird {
    display: none;
}

@keyframes cloud-drift {
    from {
        transform: translateX(-12vw) scale(var(--cloud-scale));
    }

    to {
        transform: translateX(calc(100vw + 280px)) scale(var(--cloud-scale));
    }
}

@keyframes bird-fly {
    0% {
        transform: translateX(-72px) translateY(0) scaleX(-1) rotate(-5deg);
    }

    12% {
        transform: translateX(12vw) translateY(-18px) scaleX(-1) rotate(5deg);
    }

    25% {
        transform: translateX(26vw) translateY(7px) scaleX(-1) rotate(-3deg);
    }

    40% {
        transform: translateX(42vw) translateY(-15px) scaleX(-1) rotate(6deg);
    }

    57% {
        transform: translateX(58vw) translateY(9px) scaleX(-1) rotate(-4deg);
    }

    74% {
        transform: translateX(76vw) translateY(-13px) scaleX(-1) rotate(4deg);
    }

    88% {
        transform: translateX(90vw) translateY(5px) scaleX(-1) rotate(-2deg);
    }

    100% {
        transform: translateX(calc(100vw + 96px)) translateY(0) scaleX(-1) rotate(3deg);
    }
}

.farm-bird.fly-left {
    animation-name: bird-fly-left;
}

@keyframes bird-fly-left {
    0% {
        transform: translateX(72px) translateY(0) scaleX(1) rotate(5deg);
    }

    12% {
        transform: translateX(-12vw) translateY(-18px) scaleX(1) rotate(-5deg);
    }

    25% {
        transform: translateX(-26vw) translateY(7px) scaleX(1) rotate(3deg);
    }

    40% {
        transform: translateX(-42vw) translateY(-15px) scaleX(1) rotate(-6deg);
    }

    57% {
        transform: translateX(-58vw) translateY(9px) scaleX(1) rotate(4deg);
    }

    74% {
        transform: translateX(-76vw) translateY(-13px) scaleX(1) rotate(-4deg);
    }

    88% {
        transform: translateX(-90vw) translateY(5px) scaleX(1) rotate(2deg);
    }

    100% {
        transform: translateX(calc(-100vw - 96px)) translateY(0) scaleX(1) rotate(-3deg);
    }
}

@keyframes visitor-fly-right {
    0% {
        opacity: 0;
        transform: translate(-12vw, var(--visitor-y)) translateY(0) scaleX(-1) scale(var(--visitor-scale)) rotate(-6deg);
    }

    7% {
        opacity: 1;
    }

    20% {
        transform: translate(18vw, calc(var(--visitor-y) - var(--visitor-drift))) translateY(0) scaleX(-1) scale(var(--visitor-scale)) rotate(7deg);
    }

    42% {
        transform: translate(42vw, calc(var(--visitor-y) + 3vh)) translateY(0) scaleX(-1) scale(var(--visitor-scale)) rotate(-5deg);
    }

    64% {
        transform: translate(66vw, calc(var(--visitor-y) - var(--visitor-drift))) translateY(0) scaleX(-1) scale(var(--visitor-scale)) rotate(6deg);
    }

    88% {
        opacity: 1;
        transform: translate(94vw, calc(var(--visitor-y) + 2vh)) translateY(0) scaleX(-1) scale(var(--visitor-scale)) rotate(-4deg);
    }

    100% {
        opacity: 0;
        transform: translate(112vw, var(--visitor-y)) translateY(0) scaleX(-1) scale(var(--visitor-scale)) rotate(3deg);
    }
}

@keyframes visitor-fly-left {
    0% {
        opacity: 0;
        transform: translate(112vw, var(--visitor-y)) translateY(0) scaleX(1) scale(var(--visitor-scale)) rotate(6deg);
    }

    7% {
        opacity: 1;
    }

    20% {
        transform: translate(74vw, calc(var(--visitor-y) - var(--visitor-drift))) translateY(0) scaleX(1) scale(var(--visitor-scale)) rotate(-7deg);
    }

    42% {
        transform: translate(50vw, calc(var(--visitor-y) + 3vh)) translateY(0) scaleX(1) scale(var(--visitor-scale)) rotate(5deg);
    }

    64% {
        transform: translate(26vw, calc(var(--visitor-y) - var(--visitor-drift))) translateY(0) scaleX(1) scale(var(--visitor-scale)) rotate(-6deg);
    }

    88% {
        opacity: 1;
        transform: translate(6vw, calc(var(--visitor-y) + 2vh)) translateY(0) scaleX(1) scale(var(--visitor-scale)) rotate(4deg);
    }

    100% {
        opacity: 0;
        transform: translate(-12vw, var(--visitor-y)) translateY(0) scaleX(1) scale(var(--visitor-scale)) rotate(-3deg);
    }
}

@keyframes visitor-hop {
    0%,
    70%,
    100% {
        transform: translate(18vw, 59vh) translateY(0) scale(1);
    }

    78% {
        transform: translate(22vw, 59vh) translateY(-30px) scale(1.08, 0.94);
    }

    86% {
        transform: translate(26vw, 59vh) translateY(0) scale(0.96, 1.06);
    }
}

@keyframes visitor-walk {
    0% {
        transform: translate(5vw, 69vh) translateY(0) scaleX(1);
    }

    25% {
        transform: translate(38vw, 69vh) translateY(-3px) scaleX(1);
    }

    45% {
        transform: translate(72vw, 69vh) translateY(0) scaleX(1);
    }

    50% {
        transform: translate(72vw, 69vh) translateY(0) scaleX(-1);
    }

    75% {
        transform: translate(38vw, 69vh) translateY(-3px) scaleX(-1);
    }

    95% {
        transform: translate(5vw, 69vh) translateY(0) scaleX(-1);
    }

    100% {
        transform: translate(5vw, 69vh) translateY(0) scaleX(1);
    }
}

@keyframes visitor-duck-walk {
    0%,
    10% {
        transform: translate(5vw, 69vh) translateY(0) scaleX(-1);
    }

    17% {
        transform: translate(22vw, 69vh) translateY(-2px) scaleX(-1);
    }

    25%,
    33% {
        transform: translate(38vw, 69vh) translateY(0) scaleX(-1);
    }

    42% {
        transform: translate(58vw, 69vh) translateY(-2px) scaleX(-1);
    }

    50%,
    58% {
        transform: translate(72vw, 69vh) translateY(0) scaleX(-1);
    }

    60% {
        transform: translate(72vw, 69vh) translateY(0) scaleX(1);
    }

    68% {
        transform: translate(54vw, 69vh) translateY(-2px) scaleX(1);
    }

    76%,
    84% {
        transform: translate(38vw, 69vh) translateY(0) scaleX(1);
    }

    92% {
        transform: translate(18vw, 69vh) translateY(-2px) scaleX(1);
    }

    98% {
        transform: translate(5vw, 69vh) translateY(0) scaleX(1);
    }

    100% {
        transform: translate(5vw, 69vh) translateY(0) scaleX(-1);
    }
}

@keyframes visitor-breathe {
    0%,
    100% {
        transform: translate(76vw, 58vh) scale(1) rotate(-2deg);
    }

    50% {
        transform: translate(76vw, 58vh) scale(1.06) rotate(2deg);
    }
}

@keyframes visitor-sway {
    0%,
    100% {
        transform: translate(8vw, 63vh) rotate(-5deg) scale(1);
    }

    50% {
        transform: translate(8vw, 63vh) rotate(5deg) scale(1.05);
    }
}

@keyframes visitor-react-pop {
    0% {
        transform: scale(1) rotate(0);
    }

    45% {
        transform: scale(1.28) rotate(-10deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

@keyframes decor-react-pop {
    0% {
        transform: translateY(0) scale(1) rotate(0);
    }

    45% {
        transform: translateY(-7px) scale(1.22) rotate(-9deg);
    }

    100% {
        transform: translateY(0) scale(1) rotate(0);
    }
}

@keyframes balloon-tap-float {
    0% {
        transform: translateY(0) scale(1) rotate(-3deg);
    }

    35% {
        transform: translateY(-22px) scale(1.14) rotate(7deg);
    }

    68% {
        transform: translateY(-10px) scale(1.04) rotate(-5deg);
    }

    100% {
        transform: translateY(0) scale(1) rotate(-3deg);
    }
}

@keyframes rainbow-tap-shimmer {
    0% {
        transform: scale(1);
        opacity: 0.92;
        filter: drop-shadow(0 8px 12px rgba(47, 53, 66, 0.16)) brightness(1) saturate(1);
    }

    42% {
        transform: translateY(-4px) scale(1.1);
        opacity: 1;
        filter:
            drop-shadow(0 0 12px rgba(255, 255, 255, 1))
            drop-shadow(0 0 24px rgba(255, 210, 58, 0.72))
            drop-shadow(0 0 20px rgba(116, 185, 255, 0.48))
            brightness(1.24)
            saturate(1.28);
    }

    100% {
        transform: scale(1);
        opacity: 0.92;
        filter: drop-shadow(0 8px 12px rgba(47, 53, 66, 0.16)) brightness(1) saturate(1);
    }
}

@keyframes visitor-bubble-float {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-42px) scale(1.25);
    }
}

@keyframes decor-idle {
    0%,
    100% {
        transform: translateY(0) rotate(-4deg) scale(1);
    }

    50% {
        transform: translateY(-3px) rotate(4deg) scale(1.04);
    }
}

@keyframes decor-float {
    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(-18px) rotate(5deg);
    }
}

@keyframes decor-sky-glow {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.04);
        opacity: 1;
    }
}

@keyframes rainbow-shimmer {
    0%,
    52%,
    100% {
        transform: scale(1);
        opacity: 0.92;
        filter: drop-shadow(0 8px 12px rgba(47, 53, 66, 0.16)) brightness(1) saturate(1);
    }

    62% {
        transform: translateY(-2px) scale(1.05);
        opacity: 1;
        filter:
            drop-shadow(0 0 10px rgba(255, 255, 255, 0.95))
            drop-shadow(0 0 18px rgba(255, 210, 58, 0.58))
            brightness(1.18)
            saturate(1.22);
    }

    70% {
        transform: translateY(0) scale(1.02);
        opacity: 0.98;
        filter:
            drop-shadow(0 0 8px rgba(255, 255, 255, 0.62))
            drop-shadow(0 0 14px rgba(116, 185, 255, 0.38))
            brightness(1.08)
            saturate(1.08);
    }
}

@keyframes farm-effect-float {
    0% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(var(--effect-scale)) rotate(-8deg);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.45;
        transform: translate(-50%, calc(-50% - 16px)) scale(calc(var(--effect-scale) + 0.12)) rotate(10deg);
    }
}

@keyframes farm-note-float {
    0% {
        opacity: 0;
        transform: translate(-50%, 12px) scale(var(--effect-scale)) rotate(-8deg);
    }

    25%,
    72% {
        opacity: 0.92;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -48px) scale(calc(var(--effect-scale) + 0.2)) rotate(12deg);
    }
}

@keyframes farm-rainbow-particle {
    0%,
    100% {
        opacity: 0.42;
        transform: translate(-50%, -50%) scale(var(--effect-scale));
    }

    50% {
        opacity: 1;
        transform: translate(-50%, calc(-50% - 12px)) scale(calc(var(--effect-scale) + 0.16));
    }
}

@keyframes farm-rainbow-breathe {
    0%,
    100% {
        transform: translateX(-50%) scale(0.98);
        opacity: 0.78;
    }

    50% {
        transform: translateX(-50%) scale(1.05);
        opacity: 0.96;
    }
}

@keyframes farm-animal-dance {
    0%,
    100% {
        transform: translateY(0) rotate(-5deg) scale(1);
    }

    25% {
        transform: translateY(-7px) rotate(6deg) scale(1.06);
    }

    50% {
        transform: translateY(0) rotate(-4deg) scale(1);
    }

    75% {
        transform: translateY(-5px) rotate(5deg) scale(1.04);
    }
}

@keyframes farm-rainbow-emoji {
    0%,
    100% {
        filter: hue-rotate(0deg);
    }

    50% {
        filter: hue-rotate(35deg);
    }
}

.confetti {
    position: fixed;
    top: -18px;
    z-index: 1000;
    width: 11px;
    height: 15px;
    pointer-events: none;
    opacity: 0;
    animation-name: farm-confetti-fall;
    animation-timing-function: cubic-bezier(.18,.72,.35,1);
    animation-fill-mode: forwards;
}

@keyframes farm-confetti-fall {
    0% {
        opacity: 0;
        transform: translate3d(0, -5vh, 0) rotate(0deg);
    }

    10%,
    74% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate3d(var(--confetti-drift, 30px), 108vh, 0) rotate(720deg);
    }
}

@keyframes decor-arrive {
    0% {
        opacity: 0;
        transform: translateY(22px) scale(0.2) rotate(-12deg);
    }

    65% {
        opacity: 1;
        transform: translateY(-8px) scale(1.18) rotate(8deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0);
    }
}

.farm-main {
    position: relative;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 clamp(1rem, 3vw, 2rem) 112px;
}

.plot-grid {
    --plot-cols: 3;
    --plot-gap: 11px;
    --plot-grid-max: 335px;
    display: grid;
    grid-template-columns: repeat(var(--plot-cols), minmax(0, 1fr));
    gap: var(--plot-gap);
    width: min(100%, var(--plot-grid-max));
}

.plot {
    aspect-ratio: 1;
    width: 100%;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.58);
    border: 2px solid rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    overflow: visible;
}

.plot:active {
    transform: scale(0.93);
}

.plot-empty {
    background: rgba(188, 170, 164, 0.42);
    border-color: rgba(141, 110, 99, 0.32);
}

.plot-plus {
    font-family: 'Fredoka One', cursive;
    font-size: 1.7rem;
    color: rgba(83, 55, 44, 0.48);
    line-height: 0.5;
}

.plot-ready,
.plot-producing {
    background: rgba(255, 253, 231, 0.86);
    border-color: #f9a825;
    animation: plot-pulse 1.8s ease-in-out infinite;
}

.plot-selected {
    border-color: var(--farm-green);
    border-width: 3px;
}

.plot-emoji {
    line-height: 1;
    display: block;
    transform-origin: 50% 85%;
}

@keyframes plot-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(249, 168, 37, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(249, 168, 37, 0);
    }
}

.plot-idle .plot-emoji {
    animation: plot-breathe 2.8s ease-in-out infinite;
}

@keyframes plot-breathe {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-2px) scale(1.045);
    }
}

@keyframes plot-level-up {
    0% {
        transform: scale(0.7);
    }

    60% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.plot-leveled .plot-emoji {
    animation: plot-level-up 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (prefers-reduced-motion: reduce) {
    .sky-cloud {
        animation: none;
    }

    .plot-idle .plot-emoji {
        animation: none;
    }

    .farm-visitor,
    .farm-visitor-emoji,
    .visitor-bubble,
    .farm-decor,
    .farm-decor-emoji,
    .farm-effect-particle,
    .farm-effect-rainbow,
    body.effect-dance .plot-animal .plot-emoji,
    body.effect-dance .farm-visitor:not(.farm-visitor-decor) .farm-visitor-emoji,
    body.effect-rainbow-party .plot:not(.plot-empty) .plot-emoji,
    body.effect-rainbow-party .farm-visitor-emoji {
        animation: none;
    }
}

@media (min-width: 700px) {
    .plot-grid {
        --plot-cols: 4;
        --plot-gap: 11px;
        --plot-grid-max: 468px;
    }
}

@media (orientation: landscape) and (max-height: 820px) and (min-width: 700px) {
    .farm-sky {
        height: 118px;
        margin-top: 24px;
    }

    .farm-main {
        padding-bottom: 92px;
    }

    .plot-grid {
        --plot-grid-max: min(52vw, 414px);
        --plot-gap: 9px;
    }
}

.plot-dots {
    display: flex;
    gap: 3px;
}

.dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
}

.dot-filled {
    background: var(--farm-green);
}

.dot-gold {
    background: #f9a825;
}

.production-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    font-size: 1.15rem;
    animation: production-bounce 1s ease-in-out infinite alternate;
}

@keyframes production-bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-4px);
    }
}

.farm-actions {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10;
}

.tienda-btn {
    position: relative;
    background: var(--farm-green);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 32px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(56, 142, 60, 0.4);
    cursor: pointer;
    transition: transform 0.15s ease;
    white-space: nowrap;
}

.tienda-btn:active {
    transform: scale(0.95);
}

.decorar-btn {
    background: linear-gradient(135deg, #8e4ec6, #d44e91);
    box-shadow: 0 4px 16px rgba(142, 78, 198, 0.38);
}

.tienda-prize-ready {
    animation: shop-button-glow 1.8s ease-in-out infinite;
}

.tienda-prize-ready::after {
    content: 'NUEVO';
    position: absolute;
    top: -12px;
    right: -12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #ff4d8d;
    color: #fff;
    border: 2px solid #fff;
    font-size: 0.64rem;
    line-height: 1;
    box-shadow: 0 5px 14px rgba(255, 77, 141, 0.34);
}

@keyframes shop-button-glow {
    0%,
    100% {
        box-shadow: 0 4px 16px rgba(56, 142, 60, 0.4);
    }

    50% {
        box-shadow: 0 6px 24px rgba(255, 210, 58, 0.8);
    }
}

.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 40;
}

.sheet-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

.sheet-backdrop.action-backdrop {
    background: transparent;
}

.shop-sheet,
.decor-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 12px 20px 32px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 50;
    box-shadow: 0 -14px 40px rgba(47, 53, 66, 0.22);
    max-height: 88vh;
    overflow-y: auto;
    scroll-padding-bottom: 28px;
    -webkit-overflow-scrolling: touch;
}

.shop-sheet.open,
.decor-sheet.open {
    transform: translateY(0);
}

.plot-action-popover {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 55;
    width: min(88vw, 360px);
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 14px 36px rgba(47, 53, 66, 0.22);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.96);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.plot-action-popover.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.plot-action-arrow {
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 4px 4px 12px rgba(47, 53, 66, 0.08);
    transform: translateX(-50%) rotate(45deg);
}

.plot-action-popover.below .plot-action-arrow {
    top: -8px;
    bottom: auto;
    box-shadow: -4px -4px 12px rgba(47, 53, 66, 0.08);
}

.sheet-handle {
    width: 36px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin: 0 auto 14px;
}

.sheet-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    text-align: center;
    color: var(--farm-text);
    margin-bottom: 16px;
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 9px;
    width: min(100%, 780px);
    margin: 0 auto;
}

.shop-decor-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 7px;
    width: min(100%, 780px);
    margin: 0 auto;
}

.gift-box {
    position: absolute;
    top: -72px;
    left: 50%;
    z-index: 12;
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 218, 67, 0.48), rgba(255, 218, 67, 0.08) 58%, transparent 72%);
    font-size: 4.5rem;
    line-height: 1;
    cursor: pointer;
    transform: translateX(-50%);
    filter: drop-shadow(0 8px 12px rgba(130, 80, 10, .22));
    animation: gift-heartbeat 1.4s ease-in-out infinite;
    transition: opacity .35s ease, transform .35s ease;
}

.gift-box.sheet-hidden { opacity: 0; pointer-events: none; }
.gift-box.is-opening { pointer-events: none; animation: gift-pop .35s ease forwards; }

@keyframes gift-heartbeat {
    0%, 100% { transform: translateX(-50%) scale(1) rotate(-2deg); }
    50% { transform: translateX(-50%) scale(1.08) rotate(2deg); }
}

@keyframes gift-pop {
    0% { opacity: 1; transform: translateX(-50%) scale(1) rotate(0); }
    55% { opacity: 1; transform: translateX(-50%) scale(1.35) rotate(8deg); }
    100% { opacity: 0; transform: translateX(-50%) scale(.85) rotate(-8deg); }
}

.gift-reveal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(26, 24, 34, .58);
}

.gift-card {
    width: min(90vw, 390px);
    padding: 28px 22px 22px;
    border: 4px solid #fff4b8;
    border-radius: 24px;
    background: linear-gradient(180deg, #fff, #fff9dc);
    color: #3d3442;
    text-align: center;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .3);
}

.gift-prize-emoji { display: block; font-size: 5rem; line-height: 1; animation: gift-reveal-bounce .55s cubic-bezier(.2,.9,.3,1.35) both; }
.gift-prize-text { margin: 18px 0; font-family: 'Fredoka One', cursive; font-size: clamp(1.35rem, 6vw, 2rem); color: #7a3ea1; }
.gift-prize-close { border: 0; border-radius: 999px; padding: 12px 28px; background: #ff4d8d; color: #fff; font-family: 'Fredoka One', cursive; font-size: 1.1rem; box-shadow: 0 5px 0 #c72c68; cursor: pointer; }

@keyframes gift-reveal-bounce {
    0% { opacity: 0; transform: scale(.4) rotate(-8deg); }
    70% { opacity: 1; transform: scale(1.14) rotate(3deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
    .gift-box { animation: none; }
    .gift-prize-emoji { animation: none; }
}

.plot-action-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    position: relative;
    z-index: 1;
}

.plot-action-item {
    width: 100%;
    min-height: 76px;
    display: grid;
    grid-template-rows: auto auto;
    gap: 6px;
    justify-items: center;
    align-items: center;
    padding: 10px 8px;
    border: 2px solid rgba(56, 142, 60, 0.18);
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, #f7fff8);
    box-shadow: 0 6px 18px rgba(47, 53, 66, 0.08);
    color: var(--farm-text);
    cursor: pointer;
    text-align: center;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.plot-action-item:active {
    transform: scale(0.97);
}

.plot-action-item:hover {
    border-color: rgba(56, 142, 60, 0.48);
    box-shadow: 0 10px 24px rgba(56, 142, 60, 0.16);
}

.plot-action-icon {
    min-width: 32px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    line-height: 1;
    text-align: center;
}

.plot-action-coin {
    width: 24px;
    height: 24px;
    border-width: 2px;
}

.plot-action-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plot-action-name {
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    line-height: 1.08;
    text-transform: uppercase;
}

.plot-action-sub {
    font-size: 0.68rem;
    line-height: 1.2;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0;
}

.shop-item {
    width: 100%;
    min-height: 113px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    align-items: center;
    gap: 5px;
    padding: 10px 7px 9px;
    border: 2px solid rgba(56, 142, 60, 0.16);
    background: linear-gradient(180deg, #ffffff, #f7fff8);
    cursor: pointer;
    text-align: center;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(47, 53, 66, 0.08);
}

.shop-item:active {
    transform: scale(0.97);
}

.shop-item:not(.shop-item-disabled):hover {
    border-color: rgba(56, 142, 60, 0.48);
    box-shadow: 0 10px 24px rgba(56, 142, 60, 0.16);
}

.shop-item-decor {
    min-height: 86px;
    gap: 4px;
    padding: 9px 5px 7px;
    border-color: rgba(251, 191, 36, 0.42);
    background: linear-gradient(180deg, #fffdf3, #f7fff8);
}

.shop-item-decor-active {
    border-color: rgba(56, 142, 60, 0.58);
    box-shadow: 0 7px 20px rgba(56, 142, 60, 0.13);
}

.shop-item-decor-active .shop-sub {
    color: var(--farm-green);
    font-weight: 900;
}

.shop-item-effect {
    border-color: rgba(124, 86, 214, 0.42);
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.82), transparent 24%),
        linear-gradient(180deg, #fbf7ff, #f4efff);
}

.shop-item-effect:not(.shop-item-disabled) {
    box-shadow: 0 7px 21px rgba(103, 71, 180, 0.16);
}

.shop-item-effect.shop-item-decor-active {
    border-color: rgba(83, 190, 120, 0.68);
    background: linear-gradient(180deg, #f5fff7, #e9f9ed);
}

.shop-item-disabled {
    opacity: 0.6;
    cursor: default;
}

.shop-item-disabled:active {
    transform: none;
}

.shop-item-plot {
    border-color: rgba(141, 110, 99, 0.28);
    background: linear-gradient(180deg, #fffdf7, #f5efe8);
}

.shop-item-surprise {
    border-color: rgba(255, 193, 7, 0.42);
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 235, 59, 0.42), transparent 30%),
        radial-gradient(circle at 82% 22%, rgba(255, 77, 141, 0.18), transparent 28%),
        linear-gradient(180deg, #fffdf3, #fff8df);
    color: var(--farm-text);
    opacity: 1;
}

.shop-item-surprise .shop-name {
    color: #a66a00;
}

.shop-emoji-surprise {
    width: 49px;
    height: 49px;
    display: inline-grid;
    place-items: center;
    border-radius: 18px;
    margin: 0 auto;
    background: linear-gradient(180deg, #fff, #ffe082);
    color: #a66a00;
    border: 2px solid rgba(249, 168, 37, 0.52);
    font-family: 'Fredoka One', cursive;
    font-size: 1.75rem;
    box-shadow: inset 0 -5px 0 rgba(249, 168, 37, 0.16), 0 9px 18px rgba(249, 168, 37, 0.18);
}

.shop-price-surprise {
    border-color: rgba(255, 77, 141, 0.26);
    background: #fff0f6;
    color: #ff4d8d;
}

.shop-item-prize-pending {
    border-color: rgba(255, 77, 141, 0.58);
    animation: surprise-card-ready 1.2s ease-in-out infinite;
}

.shop-item-prize-pending .shop-emoji-surprise {
    animation: surprise-question-bounce 0.9s ease-in-out infinite;
}

.shop-item-surprise.is-revealing {
    border-color: rgba(255, 210, 58, 0.92);
    box-shadow: 0 12px 32px rgba(255, 210, 58, 0.36);
    animation: surprise-reel-shake 0.2s linear infinite;
}

.shop-item-surprise.is-revealed {
    animation: surprise-reveal-pop 0.7s cubic-bezier(0.2, 1.4, 0.35, 1);
}

.shop-item-surprise.is-revealing .shop-emoji-surprise {
    background: linear-gradient(180deg, #fff, #fff176);
    font-size: 2.35rem;
}

@keyframes surprise-card-ready {
    0%,
    100% {
        box-shadow: 0 6px 18px rgba(47, 53, 66, 0.08);
    }

    50% {
        box-shadow: 0 12px 28px rgba(255, 77, 141, 0.24);
    }
}

@keyframes surprise-question-bounce {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-5px) rotate(2deg);
    }
}

@keyframes surprise-reel-shake {
    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(2px);
    }
}

@keyframes surprise-reveal-pop {
    0% {
        transform: scale(0.94);
    }

    60% {
        transform: scale(1.06);
    }

    100% {
        transform: scale(1);
    }
}

.shop-emoji {
    font-size: 1.75rem;
    width: 100%;
    text-align: center;
    line-height: 1;
}

.shop-emoji-decor {
    font-size: 1.8rem;
    min-height: 31px;
}

.shop-emoji-seed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 1.45rem;
}

.seed-arrow {
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: 900;
    color: rgba(47, 53, 66, 0.55);
}

.shop-info {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.shop-name {
    font-family: 'Fredoka One', cursive;
    font-size: 0.86rem;
    line-height: 1.08;
    color: var(--farm-text);
}

.shop-sub {
    font-size: 0.68rem;
    line-height: 1.18;
    color: #888;
    margin-top: 4px;
}

.shop-price {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1.5px solid #f9a825;
    background: #fffde7;
    justify-content: center;
}

.shop-price-disabled {
    border-color: #ddd;
    background: #f5f5f5;
}

.coin-mini {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd23a, #e88900);
    border: 1.5px solid #ffd85f;
    flex-shrink: 0;
}

.shop-price-disabled .coin-mini {
    background: #ccc;
    border-color: #ddd;
}

.price-num {
    font-family: 'Fredoka One', cursive;
    font-size: 0.9rem;
    color: #b8860b;
}

.shop-price-disabled .price-num {
    color: #999;
}

.farm-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 100;
    white-space: nowrap;
}

.farm-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@keyframes heart-float {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-40px) scale(1.3);
    }
}

.watering-feedback {
    position: fixed;
    width: 58px;
    height: 58px;
    pointer-events: none;
    z-index: 9999;
}

.watering-can,
.water-drops {
    position: absolute;
    display: block;
    line-height: 1;
    pointer-events: none;
}

.watering-can {
    top: 0;
    left: 8px;
    font-size: 1.7rem;
    transform-origin: 60% 70%;
    animation: watering-can-tip 0.95s ease-out forwards;
    filter: drop-shadow(0 3px 4px rgba(47, 53, 66, 0.18));
}

.water-drops {
    left: 18px;
    top: 24px;
    font-size: 1.15rem;
    animation: water-drops-fall 0.95s ease-out forwards;
}

@keyframes watering-can-tip {
    0% {
        opacity: 0;
        transform: translateY(8px) rotate(-18deg) scale(0.8);
    }

    24% {
        opacity: 1;
        transform: translateY(0) rotate(-28deg) scale(1.08);
    }

    70% {
        opacity: 1;
        transform: translateY(-4px) rotate(-18deg) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-18px) rotate(-10deg) scale(0.82);
    }
}

@keyframes water-drops-fall {
    0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.6);
    }

    25% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(34px) scale(0.86);
    }
}

@media (max-width: 380px) {
    .plot-grid {
        --plot-gap: 7px;
        --plot-grid-max: 302px;
    }

    .tienda-btn {
        font-size: 1rem;
        padding: 12px 16px;
    }

    .shop-sheet,
    .decor-sheet {
        padding-left: 16px;
        padding-right: 16px;
    }

    .shop-items {
        grid-template-columns: 1fr;
    }

    .shop-decor-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-item {
        min-height: 0;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto;
        justify-items: stretch;
        text-align: left;
        padding: 10px;
    }

    .shop-emoji {
        width: 38px;
        font-size: 1.75rem;
    }

    .shop-item-decor {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
        justify-items: center;
        text-align: center;
        padding: 8px 6px;
    }

    .shop-item-decor .shop-emoji {
        width: 100%;
        font-size: 1.9rem;
    }

    .shop-info {
        align-items: flex-start;
    }

    .shop-item-decor .shop-info {
        align-items: center;
    }
}
