body {
  background: #222;
  font-family: "Fira Sans", sans-serif;
  padding-right: 2rem;
}

* {
  box-sizing: border-box;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  overflow: hidden;
  max-width: 1300px;
  margin: auto;
}
.gallery__strip {
  display: flex;
  flex-direction: column;     /* 关键：竖着排 */
  align-items: center;
  width: 100%;
  height: auto;               /* 让内容撑高 */
  min-height: 100vh;          /* 至少一屏高，可继续溢出 */
  padding: 10vh 0;
}
.gallery__strip__wrapper {
  flex: 0 0 100%;
  justify-content: flex-end;
  background: #222;
  border-right: 2px solid #333;
  position: relative;
}

@media (min-width: 500px) {
  .gallery__strip__wrapper {
    flex: 0 0 50%;
  }
}
@media (min-width: 950px) {
  .gallery {
    height: 100vh;
  }
  .gallery__strip.one {
    animation: 60s move-it ease alternate infinite 5s;
    transform: translateY(2%);
  }
  .gallery__strip.three {
    animation: 70s move-it ease alternate infinite 6s;
    transform: translateY(2%);
  }
  .gallery__strip.two {
    animation: 58s move-it-2 ease alternate infinite 5s;
    transform: translateY(-50%);
  }
  .gallery__strip.four {
    animation: 65s move-it-2 ease alternate infinite 5.5s;
    transform: translateY(-50%);
  }
  .gallery__strip:hover {
    animation-play-state: paused;
  }
  .gallery__strip__wrapper {
    flex: 0 0 25%;
  }
}
/* 1. 给照片格当参照 */
.photo {
  position: relative;
  width: 80%;
  max-width: 280px;
  margin: 20px 0;
}

/* 2. 文字悬浮顶层 */
.photo__name {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 8px 10px;
  background: rgba(0,0,0,.45);   /* 半透明底，可读性更好 */
  font-size: 28px;
  letter-spacing: 2px;
  color: #fff;
  -webkit-text-stroke: 0;        /* 不再需要描边 */
  pointer-events: none;          /* 不挡住鼠标事件 */
  z-index: 2;                    /* 保证在图上方 */
}
.photo__image {
  width: 100%;
  background: #000;           /* 留黑边更电影 */
  line-height: 0;             /* 去除幽灵空白 */
}
.photo__image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;        /* 完整图，不拉伸 */
}
/*.photo__name {
  margin: 40px 0 0 0;
  align-self: flex-end;
  font-size: 36px;
  -webkit-text-stroke: 1px #fff;
  color: transparent;
  transition: color .4s;
}*/
.photo:hover .photo__name {
  color: #fff;
}
.photo:hover .photo__image img {
  transform: translateX(0%);
}


@keyframes move-it {
  0%,
 90%,
 100% {
    transform: translateY(2%);
  }
  45% {
    transform: translateY(-50%);
  }
}
@keyframes scroll-down {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
@media (min-width: 950px) {
  /* ① 动画保持原样 */
  .gallery__strip.one {
    animation: scroll-down 45s linear infinite;
    transform: translateY(-15vh);   /* 提前 15% 屏高 */
  }
  .gallery__strip.two {
    animation: scroll-down 60s linear infinite;
    transform: translateY(-70vh);   /* 几乎从底端露头 */
  }
  .gallery__strip.three {
    animation: scroll-down 75s linear infinite;
    transform: translateY(-40vh);   /* 中间偏上 */
  }
  .gallery__strip.four {
    animation: scroll-down 63s linear infinite;
    transform: translateY(-85vh);   /* 最接近底部 */
  }

  /* 悬停暂停 */
  .gallery__strip:hover {
    animation-play-state: paused;
  }
}
.gallery__strip:hover { animation-play-state: paused; }