/* thumbnail grid and the zoomable photo viewer it opens; pairs with assets/js/gallery.js */
.gallery{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:26px}
figure{margin:0}
.shot{
  position:relative;width:100%;height:var(--thumb-h);overflow:hidden;
  background:var(--paper-2);border:1px solid var(--rule);
}
.shot-open{
  position:absolute;inset:0;display:block;width:100%;height:100%;
  padding:0;border:0;background:none;font:inherit;color:inherit;cursor:zoom-in;
}
.shot-open img{width:100%;height:100%;object-fit:cover;display:block}
.shot-open::after{
  content:"\2922";position:absolute;right:0;bottom:0;
  width:26px;height:26px;line-height:26px;text-align:center;
  font-size:.85rem;color:var(--paper);background:rgba(22,33,28,.72);
  opacity:0;transition:opacity .12s ease;
}
.shot-open:hover::after,.shot-open:focus-visible::after{opacity:1}
@media(max-width:640px){:root{--thumb-h:150px}.shot-open::after{opacity:1}}
figcaption{
  font-family:"IBM Plex Mono",monospace;font-size:.62rem;letter-spacing:.09em;
  color:var(--ink-soft);margin-top:6px;line-height:1.5;
}
.imgfail{
  display:none;position:absolute;inset:0;align-items:center;justify-content:center;
  text-align:center;padding:18px;font-family:"IBM Plex Mono",monospace;
  font-size:.68rem;line-height:1.6;color:var(--ink-soft);
}
.shot.failed .imgfail{display:flex}
.shot.failed .shot-open{display:none}


/* ---------- lightbox ---------- */
.lightbox{
  border:none;padding:0;margin:0;background:transparent;
  width:100vw;max-width:100vw;height:100vh;max-height:100vh;
  overflow:hidden;color:var(--paper);
}
.lightbox::backdrop{background:rgba(12,18,15,.94)}
.lb-stage{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  overflow:hidden;touch-action:none;cursor:zoom-in;
}
.lb-stage.zoomed{cursor:grab}
.lb-stage.zoomed.dragging{cursor:grabbing}
.lightbox img{
  max-width:94vw;max-height:82vh;width:auto;height:auto;display:block;
  transform-origin:center center;will-change:transform;
  -webkit-user-select:none;user-select:none;-webkit-user-drag:none;
}
.lb-bar{
  position:absolute;left:0;right:0;bottom:0;display:flex;align-items:flex-end;
  gap:18px;padding:14px 20px 18px;background:linear-gradient(transparent,rgba(12,18,15,.9) 40%);
}
.lb-cap{
  flex:1;min-width:0;font-family:"IBM Plex Mono",monospace;font-size:.66rem;
  letter-spacing:.08em;line-height:1.6;color:var(--paper-2);
}
.lb-count{font-family:"IBM Plex Mono",monospace;font-size:.66rem;letter-spacing:.12em;color:var(--silver);white-space:nowrap}
.lightbox button{
  font:inherit;color:var(--paper);background:rgba(233,235,226,.1);
  border:1px solid rgba(233,235,226,.32);cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.lightbox button:hover{background:rgba(233,235,226,.22)}
.lightbox button:focus-visible{outline:2.5px solid var(--oak);outline-offset:3px}
.lb-close{position:absolute;top:16px;right:16px;width:42px;height:42px;font-size:1.15rem;z-index:2}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:46px;height:64px;font-size:1.3rem;z-index:2}
.lb-prev{left:14px}
.lb-next{right:14px}
.lb-zoom{position:absolute;top:16px;left:16px;display:flex;gap:8px;z-index:2}
.lb-zoom button{width:42px;height:42px;font-size:1.05rem}
@media(max-width:640px){
  .lightbox img{max-width:98vw;max-height:74vh}
  .lb-nav{width:40px;height:56px}
  .lb-cap{font-size:.6rem}
}
