/* =============================================
   story.css — 文章详情页共用母版样式
   路径：writing/shared/story.css

   ★ 改字体大小、行距、进度条颜色等，只改这里
   ★ 所有 writing/stories/ 下的阅读页引用本文件
   ============================================= */

:root {
  /* 正文衬线：Win 宋体 → 微软雅黑；Mac 宋体 → 苹方 */
  --font-serif: 'Songti SC', 'STSong', 'SimSun', '宋体', 'Microsoft YaHei', 'PingFang SC', serif;

  /* ── 可调设计变量（改这里 = 全站阅读页同步） ── */
  --story-font-size: 16px;       /* 正文字号 */
  --story-line-height: 2.2;      /* 正文行高 */
  --story-max-width: 900px;      /* 正文栏最大宽度 */
  --story-title-size: 26px;      /* 标题字号 */
  --section-gap: 4.6em;          /* 大场景分段间距 */
  --progress-height: 2px;        /* 顶部进度条高度 */
}

html { overflow-x: hidden; }

/* 侧边栏固定，不随内容滚走 */
#sidebar-container {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 30;
}

.layout { min-height: 100vh; }

.content-area {
  margin-left: var(--sidebar-w);
  display: flex;
  justify-content: center;
}

.main {
  width: 100%;
  max-width: var(--story-max-width);
  padding: 100px 80px 120px 80px;
}

/* ══════════════════════════════
   阅读进度条
══════════════════════════════ */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: var(--progress-height);
  width: 0%;
  background: var(--purple);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ══════════════════════════════
   顶部：面包屑 + 章节导航
══════════════════════════════ */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 40px;
}

.breadcrumb {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}
.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--purple); }
.breadcrumb .sep { margin: 0 6px; opacity: 0.4; }
.breadcrumb .current { color: var(--purple); }

.chapter-nav {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}
.chapter-nav a {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.chapter-nav a:hover { color: var(--purple); }

/* 悬浮迷你导航 */
.sticky-bar {
  position: fixed;
  top: 0;
  left: 460px;
  right: 0;
  height: 90px;
  z-index: 150;
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(192, 136, 200, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateY(-100%);
  transition: transform 0.25s ease;
}
.sticky-bar.visible { transform: translateY(0); }

.sticky-nav-group {
  display: flex;
  align-items: baseline;
  gap: 28px;
}
.sticky-nav-group a {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.sticky-nav-group a:hover { color: var(--purple); }

.sticky-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: #e8e8e8;
  white-space: nowrap;
}
.sticky-title .tag { margin-right: 6px; }

/* ══════════════════════════════
   文章标题
══════════════════════════════ */
.story-title {
  font-family: var(--font-display);
  font-size: var(--story-title-size);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #e8e8e8;
  text-align: center;
  margin-bottom: 44px;
}

/* ══════════════════════════════
   Summary
══════════════════════════════ */
.summary-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  font-weight: 400;
  color: rgba(232, 232, 232, 0.45);
  margin-bottom: 10px;
}
.summary-block {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(232, 232, 232, 0.55);
  margin-bottom: 40px;
  padding-left: 16px;
  border-left: 2px solid rgba(192, 136, 200, 0.15);
}
.summary-block p { text-indent: 0; margin-bottom: 6px; }

/* ══════════════════════════════
   正文
══════════════════════════════ */
.story-body {
  font-family: var(--font-serif);
  font-size: var(--story-font-size);
  line-height: var(--story-line-height);
  color: rgba(232, 232, 232, 0.82);
}
.story-body p {
  text-indent: 2em;
  margin-bottom: 6px;
}
/* 大场景分段：仅加大间距，不用星号 */
.story-body p.section-gap {
  margin-top: var(--section-gap);
}
/* 文首/文中引用原文 */
.story-body p.quote-source {
  font-style: italic;
  color: rgba(232, 232, 232, 0.72);
}

/* Summary 与正文之间的分隔星 */
.divider {
  text-align: center;
  margin: 8px 0 36px 0;
  color: rgba(232, 232, 232, 0.3);
  letter-spacing: 0.3em;
  font-size: 13px;
}

/* 诗句/韵律段 */
.verse-block {
  margin: 28px 0;
  text-align: center;
}
.verse-block .verse {
  text-indent: 0;
  margin-bottom: 2px;
  letter-spacing: 0.08em;
  color: rgba(232, 232, 232, 0.75);
}

.footnote-mark {
  text-align: center;
  text-indent: 0 !important;
  color: rgba(232, 232, 232, 0.35);
  letter-spacing: 0.3em;
  margin-top: 40px !important;
}

.footnote-block {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(192, 136, 200, 0.1);
  font-family: var(--font-serif);
  font-size: 12.5px;
  line-height: 1.9;
  color: rgba(232, 232, 232, 0.4);
}
.footnote-block p {
  text-indent: 0;
  margin-bottom: 4px;
}

/* 返回顶部 */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 30, 30, 0.85);
  border: 1px solid rgba(192, 136, 200, 0.2);
  border-radius: 50%;
  color: var(--purple);
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 150;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { border-color: var(--purple); }

/* 窄屏 */
@media (max-width: 760px) {
  .main { padding: 88px 20px 80px 20px; }
  .sticky-bar { left: 0; }
  .chapter-nav { gap: 12px; }
  .top-bar { flex-wrap: wrap; gap: 12px; }
}
