@charset "utf-8";
/* ============================================================================
 *  侗族服饰专题库 · 页面样式
 *  ---------------------------------------------------------------------------
 *  版式对齐「非遗传承专题库」：复用 style.css 里的 .hzp-head / .hzp-panel /
 *  .hzp-search，这里只补三块自有内容：检索面板底图、地图区、列表与详情。
 * ========================================================================== */

/* ---------------------------------------------------------------- 检索面板 */
/* 面板尺寸与非遗库一致：min(1200px,84%) 宽、16px 圆角、浮在纸纹上 */
.cs-panel {
  background-image: url('../img/cloth-panel.jpg');
  background-color: #B9A38C;
  /* 用图片自身比例，避免裁切 */
  aspect-ratio: 1680 / 769;
}
/* 面板背后的纸纹由 body 提供，这里只加一点留白让面板不贴页眉 */
.cs-stage { padding: clamp(16px, 2.6vh, 30px) 0 clamp(12px, 2vh, 22px); }

/* 地图区：左地图 + 右直排标题 */
.cs-maplayout {
  max-width: 1540px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: clamp(14px, 1.6vw, 26px);
}
/* 标题列：只有标题本体参与居中，红装饰用绝对定位挂在标题上方，
   这样标题的垂直中心严格对齐地图的垂直中心 */
