.cpa-lb-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  display: none; align-items: center; justify-content: center; z-index: 99999;
}
.cpa-lb-backdrop.is-open { display: flex; }

.cpa-lb-stage {
  position: relative; width: 96vw; height: 96vh;
  overflow: hidden; display:flex; align-items:center; justify-content:center;
}
.cpa-lb-wrap { position: relative; touch-action: none; }

.cpa-lb-img {
  width: auto; height: auto;
  max-width: none; max-height: none;
  will-change: transform;
  cursor: zoom-in;
  user-select: none; -webkit-user-drag: none;
}
.cpa-lb-zoomed .cpa-lb-img { cursor: grab; }
.cpa-lb-zoomed .cpa-lb-img:active { cursor: grabbing; }

/* Кнопки */
.cpa-lb-close, .cpa-lb-prev, .cpa-lb-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  color: #fff; padding: .6rem .9rem; cursor: pointer; user-select: none;
  z-index: 100001;                       /* поверх всего */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.cpa-lb-close {
  top: 20px; right: 20px; transform: none;
  min-width: 44px; min-height: 44px;     /* удобная тач-зона */
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
}
.cpa-lb-prev { left: 20px; border-radius: 10px; }
.cpa-lb-next { right: 20px; border-radius: 10px; }

.cpa-lb-caption {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 14px; opacity: .9; text-align: center; max-width: 90vw;
}

.cpa-lb-backdrop.cpa-lb-zoomed .cpa-lb-prev,
.cpa-lb-backdrop.cpa-lb-zoomed .cpa-lb-next { opacity: .25; }

.cpa-lb-hidden { display:none !important; }
html.cpa-lb-noscroll { overflow: hidden; }
