.detail-gallery-shell {
  position: relative;
  overflow: hidden;
  background: #f5f7f6;
}

.detail-gallery.has-multiple-images {
  gap: 0;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.detail-gallery.has-multiple-images::-webkit-scrollbar {
  display: none;
}

.detail-gallery.has-multiple-images > img {
  min-width: 100%;
  scroll-snap-stop: always;
}

.detail-gallery-hint,
.detail-gallery-counter {
  position: absolute;
  top: 12px;
  z-index: 2;
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  color: #fff;
  background: rgba(20, 25, 24, 0.66);
  font-size: 12px;
  line-height: 26px;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.detail-gallery-hint {
  left: 12px;
}

.detail-gallery-hint.is-hidden {
  opacity: 0;
}

.detail-gallery-counter {
  right: 12px;
  min-width: 42px;
  padding: 0 8px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.detail-gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 2;
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
  pointer-events: none;
}

.detail-gallery-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
  transition: width 180ms ease, border-radius 180ms ease, background 180ms ease;
}

.detail-gallery-dots i.active {
  width: 16px;
  border-radius: 4px;
  background: #fff;
}

.detail-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(18, 24, 22, 0.58);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 160ms ease, background 160ms ease, transform 160ms ease;
  cursor: pointer;
}

.detail-gallery-nav::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}

.detail-gallery-nav.is-previous {
  left: 16px;
}

.detail-gallery-nav.is-previous::before {
  transform: translate(-35%, -50%) rotate(-135deg);
}

.detail-gallery-nav.is-next {
  right: 16px;
}

.detail-gallery-nav.is-next::before {
  transform: translate(-65%, -50%) rotate(45deg);
}

.detail-gallery-shell:hover .detail-gallery-nav:not(:disabled),
.detail-gallery-shell:focus-within .detail-gallery-nav:not(:disabled) {
  opacity: 1;
}

.detail-gallery-nav:hover:not(:disabled) {
  background: rgba(18, 24, 22, 0.76);
  transform: translateY(-50%) scale(1.05);
}

.detail-gallery-nav:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.88);
  outline-offset: 2px;
}

.detail-gallery-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.detail-page.is-nonvideo-detail .video-stats {
  justify-content: space-between;
}

@media (prefers-reduced-motion: reduce) {
  .detail-gallery-hint,
  .detail-gallery-dots i {
    transition: none;
  }
}

@media (hover: none), (pointer: coarse) {
  .detail-gallery-nav {
    display: none;
  }
}
