/* Ri showcase lightbox: arrows + swipe */
.ri-lb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 14, 0.92);
  /* 禁止浏览器接管横向滑动（返回手势/滚动），交给 JS */
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}

.ri-lb.is-open {
  display: flex;
}

.ri-lb__stage {
  position: relative;
  width: min(96vw, 1200px);
  height: min(86vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
  cursor: grab;
}

.ri-lb.is-swiping .ri-lb__stage {
  cursor: grabbing;
}

.ri-lb__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  transition: opacity 0.15s ease, transform 0.15s ease;
  /* 允许命中，避免事件“穿透丢失”；拖拽仍由外层 pointer 统一处理 */
  pointer-events: auto;
  -webkit-user-drag: none;
  user-select: none;
}

.ri-lb.is-swiping .ri-lb__img {
  transition: none;
}

.ri-lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, transform 0.15s ease;
  z-index: 2;
}

.ri-lb__nav:hover,
.ri-lb__nav:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  outline: none;
}

.ri-lb__nav:active {
  transform: translateY(-50%) scale(0.96);
}

.ri-lb__prev {
  left: 10px;
}

.ri-lb__next {
  right: 10px;
}

.ri-lb__nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ri-lb__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  z-index: 3;
}

.ri-lb__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.ri-lb__meta {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  letter-spacing: 0.02em;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 12px;
  border-radius: 999px;
  z-index: 2;
  white-space: nowrap;
}

.ri-lb__dots {
  position: absolute;
  left: 50%;
  bottom: 52px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
  max-width: 80vw;
  flex-wrap: wrap;
  justify-content: center;
}

.ri-lb__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.ri-lb__dot.is-active {
  background: #5b9cff;
  transform: scale(1.15);
}

body.ri-lb-lock {
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .ri-lb__nav {
    width: 40px;
    height: 40px;
  }
  .ri-lb__prev {
    left: 6px;
  }
  .ri-lb__next {
    right: 6px;
  }
  .ri-lb__stage {
    width: 100vw;
    height: 78vh;
  }
}
