/* ============================================================
   嘉峪关 · 关隘碑刻
   骨架：左书脊铁栏（无顶部导航）+ 三行关城首屏（信息条 / 竖排碑题+图版 / 关墙图带）
        + 碑记引言 + 三列碑列构件 + 横向关墙案例带 + 关印城市表 + 双列手记 + 城墙页脚
   字体：楷体标题（站群内唯一），与兰州的宋体、其余各站均不同
   ============================================================ */

:root {
  --iron: #26221D;
  --stone: #6E6252;
  --sand: #F0E9DB;
  --sand-2: #E4DAC6;
  --seal: #A63A2A;
  --ink: #241F1A;
  --ink-2: #4E463C;
  --ink-3: #857764;
  --line: #D3C7B3;
  --line-2: #BCAE96;
  --paper: var(--sand);
  --paper-2: var(--sand-2);
  --accent: var(--seal);
  --font-h: 'KaiTi', 'STKaiti', 'Kaiti SC', '楷体', 'SimSun', serif;
  --font-b: 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
  --rail: 58px;
  --wrap: 1300px;
  --gut: 40px;
  --sec-y: 84px;
  --hw: 700;
  --htrack: .04em;
}

body { padding-left: var(--rail); }

/* ---------------- 左书脊铁栏 ---------------- */
.rail {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--rail);
  z-index: 90;
  background: var(--iron);
  color: var(--sand);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.rail-top { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rail-top svg { width: 26px; height: 26px; color: var(--sand); }
.rail-top i {
  writing-mode: vertical-rl;
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: .3em;
  color: rgba(240, 233, 219, .62);
}
.rail-word {
  writing-mode: vertical-rl;
  font-family: var(--font-h);
  font-size: 15px;
  letter-spacing: .34em;
  color: rgba(240, 233, 219, .9);
}
.rail-bot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rail-bot button, .rail-bot a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(240, 233, 219, .22);
  color: var(--sand);
  transition: background .2s, border-color .2s;
}
.rail-bot button:hover, .rail-bot a:hover { background: var(--seal); border-color: var(--seal); }
.rail-bot svg { width: 18px; height: 18px; }

/* ---------------- 全屏目录 ---------------- */
.menu {
  position: fixed; inset: 0; z-index: 160;
  background: var(--iron);
  color: var(--sand);
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
  overflow-y: auto;
}
.menu.on { opacity: 1; visibility: visible; }
.menu-close {
  position: absolute; top: 22px; right: 26px;
  width: 42px; height: 42px;
  border: 1px solid rgba(240, 233, 219, .25);
  color: var(--sand);
  font-size: 20px; line-height: 1;
}
.menu-in { max-width: 880px; margin: 0 auto; padding: clamp(52px, 9vh, 96px) 30px 40px; }
.menu-k { font-size: 11px; letter-spacing: .3em; color: rgba(240, 233, 219, .45); }
.menu-nav { margin-top: 34px; border-top: 1px solid rgba(240, 233, 219, .18); }
.menu-nav a {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 14px;
  padding: 20px 4px;
  border-bottom: 1px solid rgba(240, 233, 219, .13);
  transition: padding-left .25s, color .2s;
}
.menu-nav a:hover { padding-left: 14px; color: #fff; }
.menu-nav i { font-style: normal; font-size: 12px; color: var(--seal); letter-spacing: .1em; }
.menu-nav b { font-family: var(--font-h); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; letter-spacing: .08em; }
.menu-nav em { font-style: normal; font-size: 10.5px; letter-spacing: .22em; color: rgba(240, 233, 219, .4); }
.menu-foot { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 13px; color: rgba(240, 233, 219, .72); }
.menu-foot a { color: var(--sand); border-bottom: 1px solid rgba(240, 233, 219, .35); }
.menu-foot button { color: var(--sand); border-bottom: 1px solid rgba(240, 233, 219, .35); font-size: 13px; }

/* ---------------- 移动端顶条 ---------------- */
.bar {
  display: none;
  position: sticky; top: 0; z-index: 95;
  height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  background: var(--iron);
  color: var(--sand);
}
.bar-seal svg { width: 24px; height: 24px; }
.bar-city { display: flex; flex-direction: column; line-height: 1.25; }
.bar-city b { font-family: var(--font-h); font-size: 15px; letter-spacing: .12em; }
.bar-city i { font-style: normal; font-size: 9.5px; letter-spacing: .24em; color: rgba(240, 233, 219, .55); }
.bar-act { display: flex; gap: 6px; }
.bar-act button { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(240, 233, 219, .2); }
.bar-act svg { width: 17px; height: 17px; }

/* ---------------- 关城首屏 ---------------- */
.gate-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--sand);
}
.gh-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
  padding: 15px var(--gut);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px; letter-spacing: .18em; color: var(--ink-3);
}
.gh-top a { color: var(--iron); font-variant-numeric: tabular-nums; letter-spacing: .1em; }

