.lightbox__panel{
  max-height: 88vh;
  overflow: auto;             
  -webkit-overflow-scrolling: touch;
}

.lightbox__figure img,
.lightbox__figure video{
  max-width: 100%;
  height: auto;
  display: block;
}

.lb__nav{
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-size: 34px;
  line-height: 54px;
  text-align: center;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(8px);
  opacity: 1;
  transition: opacity .25s ease, transform .25s ease;
}

.lb__nav--prev{ left: 14px; }
.lb__nav--next{ right: 14px; }

.lb__hud{
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(0,0,0,.45);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 1;
  transition: opacity .25s ease;
}

.lightbox.is-idle .lb__nav,
.lightbox.is-idle .lb__hud{
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(.98);
}
.lightbox.is-idle .lb__hud{
  transform: translateX(-50%) scale(.98);
}

@media (max-width: 600px){
  .lb__nav{ width: 44px; height: 44px; font-size: 28px; line-height: 44px; }
}


@media (max-width: 520px) {
  .mg__top{
    display:flex;
    flex-direction:column;
    gap:10px;
    align-items:stretch;
  }

  .mg__title{
    font-size:28px;
    line-height:1.1;
    margin:0;
    word-break:break-word;
  }

  .mg__status{
    font-size:13px;
    opacity:.85;
    margin-top:-4px;
  }

  .mg__actions{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:10px;
  }

  .mg__btn{
    width:100%;
    justify-content:center;
    padding:12px 12px;
    font-size:14px;
    border-radius:12px;
  }

  .mg__btn--ghost{
    width:100%;
  }
}


@media (max-width: 520px) {
  .gallery__headlineRow{
    display:flex;
    flex-direction:column;
    gap:10px;
    align-items:stretch;
  }

  .gallery__headline{
    font-size:22px;
    line-height:1.15;
    margin:0;
    text-align:center; 
    word-break:break-word;
  }

  .gallery__headlineActions{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:8px;
  }

  .gallery__headlineActions .mg__miniBtn:last-child{
    grid-column: 1 / -1;
  }

  .mg__miniBtn{
    width:100%;
    justify-content:center;
    padding:10px 10px;
    font-size:13px;
    border-radius:999px;
  }
}


@media (max-width: 520px) {
  .mg__itemActions{
    display:flex;
    gap:8px;
    justify-content:center;
    margin-top:8px;
  }

  .mg__chip{
    padding:8px 12px;
    font-size:13px;
    border-radius:999px;
  }
}
.mg__title, .gallery__headline { letter-spacing: .2px; }
.gallery__headline { font-weight: 600; }
.gallery__item img,
.gallery__item video{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}
.mg__videoThumb{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:8px;
  border-radius:16px;
  background: rgba(0,0,0,.06);
}

.mg__videoIcon{
  font-size:42px;
  line-height:1;
}

.mg__videoText{
  font-size:14px;
  opacity:.8;
}

.gallery__item {
  position: relative;
  overflow: hidden;
}

.gallery__thumbVideo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.gallery__item[data-type="video"]::after {
  content: "▶";
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 16px;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.lightbox{
  overflow: hidden !important;
}

.lightbox__panel{
  overflow: hidden !important;
  max-height: 92vh;
}

.lightbox__figure{
  margin: 0;
  padding: 18px 18px 14px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  height: 100%;
  max-height: 92vh;
  overflow: hidden !important;
}

.lightbox__figure img,
.lightbox__figure video{
  display: block;
  margin: 0 auto;

  max-width: min(92vw, 1100px);
  max-height: 72vh;
  width: auto;
  height: auto;

  object-fit: contain;
  border-radius: 14px;
}

.lightbox__caption{
  max-width: min(92vw, 1100px);
  margin: 0 auto;
  white-space: normal;
  word-break: break-word;
  overflow: hidden;
}

.lightbox__panel,
.lightbox__figure{
  scrollbar-width: none; 
}
.lightbox__panel::-webkit-scrollbar,
.lightbox__figure::-webkit-scrollbar{
  width: 0;
  height: 0;
}