.gallery { min-width: 0; width: 100%; max-width: 650px; margin-inline: auto; }
.scene { position: relative; perspective: 1100px; touch-action: pan-y pinch-zoom; }
.photo-plane { position: relative; aspect-ratio: 1.48; transform-style: preserve-3d; }
.main-print, .small-print { position: absolute; background: #eeeade; box-shadow: 0 12px 24px #06140b45; backface-visibility: hidden; }
.main-print { inset: 3% 14% 5% 3%; padding: 4px; transform: rotateZ(-2deg); }
.small-print { width: 32%; height: 54%; right: 2%; bottom: 4%; padding: 4px 4px 9px; transform: translateZ(18px) rotateZ(7deg); }
.main-print img, .small-print img { display: block; width: 100%; height: 100%; object-fit: cover; }
.main-print img { object-position: 50% 12%; }
.small-print img { object-position: 50% 34%; }
.gallery figcaption { display: flex; align-items: center; gap: 9px; min-height: 48px; border-top: 1px solid #84958463; margin-top: 11px; color: #e6e9df; }
.photo-index { flex: none; color: #aebcab; font: 11px/1 var(--mono); }
.photo-index b { color: var(--accent); }
#legenda { font-size: 13px; }
.gallery-controls { display: flex; margin-left: auto; gap: 2px; }
.gallery-controls button { width: 44px; height: 44px; display: grid; place-items: center; color: var(--paper); background: none; border: 0; }
.gallery-controls button:hover { color: var(--accent); }
.gallery-controls .icon { width: 19px; height: 19px; }
#reproducao .reproduzir, #reproducao.pausado .pausa { display: none; }
#reproducao.pausado .reproduzir { display: inline; }
#anterior .icon { transform: rotate(180deg); }
@media (min-width: 480px) {
  .photo-plane { aspect-ratio: 1.35; }
  .gallery figcaption { gap: 15px; }
}
@media (min-width: 750px) {
  .photo-plane { aspect-ratio: 1.28; }
  .main-print { inset: 3% 15% 6% 5%; padding: 5px; }
  .small-print { padding: 5px 5px 12px; }
  .gallery figcaption { margin-top: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .photo-plane { transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .22s ease-out; }
  .main-print { animation: foto-entra .65s cubic-bezier(.22,.7,.26,1) both; }
  .small-print { animation: previa-entra .72s cubic-bezier(.22,.7,.26,1) both; }
  @keyframes foto-entra {
    from { transform: translate3d(6px,10px,-46px) rotateY(-10deg) rotateZ(-4deg); }
    to { transform: rotateZ(-2deg); }
  }
  @keyframes previa-entra {
    from { transform: translate3d(5px,14px,-12px) rotateY(13deg) rotateZ(4deg); }
    to { transform: translateZ(18px) rotateZ(7deg); }
  }
}
