.pet-cat-widget {
    position: fixed;
    right: 45px;
    bottom: 45px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18), 0 6px 14px rgba(0, 0, 0, 0.12);
    z-index: 1200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    gap: 10px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    -webkit-user-drag: none;
}

.pet-cat-widget,
.pet-cat-widget * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-drag: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.pet-cat-widget[data-compact="1"] {
    padding: 8px 10px;
    gap: 10px;
}

.pet-cat-widget.is-ready {
    opacity: 1;
    pointer-events: auto;
}

.pet-cat-button {
    position: relative;
    width: 70px;
    height: 70px;
    border: none;
    border-radius: 50%;
    background: #aaa;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: visible;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    animation: petCatFloat 7s ease-in-out infinite;
    will-change: transform, box-shadow;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

.pet-cat-button,
.pet-cat-button * {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

.pet-cat-button:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pet-cat-button:active {
    transform: translateY(0) scale(0.985);
}

.pet-cat-ring {
    --pet-cat-progress: 0deg;
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: conic-gradient(#f5b947 var(--pet-cat-progress), rgba(255, 255, 255, 0.06) 0deg);
    mask: radial-gradient(circle at center, transparent calc(65% - 6px), #000 calc(65% - 4px));
    opacity: 0.65;
    transition: opacity 0.2s ease, filter 0.2s ease;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

.pet-cat-button.is-holding .pet-cat-ring {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(245, 185, 71, 0.55));
}

.pet-cat-figure {
    position: absolute;
    inset: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-cat-figure,
.pet-cat-figure svg,
.pet-cat-figure * {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

.pet-cat-figure svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

.pet-cat-speech {
    position: absolute;
    bottom: 80%;
    left: 0;
    transform: translate(-50%, -8px);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    min-width: 160px;
    max-width: 200px;
    font-size: 0.85rem;
    color: #111;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: bottom left;
}

.pet-cat-speech::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) rotate(6deg);
    border-width: 7px 8px 0 8px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.08));
}

.pet-cat-speech.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-30%, -14px);
}

.pet-cat-eye,
.pet-cat-eye-outer {
    fill: #2c2f3a;
    transition: fill 0.12s ease, transform 0.12s ease;
    transform-origin: center;
    transform-box: fill-box;
}

.pet-cat-eye-outer {
    fill: #93e67f;
}

.pet-cat-figure.is-blinking .pet-cat-eye,
.pet-cat-figure.is-blinking .pet-cat-eye-outer {
    animation: petCatEyeBlink 0.18s ease;
    fill: #4c5359;
}

.pet-cat-figure:not(.is-blinking) .pet-cat-eye {
    fill: #2c2f3a;
    transform: scaleY(1);
}

.pet-cat-figure:not(.is-blinking) .pet-cat-eye-outer {
    fill: #93e67f;
    transform: scaleY(1);
}

.pet-cat-counter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
    position: relative;
}

.pet-cat-counter-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #6c757d;
}

.pet-cat-counter-value {
    font-size: 1.8rem;
    line-height: 1.1;
    font-weight: 800;
    color: #111;
}

.pet-cat-counter-sub {
    font-size: 0.9rem;
    color: #6c757d;
}

.pet-cat-close {
    position: absolute;
    right: -15px;
    bottom: -15px;
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.8);
    color: #d12c2c;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pet-cat-close:hover {
    background: rgba(255, 230, 230, 0.9);
    border-color: rgba(0, 0, 0, 0.12);
    color: #b91c1c;
}

.pet-cat-widget.pet-cat-busy .pet-cat-counter-value {
    opacity: 0.75;
}

.pet-cat-widget.is-hidden {
    display: none !important;
}

@media (max-width: 767px) {
    .pet-cat-widget {
        bottom: 22px;
        right: 18px;
        left: auto;
        transform: none;
        padding: 10px 14px;
        gap: 10px;
    }

    .pet-cat-button {
        width: 76px;
        height: 76px;
    }

    .pet-cat-counter {
        min-width: 130px;
    }

    .pet-cat-counter-value {
        font-size: 1.5rem;
    }
}

@keyframes petCatFloat {
    0% {
        transform: translateY(0) rotate(-0.5deg);
    }
    50% {
        transform: translateY(-4px) rotate(1deg);
    }
    100% {
        transform: translateY(0) rotate(-0.5deg);
    }
}

@keyframes petCatEyeBlink {
    0% {
        transform: scaleY(1);
        filter: brightness(1);
    }
    35% {
        transform: scaleY(0.1);
        filter: brightness(0.6);
    }
    70% {
        transform: scaleY(0.5);
        filter: brightness(0.9);
    }
    100% {
        transform: scaleY(1);
        filter: brightness(1);
    }
}
