/* 模板二：清爽纸感专栏风 (clean_reader.css) —— 适合故事配插图、长阅读停留时长极高 */
:root {
  --bg: #f8f6f1;
  --surface: #ffffff;
  --text: #262522;
  --muted: #716e66;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --border: #e6e2d8;
}
body.zg-alt-mode {
  --bg: #16181d;
  --surface: #20232a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #2dd4bf;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --border: #2e333d;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Songti SC", "Noto Serif SC", "Microsoft YaHei", serif;
  line-height: 1.88;
  padding-bottom: 60px;
}
body.zg-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }

.cr-container { max-width: 920px; margin: 0 auto; padding: 0 18px; }
.cr-header {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  padding: 20px 0 12px;
}
.cr-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.cr-logo { font-size: 1.5rem; font-weight: 900; color: var(--accent); letter-spacing: 1px; }
.cr-slogan { font-size: 0.82rem; color: var(--muted); font-family: system-ui, sans-serif; }

.zg-search { display: flex; gap: 6px; font-family: system-ui, sans-serif; }
.zg-search input {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
}
.zg-search button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.cr-menu {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-family: system-ui, sans-serif;
}
.zg-nav-link {
  white-space: nowrap;
  padding: 4px 2px;
  font-size: 0.94rem;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.zg-nav-link.active, .zg-nav-link:hover {
  color: var(--accent);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

.cr-tags-box { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; font-family: system-ui, sans-serif; }
.zg-tag-chip {
  font-size: 0.78rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 4px;
  color: var(--muted);
}

/* 左文右图 / 清爽专栏卡片流 */
.zg-cards-grid { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; }
.zg-post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  transition: box-shadow 0.2s;
}
.zg-post-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.zg-card-link {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.zg-card-thumb-wrap {
  flex: 0 0 180px;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: var(--border);
}
@media (max-width: 600px) {
  .zg-card-link { flex-direction: column; }
  .zg-card-thumb-wrap { width: 100%; flex: none; }
}
.zg-card-thumb { width: 100%; height: 100%; object-fit: cover; }
.zg-card-badge {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.68); color: #fff; font-size: 0.72rem;
  padding: 2px 7px; border-radius: 4px; font-family: system-ui, sans-serif;
}
.zg-card-body { flex: 1; }
.zg-card-meta { font-size: 0.78rem; color: var(--muted); display: flex; gap: 10px; margin-bottom: 6px; font-family: system-ui, sans-serif; }
.zg-card-cat { color: var(--accent); font-weight: 700; }
.zg-card-title { font-size: 1.18rem; margin-bottom: 8px; line-height: 1.4; }
.zg-card-desc { font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }
.zg-mini-tag { font-size: 0.76rem; color: var(--accent); margin-right: 8px; font-family: system-ui, sans-serif; }

/* 专栏阅读器正文 */
.cr-paper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  margin: 22px 0;
}
@media (max-width: 600px) { .cr-paper { padding: 20px 16px; } }
.zg-article-header h1 { font-size: 1.65rem; margin-bottom: 12px; line-height: 1.38; }
.zg-seo-lead {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.zg-reader-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 10px; padding-bottom: 12px; margin-bottom: 22px; border-bottom: 1px solid var(--border);
  font-family: system-ui, sans-serif; font-size: 0.82rem; color: var(--muted);
}
.zg-post-stats { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.zg-cat-pill { background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 4px; }
.zg-reader-tools { display: flex; gap: 6px; }
.zg-tool-btn {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 0.78rem;
}
.zg-article-body { font-size: 1.1rem; }
.zg-article-body.font-sm { font-size: 0.96rem; }
.zg-article-body.font-lg { font-size: 1.28rem; line-height: 2.05; }
.zg-blk-heading { font-size: 1.26rem; margin: 26px 0 12px; border-left: 4px solid var(--accent); padding-left: 10px; }
.zg-blk-para { margin-bottom: 20px; text-indent: 2em; }
.zg-blk-figure { margin: 24px 0; text-align: center; }
.zg-blk-img { max-width: 100%; height: auto; border-radius: 8px; cursor: zoom-in; border: 1px solid var(--border); }
.zg-blk-caption { font-size: 0.82rem; color: var(--muted); margin-top: 6px; font-family: system-ui, sans-serif; }
.zg-blk-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 20px 0; }

