/* Scoped to user-added galleries; template artwork and SpiritLife's original gallery are untouched. */
.media-editor #gallery-layout{width:100%;font-size:14px;min-height:44px}.media-editor .media-photo-count{margin:10px 0 18px;font:500 12px/1.6 var(--sans);color:#4a5540}.media-editor .media-notice{overflow-wrap:anywhere}.media-editor .media-actions button{min-height:36px}
.local-media .local-photo-gallery{width:100%;max-width:100%;min-width:0;margin:0;color:inherit}.local-photo-gallery *{box-sizing:border-box}.local-photo-gallery .gallery-track{min-width:0;max-width:100%}.local-photo-gallery .gallery-photo{min-width:0;margin:0;padding:0;transform:none;background:none;box-shadow:none}.local-photo-gallery .gallery-photo>button{display:block;width:100%;padding:0;border:0;background:transparent;color:inherit;cursor:zoom-in;text-align:inherit;overflow:hidden}.local-photo-gallery .gallery-photo img{display:block;width:100%;height:100%;min-width:0;object-fit:cover;margin:0;border-radius:0;background:#80808015}.local-photo-gallery .gallery-photo figcaption{margin:0;padding:12px 0 0;font:italic 18px/1.5 var(--serif);overflow-wrap:anywhere;color:inherit}.local-photo-gallery button:focus-visible,.local-photo-gallery:focus-visible{outline:3px solid currentColor;outline-offset:5px}.local-photo-gallery .gallery-instructions{font:12px/1.6 var(--sans);letter-spacing:0;text-transform:none;margin:15px 0 0;opacity:.8}
.local-photo-gallery.gallery-grid .gallery-track{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px}.local-photo-gallery.gallery-grid .gallery-photo>button{aspect-ratio:4/5}
.local-photo-gallery.gallery-mosaic .gallery-track{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;align-items:start}.local-photo-gallery.gallery-mosaic .gallery-photo>button{aspect-ratio:4/5}.local-photo-gallery.gallery-mosaic .gallery-photo:nth-child(5n+1){grid-column:span 2;grid-row:span 2}.local-photo-gallery.gallery-mosaic .gallery-photo:nth-child(5n+1)>button{aspect-ratio:4/5}.local-photo-gallery.gallery-mosaic .gallery-photo:nth-child(5n+4){grid-column:span 2}.local-photo-gallery.gallery-mosaic .gallery-photo:nth-child(5n+4)>button{aspect-ratio:2/1}.local-photo-gallery.gallery-mosaic .gallery-photo:nth-child(5n+5)>button{aspect-ratio:1/1}
.local-photo-gallery.gallery-slideshow{touch-action:pan-y pinch-zoom}.local-photo-gallery.gallery-slideshow .gallery-track{max-width:980px;margin:0 auto}.local-photo-gallery.gallery-slideshow .gallery-photo[hidden]{display:none!important}.local-photo-gallery.gallery-slideshow .gallery-photo>button{aspect-ratio:16/10;background:#80808012}.local-photo-gallery.gallery-slideshow .gallery-photo img{object-fit:contain;max-height:70vh}.local-photo-gallery.gallery-slideshow .gallery-photo figcaption{text-align:center;min-height:48px}.local-photo-gallery .gallery-navigation{display:flex;align-items:center;justify-content:center;gap:24px;margin:22px auto 0;max-width:980px}.local-photo-gallery .gallery-navigation button{display:inline-flex;align-items:center;justify-content:center;gap:12px;width:auto;min-width:112px;min-height:44px;border:1px solid currentColor;background:transparent;color:inherit;padding:10px 16px;font:13px/1.5 var(--sans);cursor:pointer}.local-photo-gallery .gallery-navigation button:disabled{opacity:.4;cursor:default}.local-photo-gallery .gallery-position{font:12px/1.5 var(--sans);min-width:90px;text-align:center}.local-photo-gallery.gallery-slideshow>.gallery-instructions{text-align:center}
.local-photo-gallery.gallery-filmstrip .gallery-track{display:flex;gap:22px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:auto;padding:5px 5px 19px;margin:-5px -5px 0;max-width:calc(100% + 10px)}.local-photo-gallery.gallery-filmstrip .gallery-photo{flex:0 0 min(72%,340px);scroll-snap-align:start}.local-photo-gallery.gallery-filmstrip .gallery-photo>button{aspect-ratio:4/5}.local-photo-gallery.gallery-filmstrip .gallery-photo:nth-child(3n+2){flex-basis:min(88%,490px)}.local-photo-gallery.gallery-filmstrip .gallery-photo:nth-child(3n+2)>button{aspect-ratio:1.45/1}.local-photo-gallery.gallery-filmstrip .gallery-photo figcaption{font-size:16px}
.local-photo-gallery.gallery-single .gallery-track{display:block;max-width:760px;margin:0 auto}.local-photo-gallery.gallery-single .gallery-photo>button{aspect-ratio:4/3}.local-photo-gallery.gallery-single .gallery-photo img{object-fit:contain;background:#80808012}.local-photo-gallery.gallery-single .gallery-photo{width:100%}
@media(max-width:760px){.local-photo-gallery.gallery-grid .gallery-track{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 14px}.local-photo-gallery.gallery-mosaic .gallery-track{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 14px}.local-photo-gallery.gallery-mosaic .gallery-photo:nth-child(5n+1){grid-column:span 2;grid-row:auto}.local-photo-gallery.gallery-mosaic .gallery-photo:nth-child(5n+1)>button{aspect-ratio:4/3}.local-photo-gallery.gallery-mosaic .gallery-photo:nth-child(5n+4){grid-column:span 2}.local-photo-gallery.gallery-mosaic .gallery-photo:nth-child(5n+4)>button{aspect-ratio:16/9}.local-photo-gallery .gallery-photo figcaption{font-size:16px;padding-top:9px}.local-photo-gallery.gallery-slideshow .gallery-photo>button{aspect-ratio:4/5}.local-photo-gallery .gallery-navigation{gap:12px}.local-photo-gallery .gallery-navigation button{padding:9px 11px;min-width:90px;gap:6px;font-size:12px}.local-photo-gallery .gallery-position{min-width:78px;font-size:11px}.local-photo-gallery.gallery-filmstrip .gallery-track{gap:16px}.local-photo-gallery.gallery-single .gallery-photo>button{aspect-ratio:4/5}}
@media(prefers-reduced-motion:reduce){.local-photo-gallery,.local-photo-gallery *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
.gallery-example-note{font:13px/1.65 var(--sans)!important;border-left:2px solid currentColor;padding:10px 16px;margin:16px 0 24px!important;text-align:left}
.design-caption .design-format-note{font:12px/1.6 var(--sans);letter-spacing:0;text-transform:none;color:var(--muted);margin:8px 0 15px}
/* A 320px page leaves less than 282px inside a padded gallery. Keep controls in bounds. */
@media(max-width:400px){.local-photo-gallery .gallery-navigation{gap:8px;flex-wrap:wrap}.local-photo-gallery .gallery-navigation button{min-width:44px;padding:10px}.local-photo-gallery .gallery-navigation button>span{display:none}.local-photo-gallery .gallery-position{min-width:70px}}
/* Constrain the slideshow frame, not just its image, so the click area matches the media. */
.local-photo-gallery.gallery-slideshow .gallery-photo>button{position:relative;max-height:70vh}
.local-photo-gallery.gallery-slideshow .gallery-photo img{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:contain}
