/* 复刻版补充样式：仅修复原站锚点定位与新增站内搜索提示，不改变原有视觉风格 */

/* 原站导航为固定悬浮层，锚点跳转后标题会被遮挡 60px；此处用 scroll-margin 抵消 */
html {
  scroll-behavior: smooth;
}
section[id],
banner[id] {
  scroll-margin-top: 60px;
}
@media (max-width: 992px) {
  section[id],
  banner[id] {
    scroll-margin-top: 68px;
  }
}

/* 图集可点击提示 */
#g_27877 picture {
  cursor: zoom-in;
}

/* ---- 原站灯箱缺陷修复 ----
   原站 .slider-container 高度为 0（子项内图片是绝对定位，无法撑开高度），
   且 grid 列宽被写死为 1200px 导致不产生横向溢出，
   最终表现是：点击图集后只有全屏黑底 + 箭头，图片不可见、箭头无效。
   这里让容器撑满视口高度、每屏一列并可横向滚动，外观仍与原站一致。 */
#g_modal_27877 .swiffy-slider {
  height: 100%;
}
#swiffy_27877 .slider-container {
  height: 100%;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
#swiffy_27877 .slider-container::-webkit-scrollbar {
  display: none;
}
#swiffy_27877 .slider-container > li {
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
}
/* 缩略图原图仅 225×300，按原始尺寸居中显示，避免被拉伸模糊 */
#swiffy_27877 .slider-container > li img {
  max-width: 80%;
  max-height: 90%;
  width: auto;
  height: auto;
}
/* 灯箱指示圆点固定在底部；原站用的是深色点，在黑底上不可见，改为浅色 */
#swiffy_27877 .slider-indicators {
  position: absolute;
  bottom: 30px;
  z-index: 3;
}
#swiffy_27877 .slider-indicators li {
  background: rgba(255, 255, 255, 0.35);
  border: 0;
}
#swiffy_27877 .slider-indicators li.active {
  background: #ea5b31;
}

/* 移动端菜单打开时锁定页面滚动，避免背景跟随滑动 */
body.menu-open {
  overflow: hidden;
}

/* 站内搜索结果提示（替代原站 /index.php 搜索接口） */
.search_tip {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 20px);
  z-index: 1600;
  width: auto;
  max-width: min(520px, 88vw);
  padding: 12px 18px;
  border-radius: 6px;
  background: rgba(25, 25, 25, 0.92);
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  pointer-events: none;
}
.search_tip.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.search_tip b {
  color: #ea5b31;
}

/* 被搜索命中的区块短暂描边，帮助定位 */
.flash-target {
  animation: flashOutline 1.6s ease-out 1;
}
@keyframes flashOutline {
  0% {
    box-shadow: inset 0 0 0 2px rgba(234, 91, 49, 0);
  }
  25% {
    box-shadow: inset 0 0 0 2px rgba(234, 91, 49, 0.85);
  }
  100% {
    box-shadow: inset 0 0 0 2px rgba(234, 91, 49, 0);
  }
}