.zg-content-pager, .zg-pager {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px; margin: 28px 0; font-family: system-ui, sans-serif;
}
.zg-cpage-list { display: flex; gap: 6px; }
.zg-cpage-num, .zg-cpage-btn, .zg-page-btn {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 8px 14px; border-radius: 6px; cursor: pointer;
}
.zg-cpage-num.active, .zg-cpage-next { background: var(--accent); color: #fff; border-color: var(--accent); }
.zg-ad-slot { margin: 18px 0; text-align: center; }
.zg-prev-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 24px 0; font-family: system-ui, sans-serif; }
.zg-pn-box { padding: 12px; border: 1px solid var(--border); border-radius: 8px; display: flex; flex-direction: column; gap: 4px; }
.zg-pn-box span { font-size: 0.75rem; color: var(--muted); }
.zg-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 12px; font-family: system-ui, sans-serif; }
.zg-rel-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.zg-rel-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.zg-rel-info { padding: 8px; }
.zg-rel-info h4 { font-size: 0.85rem; margin-bottom: 4px; }
.zg-rel-info span { font-size: 0.74rem; color: var(--muted); }

.cr-footer {
  border-top: 1px solid var(--border); padding: 28px 0; margin-top: 36px;
  text-align: center; font-size: 0.82rem; color: var(--muted); font-family: system-ui, sans-serif;
}
.cr-footer-links { display: flex; justify-content: center; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }

/* 18+弹窗与灯箱 */
.zg-age-overlay {
  position: fixed; inset: 0; background: rgba(15, 18, 22, 0.9); z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 20px; font-family: system-ui, sans-serif;
}
.zg-age-dialog {
  max-width: 420px; width: 100%; background: #ffffff; color: #1e293b;
  border-radius: 14px; padding: 28px 24px; text-align: center;
}
.zg-age-badge { display: inline-block; background: #0f766e; color: #fff; padding: 3px 12px; border-radius: 99px; font-size: 0.8rem; margin-bottom: 10px; }
.zg-age-dialog h2 { margin-bottom: 10px; }
.zg-age-dialog p { font-size: 0.9rem; color: #475569; margin-bottom: 20px; }
.zg-age-actions { display: flex; flex-direction: column; gap: 10px; }
.zg-age-enter { background: #0f766e; color: #fff; border: none; padding: 12px; border-radius: 8px; font-size: 0.98rem; font-weight: 700; cursor: pointer; }
.zg-age-leave { color: #64748b; font-size: 0.85rem; }
.zg-ad-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--surface); border-top: 1px solid var(--border); padding: 8px 16px; text-align: center; display: none; }
.zg-sticky-close { position: absolute; right: 10px; top: -24px; background: #334155; color: #fff; border: none; padding: 2px 8px; cursor: pointer; font-size: 0.75rem; }
.zg-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.93); z-index: 9990; align-items: center; justify-content: center; padding: 20px; }
.zg-lb-stage img { max-width: 90vw; max-height: 82vh; object-fit: contain; }
.zg-lb-cap { color: #e2e8f0; font-size: 0.86rem; margin-top: 8px; text-align: center; font-family: system-ui, sans-serif; }
.zg-lb-close, .zg-lb-prev, .zg-lb-next { position: absolute; background: rgba(255,255,255,0.16); color: #fff; border: none; border-radius: 50%; width: 42px; height: 42px; font-size: 1.2rem; cursor: pointer; }
.zg-lb-close { top: 18px; right: 20px; }
.zg-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.zg-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.zg-loading, .zg-empty, .zg-error { text-align: center; padding: 48px 16px; color: var(--muted); }