.gh-main {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 3vw, 46px);
  padding: clamp(26px, 4.4vh, 54px) var(--gut);
  align-items: stretch;
  min-height: 0;
}
.gh-title { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-width: 0; }
.gh-main > *, .gh-plates figure, .gh-strip-track a { min-width: 0; }
.gh-title h1 {
  writing-mode: vertical-rl;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.45vw, 2.3rem);
  line-height: 1.22;
  letter-spacing: .09em;
  max-height: min(72vh, 640px);
  margin-left: auto;
  color: var(--iron);
  margin: 0;
}
.gh-title h1 em { font-style: normal; color: var(--seal); }
.gh-sub { font-size: 14.5px; line-height: 1.9; color: var(--ink-2); max-width: 34ch; }
.gh-act { display: flex; flex-wrap: wrap; gap: 10px; }
.gh-act .btn { height: 46px; }

.gh-plates {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr);
  grid-template-rows: 1fr 1fr;
  gap: 9px;
  min-height: min(58vh, 500px);
  min-width: 0;
}
.gh-plates figure { margin: 0; overflow: hidden; background: var(--sand-2); position: relative; }
.gh-plates figure img { width: 100%; height: 100%; object-fit: cover; }
.gh-plates .p1 { grid-row: 1 / 3; }
.gh-plates .p1::after {
  content: '';
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(38, 34, 29, .16);
  pointer-events: none;
}
.gh-seal {
  position: absolute;
  left: -18px; bottom: 16px;
  width: 78px; height: 78px;
  display: grid; place-content: center;
  text-align: center;
  background: var(--seal);
  color: #F6EFE0;
  font-family: var(--font-h);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: .1em;
  box-shadow: 0 0 0 3px var(--sand), 0 0 0 4px var(--seal);
}

/* 关墙图带 */
.gh-strip { position: relative; border-top: 1px solid var(--line); padding: 10px 0 14px; }
.gh-strip-track {
  display: flex; gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0 var(--gut);
  scrollbar-width: none;
}
.gh-strip-track::-webkit-scrollbar { display: none; }
.gh-strip-track a { flex: 0 0 132px; scroll-snap-align: start; }
.gh-strip-track img { height: 76px; width: 100%; object-fit: cover; filter: saturate(.92); transition: filter .3s, transform .3s; }
.gh-strip-track a:hover img { filter: saturate(1.08); transform: translateY(-2px); }
.gh-strip-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px;
  background: var(--sand); border: 1px solid var(--line-2);
  display: grid; place-content: center;
  z-index: 2;
}
.gh-strip-btn[data-rail-prev] { left: 6px; }
.gh-strip-btn[data-rail-next] { right: 6px; }

/* ---------------- 碑记引言 ---------------- */
.stele {
  background: var(--iron);
  color: var(--sand);
  padding: clamp(46px, 7vw, 86px) 0;
  text-align: center;
  position: relative;
}
.stele::before, .stele::after {
  content: '';
  position: absolute; left: 50%; transform: translateX(-50%);
  width: min(560px, 76%);
  height: 1px;
  background: rgba(240, 233, 219, .22);
}
.stele::before { top: 22px; }
.stele::after { bottom: 22px; }
.stele-mark { font-family: var(--font-h); font-size: 12px; letter-spacing: .6em; color: var(--seal); margin-bottom: 22px; }
.stele blockquote {
  margin: 0 auto;
  max-width: 24ch;
  font-family: var(--font-h);
  font-size: clamp(1.25rem, 2.3vw, 1.85rem);
  line-height: 1.9;
  letter-spacing: .1em;
  color: #F4EDDF;
}
.stele-meta {
  margin-top: 26px;
  display: flex; justify-content: center; gap: 20px;
  font-size: 10.5px; letter-spacing: .26em;
  color: rgba(240, 233, 219, .42);
}

/* ---------------- 三列碑列 ---------------- */
.cols { background: var(--sand); }
.cols-head { max-width: 62ch; margin-bottom: clamp(26px, 3.4vw, 42px); }
.cols-head h2 { font-family: var(--font-h); font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: .06em; margin: 6px 0 10px; }
.cols-head p { font-size: 14.5px; color: var(--ink-3); }

.cols-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(20px, 3vw, 40px);
  border-top: 2px solid var(--iron);
}
.col { min-width: 0; border-right: 1px solid var(--line); }
.col:last-child { border-right: 0; }
.col-cap {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line-2);
}
.col-cap span { font-family: var(--font-h); font-size: 18px; letter-spacing: .1em; }
.col-cap i { font-style: normal; font-size: 10.5px; color: var(--ink-3); letter-spacing: .16em; }

