.cifra-pet {
    position: fixed;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: 120px;
    z-index: 20;
    pointer-events: none;
}
.cifra-pet[hidden] { display: none; }
.cifra-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}
.cifra-button canvas { display: block; width: 100%; height: auto; }
.cifra-button:focus-visible { outline: 2px dotted #745a8b; outline-offset: 3px; }
.cifra-heart {
    position: absolute;
    top: -20px;
    left: 44%;
    color: #f4c3ea;
    font: 32px/1 sans-serif;
    text-shadow: 0 1px 2px #745a8b;
    opacity: 0;
}
.cifra-pet.is-petted .cifra-heart { animation: cifra-heart 1.8s ease-out both; }
@keyframes cifra-heart {
    0% { opacity: 0; transform: translateY(8px) scale(.7); }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-22px) scale(1.15); }
}
.cifra-status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
@media (max-width: 600px) { .cifra-pet { width: 88px; } }
@media (prefers-reduced-motion: reduce) {
    .cifra-pet.is-petted .cifra-heart { animation: none; opacity: 1; }
}
