/* 首页通用 UI：返回顶部、锚点滚动、nav2 初始化 */

/*
 * 返回顶部：对齐原包，禁止 100vw（移动端会撑大 scrollWidth → 竖滑左右晃）
 */
.home-back-top {
  position: fixed;
  z-index: 98;
  right: 6px;
  bottom: max(20px, env(safe-area-inset-bottom, 0px) + 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 56px;
  min-width: 56px;
  box-sizing: border-box;
  padding: 8px 6px 6px;
  border-radius: 6px;
  border: 1px solid #c5d2f0;
  box-shadow: 0 2px 10px rgba(73, 95, 169, 0.28);
  background: #f5f8ff;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 资料区换行契约（与原包 body word-break 一致，防长串撑出横向滚动） */
#home-material-root {
  max-width: 100%;
  word-break: break-all;
  word-wrap: break-word;
}

.home-back-top__icon {
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.home-back-top__label {
  display: block;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  color: #495fa9;
  white-space: nowrap;
  user-select: none;
}

.home-back-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tit-highlight-mark {
  color: var(--home-tit-highlight, #ffff00);
}

.material-hit {
  background-color: var(--home-material-hit-bg, #ff0);
  color: var(--home-material-hit-fg, #f00);
}

.jhq-play {
  color: #00cc33;
}

.home-material-preview-bar {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: linear-gradient(90deg, #fff3cd 0%, #ffe8a1 100%);
  border-bottom: 1px solid #f0c040;
  color: #7a5a00;
  font-size: 14px;
  line-height: 1.4;
}

.home-material-preview-bar-text {
  flex: 1 1 220px;
}

.home-material-preview-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.home-material-preview-bar-link {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e0b020;
  color: #7a5a00;
  text-decoration: none;
  white-space: nowrap;
}

.home-material-preview-bar-link:hover {
  background: #fffdf5;
  color: #5a4300;
}

.aajgk-value {
  color: #ff0000;
}

.home-skel-image--grid {
  min-height: 160px;
}

.site-declaration-box {
  margin-top: 8px;
}

/* 尊重后台「本站声明」编辑器样式，不覆盖对齐与字号 */
.site-declaration-box .footer {
  text-align: unset;
  color: unset;
  font-size: unset;
  padding: 10px;
}

.site-declaration-box img {
  max-width: 100%;
}
