body.gallery-photo-open { overflow: hidden; }
.gallery-photo-dialog { width: min(1200px, calc(100vw - 28px)); max-width: none; max-height: calc(100dvh - 28px); padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--cream); color: var(--ink); overflow-y: auto; }
.gallery-photo-dialog::backdrop { background: rgba(23, 22, 19, .84); }
.gallery-photo-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.gallery-photo-dialog .gallery-photo-toolbar h2 { font: 600 1.12rem/1.4 var(--sans, system-ui); margin: 0; overflow-wrap: anywhere; }
.gallery-photo-toolbar .button { flex-shrink: 0; min-height: 44px; }
.gallery-photo-dialog > p { margin: 10px 0; font-size: .875rem; }
.gallery-photo-status:empty { display: none; }
.gallery-photo-stage { display: grid; place-items: center; min-height: 100px; background: #282721; border-radius: 8px; }
.gallery-photo-stage img { display: block; max-width: 100%; max-height: calc(100dvh - 190px); width: auto; height: auto; object-fit: contain; }
.gallery-photo-stage img:not([src]), .gallery-photo-stage img[hidden] { display: none; }
.gallery-photo-toolbar .button:focus-visible, [data-gallery-photo]:focus-visible { outline: 3px solid var(--gold-600, #9a7c42); outline-offset: 4px; }
.gallery-detail-heading { margin-bottom: 20px; }
.gallery-detail-heading h1 { margin: 8px 0; overflow-wrap: anywhere; }
.gallery-detail-image { display: grid; place-items: center; padding: 12px; background: #282721; border-radius: 12px; }
.gallery-detail-image img { max-width: 100%; max-height: 75dvh; width: auto; height: auto; display: block; }
@media (max-width: 600px) {
  .gallery-photo-dialog { padding: 12px; width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .gallery-photo-toolbar { gap: 10px; align-items: flex-start; }
  .gallery-photo-dialog .gallery-photo-toolbar h2 { font-size: 1rem; }
  .gallery-photo-toolbar .button { padding: 9px 12px; }
  .gallery-detail-heading { flex-direction: column; }
  .gallery-photo-stage img { max-height: calc(100dvh - 210px); }
}
