/* Gallery page: justified rows of thumbnails, empty state, full-screen viewer. */
.hall { max-width: 1320px; width: 100%; margin: 0 auto; padding: clamp(28px, 6vh, 64px) var(--pad) clamp(56px, 9vh, 110px); }
.hall-head { margin-bottom: clamp(24px, 4vh, 40px); }
.hall-head .kicker[hidden] { display: none; }
.hall-head h1 { font-family: var(--display); font-weight: 300; font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.15; letter-spacing: -.01em; margin: 18px 0 12px; }
.hall-head .lead { max-width: 40ch; margin: 0; }

.grid { position: relative; }
.grid .tile img { opacity: 0; transition: opacity .6s, transform .6s cubic-bezier(.2,.8,.2,1); }
.grid .tile img.ok { opacity: 1; }

.empty { text-align: center; padding: 10vh 20px; }
.empty .sil { width: 96px; aspect-ratio: 1; margin: 0 auto 22px; background: url(/assets/silhouette.webp) center / contain no-repeat; opacity: .5; animation: breathe var(--breath) ease-in-out infinite; }
.empty p { font: 500 .72rem/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin: 0; }
@keyframes breathe { 50% { transform: scale(1.05); opacity: .3; } }

/* ---------- viewer ---------- */
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(6,5,9,.97); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); touch-action: none; animation: lbIn .25s ease; }
.lb[hidden] { display: none; }
@keyframes lbIn { from { opacity: 0; } }
.lb-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font: 500 .7rem/1 var(--mono); letter-spacing: .14em; color: var(--muted); }
.lb-stage { position: relative; min-height: 0; overflow: hidden; }
/* a strip of three slides — previous, current, next (--pos -1, 0, 1); gallery.js moves the strip after the finger */
.lb-track { position: absolute; inset: 0; will-change: transform; }
.lb-slide { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: 0 clamp(8px, 7vw, 96px); container-type: size; transform: translateX(calc(var(--pos, 0) * 100%)); }
/* the box is set by the picture's real proportions (--r) and width (--w), so the thumbnail and the full version take the same place */
.lb-slide img { width: min(100cqw, 100cqh * var(--r, 1), var(--w, 100cqw)); height: auto; aspect-ratio: var(--r, 1); border-radius: 2px; user-select: none; -webkit-user-drag: none; transform-origin: 0 0; }
.lb-slide img:not([src]) { visibility: hidden; }
.lb-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); min-height: 72px; }
.lb-tools { display: flex; align-items: center; gap: 8px; }
.lb-step { display: none; }
.lb-cap { font: 500 .74rem/1.4 var(--mono); letter-spacing: .08em; color: var(--ink); overflow-wrap: anywhere; }
.lb-cap:empty { display: none; }
.lb-round { position: relative; width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(10,9,14,.4); color: var(--ink); font-size: 1.05rem; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(var(--rule), .22); transition: box-shadow .2s; }
@media (hover: hover) { .lb-round:hover { box-shadow: inset 0 0 0 1px rgba(var(--rule), .6); } }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb.single .lb-prev, .lb.single .lb-next { display: none; }

/* phone: the side arrows give way to small ones next to "copy link", like the pager under the lens */
@media (max-width: 860px) {
  .lb-prev, .lb-next { display: none; }
  .lb-step { display: inline-flex; padding: 0; width: 38px; height: 38px; justify-content: center; letter-spacing: 0; font-size: .9rem; }
  /* the caption keeps its own line even when empty, so the buttons and the picture don't jump while swiping */
  .lb-cap, .lb-cap:empty { display: block; flex-basis: 100%; min-height: 1.4em; text-align: center; }
  .lb.single .lb-step { display: none; }
}
@media (max-width: 860px) and (pointer: coarse) {
  .lb-step { width: 44px; height: 44px; }
}
