.site-photo-gallery.site-extra-section{display:block;position:relative;width:100%;max-width:100%;min-width:0;padding:0;background:transparent;box-sizing:border-box}
.site-photo-gallery .site-photo-track{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:thin}
.site-photo-gallery .site-photo-tile{position:relative;flex:0 0 70%;display:block;min-width:0;padding:0;border:0;border-radius:0;overflow:hidden;cursor:zoom-in;background:#17202b;scroll-snap-align:start}
.site-photo-gallery .site-photo-tile img{display:block;width:100%;height:100%;aspect-ratio:4/3;object-fit:cover;max-width:none;margin:0}
.site-photo-tile span{position:absolute;right:10px;bottom:10px;color:white;background:#0009;padding:4px 9px;border-radius:20px;font:14px/1.4 sans-serif}
.site-photo-gallery[data-photo-gallery=grid2] .site-photo-track{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}
.site-photo-gallery .site-photo-prev,.site-photo-gallery .site-photo-next{position:absolute;top:50%;transform:translateY(-50%);width:42px;height:42px;padding:0;border:0;border-radius:50%;background:#fffffff0;color:#17202b;cursor:pointer;box-shadow:0 2px 10px #0003}
.site-photo-prev{left:12px}.site-photo-next{right:12px}
.site-photo-dialog{position:fixed;inset:0;box-sizing:border-box;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:60px 56px;border:0;background:#080c12f5;color:white}
.site-photo-dialog::backdrop{background:#000d}.site-photo-dialog img{display:block;width:100%;height:100%;object-fit:contain}.site-photo-dialog button{position:absolute;background:#26303c;color:white;border:1px solid #ffffff50;border-radius:50%;width:42px;height:42px;cursor:pointer;font:24px sans-serif}.site-photo-dialog [data-close]{top:12px;right:16px}.site-photo-dialog [data-prev]{left:8px;top:50%}.site-photo-dialog [data-next]{right:8px;top:50%}.site-photo-dialog p{position:absolute;bottom:8px;left:0;width:100%;text-align:center;font:16px sans-serif}.site-photo-gallery button:focus-visible,.site-photo-dialog button:focus-visible{outline:3px solid #3288ff;outline-offset:-3px}
@media(max-width:600px){.site-photo-gallery .site-photo-track{gap:8px}.site-photo-gallery .site-photo-tile{flex-basis:86%}.site-photo-dialog{padding:64px 44px}.site-photo-tile span{font-size:12px;right:5px;bottom:5px}}

/* The gallery remains as tall as its visible track, including after editor resizing. */
.site-photo-gallery .site-photo-tile img{height:auto}

/* Defaults apply only to newly created horizontal galleries. */
.site-photo-gallery.site-extra-section[data-carousel-defaults="1"]{width:812px;max-width:100%!important;margin-left:auto!important;margin-right:auto!important}

@media(max-width:768px){
 .site-photo-gallery.site-extra-section[data-carousel-defaults="1"]{width:calc(100% - 16px);min-height:0}
 .site-photo-gallery[data-carousel-defaults="1"] .site-photo-track{gap:8px}
 .site-photo-gallery[data-carousel-defaults="1"] .site-photo-tile{flex-basis:86%}
}

/* Center navigation on the photo track, independent of the editor's minimum gallery height. */
.site-photo-gallery.site-extra-section[data-photo-gallery=carousel]{display:grid;grid-template-columns:minmax(0,1fr);align-content:start}
.site-photo-gallery[data-photo-gallery=carousel]>.site-photo-track{grid-area:1/1;min-width:0}
.site-photo-gallery[data-photo-gallery=carousel]>:is(.site-photo-prev,.site-photo-next){grid-area:1/1;position:relative;top:auto;left:auto;right:auto;transform:none;align-self:center;justify-self:start;margin:0 12px;z-index:1}
.site-photo-gallery[data-photo-gallery=carousel]>.site-photo-next{justify-self:end}

/* Modern gallery template: open spacing, strong title, image-led composition. */
.site-page-content.site-gallery-modern{max-width:1440px;margin:32px auto 80px;padding:24px 48px;color:#172a35}
.site-gallery-modern .site-page-intro{max-width:none;padding:0 0 32px;margin:0}
.site-gallery-modern .site-page-intro h1{font-size:clamp(2.75rem,7vw,6rem);font-weight:400;line-height:1.08;letter-spacing:-.035em;margin:0 0 16px}
.site-gallery-modern .site-page-intro p{font-size:1.125rem;line-height:1.7;max-width:680px;margin:0}
.site-gallery-modern .site-page-intro p:empty{display:none}
.site-gallery-modern .site-photo-gallery{margin:0 auto 32px}
.site-gallery-modern .site-photo-track{gap:18px}
.site-gallery-modern .site-photo-tile{border-radius:14px}
.site-gallery-modern .site-photo-tile img{transition:transform .5s ease}
.site-gallery-modern .site-photo-tile:hover img{transform:scale(1.035)}
.site-gallery-modern .site-photo-tile span{background:#10202acc;backdrop-filter:blur(10px);font-size:14px;padding:7px 12px;right:14px;bottom:14px}
.site-photo-gallery[data-photo-gallery=grid3] .site-photo-track{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;scroll-snap-type:none}
.site-photo-gallery[data-photo-gallery=mosaic] .site-photo-track{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:clamp(130px,17vw,235px);overflow:visible;scroll-snap-type:none}
.site-photo-gallery[data-photo-gallery=mosaic] .site-photo-tile{height:100%}
.site-photo-gallery[data-photo-gallery=mosaic] .site-photo-tile:nth-child(6n+1),.site-photo-gallery[data-photo-gallery=mosaic] .site-photo-tile:nth-child(6n+6){grid-column:span 2;grid-row:span 2}
.site-photo-gallery[data-photo-gallery=mosaic] .site-photo-tile img{height:100%;aspect-ratio:auto}
@media(max-width:900px){
 .site-page-content.site-gallery-modern{padding:20px 24px;margin-top:20px}
 .site-photo-gallery[data-photo-gallery=grid3] .site-photo-track{grid-template-columns:repeat(2,minmax(0,1fr))}
 .site-photo-gallery[data-photo-gallery=mosaic] .site-photo-track{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:clamp(140px,30vw,260px)}
 .site-photo-gallery[data-photo-gallery=mosaic] .site-photo-tile:nth-child(6n+1),.site-photo-gallery[data-photo-gallery=mosaic] .site-photo-tile:nth-child(6n+6){grid-column:span 2;grid-row:span 1}
}
@media(max-width:600px){
 .site-page-content.site-gallery-modern{padding:16px;margin:16px auto 40px}
 .site-gallery-modern .site-page-intro{padding-bottom:24px}
 .site-gallery-modern .site-photo-track{gap:10px}
 .site-gallery-modern .site-photo-tile{border-radius:10px}
 .site-gallery-modern .site-photo-tile span{right:8px;bottom:8px;padding:4px 8px}
}
@media(prefers-reduced-motion:reduce){.site-gallery-modern .site-photo-tile img{transition:none}.site-gallery-modern .site-photo-tile:hover img{transform:none}}

/* Independent view modes; the editor and gallery share the 768px breakpoint. */
.site-photo-gallery:not([data-photo-gallery=carousel])>[data-photo-scroll]{display:none}
.site-photo-gallery[data-photo-gallery=single] .site-photo-track{display:block;overflow:visible}
.site-photo-gallery[data-photo-gallery=single] .site-photo-tile{width:100%}
.site-photo-gallery[data-photo-gallery=single] .site-photo-tile:not(:first-child),.site-photo-gallery[data-photo-gallery=single] .site-photo-tile span{display:none}
@media(max-width:900px){
 .site-photo-gallery[data-gallery-desktop][data-photo-gallery=grid3] .site-photo-track{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Additional gallery modes. The existing carousel rules stay unchanged. */
.site-photo-gallery[data-photo-gallery=vertical] .site-photo-track{display:grid;grid-template-columns:minmax(0,1fr);overflow:visible;scroll-snap-type:none}
.site-photo-gallery[data-photo-gallery=vertical] .site-photo-tile{width:100%;height:auto}
.site-photo-gallery[data-photo-gallery=vertical] .site-photo-tile img{height:auto;aspect-ratio:auto;object-fit:contain}
.suite-gallery[data-photo-gallery]:not([data-photo-gallery=carousel]){height:auto!important;max-height:none!important;overflow:visible!important}
.suite-gallery[data-photo-gallery]:not([data-photo-gallery=carousel]) .suite-gallery__viewport{display:grid!important;grid-template-columns:minmax(0,1fr);gap:16px;overflow:visible!important;scroll-snap-type:none;height:auto!important;padding:0}
.suite-gallery[data-photo-gallery]:not([data-photo-gallery=carousel]) .suite-gallery__slide{width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;flex:none;aspect-ratio:auto}
.suite-gallery[data-photo-gallery]:not([data-photo-gallery=carousel]) .suite-gallery__slide img{display:block;width:100%!important;max-width:100%!important;height:auto!important;aspect-ratio:4/3;object-fit:cover;transform:none!important}
.suite-gallery[data-photo-gallery=vertical] .suite-gallery__slide img{aspect-ratio:auto!important;object-fit:contain!important}
.suite-gallery[data-photo-gallery=grid2] .suite-gallery__viewport{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.suite-gallery[data-photo-gallery=grid3] .suite-gallery__viewport{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.suite-gallery[data-photo-gallery=mosaic] .suite-gallery__viewport{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-auto-rows:clamp(130px,17vw,235px)}
.suite-gallery[data-photo-gallery=mosaic] .suite-gallery__slide{height:100%!important}
.suite-gallery[data-photo-gallery=mosaic] .suite-gallery__slide:nth-child(6n+1),.suite-gallery[data-photo-gallery=mosaic] .suite-gallery__slide:nth-child(6n+6){grid-column:span 2;grid-row:span 2}
.suite-gallery[data-photo-gallery=mosaic] .suite-gallery__slide img{height:100%!important;aspect-ratio:auto}
.suite-gallery[data-photo-gallery]:not([data-photo-gallery=carousel]) .suite-gallery__scroll-arrow{display:none!important}
@media(max-width:768px){.suite-gallery[data-photo-gallery=mosaic] .suite-gallery__viewport{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:clamp(140px,30vw,260px)}.suite-gallery[data-photo-gallery=mosaic] .suite-gallery__slide:nth-child(6n+1),.suite-gallery[data-photo-gallery=mosaic] .suite-gallery__slide:nth-child(6n+6){grid-row:span 1}}