.cs-maptitle {
  flex: 0 0 auto;
  width: clamp(58px, 5.4vw, 76px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-maptitle h2 {
  position: relative;
  margin: 0;
  writing-mode: vertical-rl;      /* 直排：从上到下 */
  text-orientation: upright;
  font-family: var(--f-serif);
  font-size: clamp(19px, 1.8vw, 25px);
  font-weight: 700;
  letter-spacing: .34em;
  color: var(--ink);
  white-space: nowrap;
}
/* 标题上方一小段红线，不占布局高度 */
.cs-maptitle h2::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 16px;
  width: 2px;
  height: clamp(26px, 3.2vw, 42px);
  background: var(--red);
  border-radius: 1px;
}

/* 检索框内的「范围」下拉：与非遗库的浅色标签同一观感 */
.cs-scope {
  flex: 0 0 auto;
  height: 100%;
  padding: 0 30px 0 18px;
  font-family: var(--f-serif);
  font-size: 15px;
  letter-spacing: .1em;
  color: #5B3B2C;
  background: rgba(244, 237, 226, .92)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23806A55' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 12px center / 12px;
  border: 0;
  border-right: 1px solid #E6DCCB;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.cs-scope:hover { background-color: rgba(238, 229, 215, .96); }

/* 检索结果提示（替换掉默认的「汉字 / 拼音均可」） */
.hzp-search-tip.is-hit { color: #8B4A2B; }
.hzp-search-tip.is-miss { color: #A33; }

/* ---------------------------------------------------------------- 地图区 */
.cs-mapsec {
  /* 地图独占第二屏，上下各留一点纸边 */
  padding: clamp(14px, 2vh, 22px) clamp(16px, 3.4vw, 54px) clamp(14px, 2vh, 22px);
  scroll-margin-top: 84px;   /* 吸顶导航 72px + 一点空隙，滚过来时不被遮住 */
}
.cs-mapbox {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 54px rgba(58, 42, 28, .16), 0 3px 10px rgba(58, 42, 28, .08);
}
#map {
  width: 100%;
  /* JS 会按「一屏内看完」重算高度，这里只是兜底 */
  height: calc(100vh - 150px);
  min-height: 420px;
  background: #EDE9E2;
}

/* 地图没配密钥 / 加载失败时的引导页 */
.cs-setup {
  padding: 46px clamp(24px, 4vw, 60px) 52px;
  background: #FFFDF9;
  min-height: 420px;
}
.cs-setup h3 {
  margin: 0 0 10px; font-size: 18px; color: var(--red);
  font-family: var(--f-serif); letter-spacing: .06em;
}
.cs-setup p { font-size: 14px; color: var(--ink-2); line-height: 2; margin: 0 0 10px; }
.cs-setup ol { font-size: 14px; color: var(--ink-2); line-height: 2.2; padding-left: 24px; margin: 12px 0 18px; }
.cs-setup code {
  background: #F3F0EA; padding: 1px 7px; border-radius: 2px;
  font-family: Consolas, Menlo, monospace; font-size: 13px; color: #8A4B2F;
}
.cs-setup pre {
  background: #2B3947; color: #E8D19C; padding: 14px 18px; border-radius: 3px;
  font-size: 13px; line-height: 1.9; overflow-x: auto; margin: 0 0 16px;
}
.cs-setup .tip {
  font-size: 13px; color: var(--ink-3); background: #FBF7F0;
  border-left: 3px solid var(--gold); padding: 10px 16px; line-height: 1.9;
}

/* ---------------------------------------------------------------- 百度信息窗 */
.cs-iw { padding: 6px 4px 2px; font-family: var(--f-sans); }
.cs-iw h4 {
  margin: 0 0 6px; font-size: 15.5px; color: var(--red); font-weight: 700;
  font-family: var(--f-serif); letter-spacing: .06em;
}
.cs-iw .cs-iw-tags { font-size: 12.5px; color: #8A7A67; margin-bottom: 7px; }
.cs-iw p { margin: 0 0 10px; font-size: 13px; color: #4A3E33; line-height: 1.8; }
.cs-iw a {
  display: inline-block; font-size: 12.5px; color: #fff; background: var(--red);
  padding: 6px 16px; border-radius: 2px; letter-spacing: .05em;
}
.cs-iw a:hover { background: var(--red-dark); }

/* ---------------------------------------------------------------- 条目列表页：左筛选 + 右长条 */
/* 两栏各自在视口内滚动：整块高度 = 视口 − 吸顶导航，外层不滚 */
.cs-entries {
  max-width: 1400px;
  margin: 0 auto;
  height: calc(100vh - 72px);
  box-sizing: border-box;
  padding: clamp(14px, 2.2vh, 24px) 24px clamp(10px, 1.6vh, 18px);
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 26px;
  align-items: stretch;
  overflow: hidden;
}
.cs-side,
.cs-main {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;   /* 滚到头不要带动外层页面 */
  /* 隐藏滚动条，但照样能滚 */
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* 旧 Edge / IE */
}
.cs-side::-webkit-scrollbar,
.cs-main::-webkit-scrollbar { width: 0; height: 0; }

/* 左：筛选面板 */
.cs-side {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 0 12px;          /* 顶部不留缝，吸顶条才能贴住上沿 */
  box-shadow: 0 1px 2px rgba(43, 57, 71, .04);
}
.cs-side-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2);
  background: #fff;
}
/* 吸顶条上方再补一块同色，防止滚动内容从边框/圆角的亚像素缝里透出来 */
.cs-side-head::before {
  content: "";
  position: absolute;
  left: -1px; right: -1px; bottom: 100%;
  height: 12px;
  background: #fff;
}
.cs-side-head b { font-size: 14px; letter-spacing: .16em; color: var(--ink); font-weight: 700; }
.cs-reset {
  border: 0; background: none; padding: 0; cursor: pointer;
  font-size: 12.5px; color: var(--ink-3);
}
.cs-reset:hover { color: var(--red); }

.cs-fgroup { padding: 12px 10px 4px; }
.cs-fgroup h4 {
  margin: 0 0 6px; padding: 0 6px; font-size: 12px; font-weight: 400;
  letter-spacing: .16em; color: var(--ink-4);
}
.cs-fopts { display: flex; flex-direction: column; }
.cs-fopt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 6px 8px; border: 0; border-radius: 2px;
  background: none; cursor: pointer; text-align: left;
  font-family: inherit; font-size: 13px; color: var(--ink-2);
  transition: background .14s, color .14s;
}
.cs-fopt:hover { background: #FAF7F2; color: var(--red); }
.cs-fopt em { font-style: normal; font-size: 11.5px; color: var(--ink-4); }
.cs-fopt.is-on { background: #FBF3EA; color: var(--red); font-weight: 700; }
.cs-fopt.is-on em { color: var(--red-soft); }

/* 县域 / 乡镇：展开-收起 */
.cs-fmore {
  display: flex; align-items: center; gap: 5px;
  width: 100%; padding: 6px 8px; margin-top: 2px;
  border: 0; background: none; cursor: pointer; text-align: left;
  font-family: inherit; font-size: 12px; color: var(--ink-3);
  transition: color .14s;
}
.cs-fmore:hover { color: var(--red); }
.cs-fmore svg {
  width: 11px; height: 11px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; transition: transform .2s;
}
.cs-fmore.is-open svg { transform: rotate(180deg); }

/* 右：检索 + 结果 */
.cs-main { padding-right: 4px; }
/* 检索栏与结果条吸在这栏顶部，列表在下面滚 */
.cs-main-head {
  position: sticky; top: 0; z-index: 3;
  background: var(--paper);
  padding: 2px 0 8px;
}
.cs-main-head::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 100%;
  height: 10px;
  background: var(--paper);
}
.cs-searchbar { display: flex; align-items: stretch; height: 46px; margin-bottom: 14px; }
.cs-searchbar input {
  flex: 1 1 auto; min-width: 0; padding: 0 16px; font-family: inherit; font-size: 14.5px;
  color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-right: 0; border-radius: 3px 0 0 3px; outline: none;
}
.cs-searchbar input:focus { border-color: var(--gold); }
.cs-searchbar input::placeholder { color: var(--ink-4); }
.cs-searchbar button {
  flex: 0 0 auto; padding: 0 30px; border: 1px solid #8B4A2B; background: #8B4A2B;
  color: #FFF8EF; font-family: var(--f-serif); font-size: 15px; letter-spacing: .18em;
  border-radius: 0 3px 3px 0; cursor: pointer; transition: background .18s;
}
.cs-searchbar button:hover { background: #743A1F; }

.cs-resultbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--ink-3); margin-bottom: 14px;
}
.cs-resultbar b { font-size: 16px; color: var(--red); font-weight: 700; margin: 0 2px; }
.cs-chipbar { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-chipbar i {
  font-style: normal; font-size: 12px; color: #7A6A57; background: #F5F0E8;
  padding: 2px 10px; border-radius: 10px;
}

/* 长条卡片：左大图 + 右文字 */
.cs-rows { display: flex; flex-direction: column; gap: 14px; }
.cs-row {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px;
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  padding: 16px; text-decoration: none; color: inherit;
  transition: border-color .18s, box-shadow .18s, transform .18s;
  box-shadow: 0 1px 2px rgba(43, 57, 71, .04);
}
.cs-row:hover {
  border-color: var(--gold); transform: translateY(-2px);
  box-shadow: 0 18px 40px -24px rgba(58, 42, 28, .55);
}
.cs-row-fig {
  display: block; width: 240px; height: 170px; overflow: hidden;
  background: #F1EBE1; border: 1px solid var(--line-2); border-radius: 2px;
}
.cs-row-fig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-fig-ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 8px;
}
.cs-fig-ph b {
  font-size: 30px; font-weight: 400; color: #D6C9B6; font-family: var(--f-serif);
  letter-spacing: .06em;
}
.cs-fig-ph em {
  font-style: normal; font-size: 12.5px; color: #B7A794; letter-spacing: .18em;
}

.cs-row-body { display: flex; flex-direction: column; min-width: 0; padding: 2px 0; }
.cs-row-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cs-badge {
  font-style: normal; font-size: 11.5px; color: #7A6A57; background: #F5F0E8;
  padding: 2px 10px; border-radius: 10px; white-space: nowrap;
}
.cs-row-title {
  font-family: var(--f-serif); font-size: 19px; font-weight: 700;
  color: var(--ink); letter-spacing: .05em;
}

.cs-row-meta {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 26px; margin-top: 12px;
}
.cs-row-meta span { display: flex; gap: 10px; font-size: 13px; line-height: 1.6; }
.cs-row-meta em {
  /* 标签最长四个字（简要特点），统一宽度让各列对齐；不足会折行 */
  flex: 0 0 62px; font-style: normal; color: var(--ink-4);
  letter-spacing: .02em; white-space: nowrap;
}
.cs-row-meta i {
  font-style: normal; color: var(--ink-2); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

.cs-row-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; padding: 6px 16px; font-size: 13px; letter-spacing: .06em;
  color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 2px;
  transition: .16s;
}
.cs-row-btn svg {
  width: 13px; height: 13px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.cs-row:hover .cs-row-btn { border-color: var(--red); color: var(--red); }

.cs-empty-box {
  padding: 70px 20px; text-align: center; color: var(--ink-3); font-size: 14px;
  background: #fff; border: 1px dashed var(--line); border-radius: 3px;
}

/* ---------------------------------------------------------------- 通用页头 / 面包屑 */
.cs-listpage { max-width: 1200px; margin: 0 auto; padding: clamp(28px, 4vh, 44px) 24px 76px; }
.cs-crumb { font-size: 13px; color: var(--ink-3); margin: 0 0 12px; }
.cs-crumb a { color: var(--ink-3); }
.cs-crumb a:hover { color: var(--red); }
.cs-crumb i { font-style: normal; margin: 0 8px; color: var(--ink-4); }

/* ---------------------------------------------------------------- 详情页 */
.cs-detail { max-width: 880px; margin: 0 auto; padding: clamp(26px, 4vh, 42px) 24px 80px; }
.cs-detail h1 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: .06em; }
.cs-detail .loc { font-size: 14px; color: var(--ink-3); margin-left: 12px; }
.cs-detail-title { display: flex; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.cs-lead-tag {
  margin: 0 0 4px; font-size: 13.5px; color: var(--red-soft); letter-spacing: .06em;
}

/* 详情页封面：宽幅取景，竖构图照片也裁成横幅 */
.cs-cover {
  margin: 20px 0 4px; overflow: hidden; border-radius: 3px;
  border: 1px solid var(--line); background: #F1EBE1;
}
.cs-cover img {
  display: block; width: 100%; height: clamp(240px, 34vw, 420px);
  object-fit: cover; object-position: center 26%;
}

.cs-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin: 24px 0 30px; border-radius: 2px; overflow: hidden;
}
.cs-fact { background: #fff; padding: 15px 18px; }
.cs-fact dt { font-size: 12px; color: var(--ink-3); letter-spacing: 1.2px; margin-bottom: 6px; }
.cs-fact dd { margin: 0; font-size: 14.5px; color: var(--ink); font-family: var(--f-serif); }

@media (max-width: 760px) {
  .cs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cs-body { font-size: 15.5px; line-height: 2.2; color: var(--ink-2); text-align: justify; }
.cs-body p { margin: 0 0 18px; text-indent: 2em; }
.cs-body .cs-empty { color: var(--ink-3); text-indent: 0; }

.cs-refs { margin-top: 32px; padding-top: 18px; border-top: 1px dashed var(--line); }
.cs-refs h3 { font-size: 14px; color: var(--ink-2); margin: 0 0 10px; font-weight: 400; letter-spacing: 1px; }
.cs-refs li { font-size: 13px; color: var(--ink-3); line-height: 2; }

.cs-actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.cs-btn {
  display: inline-block; padding: 10px 24px; font-size: 13.5px; letter-spacing: .05em;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 2px;
}
.cs-btn:hover { border-color: var(--red); color: var(--red); }
.cs-btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.cs-btn.primary:hover { background: var(--red-dark); color: #fff; }

.cs-loading { padding: 80px 0; text-align: center; color: var(--ink-3); font-size: 14px; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 900px) {
  .hzp-search { height: 46px; width: 88%; top: 26%; }
  .hzp-search-tip { display: none; }
  #map { height: 62vh; }
  .cs-mapsec { padding: 0 12px 34px; }
  .cs-mapbox { border-radius: 12px; }
  /* 窄屏：直排标题改为地图上方的横排 */
  .cs-maplayout { flex-direction: column-reverse; gap: 10px; }
  .cs-maptitle {
    width: auto; flex-direction: row; align-items: center; justify-content: flex-start;
    gap: 10px; padding: 0 0 2px;
  }
  .cs-maptitle h2 { writing-mode: horizontal-tb; letter-spacing: .12em; }
  .cs-maptitle h2::before {
    position: static; transform: none; margin: 0 12px 0 0;
    display: inline-block; vertical-align: middle;
    width: 16px; height: 2px;
  }
  .cs-listpage { padding-left: 14px; padding-right: 14px; }
  /* 条目页：窄屏恢复整页滚动，筛选转成横向标签 */
  .cs-entries {
    grid-template-columns: 1fr; gap: 14px; padding: 18px 14px 60px;
    height: auto; overflow: visible;
  }
  .cs-side, .cs-main { height: auto; overflow: visible; padding-right: 0; }
  .cs-main-head { position: static; background: none; padding-bottom: 0; }
  .cs-side { padding-bottom: 6px; }
  .cs-fgroup { padding: 8px 10px 0; }
  .cs-fopts { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .cs-fopt {
    width: auto; padding: 5px 12px; border: 1px solid var(--line);
    border-radius: 14px; font-size: 12.5px;
  }
  .cs-fopt em { margin-left: 4px; }
  .cs-row { grid-template-columns: 1fr; gap: 12px; }
  .cs-row-fig { width: 100%; height: 190px; }
  .cs-row-meta { grid-template-columns: 1fr; gap: 5px; }
}

/* ---------------------------------------------------------------- 专题正文：两栏 + 目录 */
.cs-doc-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(22px, 3.4vh, 36px) 24px 80px;
}
.cs-doc-wrap .cs-crumb { margin-bottom: 10px; }
.cs-doc {
  display: grid;
  grid-template-columns: 186px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  margin-top: 18px;
}
.cs-toc {
  position: sticky;
  top: 96px;
  border-left: 2px solid var(--line);
  padding-left: 14px;
}
.cs-toc-h {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--ink-4);
}
.cs-toc-btn {
  display: block;
  width: 100%;
  padding: 6px 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--f-serif);
  font-size: 14.5px;
  letter-spacing: .06em;
  color: var(--ink-2);
  transition: color .16s;
}
.cs-toc-btn:hover { color: var(--red); }
.cs-toc-btn.is-on { color: var(--red); font-weight: 700; }

.cs-article section { scroll-margin-top: 96px; margin-bottom: 34px; }
.cs-article h2 {
  font-size: 18px;
  letter-spacing: .1em;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.cs-article p { font-size: 15px; line-height: 2.1; color: var(--ink-2); margin: 0 0 16px; text-align: justify; }

.cs-sum { width: 100%; border-collapse: collapse; }
.cs-sum th, .cs-sum td {
  border: 1px solid var(--line);
  padding: 10px 16px;
  font-size: 14.5px;
  text-align: left;
}
.cs-sum th { width: 118px; background: #FBF7F0; color: var(--ink-2); font-weight: 400; letter-spacing: .1em; }
.cs-sum td { color: var(--ink); font-family: var(--f-serif); }

/* 主要分布村庄：一行三个 */
.cs-places {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 22px;
}
.cs-places li { margin: 0; }

/* 村庄：可点，点了回地图定位 */
.cs-place-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  font-family: var(--f-serif);
  font-size: 14px;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s, color .16s, background .16s;
}
.cs-place-btn:hover {
  border-color: var(--gold);
  background: #FBF7F0;
  color: var(--red);
}
.cs-place-btn i {
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--ink-4);
  white-space: nowrap;
}
.cs-place-btn:hover i { color: var(--red-soft); }

/* 地图上的村庄定位标记 */
.cs-vil-pin {
  width: 120px;
  padding: 4px 0;
  text-align: center;
  background: #9A2929;
  color: #fff;
  font-family: var(--f-serif);
  font-size: 12.5px;
  letter-spacing: .06em;
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(80, 30, 20, .3);
}

/* 图片：瀑布流。横图竖图各按原比例，不裁切 */
.cs-gallery {
  column-count: 3;
  column-gap: 14px;
}
.cs-gallery a {
  display: block;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  background: #F2EDE5;
  transition: border-color .18s;
}
.cs-gallery a:hover { border-color: var(--gold); }
.cs-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
}

.cs-src { margin: 0; padding-left: 22px; }
.cs-src li { font-size: 13.5px; line-height: 2; color: var(--ink-3); }

.cs-note { font-size: 13.5px; color: var(--ink-4); }

@media (max-width: 900px) {
  .cs-doc { grid-template-columns: 1fr; gap: 20px; }
  .cs-places { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-gallery { column-count: 2; column-gap: 10px; }
  .cs-gallery a { margin-bottom: 10px; }
  .cs-toc {
    position: static; border-left: 0; border-top: 1px solid var(--line);
    padding: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px;
  }
  .cs-toc-h { width: 100%; margin-bottom: 2px; }
  .cs-toc-btn {
    width: auto; padding: 4px 12px; border: 1px solid var(--line);
    border-radius: 14px; font-size: 13px;
  }
}

/* 地图图片弹窗：白框 + 阴影，图片整张显示，高度自适应 */
.cs-iw-fig {
  display: block;
  padding: 4px;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 24px rgba(40, 30, 20, .28);
  line-height: 0;
}
.cs-iw-fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}

/* 地图 / 卫星 切换 */
.cs-maptype {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  display: flex;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 2px 10px rgba(40, 30, 20, .18);
}
.cs-maptype button {
  border: 0;
  background: none;
  padding: 6px 14px;
  font-family: var(--f-serif);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .16s, color .16s;
}
.cs-maptype button.is-on { background: #9A2929; color: #fff; }
.cs-maptype button:not(.is-on):hover { background: #FBF3EA; color: var(--red); }

/* ---------------------------------------------------------------- 首页时间轴：三个时期 */
.cs-era {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(16px, 3vw, 40px);
}
.cs-era-inner { width: 100%; max-width: 1060px; }

.cs-era-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-top: 58px;          /* 上方留给年份 */
}
/* 横线：穿过三个圆点 */
.cs-era-track::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 58px;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(198, 158, 94, 0) 0%, rgba(198, 158, 94, .55) 18%,
    rgba(198, 158, 94, .55) 82%, rgba(198, 158, 94, 0) 100%);
}

.cs-era-node {
  position: relative;
  padding: 74px 16px 26px;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.cs-era-node .era-year {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 12.5px;
  letter-spacing: .14em;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.cs-era-node .era-dot {
  position: absolute;
  top: 52px;
  left: 50%;
  width: 13px;
  height: 13px;
  margin-left: -6.5px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gold);
  transition: background .2s, border-color .2s, transform .2s;
}
.cs-era-node .era-name {
  font-family: var(--f-serif);
  font-size: clamp(19px, 1.9vw, 25px);
  letter-spacing: .16em;
  color: var(--ink);
  transition: color .2s;
}
.cs-era-node .era-hint {
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--ink-4);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity .2s, transform .2s;
}

.cs-era-node:hover .era-dot,
.cs-era-node:focus-visible .era-dot {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.15);
}
.cs-era-node:hover .era-name,
.cs-era-node:focus-visible .era-name { color: var(--red); }
.cs-era-node:hover .era-hint,
.cs-era-node:focus-visible .era-hint { opacity: 1; transform: translateY(0); }
.cs-era-node:focus { outline: none; }

