/* Uniform gallery cards: each caption belongs to its own framed photograph. */
#moments-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 22px;columns:auto;align-items:stretch}
#moments-grid .moment-card{display:flex;flex-direction:column;min-width:0;margin:0;background:#fbf8f2;border:1px solid #ded6ca;border-radius:12px;overflow:hidden;align-self:stretch}
#moments-grid .moment-image{width:100%;aspect-ratio:4/3;border-radius:0;flex-shrink:0}
#moments-grid .moment-image img{display:block;width:100%;height:100%;object-fit:cover}
#moments-grid .moment-caption{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:18px 20px 20px;flex:1}
#moments-grid .moment-caption strong{font-size:17px;font-weight:600;line-height:1.55;color:var(--ink);overflow-wrap:anywhere}
#moments-grid .moment-caption small{padding:0;margin-top:auto;font-size:13px;line-height:1.5;color:#8c7254}
#moments-grid .moment-card:hover{border-color:#c4b39c}
#photo-dialog{width:min(1040px,calc(100% - 32px));padding:16px;border-radius:16px;max-height:90svh}
#photo-dialog #large-photo{display:block;width:100%;height:auto;max-height:58svh;object-fit:contain;border-radius:8px;background:#e8e1d6}
#photo-dialog .gallery-caption{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 24px;padding:22px 12px 12px;text-align:left;align-items:start}
#photo-dialog .photo-heading{grid-column:1;grid-row:1;min-width:0}
#photo-dialog p,#photo-dialog h2{padding:0;margin:0;max-width:none}
#photo-dialog #photo-year{font-size:13px;line-height:1.5;font-weight:600;color:#bf702d;margin:0 0 7px}
#photo-dialog #photo-caption{font-size:24px;font-weight:700;line-height:1.4;letter-spacing:-.025em;color:var(--ink)}
#photo-dialog #photo-details{grid-column:1/-1;grid-row:2;display:flex;flex-direction:column;gap:10px;min-width:0}
#photo-dialog #photo-details p{margin:0;padding:0;font-size:16px;line-height:1.7}
#photo-dialog #photo-details .photo-location{font-size:14px;color:#8a755d}
#photo-dialog #photo-details .photo-description{color:#5d5f56}
#photo-dialog .gallery-controls{grid-column:2;grid-row:1;display:flex;align-items:center;gap:12px;padding:0}
#photo-dialog .gallery-controls[hidden]{display:none}
#photo-dialog #gallery-position{font-size:13px;white-space:nowrap}
@media(max-width:900px){#moments-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 18px}}
@media(max-width:560px){#moments-grid{grid-template-columns:1fr;gap:22px}#photo-dialog{padding:10px;width:calc(100% - 24px)}#photo-dialog #large-photo{max-height:48svh}#photo-dialog .gallery-caption{grid-template-columns:minmax(0,1fr);padding:18px 8px 10px;gap:12px}#photo-dialog #photo-caption{font-size:21px}#photo-dialog .gallery-controls{grid-column:1;grid-row:3;justify-content:flex-end;padding-top:6px}#photo-dialog #photo-details p{font-size:15px}#photo-dialog .dialog-close{right:16px;top:16px}}
