.lb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;               
    pointer-events: none;     
    transition: opacity .18s ease-out;
    z-index: 9999;            
  }
  
  .lb-overlay.lb-show {
    opacity: 1;
    pointer-events: auto;
  }
  
  .lb-modal {
    max-width: min(90vw, 1100px);
    max-height: 90vh;
    position: relative;
    transform: translateY(4px) scale(.995);
    transition: transform .18s ease-out;
  }
  
  .lb-overlay.lb-show .lb-modal {
    transform: translateY(0) scale(1);
  }
  
  .lb-img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
  }
  
  .lb-caption {
    margin-top: .6rem;
    text-align: center;
    color: #f0f0f0;
    font-size: .95rem;
    line-height: 1.3;
  }
  
  .lb-close,
  .lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: rgba(0,0,0,.45);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: #fff;
  }
  
  .lb-close {
    top: 16px;
    right: 16px;
    transform: none;
    width: 36px;
    height: 36px;
  }
  
  .lb-prev { left: 12px; }
  .lb-next { right: 12px; }
  
  .lb-close svg, .lb-nav svg { width: 22px; height: 22px; }
  
  body.lb-no-scroll { overflow: hidden; }