/* =====================================================================
   报纸版面样式（随心读 epaper 化，2026-11-04）
   - 几何来源：layout_json.zones[*].geometry（排版引擎自动生成，非手工锚点）
   - 设计空间 1000x1400，全部用百分比定位 + cqw 字号 → 同一 markup 可做
     大版面页 / 迷你缩略图 / 文章页左栏，无需出图
   ===================================================================== */

/* ---------- 沉浸模式：与 reader 页一致，隐藏公告条与站点页脚 ---------- */
body.reader-page #bulletinBanner { display: none !important; }
body.reader-page .site-footer-nav { display: none !important; }

/* ---------- 版面画布 ---------- */
.ep-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 1400;
  container-type: inline-size;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.012) 0 1px, transparent 1px 7px),
    #faf7ee;
  border: 1px solid #c9c2ae;
  overflow: hidden;
}

/* ---------- 报头 ---------- */
.ep-masthead {
  text-align: center;
  padding: 1.5cqw 0 1.0cqw;
  border-bottom: 0.45cqw double #2b2b2b;
  margin-bottom: 0.6cqw;
}
.ep-mast-name {
  font-family: "Noto Serif SC", "SimSun", "宋体", serif;
  font-weight: 900;
  font-size: 4.8cqw;
  letter-spacing: .3em;
  text-indent: .3em;
  color: #1d1d1d;
}
.ep-mast-meta {
  margin-top: .6cqw;
  font-size: 1.7cqw;
  color: #5a5a5a;
  font-family: "Noto Serif SC", "SimSun", serif;
}
.ep-mast-meta b { color: #8c2a2a; }

/* ---------- 豆腐块（= 热点，锚点即 DOM 块本身） ---------- */
.ep-block {
  position: absolute;
  box-sizing: border-box;
  display: block;
  border: 1px solid #3a3a3a;
  background: #fdfbf4;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  padding: 1.2cqw 1.4cqw;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.ep-block:hover {
  background: #f4efdd;
  box-shadow: inset 0 0 0 2px #a02323;
}
.ep-block.ep-static { cursor: default; }
.ep-block.ep-static:hover { box-shadow: none; background: #fdfbf4; }

/* 分区标签 */
.ep-zone-tag {
  display: inline-block;
  font-family: "Noto Serif SC", "SimSun", serif;
  font-size: 1.5cqw;
  letter-spacing: .18em;
  color: #a02323;
  border-top: 0.25cqw solid #a02323;
  padding-top: .3cqw;
  margin-bottom: .8cqw;
}

/* 块内标题 */
.ep-title {
  margin: 0 0 .6cqw;
  font-family: "Noto Serif SC", "SimSun", serif;
  font-weight: 700;
  font-size: 2.1cqw;
  line-height: 1.35;
  color: #1d1d1d;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-byline {
  font-size: 1.35cqw;
  color: #777;
  margin-bottom: .7cqw;
}
.ep-preview {
  font-family: "Noto Serif SC", "SimSun", serif;
  font-size: 1.5cqw;
  line-height: 1.72;
  color: #3c3c3c;
  text-indent: 2em;
  text-align: justify;
  overflow: hidden;
  max-height: 100%;
}

/* 头条块放大 */
.ep-headline .ep-title { font-size: 3.3cqw; -webkit-line-clamp: 3; }
.ep-headline .ep-preview {
  column-count: 2;
  column-gap: 2.4cqw;
  column-rule: 1px solid #d8d2bd;
  font-size: 1.75cqw;
}
.ep-headline .ep-zone-tag { font-size: 1.9cqw; border-top-width: 0.35cqw; }

/* 文章页当前块高亮 */
.ep-active {
  outline: 0.4cqw solid #c0392b;
  outline-offset: -0.4cqw;
  background: #fdf3e0;
}

/* ---------- 迷你缩略图（发现页期次区） ---------- */
.ep-thumb {
  display: block;
  background: #fff;
  border: 1px solid #ddd6c4;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.ep-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.ep-thumb-meta {
  margin-top: 8px;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ep-thumb-meta .ep-thumb-title { font-weight: 700; color: #222; }

/* 缩略图内压缩字号（容器小，cqw 自动按容器宽缩放，只需压 padding） */
/* 迷你版面 = 一张「填满」的报纸缩略图：实心报头 + 每个豆腐块带正文横纹，
   不再出现空荡的描边方框；块内丑陋文件名标题隐藏，只留报头刊名 */
.ep-canvas--mini {
  background:
    repeating-linear-gradient(0deg, rgba(60,50,35,.08) 0 1px, transparent 1px 4px),
    #efe9da;
  border-color: #b3a98f;
}
.ep-canvas--mini .ep-masthead {
  padding: 1.0cqw 0 .7cqw;
  border-bottom: none;
  margin-bottom: .5cqw;
  background: #7a1f1f;
  color: #fdf3e0;
  border-radius: 2px 2px 0 0;
}
.ep-canvas--mini .ep-mast-name { color: #fdf3e0; font-size: 3.4cqw; letter-spacing: .22em; text-indent: .22em; }
.ep-canvas--mini .ep-mast-meta { color: #f3d9cc; margin-top: .25cqw; font-size: 1.5cqw; }
/* 每篇文章块：淡底 + 横纹 = 报纸正文栏，永远不空 */
.ep-canvas--mini .ep-block {
  padding: .5cqw .6cqw;
  border-width: 1px;
  border-color: #b3a98f;
  background:
    repeating-linear-gradient(0deg, rgba(60,50,35,.15) 0 1px, transparent 1px 3.2px),
    #fbf8ef;
}
.ep-canvas--mini .ep-block .ep-title { display: none; }
/* 头条块更醒目（浅金底 + 红边） */
.ep-canvas--mini .ep-headline {
  background:
    repeating-linear-gradient(0deg, rgba(60,50,35,.10) 0 1px, transparent 1px 3.2px),
    #fff7e6;
  border-color: #8c2a2a;
}
/* 无版面期次的占位卡：与缩略图同尺寸，填充满而非空洞 */
.ep-canvas--fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.02) 0 1px, transparent 1px 7px),
    #efe9da;
}
.ep-canvas--fallback .ep-fallback-name {
  font-family: "Noto Serif SC","SimSun",serif; font-weight: 900;
  font-size: 5cqw; letter-spacing: .3em; text-indent: .3em; color: #7a1f1f;
}
.ep-canvas--fallback .ep-fallback-meta { font-size: 2.4cqw; color: #6a5f48; }
.ep-canvas--fallback .ep-fallback-note {
  font-size: 2cqw; color: #8a7c5c; border-top: 1px dashed #c9b98a; padding-top: 4px; margin-top: 2px;
}

/* ---------- 版面页外层（大页） ---------- */
.ep-page-wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 18px 12px 40px;
}
.ep-page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.ep-page-head .ep-btn {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid #b9b19a;
  border-radius: 4px;
  background: #fff;
  color: #444;
  text-decoration: none;
  font-size: 13px;
}
.ep-page-head .ep-btn:hover { border-color: #a02323; color: #a02323; }

/* ---------- 往期回顾页头 ---------- */
.ep-list-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ep-list-title { display: flex; align-items: baseline; gap: 12px; }
.ep-list-title h1 {
  font-family: "Noto Serif SC", "SimSun", serif;
  font-size: 26px;
  letter-spacing: .1em;
  margin: 0;
  color: #2b2620;
}
.ep-list-count {
  font-size: 13px;
  color: #8a7d63;
  background: #f3ecdd;
  border: 1px solid #e6dcc6;
  border-radius: 999px;
  padding: 3px 12px;
}
.ep-list-head .ep-btn {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid #cfc6ad;
  border-radius: 8px;
  background: #fff;
  color: #555;
  text-decoration: none;
  font-size: 13px;
  transition: all .15s;
}
.ep-list-head .ep-btn:hover { border-color: #a02323; color: #a02323; }

/* ---------- 往期回顾缩略图墙 ---------- */
.ep-issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.ep-thumb {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid #ddd6c4;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  box-shadow: 0 1px 3px rgba(80, 60, 30, .06);
}
.ep-thumb:hover {
  transform: translateY(-4px);
  border-color: #c9b98a;
  box-shadow: 0 10px 26px rgba(80, 60, 30, .16);
}
/* 空版面占位：不再是空洞米色块 */
.ep-thumb-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    radial-gradient(220px 120px at 50% 0%, rgba(160, 35, 35, .05), transparent 70%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.015) 0 1px, transparent 1px 8px),
    #f6f1e2;
}
.ep-fallback-name {
  font-family: "Noto Serif SC", "SimSun", serif;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: .35em;
  text-indent: .35em;
  color: #9a8a68;
}
.ep-fallback-meta { font-size: 12px; color: #a89a78; }
.ep-fallback-note {
  font-size: 12px;
  color: #b0a480;
  border-top: 1px dashed #d8cba8;
  padding-top: 8px;
}
.ep-thumb-meta {
  margin-top: 10px;
  font-size: 12.5px;
  color: #6b6353;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-top: 1px dashed #ece5d2;
  padding-top: 9px;
}
.ep-thumb-meta .ep-thumb-title { font-weight: 700; color: #2b2620; }

.ep-pager {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
}
.ep-pager .ep-btn {
  display: inline-block;
  padding: 7px 18px;
  border: 1px solid #cfc6ad;
  border-radius: 8px;
  background: #fff;
  color: #555;
  text-decoration: none;
  font-size: 13px;
  transition: all .15s;
}
.ep-pager .ep-btn:hover { border-color: #a02323; color: #a02323; }
.ep-pager-info { font-size: 13px; color: #8a8371; font-variant-numeric: tabular-nums; }

/* ---------- 文章页（左迷你版面 + 右正文） ---------- */
.ep-article-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 12px 40px;
  display: grid;
  grid-template-columns: minmax(300px, 460px) 1fr;
  gap: 26px;
  align-items: start;
}
@media (max-width: 900px) {
  .ep-article-wrap { grid-template-columns: 1fr; }
}
.ep-article-side .ep-side-tip {
  margin-top: 10px;
  font-size: 12px;
  color: #8a8a8a;
  text-align: center;
}
.ep-article-main {
  background: #fdfbf4;
  border: 1px solid #d8d2bd;
  border-radius: 6px;
  padding: 26px 30px;
}
.ep-article-main h1 {
  font-family: "Noto Serif SC", "SimSun", serif;
  font-size: 26px;
  line-height: 1.4;
  margin: 0 0 10px;
  color: #1d1d1d;
}
.ep-article-meta {
  font-size: 13px;
  color: #777;
  padding-bottom: 14px;
  border-bottom: 1px solid #e4ddc8;
  margin-bottom: 16px;
}
.ep-article-meta span { margin-right: 14px; }
.ep-article-body {
  font-family: "Noto Serif SC", "SimSun", serif;
  font-size: 16px;
  line-height: 1.9;
  color: #333;
  text-indent: 2em;
  text-align: justify;
  max-height: 560px;
  overflow: hidden;
  position: relative;
}
.ep-article-body::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 90px;
  background: linear-gradient(transparent, #fdfbf4);
}
.ep-article-cta {
  margin-top: 22px;
  display: inline-block;
  padding: 10px 26px;
  background: #a02323;
  color: #fff !important;
  border-radius: 4px;
  text-decoration: none;
  font-size: 15px;
  letter-spacing: .1em;
}
.ep-article-cta:hover { background: #8c1d1d; }
.ep-article-nav {
  margin-top: 16px;
  font-size: 13px;
  color: #888;
}
.ep-article-nav a { color: #a02323; text-decoration: none; margin-right: 14px; }