/* 时期专题页 */
.cs-era-page .cs-era-years {
  margin: 6px 0 26px;
  font-size: 13.5px;
  letter-spacing: .18em;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.cs-era-body {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  margin-bottom: 34px;
  min-height: 220px;
}

@media (max-width: 900px) {
  .cs-era { padding: 0 14px; align-items: flex-start; }
  .cs-era-node { padding: 70px 6px 18px; }
  .cs-era-node .era-name { font-size: 17px; letter-spacing: .1em; }
  .cs-era-node .era-year { font-size: 11px; letter-spacing: .06em; }
}

/* 条目列表分页 */
.cs-pager {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 26px 0 8px;
}
.cs-pg {
  padding: 8px 18px; font-size: 13px; letter-spacing: .04em;
  color: var(--ink-2); background: #fff;
  border: 1px solid var(--line); border-radius: 2px;
  font-family: inherit; cursor: pointer;
  transition: border-color .16s, color .16s;
}
.cs-pg:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.cs-pg:disabled { color: var(--ink-4); cursor: default; background: #FAF9F7; }
.cs-pg-info {
  font-size: 12.5px; color: var(--ink-3); letter-spacing: .06em;
}
.cs-pg-info i { font-style: normal; margin-left: 8px; color: var(--ink-4); }

/* 页码按钮 */
.cs-pg-num {
  min-width: 38px; padding: 8px 10px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.cs-pg-num.is-on {
  color: #fff; background: var(--red); border-color: var(--red);
}
.cs-pg-gap {
  padding: 0 2px; color: var(--ink-4); font-size: 13px; letter-spacing: .02em;
}
.cs-pager .cs-pg-info { margin-left: 6px; }
