/* =====================================================================
   首页「宣纸古籍」版式（2026-11-10）
   所有规则都挂在 .home-page 下 —— 只影响首页，其它页面零改动。
   回档方式：删掉 view/index/index.html 里的 home.css <link> 即恢复旧版；
             或 git revert 本次提交。
   ===================================================================== */

.home-page {
  --xh-ink: #241c14;
  --xh-ink-2: #5a4a38;
  --xh-ink-3: #8b7860;
  --xh-red: #9c2a1c;
  --xh-red-2: #a8322a;
  --xh-gold: #a9812f;
  --xh-paper: #f7f0df;
  --xh-line: #e0cda9;
  --xh-kai: "Kaiti SC", "STKaiti", "KaiTi_GB2312", "KaiTi", "楷体", "Songti SC", "SimSun", serif;
}

/* ---------- 主视觉 ---------- */
.xh {
  position: relative;
  overflow: hidden;
  padding: 46px 0 34px;
  background:
    radial-gradient(1000px 460px at 50% -14%, #fffdf7 0, rgba(255, 253, 247, 0) 72%),
    radial-gradient(540px 340px at 6% 16%, rgba(170, 130, 70, .10), transparent 70%),
    radial-gradient(520px 320px at 96% 6%, rgba(160, 60, 40, .07), transparent 70%),
    linear-gradient(180deg, #f8f1e1 0%, #f2e7d0 62%, #efe2c8 100%);
}
/* 宣纸纤维纹理：SVG 噪声，纯前端、无图片请求 */
.xh::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.26'/%3E%3C/svg%3E");
}
.xh > .wrap { position: relative; z-index: 1; }

/* 两侧竖排款识（桌面装饰，窄屏隐藏） */
.xh-side {
  position: absolute; top: 130px; z-index: 0; pointer-events: none;
  writing-mode: vertical-rl;
  font-family: var(--xh-kai); font-size: 15px; letter-spacing: .55em;
  color: rgba(122, 92, 52, .38);
}
.xh-side.l { left: 2.6%; }
.xh-side.r { right: 2.6%; }
/* 卷轴改为通栏后，左右余量收窄，竖排款识在 1400px 以下会压到卷轴，直接隐藏 */
@media (max-width: 1400px) { .xh-side { display: none; } }

/* 主标题：楷体大字 */
.xh-title {
  margin: 0;
  text-align: center;
  font-family: var(--xh-kai);
  font-weight: 700;
  font-size: clamp(2.35rem, 5.2vw, 4.1rem);
  line-height: 1.2;
  letter-spacing: .05em;
  color: #1e160e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55), 0 3px 14px rgba(90, 60, 30, .12);
}
.xh-sub {
  margin: 12px 0 0;
  text-align: center;
  font-size: clamp(13px, 1.5vw, 15.5px);
  letter-spacing: .26em;
  color: #6b5844;
  font-family: "Songti SC", "SimSun", serif;
}

/* 卷轴：与下方搜索卡同宽（.wrap 通栏），两端木轴各占 20px */
.xh-scroll { position: relative; display: flex; align-items: stretch; width: 100%; margin: 34px auto 0; }
.xh-roll {
  position: relative;
  flex: 0 0 20px;
  margin: -11px 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #3d2717, #7b5330 38%, #a87a49 56%, #5d3b22);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, .45), 0 8px 16px -8px rgba(60, 40, 20, .5);
}
.xh-roll::before, .xh-roll::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  width: 17px; height: 10px; border-radius: 50%;
  background: linear-gradient(180deg, #9a6f40, #4a2f1b);
}
.xh-roll::before { top: -9px; }
.xh-roll::after { bottom: -9px; }
.xh-paper {
  flex: 1 1 auto;
  padding: 46px 40px 42px;
  border-top: 1px solid var(--xh-line);
  border-bottom: 1px solid var(--xh-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 42%),
    repeating-linear-gradient(180deg, rgba(150, 110, 60, .045) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #fdf7e8, #f5e9d1);
  box-shadow: inset 0 0 46px rgba(150, 110, 60, .16), 0 24px 44px -30px rgba(70, 45, 20, .6);
}
.xh-quote {
  margin: 0;
  text-align: center;
  font-family: var(--xh-kai);
  font-size: clamp(1.4rem, 3vw, 3rem);
  line-height: 1.55;
  letter-spacing: .06em;
  color: #1f170f;
}
.xh-quote em { font-style: normal; color: var(--xh-red); }
.xh-note {
  margin: 20px 0 0;
  text-align: center;
  font-size: clamp(13.5px, 1.45vw, 18px);
  letter-spacing: .05em;
  color: #7a2a1c;
  font-family: var(--xh-kai);
}
.xh-mini-seal {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin-left: 14px; vertical-align: -15px;
  border: 2px solid rgba(168, 50, 42, .72);
  border-radius: 5px; color: #a8322a;
  font-family: "Songti SC", serif; font-size: 12px; line-height: 1.15; letter-spacing: 0;
  transform: rotate(-4deg);
}

/* 主按钮（金棕） */
.xh-cta { display: flex; justify-content: center; margin-top: 26px; }
.xh-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 38px; border-radius: 8px;
  background: linear-gradient(180deg, #c69c4e, #a2752a 55%, #8c6320);
  border: 1px solid #7d5719;
  color: #fff9e8; font-family: "Songti SC", serif;
  font-size: clamp(16px, 1.7vw, 19px); letter-spacing: .14em;
  box-shadow: 0 12px 26px -14px rgba(90, 60, 20, .85), inset 0 1px 0 rgba(255, 255, 255, .38);
  transition: .18s;
}
.xh-btn:hover {
  color: #fffdf3; transform: translateY(-1px);
  background: linear-gradient(180deg, #d2a856, #ad7f2f 55%, #946a23);
  box-shadow: 0 16px 30px -14px rgba(90, 60, 20, .9), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.xh-btn .arw { font-family: sans-serif; letter-spacing: 0; }
.xh-cta-note { margin: 12px 0 0; text-align: center; font-size: 13px; color: #6b5844; }
.xh-cta-note b { color: #8c6320; font-weight: 600; }

/* 三枚竖排小标签 */
.xh-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 24px auto 0; }
.xh-tags span {
  writing-mode: vertical-rl;
  padding: 14px 9px;
  border: 1px solid rgba(160, 125, 70, .4);
  border-radius: 6px;
  background: rgba(255, 252, 244, .62);
  color: #5f4c37; font-size: 13px; letter-spacing: .22em;
  font-family: "Songti SC", "SimSun", serif;
}

/* 落款 */
.xh-foot {
  max-width: 320px; margin: 26px auto 0; padding-top: 14px;
  border-top: 1px solid rgba(160, 125, 70, .35);
  text-align: center; font-size: 12.5px; letter-spacing: .4em;
  color: #8a7458; font-family: "Songti SC", serif;
}

/* ---------- 搜索区（承接主视觉，同一张纸） ---------- */
.xh-band { padding: 30px 0 18px; background: linear-gradient(180deg, #efe2c8 0%, #f6efdd 52%, var(--paper) 100%); }
.xh-search {
  background: rgba(255, 253, 246, .9);
  border: 1px solid #e2d3b6;
  border-radius: 12px;
  padding: 22px 24px 20px;
  box-shadow: 0 20px 40px -32px rgba(80, 55, 25, .7);
}
.xh-search .searchbar { margin-top: 0; max-width: none; }
.xh-search .srch-form { margin-top: 0; }
.xh-poem {
  margin: 16px 0 0; text-align: center;
  font-family: "Songti SC", serif; font-size: 13px; letter-spacing: .16em; color: #8a7458;
}
.xh-poem i { font-style: normal; color: #b09a7c; letter-spacing: .06em; }

/* ---------- 首页版块微调（只作用于首页） ---------- */
.home-page .panel-title h2 {
  font-family: var(--xh-kai);
  font-size: 23px; letter-spacing: .06em; color: #241c14;
}
.home-page .panel-title h2::before {
  content: ""; display: inline-block; width: 4px; height: 17px; margin-right: 10px;
  border-radius: 2px; background: linear-gradient(180deg, #b03a2a, #8c2a1e); vertical-align: -2px;
}
.home-page .panel-title .line { background: linear-gradient(90deg, var(--xh-line), rgba(224, 205, 169, 0)); }
.home-page .clan-card { background: #fffdf7; border-color: #e6d8bd; }
.home-page .clan-card:hover { border-color: var(--xh-gold); box-shadow: 0 12px 26px -22px rgba(90, 60, 20, .7); }
.home-page .clan-card .poem { color: #7a6a4e; }
.home-page .card { background: #fffdf7; border-color: #e6d8bd; }
.home-page .stat-grid { margin-top: 18px; gap: 12px; }
.home-page .stat {
  background: rgba(255, 253, 246, .82);
  border: 1px solid #e2d3b6;
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.home-page .stat b { font-size: 30px; color: #9c2a1c; }
.home-page .stat span { letter-spacing: .06em; }

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
  .xh { padding: 26px 0 26px; }
  .xh-title { font-size: 2.15rem; letter-spacing: .04em; line-height: 1.3; }
  .xh-sub { letter-spacing: .18em; }
  .xh-scroll { margin-top: 20px; }
  .xh-roll { flex: 0 0 12px; margin: -7px 0; border-radius: 7px; }
  .xh-roll::before, .xh-roll::after { width: 12px; height: 8px; }
  .xh-paper { padding: 24px 14px 22px; }
  .xh-quote { font-size: 1.32rem; line-height: 1.58; }
  .xh-note { font-size: 13.5px; margin-top: 14px; }
  .xh-mini-seal { width: 32px; height: 32px; margin-left: 7px; vertical-align: -9px; font-size: 9.5px; }
  .xh-cta { margin-top: 18px; padding: 0 2px; }
  .xh-btn { width: 100%; justify-content: center; padding: 13px 16px; font-size: 16px; letter-spacing: .1em; }
  .xh-cta-note { font-size: 12.5px; line-height: 1.7; padding: 0 6px; }
  .xh-cta-note .dot { display: none; }
  .xh-cta-note .ln { display: block; }
  .xh-tags { gap: 8px; margin-top: 16px; }
  .xh-tags span {
    writing-mode: horizontal-tb;
    padding: 7px 12px; border-radius: 999px;
    font-size: 12px; letter-spacing: .04em;
  }
  .xh-foot { letter-spacing: .3em; font-size: 12px; margin-top: 20px; }
  .xh-band { padding: 20px 0 2px; }
  .xh-search { padding: 14px 12px 12px; border-radius: 10px; }
  .xh-poem { font-size: 11.5px; letter-spacing: .06em; margin-top: 12px; }
  .home-page .stat b { font-size: 24px; }
  .home-page .stat { padding: 11px 10px; }
  .home-page .stat span { font-size: 12px; }
  .home-page .panel-title h2 { font-size: 20px; }
  /* 手机上一列更好读：两列会把谱名和元信息挤成豆腐块 */
  .home-page .grid-3 { grid-template-columns: 1fr !important; }
}

@media (max-width: 400px) {
  .xh-tags span { padding: 6px 9px; font-size: 11.5px; }
}
