* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  background: #fff;
}

#scale-spacer {
  position: relative;
  width: 100%;
  z-index: 1; /* 盖住下方 side-rail，缩放到100%时完全遮住装饰文字 */
}

#zoom-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transform-origin: top center;
}

.page {
  position: relative;
  width: 100%;
  display: block;
  line-height: 0; /* 消除 img 底部空隙，保证无缝拼接 */
}

.page img.page-image {
  width: 100%;
  height: auto;
  display: block;
}

.overlay {
  position: absolute;
  object-fit: cover;
}

/* 缩小页面后左右露出的循环滚动装饰文字 */
.side-rail {
  position: fixed;
  top: 0;
  width: 40px;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.side-rail--left {
  left: 0;
}

.side-rail--right {
  right: 0;
}

.side-rail__track {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vh;
  height: 40px;
  overflow: hidden;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center center;
}

.side-rail__track-inner {
  display: flex;
  align-items: center;
  width: max-content;
  height: 100%;
  animation: side-rail-scroll 70s linear infinite;
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1;
  color: #1a1a1a;
  white-space: nowrap;
}

.side-rail__group {
  display: flex;
  white-space: nowrap;
}

.side-rail__track-inner span {
  white-space: nowrap;
  margin-right: 48px;
}

@keyframes side-rail-scroll {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0%); }
}
