.pswp {
  --pswp-bg: #11110f;
  --pswp-icon-color: #f5f0e8;
  --pswp-icon-color-secondary: #11110f;
  z-index: 12000;
}

.pswp__bg {
  background: radial-gradient(circle at 50% 42%, #272620 0%, #11110f 68%);
}

.pswp__button {
  width: 48px;
  height: 48px;
}

.pswp__button--arrow {
  width: 58px;
  height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(17, 17, 15, 0.62);
  backdrop-filter: blur(10px);
}

.pswp__counter {
  height: 48px;
  line-height: 48px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  text-shadow: none;
}

.pswp__zoom-wrap {
  touch-action: none;
}

.pswp__sbs-filmstrip {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  height: auto;
  padding: 8px 0 max(12px, env(safe-area-inset-bottom));
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(17, 17, 15, 0), rgba(17, 17, 15, 0.92) 26%, #11110f 100%);
}

.sbs-viewer-hint {
  min-height: 20px;
  padding: 0 16px 6px;
  color: rgba(245, 240, 232, 0.72);
  font: 500 11px/1.3 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.035em;
  text-align: center;
}

.sbs-filmstrip {
  display: flex;
  gap: 8px;
  width: 100%;
  padding: 2px max(16px, calc((100vw - 1100px) / 2));
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(200, 153, 92, 0.7) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

.sbs-filmstrip::-webkit-scrollbar {
  height: 4px;
}

.sbs-filmstrip::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

.sbs-filmstrip::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(200, 153, 92, 0.76);
}

.sbs-filmstrip-button {
  position: relative;
  flex: 0 0 86px;
  width: 86px;
  height: 64px;
  padding: 3px;
  overflow: hidden;
  scroll-snap-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: #272620;
  opacity: 0.66;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.sbs-filmstrip-button:hover {
  opacity: 0.92;
}

.sbs-filmstrip-button:focus-visible {
  outline: 2px solid #f5f0e8;
  outline-offset: 2px;
}

.sbs-filmstrip-button.is-active {
  border-color: #c8995c;
  box-shadow: 0 0 0 2px rgba(200, 153, 92, 0.42);
  opacity: 1;
  transform: translateY(-2px);
}

.sbs-filmstrip-button img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
  pointer-events: none;
}

.sbs-filmstrip-button span {
  position: absolute;
  right: 5px;
  bottom: 4px;
  min-width: 22px;
  padding: 2px 4px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 17, 15, 0.76);
  font: 600 9px/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-align: center;
  pointer-events: none;
}

@media (max-width: 759px) {
  .pswp__button--arrow {
    display: none;
  }

  .pswp__button {
    width: 46px;
    height: 46px;
  }

  .pswp__counter {
    height: 46px;
    line-height: 46px;
  }

  .pswp__sbs-filmstrip {
    padding-top: 6px;
  }

  .sbs-viewer-hint {
    padding-bottom: 5px;
    font-size: 10px;
  }

  .sbs-filmstrip {
    gap: 7px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .sbs-filmstrip-button {
    flex-basis: 74px;
    width: 74px;
    height: 56px;
    border-radius: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sbs-filmstrip,
  .sbs-filmstrip-button {
    scroll-behavior: auto;
    transition: none;
  }
}
