/* Keep gallery navigation fixed beside the image, including while zoomed. */
#gallery-dialog{height:100dvh;max-height:100dvh;background:#080705;color:#f2e8d7}
#gallery-dialog .lightbox-top{min-height:68px;padding:10px 24px;gap:16px}
#gallery-dialog .lightbox-top .icon-button,#gallery-dialog .zoom-button{width:44px;height:44px;flex:none}
#gallery-dialog .lightbox-top .icon-button{background:#f2e8d7;color:#20170e;border:1px solid #b58a4f}
#gallery-dialog .lightbox-media{position:relative;display:flex;flex:1;min-width:0;min-height:0}
#gallery-dialog .lightbox-stage{width:100%;height:100%;min-width:0;padding:12px 96px}
#gallery-dialog .lightbox-stage img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
#gallery-dialog .lightbox-stage.is-zoomed img{width:150%;height:auto;min-height:100%;max-width:none;max-height:none}
#gallery-dialog .lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:1;width:64px;height:64px;border:2px solid #b58a4f;border-radius:50%;background:#f2e8d7;color:#20170e;box-shadow:0 4px 18px #0008;display:grid;place-items:center;padding:0}
#gallery-dialog [data-gallery-prev]{inset-inline-start:20px}
#gallery-dialog [data-gallery-next]{inset-inline-end:20px}
#gallery-dialog .lightbox-nav .ui-arrow{width:28px;height:28px;stroke-width:2}
#gallery-dialog .lightbox-nav:hover:not(:disabled){background:#ffefd4;border-color:#e3bf85}
#gallery-dialog .lightbox-nav:disabled{opacity:.45;cursor:default}
#gallery-dialog button:focus-visible{outline:3px solid #e3bf85;outline-offset:4px}
#gallery-dialog .lightbox-bottom{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:16px;min-height:64px;padding:10px 24px}
#gallery-caption{min-width:0;overflow-wrap:anywhere;font-size:12px;color:#d7c8b2}
#gallery-counter{min-width:84px;text-align:center;white-space:nowrap;font-size:14px;letter-spacing:.08em}
#gallery-dialog .zoom-button{justify-self:end}
@media(max-width:760px){
 #gallery-dialog .lightbox-top{min-height:60px;padding:8px 12px;font-size:12px}
 #gallery-dialog .lightbox-stage{padding:8px 6px}
 #gallery-dialog .lightbox-nav{width:48px;height:48px}
 #gallery-dialog [data-gallery-prev]{inset-inline-start:8px}
 #gallery-dialog [data-gallery-next]{inset-inline-end:8px}
 #gallery-dialog .lightbox-nav .ui-arrow{width:23px;height:23px}
 #gallery-dialog .lightbox-bottom{grid-template-columns:44px minmax(0,1fr) 44px;gap:6px;padding:8px 12px}
 #gallery-caption{grid-column:1/-1;text-align:center}
 #gallery-caption:empty{display:none}
 #gallery-counter{grid-column:2;grid-row:2}
 #gallery-dialog .zoom-button{grid-column:3;grid-row:2}
}
