/* Owner framing applies to card previews; passport and print keep the original. */
.animal-card .photo-wrap{overflow:hidden}
.animal-card .animal-image{object-position:var(--photo-frame-x,65%) var(--photo-frame-y,50%);transform:scale(var(--photo-frame-zoom,1));transform-origin:var(--photo-frame-x,65%) var(--photo-frame-y,50%)}

/* Explicit four-key protocol: crop/zoom first, quarter-turn the resulting square.
   Legacy frames do not enter these selectors (including passport/print). */
.photo-frame-square{display:block;position:relative!important;inset:auto!important;width:100%;height:auto!important;aspect-ratio:1;overflow:hidden;flex-shrink:0;padding:0!important;background:transparent!important;text-decoration:none!important}
.photo-frame-square>.photo-frame-rotation{position:absolute;inset:0;display:block;transform:rotate(var(--photo-frame-rotation,0deg));transform-origin:center}
.photo-frame-square>.photo-frame-rotation>img.animal-image,.photo-frame-square>.photo-frame-rotation>.passport-cover-sources>img.animal-image{display:block!important;width:100%!important;height:100%!important;max-height:none!important;max-width:none!important;object-fit:cover!important;object-position:var(--photo-frame-x,65%) var(--photo-frame-y,50%)!important;transform:scale(var(--photo-frame-zoom,1))!important;transform-origin:var(--photo-frame-x,65%) var(--photo-frame-y,50%)!important;border-radius:0!important}
.photo-wrap:not(.passport-photo):has(.photo-frame-square){aspect-ratio:1!important;height:auto!important}
.passport-photo:has(>.photo-frame-square),.paper-photo:has(>.photo-frame-square){height:auto!important;min-height:0!important;max-height:none!important}
.trust-photo-open:has(>.photo-frame-square){height:auto;aspect-ratio:1}
