/* Owner-selected matching frames and centered crops; photo exports stay intact. */
img[src^="/calculator/photos/"] { object-position:50% 50%; }
.gallery-expanded {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:flex-start;
  gap:var(--space-block) var(--space-group);
}
.gallery-expanded button:nth-child(n) {
  flex:0 0 calc((100% - var(--space-column))/3);
  width:calc((100% - var(--space-column))/3);
  min-width:0;
  padding:0;
}
.gallery-expanded button:nth-child(n) figure { aspect-ratio:4/5; }
.gallery-expanded img { object-fit:cover; object-position:50% 50%; }
.gallery-expanded button:focus-visible { outline:2px solid var(--lime); outline-offset:6px; }
.gallery-expanded figcaption { min-height:28px; justify-content:flex-end; }
@media(max-width:760px) {
  .gallery-expanded { gap:var(--space-group) var(--space-text); }
  .gallery-expanded button:nth-child(n) {
    flex-basis:calc((100% - var(--space-text))/2);
    width:calc((100% - var(--space-text))/2);
  }
}
@media(max-width:360px) {
  .gallery-expanded button:nth-child(n) { flex-basis:100%; width:100%; }
}