.brick {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 52px;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.brick-no { grid-row: 1 / 3; font-size: 11px; color: var(--seal); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.brick b { font-size: 15px; font-weight: 600; letter-spacing: .02em; transition: color .2s; }
.brick i { font-style: normal; font-size: 11.5px; color: var(--ink-3); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.brick img {
  grid-column: 3; grid-row: 1 / 3;
  width: 52px; height: 52px; object-fit: cover;
  filter: grayscale(.85) contrast(1.05);
  opacity: .78;
  transition: filter .35s, opacity .35s;
}
.brick:hover b { color: var(--seal); }
.brick:hover img { filter: none; opacity: 1; }

/* ---------------- 横向关墙案例带 ---------------- */
.rail-cases { background: var(--sand-2); overflow: hidden; }
.rc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.rc-head h2 { font-family: var(--font-h); font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: .06em; margin-top: 6px; }
.rc-nav { display: flex; gap: 8px; }
.rc-nav button {
  width: 42px; height: 42px;
  border: 1px solid var(--stone);
  color: var(--iron);
  display: grid; place-content: center;
  transition: background .2s, color .2s;
}
.rc-nav button:hover { background: var(--iron); color: var(--sand); }

.rc-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 var(--gut) 6px;
  scrollbar-width: none;
}
.rc-track::-webkit-scrollbar { display: none; }
.rc-card {
  flex: 0 0 min(72vw, 600px);
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  background: var(--sand);
  min-width: 0;
}
.rc-card figure { margin: 0; overflow: hidden; }
.rc-card figure img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; transition: transform .7s; }
.rc-card:hover figure img { transform: scale(1.04); }
.rc-card > div { padding: 20px 20px 22px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.rc-card h3 { font-family: var(--font-h); font-size: 19px; font-weight: 700; line-height: 1.45; }
.rc-card p { font-size: 12.5px; color: var(--ink-3); line-height: 1.65; }

/* ---------------- 关印城市表 ---------------- */
.seals { background: var(--sand); }
.seal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  border-top: 2px solid var(--iron);
  padding-top: 22px;
}
.seal {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--line-2);
  background: var(--sand-2);
  transition: background .22s, color .22s, border-color .22s;
  min-width: 0;
  padding: 4px;
}
.seal b { font-family: var(--font-h); font-size: clamp(12px, 1.15vw, 16px); letter-spacing: .06em; white-space: nowrap; }
.seal i { font-style: normal; font-size: 8px; letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; }
.seal:hover { background: var(--iron); border-color: var(--iron); }
.seal:hover b, .seal:hover i { color: var(--sand); }
.seal.cur { background: var(--seal); border-color: var(--seal); }
.seal.cur b, .seal.cur i { color: #F7F0E1; }

/* ---------------- 双列手记 ---------------- */
.notes { background: var(--sand); }
.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(20px, 3vw, 40px);
  border-top: 2px solid var(--iron);
}
.note {
  display: block;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.note time { font-size: 11px; letter-spacing: .16em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.note h3 { font-family: var(--font-h); font-size: 18px; line-height: 1.5; margin: 7px 0 6px; transition: color .2s; }
.note p { font-size: 13px; color: var(--ink-3); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note:hover h3 { color: var(--seal); }

/* ---------------- 结尾 ---------------- */
.gate-cta { background: var(--iron); color: var(--sand); padding: clamp(40px, 6vw, 70px) 0; }
.gate-cta .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: end; }
.gate-cta p { font-family: var(--font-h); font-size: clamp(1.2rem, 2.1vw, 1.7rem); line-height: 1.65; letter-spacing: .06em; max-width: 24ch; }
.gate-cta small { display: block; margin-top: 12px; font-size: 11.5px; letter-spacing: .18em; color: rgba(240, 233, 219, .48); font-family: var(--font-b); }
.gate-tel { font-family: var(--font-h); font-size: clamp(1.5rem, 3vw, 2.3rem); color: #F6EFE0; border-bottom: 2px solid var(--seal); padding-bottom: 4px; font-variant-numeric: tabular-nums; }

/* ---------------- 城墙页脚 ---------------- */
.gate { background: #1C1915; color: rgba(240, 233, 219, .72); }
.gate-wall {
  height: 16px;
  background:
    repeating-linear-gradient(90deg, rgba(240,233,219,.28) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, rgba(240,233,219,.18) 0 1px, transparent 1px 8px);
  border-bottom: 1px solid rgba(240, 233, 219, .16);
}
.gate-in { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 34px 0 30px; text-align: center; }
.gate-brand { display: flex; align-items: center; gap: 10px; color: var(--sand); }
.gate-brand svg { width: 26px; height: 26px; }
.gate-brand b { font-family: var(--font-h); font-size: 15px; letter-spacing: .14em; }
.gate-line { font-size: 12.5px; line-height: 2; }
.gate-line b { color: rgba(240, 233, 219, .42); font-weight: 400; margin: 0 5px 0 12px; }
.gate-line b:first-child { margin-left: 0; }
.gate-line a { color: var(--sand); border-bottom: 1px solid rgba(240, 233, 219, .28); }
.gate-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 12.5px; padding: 12px 0; border-top: 1px solid rgba(240, 233, 219, .13); border-bottom: 1px solid rgba(240, 233, 219, .13); width: min(760px, 100%); }
.gate-links a:hover, .gate-links button:hover { color: #fff; }
.gate-copy { font-size: 11.5px; letter-spacing: .06em; color: rgba(240, 233, 219, .42); }

/* 移动端底部条 */
.mbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  height: 58px;
  background: var(--iron);
  color: var(--sand);
  border-top: 1px solid rgba(240, 233, 219, .16);
}
.mbar > * { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 11px; }
.mbar > * + * { border-left: 1px solid rgba(240, 233, 219, .13); }
.mbar b { font-family: var(--font-h); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mbar .hot { background: var(--seal); color: #fff; }

/* ---------------- 内页：碑刻式排版 ---------------- */
.page-head { border-bottom: 2px solid var(--iron); }
.page-head h1 { letter-spacing: .05em; }
.crumb { letter-spacing: .2em; }

.pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(18px, 2.6vw, 34px); border-top: 2px solid var(--iron); padding-top: 20px; }
.pcard { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.pcard-img { aspect-ratio: 3 / 4; }
.pcard-body { padding: 12px 0 0; }
.pcard-idx { color: var(--seal); }
.pcard-body h3 { font-size: 18px; margin: 4px 0 4px; letter-spacing: .03em; }
.pcard-body p { font-size: 12.5px; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-go { margin-top: 8px; font-size: 11.5px; letter-spacing: .12em; }

.wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 22px; }
.cc-img { aspect-ratio: 4 / 3; }
.cc-meta { padding-top: 10px; border-top: 1px solid var(--line); margin-top: 10px; }
.cc-meta h3 { font-size: 19px; }

.news-row { grid-template-columns: 88px minmax(0, 1fr) 20px; }
.news-row h3 { font-size: 18px; }

.adv-side h2, .sec-head h2 { letter-spacing: .05em; }
.contact-row dd a { color: var(--seal); border-bottom: 1px solid var(--line-2); }
.map-card { background: var(--iron); }
.detail-tel { background: var(--iron); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .seal-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cols-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col:nth-child(2) { border-right: 0; }
}

@media (max-width: 900px) {
  :root { --rail: 0px; --gut: 18px; --sec-y: 56px; }
  body { padding-left: 0; padding-bottom: 58px; }
  .rail { display: none; }
  .bar { display: flex; }
  .mbar { display: flex; }

  .gate-hero { min-height: 0; }
  .gh-top { padding: 10px var(--gut); font-size: 10.5px; letter-spacing: .1em; }
  .gh-main { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 22px var(--gut) 26px; }
  .gh-title h1 {
    writing-mode: horizontal-tb;
    font-size: clamp(1.7rem, 7vw, 2.4rem);
    line-height: 1.28;
    max-height: none;
    letter-spacing: .04em;
  }
  .gh-sub { font-size: 13.5px; }
  .gh-plates { min-height: 260px; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
  .gh-plates .p1 { grid-row: 1; }
  .gh-plates figure:nth-child(3) { display: none; }
  .gh-seal { left: auto; right: 10px; bottom: -14px; width: 62px; height: 62px; font-size: 14px; }

  .cols-grid { grid-template-columns: minmax(0, 1fr); }
  .col { border-right: 0; }
  .brick { grid-template-columns: 24px minmax(0, 1fr) 46px; }
  .brick img { width: 46px; height: 46px; }

  .rc-card { flex: 0 0 84vw; grid-template-columns: minmax(0, 1fr); }
  .rc-card figure img { min-height: 190px; }

  .seal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .notes-grid { grid-template-columns: minmax(0, 1fr); }

  .gate-cta .wrap { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .gate-line b { display: block; margin: 8px 0 0; }
  .gate-line b:first-child { margin-top: 0; }

  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wall { grid-template-columns: minmax(0, 1fr); }
  .news-row { grid-template-columns: minmax(0, 1fr) 18px; }
  .news-row time { grid-column: 1 / -1; }
}
