.photo-wall { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px; }
.photo-slot { overflow:hidden;border-radius:5px;background:#dfeae7;box-shadow:0 3px 12px rgba(22,63,70,.1); }
.photo-slot a { display:block; }
.photo-slot img { display:block;width:100%;height:190px;object-fit:cover;background:#e7efec;transition:opacity .35s ease; }
.photo-sources { display:none; }
@media (max-width:760px) { .photo-wall{gap:7px}.photo-slot img{height:120px} }

.photo-dialog{border:0;padding:64px 16px 16px;background:#14252bef;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;box-sizing:border-box;overflow:auto}
.photo-dialog::backdrop{background:#000c}
.photo-dialog[open]{display:flex;align-items:center;justify-content:center}
.photo-dialog img{display:block;max-width:100%;max-height:calc(100dvh - 80px);width:auto;height:auto;object-fit:contain}
.photo-close{position:fixed;top:12px;right:16px;z-index:1;min-width:88px;min-height:44px;border:2px solid white;border-radius:5px;padding:8px 16px;background:#fff;color:#14252b;font:700 17px Arial,sans-serif;cursor:pointer}
.photo-close:focus-visible{outline:3px solid #ffdb67;outline-offset:3px}



/* Hide the bottom paper/table edge in the final TRIN 1 thumbnail. */
.step-one-photos .photo-slot:last-child img{transform:scale(1.15);transform-origin:center top;object-position:center top!important}

.portrait-photos .photo-slot a{position:relative;aspect-ratio:3/4;overflow:hidden}
.portrait-photos .photo-slot img{position:absolute;left:50%;top:50%;width:133.333%;height:75%;max-width:none;transform:translate(-50%,-50%) rotate(90deg);object-fit:contain}
.photo-dialog img.photo-rotated{transform:rotate(90deg);max-width:calc(100dvh - 90px);max-height:calc(100vw - 40px)}

.photo-slot img.rotate-half-turn,.photo-dialog img.photo-half-turn{transform:rotate(180deg)}

.photo-slot.portrait-photo a{position:relative;aspect-ratio:3/4;overflow:hidden}
.photo-slot.portrait-photo img{position:absolute;left:50%;top:50%;width:133.333%;height:75%;max-width:none;transform:translate(-50%,-50%) rotate(90deg);object-fit:contain}
