.gallery.gallery-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px;margin:20px 0;align-items:start}.gallery-grid .gallery-tile{min-width:0;border:1px solid #e5d9cb;border-radius:13px;overflow:hidden;background:#fffaf4}.gallery-grid a.gallery-open{display:block!important;padding:0!important;margin:0!important;float:none!important}.gallery-grid a.gallery-open img{display:block!important;width:100%!important;height:140px!important;max-height:140px!important;object-fit:cover!important;border-radius:0!important;margin:0!important;cursor:zoom-in}.gallery-grid .gallery-caption{font:13px/1.5 system-ui,sans-serif;padding:10px 12px;margin:0;white-space:normal;overflow-wrap:anywhere;color:#503829}.gallery-caption:empty{display:none}.gallery-viewer{padding:0;border:1px solid #ad8d70;border-radius:16px;background:#fffaf4;color:#382a21;max-width:min(960px,94vw);width:94vw;max-height:94dvh;overflow:auto;box-shadow:0 20px 80px #0006}.gallery-viewer::backdrop{background:#21180fd9}.gallery-viewer header{display:flex;justify-content:space-between;align-items:center;padding:10px 18px}.gallery-viewer button{font:16px system-ui,sans-serif;min-width:44px;min-height:44px;border:1px solid #d4c0a9;border-radius:8px;background:#fffaf4;color:#503829;cursor:pointer}.gallery-viewer img{display:block;width:100%;height:auto;max-height:70dvh;object-fit:contain;background:#30271f}.gallery-viewer p{padding:16px 20px;font:16px/1.6 system-ui,sans-serif;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.gallery-viewer p:empty{display:none}.gallery-viewer button:focus-visible,.gallery-open:focus-visible{outline:3px solid #aa794a;outline-offset:3px}.admin-app .gallery-admin-media{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}.admin-app .gallery-admin-media img{height:130px;object-fit:cover}.gallery-admin-media textarea{font:14px/1.5 system-ui,sans-serif}.gallery-admin-media details{padding:12px}.gallery-admin-media label{font-size:13px}.gallery-admin-media button{font-size:12px}.gallery-admin-media details form{display:block}
@media(max-width:500px){.gallery.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gallery-grid a.gallery-open img{height:115px!important}.gallery-viewer img{max-height:65dvh}.gallery-viewer p{font-size:14px}.admin-app .gallery-admin-media{grid-template-columns:1fr}}
/* Captions remain available to the lightbox, but are hidden on gallery tiles. */
.gallery.gallery-grid .gallery-tile .gallery-caption{display:none!important}
/* Navigation stays inside the image area, never across the caption. */
.gallery-viewer .gallery-stage{position:relative;min-height:100px;background:#30271f}
.gallery-viewer button.gallery-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:1;display:flex;align-items:center;justify-content:center;width:48px;height:56px;padding:0;border:1px solid #ffffff70;border-radius:12px;background:#2b1d13c9;color:#fff;box-shadow:0 2px 12px #0005;line-height:1;font-size:42px;touch-action:manipulation}
.gallery-viewer button.gallery-nav:hover{background:#503829ed}
.gallery-viewer .gallery-previous{left:12px}.gallery-viewer .gallery-next{right:12px}
.gallery-viewer button.gallery-nav[hidden]{display:none!important}
.gallery-viewer button.gallery-nav:focus-visible{outline:3px solid white;outline-offset:3px}
@media(max-width:500px){.gallery-viewer button.gallery-nav{width:44px;height:48px;font-size:36px;border-radius:9px}.gallery-viewer .gallery-previous{left:8px}.gallery-viewer .gallery-next{right:8px}}
