/* ZHI — listing photo gallery (lightbox) */
.glb {
	width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; color: #fff; background: #061521;
	overflow: hidden; overscroll-behavior: contain;
}
.glb[open] { display: grid; grid-template-rows: auto 1fr auto; animation: glbIn 380ms var(--ease-cinema); }
.glb::backdrop { background: #04101a; }
@keyframes glbIn { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
body.glb-open { overflow: hidden; }

.glb__bar { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem clamp(1rem, 3vw, 2rem); }
.glb__count { margin: 0; font-size: var(--fs-sm); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); font-variant-numeric: tabular-nums; }
.glb__close, .glb__nav {
	display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.06); color: #fff; cursor: pointer;
	transition: background-color 250ms, transform 250ms var(--ease-out);
}
.glb__close .icon, .glb__nav .icon { width: 20px; height: 20px; }
.glb__close:hover, .glb__nav:hover { background: rgba(255, 255, 255, 0.18); }
.glb__nav:active { transform: scale(0.94); }
.glb__close:focus-visible, .glb__nav:focus-visible, .glb__thumb:focus-visible { outline: 2px solid var(--teal-300); outline-offset: 2px; }

.glb__stage { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(0.5rem, 2vw, 1.5rem); min-height: 0; padding: 0 clamp(0.75rem, 3vw, 2rem); }
.glb__figure { margin: 0; min-width: 0; min-height: 0; height: 100%; display: grid; place-items: center; touch-action: pan-y; }
.glb__figure img {
	max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--radius);
	/* Never show alt text or a broken-image label behind the photo while it loads. */
	color: transparent; font-size: 0; background: transparent; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
	transition: opacity 260ms var(--ease-out);
}
.glb__figure img.is-loading { opacity: 0; }

.glb__foot { padding: 0.75rem clamp(1rem, 3vw, 2rem) 1.25rem; }
.glb__thumbs { display: flex; gap: 0.5rem; width: max-content; max-width: 100%; margin-inline: auto; overflow-x: auto; padding: 0.25rem 0.25rem 0.5rem; scrollbar-width: thin; }
.glb__thumb { flex: none; width: 76px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--navy-800); cursor: pointer; opacity: 0.55; transition: opacity 250ms, border-color 250ms; }
.glb__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.glb__thumb:hover { opacity: 0.9; }
.glb__thumb[aria-current="true"] { opacity: 1; border-color: var(--bronze-300, #E3CB9C); }

@media (max-width: 599px) {
	.glb__stage { grid-template-columns: 1fr; }
	.glb__nav { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); background: rgba(7, 27, 41, 0.6); }
	.glb__nav--prev { left: 1rem; }
	.glb__nav--next { right: 1rem; }
	.glb__nav:active { transform: translateY(-50%) scale(0.94); }
	.glb__thumb { width: 60px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .glb[open] { animation: none; } .glb__figure img { transition: none; } }