.page2{
  max-width:1100px;
  margin:0 auto;
  padding:20px;
} 	/* Gallery grid (responsive) */
.gallery{
  display:grid;
  gap:12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.thumb{
  border:0;
  padding:0;
  background:transparent;
  cursor:pointer;
  border-radius:10px;
  overflow:hidden;
}
.thumb img{
  width:100%;
  height:140px;
  object-fit:cover;
  display:block;
  transition: transform .15s ease;
}
.thumb:hover img{ transform: scale(1.03); }

/* Lightbox overlay */
.lightbox{
  position:fixed;
  inset:0;
  z-index:99999;      /* Overlap everything */
  display:none;
}
.lightbox.is-open{ display:block; }

.lightbox__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.85);
}

/* Modal panel */
.lightbox__panel{
  position:relative;
  z-index:1;
  max-width:1200px;
  margin:24px auto;
  padding:12px;
  display:grid;
  grid-template-columns:44px 1fr 44px;
  grid-template-rows:1fr auto;
  gap:12px;
  align-items:center;
}

/* Close button */
.lightbox__close{
  position:absolute;
  top:8px;
  right:8px;
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.35);
  color:#fff;
  font-size:26px;
  cursor:pointer;
}

/* Nav buttons */
.lightbox__nav{
  height:56px;
  width:44px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color:#fff;
  font-size:34px;
  cursor:pointer;
  user-select:none;
}

/* Image area */
.lightbox__figure{ margin:0; text-align:center; }
.lightbox__figure img{
  max-width:92vw;
  max-height:72vh;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:12px;
  background:#111;
}
.lightbox__caption{
  margin-top:8px;
  font-size:14px;
  opacity:.85;
}

/* Thumbnail rail */
.lightbox__thumbRail{
  grid-column:1 / -1;
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:8px 4px;
  scrollbar-width: thin;
}
.lightbox__thumbRail button{
  border:1px solid rgba(255,255,255,.18);
  border-radius:10px;
  padding:0;
  background:transparent;
  cursor:pointer;
  overflow:hidden;
}
.lightbox__thumbRail img{
  width:64px;
  height:48px;
  object-fit:cover;
  display:block;
}
.lightbox__thumbRail .is-active{
  outline:2px solid #fff;
  outline-offset:2px;
}

/* Mobile tweaks */
@media (max-width:600px){
  .thumb img{ height:110px; }
  .lightbox__panel{
    margin:10px auto;
    grid-template-columns:40px 1fr 40px;
  }
  .lightbox__figure img{ max-height:62vh; }
}