/* ============================================================
   Outside of work —— 可自由拖拽的横向相册（含灯箱）
   ============================================================ */
.px-gallery { position: relative; width: 100%; }

.px-gallery__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #9b9b9b;
}
.px-gallery__hint { user-select: none; }
.px-gallery__bar { position: relative; width: 160px; height: 2px; background: rgba(0,0,0,.12); overflow: hidden; }
.px-gallery__bar-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: #111; transition: width .12s linear; }

.px-gallery__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  padding: 46px 0 56px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.px-gallery__viewport::-webkit-scrollbar { display: none; }
.px-gallery__viewport.is-drag { cursor: grabbing; }
.px-gallery__viewport.is-drag .px-item { pointer-events: none; }

.px-gallery__track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  padding: 0 max(28px, calc((100vw - 1180px) / 2));
}

.px-item {
  position: relative;
  flex: 0 0 auto;
  height: var(--h, 40vh);
  transform: translateY(var(--dy, 0px));
  transition: transform .5s cubic-bezier(.5,.5,0,1), filter .55s ease;
  filter: grayscale(.12);
  user-select: none;
}
.px-item img {
  display: block;
  height: 100%;
  width: auto;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0 26px 60px -26px rgba(0,0,0,.45);
  -webkit-user-drag: none;
  user-select: none;
  background: #eee;
}
.px-item:hover { transform: translateY(calc(var(--dy, 0px) - 6px)) scale(1.02); filter: grayscale(0); }
.px-item__cap {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 10.5px;
  letter-spacing: .14em;
  color: #fff;
  mix-blend-mode: difference;
  opacity: .9;
  pointer-events: none;
}

/* 灯箱 */
.px-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 8, .94);
  backdrop-filter: blur(6px);
}
.px-lightbox.is-open { display: flex; }
.px-lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 90px -20px rgba(0,0,0,.8);
}
.px-lightbox__close,
.px-lightbox__prev,
.px-lightbox__next {
  position: absolute;
  background: none;
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.px-lightbox__close {
  top: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  font-size: 16px;
}
.px-lightbox__prev,
.px-lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 20px;
}
.px-lightbox__prev { left: 24px; }
.px-lightbox__next { right: 24px; }
.px-lightbox__close:hover,
.px-lightbox__prev:hover,
.px-lightbox__next:hover { background: #fff; color: #000; border-color: #fff; }

@media (max-width: 768px) {
  .px-gallery__bar { width: 100px; }
  .px-gallery__viewport { padding: 30px 0 40px; }
  .px-gallery__track { gap: 16px; padding: 0 20px; }
  .px-item { height: calc(var(--h, 40vh) * 0.72); }
  .px-lightbox__prev { left: 10px; }
  .px-lightbox__next { right: 10px; }
  .px-lightbox__prev, .px-lightbox__next { width: 44px; height: 44px; }
}
