.gallery-lightbox[hidden]{display:none}
.gallery-lightbox{position:fixed;z-index:1000;inset:0;display:flex;align-items:stretch;justify-content:center;color:#fff}
.gallery-lightbox-backdrop{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:rgba(6,10,18,.94);cursor:zoom-out}
.gallery-lightbox-panel{position:relative;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:100%;height:100%;pointer-events:none}
.gallery-lightbox-toolbar{z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:58px;padding:8px 16px;background:rgba(0,0,0,.28);pointer-events:auto}
.gallery-lightbox-counter{font-size:14px;color:#dce2ec}
.gallery-lightbox-actions{display:flex;gap:8px}
.gallery-lightbox-actions button{min-width:40px;height:40px;padding:0 10px;border:1px solid rgba(255,255,255,.3);border-radius:8px;background:rgba(255,255,255,.12);color:#fff;font:inherit;font-size:20px;cursor:pointer}
.gallery-lightbox-actions button[data-gallery-action="reset"]{font-size:14px}
.gallery-lightbox-actions button:hover{background:rgba(255,255,255,.24)}
.gallery-lightbox-viewport{position:relative;display:flex;align-items:center;justify-content:center;min-height:0;overflow:hidden;pointer-events:auto;touch-action:none;user-select:none}
.gallery-lightbox-viewport>img{max-width:calc(100vw - 96px);max-height:calc(100vh - 135px);object-fit:contain;transform-origin:center;will-change:transform;cursor:grab}
.gallery-lightbox-viewport>img:active{cursor:grabbing}
.gallery-lightbox-nav{position:absolute;z-index:2;top:50%;width:48px;height:64px;padding:0;border:0;border-radius:9px;background:rgba(0,0,0,.36);color:#fff;font-size:44px;line-height:1;transform:translateY(-50%);cursor:pointer}
.gallery-lightbox-nav:hover{background:rgba(0,0,0,.58)}
.gallery-lightbox-prev{left:12px}.gallery-lightbox-next{right:12px}
.gallery-lightbox-name{min-height:46px;padding:9px 18px 13px;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;color:#e7ebf2;pointer-events:none}
body.gallery-lightbox-open{overflow:hidden}
@media(max-width:720px){
  .gallery-lightbox-toolbar{padding:7px 9px}.gallery-lightbox-actions{gap:5px}
  .gallery-lightbox-actions button{min-width:38px;height:38px;padding:0 8px}
  .gallery-lightbox-viewport>img{max-width:100vw;max-height:calc(100vh - 120px)}
  .gallery-lightbox-nav{width:38px;height:54px;font-size:36px}.gallery-lightbox-prev{left:4px}.gallery-lightbox-next{right:4px}
}

.gallery-detail-tags{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}.gallery-detail-tags a{padding:4px 12px;border-radius:20px;background:#edf5ff;color:#2866a8;font-size:14px}

/* Gallery directory pages only: preserve natural image proportions and pack columns. */
.hmTop ul.gallery-directory-grid{width:100%;column-count:6;column-gap:24px}
.hmTop .gallery-directory-grid>li{float:none;width:100%;padding:0;margin:0 0 24px;break-inside:avoid}
.hmTop .gallery-directory-grid .thumbnail{margin:0 0 10px}
.hmTop .gallery-directory-grid .thumbnail a{padding-bottom:0}
.hmTop .gallery-directory-grid .thumbnail img{position:static;display:block;width:100%;height:auto}
@media(max-width:1280px){.hmTop ul.gallery-directory-grid{column-count:3;column-gap:20px}.hmTop .gallery-directory-grid>li{margin-bottom:20px}}
@media(max-width:760px){.hmTop ul.gallery-directory-grid{column-count:2;column-gap:12px}.hmTop .gallery-directory-grid>li{margin-bottom:16px}}
