/* Handz Up Gunz Down — the gallery page and the share-photos page. Same tokens as site.css.
   Nothing moves on its own; the photo viewer is a solid navy sheet (no blur, never black). */

/* ---------- the gallery: whole photos, never cropped, in columns ---------- */
.gal{columns:3 260px;column-gap:12px;margin:0;padding:0;list-style:none}
.gal[hidden],.gal-empty[hidden],.lb[hidden]{display:none}
.gal li{break-inside:avoid;margin:0 0 12px}
.gal button{display:block;width:100%;padding:0;border:0;background:var(--bg2);cursor:zoom-in}
/* clip-path keeps hc1-motion from jabbing each tile in from the side (it skips clipped pictures): a wall of photos stays still */
.gal img{display:block;width:100%;height:auto;clip-path:inset(0)}
.gal button:focus-visible{outline:3px solid var(--acc-txt);outline-offset:3px}
.gal-empty{margin:0;font-size:18px;color:var(--mute)}
.gal-more{margin:26px 0 0}

/* ---------- the photo viewer ---------- */
.lb{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:64px 64px 24px;background:var(--ink);color:#efe9dc}
.lb figure{margin:0;display:grid;justify-items:center;gap:12px;max-width:100%}
.lb img{display:block;max-width:100%;max-height:calc(100svh - 150px);width:auto;height:auto}
.lb figcaption{min-height:1.4em;font:500 16px/1.4 var(--f-body);color:#d7d0c0;text-align:center}
.lb figcaption a{color:var(--gold2)}
.lb-b{position:absolute;display:grid;place-items:center;width:48px;height:48px;padding:0;border:0;cursor:pointer;
  background:var(--ink2);color:var(--gold2);box-shadow:inset 0 0 0 2px rgba(240,207,122,.45);font:400 34px/1 var(--f-body)}
.lb-b:hover{background:var(--ink3)}
.lb-b:focus-visible{outline:3px solid var(--gold2);outline-offset:2px}
.lb-x{top:10px;right:10px}
.lb-prev{left:10px;top:50%;margin-top:-24px}
.lb-next{right:10px;top:50%;margin-top:-24px}
.lb-b[hidden]{display:none}
body.lb-on{overflow:hidden}

/* ---------- share photos (contributors) ---------- */
.sh-form{display:grid;gap:18px;padding-top:26px;padding-bottom:120px}
.sh-form[hidden]{display:none}
.sh-pick,.su-file{position:relative;overflow:hidden}
.sh-pick input,.su-file input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;font-size:0}
.sh-pick:focus-within,.su-file:focus-within{box-shadow:inset 0 0 0 3px var(--text)}
.sh-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px;margin:14px 0 0;padding:0;list-style:none}
.sh-list:empty{display:none}
.sh-list li{position:relative;display:grid;gap:4px}
.sh-list img{display:block;width:100%;aspect-ratio:1;object-fit:cover;background:var(--bg2)}
.sh-list .st{font:600 13px/1.25 var(--f-cond);letter-spacing:.06em;text-transform:uppercase;color:var(--mute)}
.sh-list .st.good{color:var(--acc-txt)}
.sh-list .st.bad{color:var(--text);text-transform:none;letter-spacing:0;font:500 13px/1.3 var(--f-body)}
.sh-list .rm{position:absolute;top:4px;right:4px;width:32px;height:32px;padding:0;border:0;cursor:pointer;
  background:var(--ink);color:var(--gold2);font:400 22px/1 var(--f-body)}
.sh-ok{display:flex;gap:14px;align-items:flex-start;cursor:pointer;font-size:17px;line-height:1.45}
.sh-ok input{flex:none;width:24px;height:24px;margin:2px 0 0;accent-color:var(--gold-deep)}
html[data-mode=night] .sh-ok input{accent-color:var(--gold)}

@media (max-width:760px){
  .gal{columns:2 140px;column-gap:8px}
  .gal li{margin-bottom:8px}
  .lb{padding:60px 8px 16px}
  .lb-prev,.lb-next{top:auto;bottom:12px;margin-top:0}
  .lb img{max-height:calc(100svh - 170px)}
}

/* room for the photos before gallery.json arrives, so nothing on screen jumps when they land */
.gal-box{min-height:70svh}
