#lb-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#lb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  cursor: pointer;
}

#lb-box {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  max-width: 92vw;
  max-height: 92vh;
}

#lb-img {
  display: block;
  max-width: 88vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity .2s ease;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .7);
}

#lb-bar {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 .25rem;
  color: #bbb;
  font-size: .88rem;
  font-family: sans-serif;
}

#lb-caption { flex: 1; }
#lb-counter  { flex-shrink: 0; margin-left: 1rem; color: #888; }

#lb-close {
  position: fixed;
  top: 1rem;
  right: 1.2rem;
  z-index: 2;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
#lb-close:hover { background: rgba(255,255,255,.28); }

#lb-prev,
#lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 2.8rem;
  line-height: 1;
  width: 2.8rem;
  height: 5rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
#lb-prev:hover,
#lb-next:hover { background: rgba(255,255,255,.28); }

#lb-prev { left:  .8rem; }
#lb-next { right: .8rem; }

@media (max-width: 600px) {
  #lb-prev { left:  .3rem; }
  #lb-next { right: .3rem; }
  #lb-prev, #lb-next { width: 2.2rem; height: 4rem; font-size: 2rem; }
}
