.photo-overlay #lightbox-gallery-grid{columns:auto!important;padding:0!important}
.works-carousel-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior:contain;scrollbar-width:none}
.works-carousel-track::-webkit-scrollbar{display:none}
.works-carousel-slide{min-width:0;scroll-snap-stop:always;display:flex;align-items:center;justify-content:center;padding:0;border:0;cursor:zoom-in}
.works-carousel-controls{display:flex;justify-content:center;align-items:center}
.works-carousel-controls button{width:44px;height:44px;border:1px solid;border-radius:50%;font-size:22px}
.works-carousel-controls button:disabled{opacity:.25}
.works-carousel-counter{font-size:14px;min-width:64px;text-align:center}
#lightbox-modal.photo-overlay{padding:0;background:#111;backdrop-filter:none;color:white}
.photo-overlay #lightbox-content-box{position:relative;width:100%;max-width:none;height:100dvh;max-height:none;padding:0;gap:0;border:0;border-radius:0;box-shadow:none;background:transparent;overflow:hidden}
.photo-overlay #lightbox-content-box>div:first-child{position:absolute;top:max(14px,env(safe-area-inset-top));left:20px;z-index:2;border:0;padding:0;pointer-events:none}
.photo-overlay #lightbox-content-box>div:first-child>div,.photo-overlay #lightbox-desc{display:none}
.photo-overlay #lightbox-title{color:white;font-size:15px;font-weight:500;text-shadow:0 1px 8px #000}
.photo-overlay #lightbox-content-box>div:last-child{height:100%;max-height:none;background:transparent;overflow:hidden}
.photo-overlay #lightbox-gallery-grid{height:100%}
.photo-overlay .works-carousel-track{position:relative;height:100%;align-items:center;gap:12px;padding:52px 6vw 64px;scroll-padding-inline:6vw;touch-action:pan-x pinch-zoom}
.photo-overlay .works-carousel-slide{flex:0 0 auto;width:auto;height:100%;max-width:88vw;background:transparent;scroll-snap-align:center}
.photo-overlay .works-carousel-slide img{height:100%;width:auto;max-width:88vw;object-fit:contain}
.photo-overlay .works-carousel-controls{position:absolute;bottom:max(8px,env(safe-area-inset-bottom));left:0;right:0;padding:0;gap:20px;pointer-events:none}
.photo-overlay .works-carousel-controls button{background:#ffffff18;color:white;border-color:#ffffff40;pointer-events:auto}
.photo-overlay .works-carousel-counter{color:white}
#lightbox-modal.photo-overlay>button{top:max(8px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));width:44px;height:44px;color:white;background:#0008;border-radius:50%;font-size:32px;z-index:220}
@media(min-width:768px){.photo-overlay .works-carousel-track{gap:20px;padding-inline:12vw;scroll-padding-inline:12vw}.photo-overlay .works-carousel-slide,.photo-overlay .works-carousel-slide img{max-width:76vw}}
@media(max-width:767px){.photo-overlay .works-carousel-slide{width:86vw;max-width:86vw}.photo-overlay .works-carousel-slide img{width:100%;height:100%;object-fit:cover}.photo-overlay .works-carousel-track{gap:10px}}

/* Override the older homepage modal theme only for photo albums. */
#lightbox-modal.photo-overlay{padding:0!important;background:rgba(20,18,15,.28)!important;backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important}
#lightbox-modal.photo-overlay #lightbox-content-box{padding:0!important;gap:0!important;background:transparent!important;border:0!important;border-radius:0!important}
#lightbox-modal.photo-overlay #lightbox-content-box>div:first-child{padding:0!important}
#lightbox-modal.photo-overlay #lightbox-content-box>div:last-child{background:transparent!important;border-radius:0!important}
#lightbox-modal.photo-overlay>button{top:max(8px,env(safe-area-inset-top))!important;right:max(12px,env(safe-area-inset-right))!important}
