.glightbox-container video {
  display: block;
  max-width: min(100%, 1200px);
  max-height: calc(100dvh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.glightbox-container .gvideo-wrapper {
  max-width: min(100%, 1200px);
}

.cat-gallery-lightbox {
  display: block;
}
.kgorod-cat-media-strip__item{position:relative}.cat-gallery-like-badge{pointer-events:none;position:absolute;right:8px;bottom:8px;z-index:2;display:inline-flex;align-items:center;gap:4px;min-height:28px;padding:4px 7px;border-radius:9px;color:#fff;background:rgba(20,18,14,.62);font:700 12px/1 system-ui,sans-serif}.cat-gallery-like-badge svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2}.cat-gallery-like-badge.is-liked svg{fill:#ef6c70;stroke:#ef6c70}

.kgv-gallery-lightbox{position:fixed;inset:0;z-index:3000;display:none;place-items:center;padding:48px 76px;background:rgba(20,18,14,.88)}.kgv-gallery-lightbox.is-open{display:grid}.kgv-lightbox-open{overflow:hidden}.kgv-gallery-lightbox-media{display:grid;place-items:center;max-width:min(1280px,100%);max-height:calc(100dvh - 96px)}.kgv-gallery-lightbox-image,.kgv-gallery-lightbox-video{display:block;max-width:min(1280px,100%);max-height:calc(100dvh - 96px);object-fit:contain;background:#000}.kgv-gallery-lightbox button{position:absolute;z-index:2;border:0;color:#fff;background:transparent;cursor:pointer}.kgv-gallery-lightbox-close{top:14px;right:20px;font-size:42px}.kgv-gallery-lightbox-prev,.kgv-gallery-lightbox-next{top:50%;font-size:48px;transform:translateY(-50%)}.kgv-gallery-lightbox-prev{left:20px}.kgv-gallery-lightbox-next{right:20px}.kgv-gallery-lightbox-counter{position:absolute;z-index:2;bottom:18px;left:50%;transform:translateX(-50%);color:#fff}@media(max-width:767px){.kgv-gallery-lightbox{padding:calc(52px + env(safe-area-inset-top)) 48px calc(52px + env(safe-area-inset-bottom))}.kgv-gallery-lightbox-media,.kgv-gallery-lightbox-image,.kgv-gallery-lightbox-video{max-width:100%;max-height:100%}.kgv-gallery-lightbox-prev{left:4px}.kgv-gallery-lightbox-next{right:4px}.kgv-gallery-lightbox-close{right:10px}}
/* Keep the shared lightbox independent from legacy gallery transitions. */
body > .kgv-gallery-lightbox {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  width: 100dvw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  z-index: 2147483647 !important;
}

body > .kgv-gallery-lightbox.is-open {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body > .kgv-gallery-lightbox .kgv-gallery-lightbox-image,
body > .kgv-gallery-lightbox .kgv-gallery-lightbox-video {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.kgv-gallery-lightbox .cat-media-like-panel{position:fixed;z-index:3;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(520px,calc(100vw - 32px));padding:10px;border-radius:16px;background:rgba(20,18,14,.76);backdrop-filter:blur(10px)}.kgv-gallery-lightbox .cat-media-like{position:static;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:48px;padding:10px 16px;border:0;border-radius:10px;color:#fff;background:transparent;font:600 16px/1 system-ui,sans-serif;cursor:pointer}.cat-media-like svg,.cat-gallery-like-badge svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2}.cat-media-like.is-liked svg,.cat-gallery-like-badge.is-liked svg{fill:#ef6c70;stroke:#ef6c70}.cat-media-like:disabled{opacity:.6}.kgorod-cat-media-strip__item{position:relative}.cat-gallery-like-badge{pointer-events:none;position:absolute;right:8px;bottom:8px;z-index:2;display:inline-flex;align-items:center;gap:4px;min-height:28px;padding:4px 7px;border-radius:9px;color:#fff;background:rgba(20,18,14,.62);backdrop-filter:blur(8px);font:700 12px/1 system-ui,sans-serif}.cat-gallery-like-badge svg{width:15px;height:15px}@media(hover:hover){.kgorod-cat-media-strip__item:hover .cat-gallery-like-badge{transform:scale(1.08)}}

/* Lightbox controls: keep interaction states scoped to their own buttons. */
body > .kgv-gallery-lightbox .kgv-gallery-lightbox-close,
body > .kgv-gallery-lightbox .kgv-gallery-lightbox-prev,
body > .kgv-gallery-lightbox .kgv-gallery-lightbox-next {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(20, 18, 14, 0.68);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body > .kgv-gallery-lightbox .kgv-gallery-lightbox-close {
  top: 24px;
  right: 24px;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}

body > .kgv-gallery-lightbox .kgv-gallery-lightbox-prev,
body > .kgv-gallery-lightbox .kgv-gallery-lightbox-next {
  font-size: 42px;
  line-height: 1;
}

@media (hover: hover) {
  body > .kgv-gallery-lightbox .kgv-gallery-lightbox-close:hover,
  body > .kgv-gallery-lightbox .kgv-gallery-lightbox-prev:hover,
  body > .kgv-gallery-lightbox .kgv-gallery-lightbox-next:hover {
    background: rgba(42, 39, 34, 0.82);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  }
}

body > .kgv-gallery-lightbox .kgv-gallery-lightbox-close:active,
body > .kgv-gallery-lightbox .kgv-gallery-lightbox-prev:active,
body > .kgv-gallery-lightbox .kgv-gallery-lightbox-next:active {
  background: rgba(42, 39, 34, 0.82);
  transform: translateY(-50%) scale(0.96);
}

body > .kgv-gallery-lightbox .kgv-gallery-lightbox-close:active {
  transform: scale(0.96);
}

body > .kgv-gallery-lightbox .kgv-gallery-lightbox-counter {
  z-index: 2;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

@media (max-width: 768px) {
  body > .kgv-gallery-lightbox .kgv-gallery-lightbox-close {
    top: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
  }
