.ui-lightbox {
  max-width: min(92vw, 1200px);
  max-height: 90dvh;
  width: fit-content;
  min-width: min(90vw, 320px);
  padding: 20px 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, #18191d 0%, #101114 100%);
  color: #ffffff;
  overflow: hidden;
  box-shadow:
    0 34px 80px -18px rgba(0, 0, 0, 0.92),
    0 14px 36px -14px rgba(243, 135, 26, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.ui-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.ui-lightbox__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  touch-action: pan-y pinch-zoom;
}

.ui-lightbox__stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #07080a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.55);
}
/**
* TV LINES
*/
/*
.ui-lightbox__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: 12px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, 0) 3px,
    rgba(0, 0, 0, 0.14) 3px,
    rgba(0, 0, 0, 0.14) 4px
  );
  opacity: 0.45;
}
*/

/* Dezent reflektierender TV-Glas-Schimmer ohne Klick-Blockade */
.ui-lightbox__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 12px;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 28%,
    rgba(255, 255, 255, 0) 52%
  );
}

.ui-lightbox__figure {
  margin: 0;
  text-align: center;
  will-change: transform, opacity;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.ui-lightbox__figure.is-dragging {
  transition: none;
}

.ui-lightbox__figure img {
  display: block;
  max-width: min(82vw, 1080px);
  max-height: 68dvh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  user-select: none;
  -webkit-user-drag: none;
}

.ui-lightbox__caption {
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

.ui-lightbox__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 4px;
}

.ui-lightbox__close,
.ui-lightbox__nav {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.ui-lightbox__close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2147483647;
  background: rgba(20, 20, 20, 0.92);
}

.ui-lightbox__nav:hover,
.ui-lightbox__close:hover {
  border-color: #f3871a;
  color: #f3871a;
  background: rgba(243, 135, 26, 0.1);
}

@media (min-width: 769px) {
  .ui-lightbox {
    padding: 24px 24px 28px;
  }

  /* Nur die direkten Desktop-Pfeile in .ui-lightbox fixieren */
  .ui-lightbox > .ui-lightbox__nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2147483647;
    background: rgba(20, 20, 20, 0.92);
  }

  .ui-lightbox > .ui-lightbox__nav--prev {
    left: 20px;
  }

  .ui-lightbox > .ui-lightbox__nav--next {
    right: 20px;
  }

  .ui-lightbox__controls {
    display: none;
  }
}

@media (max-width: 768px) {
  .ui-lightbox {
    max-width: 94vw;
    max-height: 86dvh;
    padding: 16px 14px 20px;
    border-radius: 14px;
  }

  .ui-lightbox__figure img {
    max-width: 100%;
    max-height: 54dvh;
  }

  /* Direkte Desktop-Pfeile auf Mobile komplett ausblenden */
  .ui-lightbox > .ui-lightbox__nav {
    display: none;
  }
}