/* zoom.css — лайтбокс увеличения карт (единый для всего сайта и app.html).
   Модал: карта по центру экрана; крестик — на рамке карты (12px от верхнего
   и правого краёв карты); подпись и описание под картой помещаются во вьюпорт
   без скролла — высоту карты подстраивает zoom.js (fit). */
.zlb {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 22px;
  background: rgba(9, 6, 15, .9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .24s ease;
}
.zlb.open { opacity: 1; }
/* критично: author-правило display:grid перебивало UA-стиль [hidden] — невидимый
   оверлей оставался на экране и глотал все клики после закрытия просмотра */
.zlb[hidden] { display: none !important; }
.zlb:not(.open) { pointer-events: none; }
.zlb-figure {
  margin: 0; display: flex; flex-direction: column; align-items: center;
  gap: 14px; width: min(100%, 560px);
  transform: scale(.94); transition: transform .28s cubic-bezier(.22,1,.36,1);
}
.zlb.open .zlb-figure { transform: scale(1); }
/* рамка карты: жмётся под изображение, служит якорем для крестика */
.zlb-imgwrap { position: relative; display: grid; line-height: 0; max-width: 100%; }
.zlb-figure img {
  display: block; max-width: 100%; max-height: 78vh; border-radius: 16px;
  box-shadow: 0 40px 120px -40px rgba(0,0,0,.95), 0 0 60px rgba(168,85,247,.4);
  border: 1px solid rgba(196,181,253,.3);
}
/* страховка без JS: с описанием карта пониже, чтобы описание начиналось во вьюпорте */
.zlb.has-desc .zlb-figure img { max-height: 54vh; }
.zlb-figure img.is-reversed { transform: rotate(180deg); }
.zlb-cap {
  font: 600 16px/1.45 "Playfair Display", Georgia, serif;
  color: #f4e9d2; text-align: center; letter-spacing: .02em;
}
.zlb-cap small { display: block; margin-top: 3px; font: 500 12.5px/1.4 "Manrope", sans-serif; color: rgba(244,233,210,.6); letter-spacing: .04em; }
/* блок краткого описания под картой (зум из расклада) */
.zlb-desc {
  width: 100%; box-sizing: border-box; text-align: left;
  background: rgba(26, 12, 28, .72);
  border: 1px solid rgba(196, 181, 253, .28);
  border-radius: 14px; padding: 14px 18px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.zlb-desc-kw {
  margin: 0 0 6px; font: 700 11px/1.3 "Manrope", sans-serif;
  letter-spacing: .12em; text-transform: uppercase; color: #e0b7ff;
}
.zlb-desc-text { margin: 0; font: 400 13.5px/1.55 "Inter", system-ui, sans-serif; color: rgba(244, 233, 210, .92); }
.zlb-more {
  display: inline-block; margin-top: 10px; font: 600 12.5px/1.3 "Manrope", sans-serif;
  color: #e8c7a0; text-decoration: none; border-bottom: 1px dashed rgba(232, 199, 160, .5);
  transition: color .2s ease, border-color .2s ease;
}
.zlb-more:hover { color: #fff; border-color: rgba(232, 199, 160, .9); }
.zlb-desc[hidden] { display: none; }
/* крестик: прижат к углу карты с ровным отступом 12px, в стиле сайта
   (тёмное стекло + лиловая кромка), не зависит от скролла — его нет */
.zlb-close {
  position: absolute; top: 12px; right: 12px; z-index: 6;
  width: 38px; height: 38px; flex: none;
  border-radius: 50%; border: 1px solid rgba(196,181,253,.4);
  background: rgba(21,8,17,.78);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #f4e9d2;
  font: 400 20px/1 system-ui, sans-serif;
  cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 6px 22px rgba(0,0,0,.5);
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.zlb-close:hover { background: rgba(168,85,247,.28); color: #fff; border-color: rgba(168,85,247,.65); }
.zlb-close:active { transform: scale(.94); }
.zlb-hint { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font: 500 12px/1 "Manrope", sans-serif; color: rgba(244,233,210,.4); }
[data-zoom] { cursor: zoom-in; }
body.zlb-lock { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .zlb, .zlb-figure { transition: none !important; }
}
