/* ============================================================
 * 五行小宝 · 报告页样式（v3 重做）
 * 风格：东方留白 + 朴实 + 模块卡片化 + 付费遮罩
 * ============================================================ */

/* ==================== 基础变量 ==================== */
.rp-page {
  background: #F8F6F0;
  color: #2A2A2A;
  font-family: var(--f-base, 'Noto Sans SC', sans-serif);
  line-height: 1.85;
}
.rp-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.rp-page * { box-sizing: border-box; }

/* ==================== 顶部封面 ==================== */
.rp-cover {
  position: relative;
  background: linear-gradient(135deg, #1661AB 0%, #0E4A82 100%);
  border-radius: 20px;
  padding: 48px 32px;
  color: #fff;
  text-align: center;
  margin-bottom: 32px;
  overflow: hidden;
}
.rp-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08), transparent 50%);
  pointer-events: none;
}
.rp-cover-eyebrow {
  font-size: 11px; letter-spacing: 3px; opacity: 0.75;
  margin-bottom: 16px; font-weight: 500;
}
.rp-cover-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 34px; font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 2px;
}
.rp-cover-meta {
  font-size: 14px; opacity: 0.92;
  margin-bottom: 20px;
}
.rp-cover-tags {
  display: flex; justify-content: center; gap: 18px;
  font-size: 12px; opacity: 0.88;
  flex-wrap: wrap;
}
.rp-cover-tags span::before { content: '· '; opacity: 0.6; }

/* ==================== 八字盘可视化 ==================== */
.rp-bazi-board {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.rp-bazi-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.rp-bazi-pillar {
  text-align: center;
  padding: 14px 8px;
  background: #FAF7EE;
  border-radius: 12px;
  border: 1px solid transparent;
}
.rp-bazi-pillar.is-day {
  background: #fff;
  border-color: #1661AB;
  box-shadow: 0 2px 8px rgba(22, 97, 171, 0.12);
}
.rp-bazi-label {
  font-size: 11px; color: #888;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.rp-bazi-pillar.is-day .rp-bazi-label { color: #1661AB; font-weight: 600; }
.rp-bazi-tg, .rp-bazi-dz {
  font-family: 'Noto Serif SC', serif;
  font-size: 28px; font-weight: 700;
  line-height: 1.15;
}
.rp-bazi-dz { margin-top: 2px; }
.rp-bazi-shi {
  font-size: 11px; color: #999;
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.rp-bazi-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  padding-top: 18px;
  border-top: 1px dashed #E5E0D5;
  font-size: 13px;
}
.rp-bazi-summary-item {
  display: flex; align-items: baseline;
  gap: 8px;
}
.rp-bazi-summary-item .k {
  color: #888;
  flex-shrink: 0;
  letter-spacing: 1px;
}
.rp-bazi-summary-item .v {
  color: #2A2A2A;
  font-weight: 600;
}

/* 五行小色点 */
.rp-wx-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: -1px;
}
.rp-wx-mu { background: #789262; }
.rp-wx-huo { background: #C8473A; }
.rp-wx-tu { background: #A0612E; }   /* 土 → 赭石褐（红棕，与金亮黄拉开差距） */
.rp-wx-jin { background: #D4A017; }   /* 金 → 亮金 */
.rp-wx-shui { background: #1661AB; }

/* ==================== 目录 ==================== */
.rp-toc {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.rp-toc-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px; font-weight: 700;
  margin: 0 0 18px;
  color: #1A1A2E;
  display: flex; align-items: baseline; justify-content: space-between;
}
.rp-toc-title small {
  font-size: 11px; font-weight: 400;
  color: #999;
  letter-spacing: 1px;
}
.rp-toc-list {
  display: flex; flex-direction: column;
}
.rp-toc-item {
  display: flex; align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #F0EDE3;
}
.rp-toc-item:last-child { border-bottom: none; }
.rp-toc-num {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px; font-weight: 600;
  color: #C89B40;
  min-width: 28px;
}
.rp-toc-body { flex: 1; }
.rp-toc-name {
  font-size: 15px; font-weight: 600;
  color: #2A2A2A;
}
.rp-toc-sub {
  font-size: 12px; color: #888;
  margin-top: 2px;
}
.rp-toc-status {
  font-size: 11px; padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.rp-toc-status.free {
  background: rgba(120, 146, 98, 0.1);
  color: #5A7548;
}
.rp-toc-status.locked {
  background: rgba(0, 0, 0, 0.05);
  color: #999;
}

/* ==================== 章节通用 ==================== */
.rp-chapter {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  position: relative;
}
.rp-chapter-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #F0EDE3;
}
.rp-chapter-num {
  font-family: 'Noto Serif SC', serif;
  font-size: 13px; color: #C89B40;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.rp-chapter-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 24px; font-weight: 700;
  color: #1A1A2E;
  margin: 0;
  letter-spacing: 1px;
}
.rp-chapter-subtitle {
  font-size: 13px; color: #888;
  margin-top: 4px;
}
.rp-chapter-tag {
  font-size: 11px; padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.rp-chapter-tag.free {
  background: rgba(120, 146, 98, 0.1);
  color: #5A7548;
}
.rp-chapter-tag.paid {
  background: rgba(200, 155, 64, 0.12);
  color: #8A6A26;
}

.rp-chapter p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.95;
  color: #333;
}
.rp-chapter p.lead {
  font-size: 16px;
  color: #2A2A2A;
}
.rp-chapter blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid #C89B40;
  background: #FAF7EE;
  font-size: 14px;
  color: #555;
  font-style: italic;
  border-radius: 0 8px 8px 0;
}
.rp-chapter blockquote p { margin: 0; line-height: 1.8; font-size: 14px; }
.rp-chapter strong { color: #1A1A2E; font-weight: 700; }

.rp-chapter h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px; font-weight: 700;
  color: #1A1A2E;
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 3px solid #1661AB;
}
.rp-chapter h4 {
  font-size: 15px; font-weight: 700;
  color: #1A1A2E;
  margin: 20px 0 8px;
}

/* 单句成段——金句样式
   注：原来用 text-align:center，但金句一旦换行，最后一行容易孤零零两三个字居中，很丑。
   改成左对齐 + 左侧金色色条 + 引文风格，长短句都不破图。 */
.rp-soulline {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  text-align: left;
  color: #1A1A2E;
  margin: 24px 0;
  padding: 10px 0 10px 18px;
  letter-spacing: 0.5px;
  font-weight: 600;
  line-height: 1.7;
  border-left: 3px solid #D4A017;
}

/* 觉察金句框 */
.rp-aha {
  margin: 20px 0;
  padding: 16px 20px;
  background: linear-gradient(135deg, #FAF7EE 0%, #fff 100%);
  border: 1px solid #E5DCC0;
  border-radius: 12px;
  font-size: 14px;
  color: #2A2A2A;
  line-height: 1.85;
}
.rp-aha .label {
  font-size: 11px; color: #C89B40;
  letter-spacing: 2px; font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

/* ==================== 第 1 章免费试读：渐隐遮罩 ==================== */
.rp-locked-tease {
  position: relative;
  max-height: 200px;
  overflow: hidden;
}
.rp-locked-tease::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, #fff);
  pointer-events: none;
}

/* ==================== 表格（角色卡 / 五行分布）==================== */
.rp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
.rp-table th, .rp-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #F0EDE3;
}
.rp-table th {
  font-weight: 600;
  color: #888;
  font-size: 12px;
  letter-spacing: 1px;
  background: #FAF7EE;
}
.rp-table td:first-child { font-weight: 600; color: #1A1A2E; }
.rp-table td .small { color: #888; font-size: 12px; }

/* ==================== 大运时间轴 ==================== */
.rp-dayun-axis {
  display: flex;
  gap: 4px;
  padding: 24px 8px 16px;
  overflow-x: auto;
  margin: 0 -8px 24px;
}
.rp-dayun-step {
  flex: 0 0 100px;
  text-align: center;
  padding: 14px 6px;
  border-radius: 12px;
  background: #FAF7EE;
  border: 1.5px solid transparent;
  cursor: default;
  transition: all 0.18s;
  position: relative;
}
.rp-dayun-step.is-current {
  background: #fff;
  border-color: #1661AB;
  box-shadow: 0 4px 14px rgba(22, 97, 171, 0.15);
}
.rp-dayun-step.is-key {
  background: linear-gradient(135deg, #FAF3DC 0%, #FFF 100%);
  border-color: #C89B40;
}
.rp-dayun-age {
  font-size: 11px; color: #888;
  margin-bottom: 4px;
  letter-spacing: 1px;
}
.rp-dayun-gz {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px; font-weight: 700;
  color: #1A1A2E;
  line-height: 1.2;
  margin-bottom: 4px;
}
.rp-dayun-step.is-current .rp-dayun-gz { color: #1661AB; }
.rp-dayun-step.is-key .rp-dayun-gz { color: #8A6A26; }
.rp-dayun-tag {
  font-size: 10px;
  color: #999;
  letter-spacing: 0.5px;
}
.rp-dayun-step.is-current .rp-dayun-tag {
  color: #1661AB; font-weight: 700;
}
.rp-dayun-step.is-key .rp-dayun-tag {
  color: #8A6A26; font-weight: 700;
}
.rp-dayun-marker {
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.rp-dayun-step.is-current .rp-dayun-marker {
  background: #1661AB; color: #fff;
}
.rp-dayun-step.is-key .rp-dayun-marker {
  background: #C89B40; color: #fff;
}

/* 大运详解块 */
.rp-dayun-detail {
  background: #FAF7EE;
  border-radius: 14px;
  padding: 22px 22px 16px;
  margin: 18px 0;
  border-left: 3px solid #1661AB;
}
.rp-dayun-detail.is-key {
  border-left-color: #C89B40;
  background: linear-gradient(135deg, #FAF3DC 0%, #FAF7EE 100%);
}
.rp-dayun-detail-head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.rp-dayun-detail-gz {
  font-family: 'Noto Serif SC', serif;
  font-size: 22px; font-weight: 700;
  color: #1A1A2E;
}
.rp-dayun-detail-age {
  font-size: 13px; color: #666;
}
.rp-dayun-detail-badge {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #1661AB;
  color: #fff;
  letter-spacing: 0.5px;
}
.rp-dayun-detail.is-key .rp-dayun-detail-badge {
  background: #C89B40;
}
.rp-dayun-block {
  margin-top: 14px;
}
.rp-dayun-block-label {
  font-size: 12px; color: #888;
  letter-spacing: 2px;
  margin-bottom: 6px;
  font-weight: 600;
}
.rp-dayun-block p {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
}

/* ==================== 流年卡片 ==================== */
.rp-flow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 16px 0;
}
.rp-flow-card {
  background: #FAF7EE;
  border-radius: 12px;
  padding: 18px 20px;
  border-left: 3px solid #789262;
}
.rp-flow-year {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px; font-weight: 700;
  color: #1A1A2E;
  margin-bottom: 6px;
}
.rp-flow-gz {
  font-size: 13px; color: #666;
  margin-bottom: 10px;
}
.rp-flow-card p { margin: 6px 0; font-size: 14px; line-height: 1.8; }
.rp-flow-card blockquote {
  margin-top: 10px;
  font-style: italic;
  font-size: 13px;
  color: #777;
  border-left: 2px solid #C89B40;
  padding-left: 10px;
  background: transparent;
}

/* ==================== 付费遮罩 · 锁定章节 ==================== */
.rp-locked {
  position: relative;
  min-height: 240px;
}
.rp-locked .rp-locked-content {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
  opacity: 0.6;
}
.rp-locked-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.85) 30%,
    rgba(255,255,255,0.98) 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 16px;
  padding: 40px 24px;
}
.rp-locked-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #1A1A2E;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}
.rp-locked-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 17px; font-weight: 700;
  color: #1A1A2E;
  margin-bottom: 6px;
}
.rp-locked-desc {
  font-size: 13px; color: #666;
  margin-bottom: 16px;
}
.rp-locked-btn {
  display: inline-block;
  padding: 10px 22px;
  background: #1661AB;
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.18s;
}
.rp-locked-btn:hover {
  background: #0E4A82;
  transform: translateY(-1px);
}

/* ==================== 解锁 CTA ==================== */
.rp-cta {
  background: linear-gradient(135deg, #1A1A2E 0%, #0E4A82 100%);
  border-radius: 20px;
  padding: 44px 32px;
  text-align: center;
  color: #fff;
  margin: 32px 0;
}
.rp-cta-eyebrow {
  font-size: 11px; letter-spacing: 3px;
  opacity: 0.7;
  margin-bottom: 14px;
}
.rp-cta-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 28px; font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: 1px;
}
.rp-cta-desc {
  font-size: 14px; opacity: 0.92;
  line-height: 1.85;
  margin-bottom: 22px;
}
.rp-cta-price {
  display: flex; align-items: baseline; justify-content: center;
  gap: 14px; margin-bottom: 20px;
}
.rp-cta-price-now {
  font-family: 'Noto Serif SC', serif;
  font-size: 38px; font-weight: 700;
}
.rp-cta-price-old {
  font-size: 15px; opacity: 0.55;
  text-decoration: line-through;
}
.rp-cta-tag {
  font-size: 11px;
  padding: 3px 10px;
  background: #C89B40;
  border-radius: 999px;
  letter-spacing: 1px;
}
.rp-cta-btn {
  display: inline-block;
  padding: 14px 36px;
  background: #fff;
  color: #1A1A2E;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.18s;
}
.rp-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.rp-cta-foot {
  font-size: 12px; opacity: 0.7;
  margin-top: 14px;
}

/* ==================== 信任三角 ==================== */
.rp-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.rp-trust-item {
  text-align: center;
  padding: 22px 14px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.rp-trust-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 14px; font-weight: 700;
  letter-spacing: 0;
}
.rp-trust-icon.t1 { background: #1661AB; }
.rp-trust-icon.t2 { background: #C89B40; }
.rp-trust-icon.t3 { background: #789262; }
.rp-trust-name {
  font-size: 14px; font-weight: 600;
  color: #1A1A2E;
  margin-bottom: 4px;
}
.rp-trust-desc {
  font-size: 11px; color: #888;
  line-height: 1.6;
}

/* ==================== 收口金句海报 ==================== */
.rp-finale {
  text-align: center;
  padding: 50px 24px;
  background: linear-gradient(180deg, #FAF7EE 0%, #fff 100%);
  border-radius: 20px;
  margin: 32px 0;
}
.rp-finale-line {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  color: #1A1A2E;
  margin: 14px 0;
  line-height: 1.85;
  font-weight: 600;
}
.rp-finale-strong {
  font-size: 22px; color: #1661AB;
  margin: 24px 0 16px;
}
.rp-finale-foot {
  font-size: 12px; color: #999;
  margin-top: 32px;
  letter-spacing: 1px;
}

/* ==================== 移动端 ==================== */
@media (max-width: 720px) {
  .rp-container { padding: 28px 16px 60px; }
  .rp-cover { padding: 36px 24px; }
  .rp-cover-title { font-size: 26px; }
  .rp-chapter { padding: 28px 22px; }
  .rp-chapter-title { font-size: 20px; }
  .rp-bazi-tg, .rp-bazi-dz { font-size: 22px; }
  .rp-bazi-summary { grid-template-columns: 1fr; }
  .rp-cta { padding: 36px 24px; }
  .rp-cta-title { font-size: 22px; }
  .rp-trust { grid-template-columns: 1fr; }
  .rp-soulline { font-size: 16px; }
  .rp-dayun-axis { padding: 20px 0; gap: 6px; margin: 0 -16px 20px; padding-left: 16px; padding-right: 16px; }
  .rp-dayun-step { flex: 0 0 88px; padding: 12px 4px; }
  .rp-dayun-gz { font-size: 16px; }
}

/* ==================== 解锁后效果（已购买）==================== */
.rp-page.is-unlocked .rp-locked .rp-locked-content {
  filter: none;
  user-select: auto;
  pointer-events: auto;
  opacity: 1;
}
.rp-page.is-unlocked .rp-locked-overlay { display: none; }
.rp-page.is-unlocked .rp-cta { display: none; }
.rp-page.is-unlocked .rp-toc-status.locked {
  background: rgba(120, 146, 98, 0.1);
  color: #5A7548;
}
.rp-page.is-unlocked .rp-toc-status.locked::before { content: '已解锁'; }
.rp-page.is-unlocked .rp-toc-status.locked { font-size: 0; }
.rp-page.is-unlocked .rp-toc-status.locked::before { font-size: 11px; }
.rp-page.is-unlocked .rp-chapter-tag.paid {
  background: rgba(120, 146, 98, 0.1);
  color: #5A7548;
}
.rp-page.is-unlocked .rp-chapter-tag.paid::before { content: '已解锁'; }
.rp-page.is-unlocked .rp-chapter-tag.paid { font-size: 0; }
.rp-page.is-unlocked .rp-chapter-tag.paid::before { font-size: 11px; }

/* 第 1 章免费试读时收起；解锁后展开 */
.rp-page.is-unlocked .rp-locked-tease { max-height: none; }
.rp-page.is-unlocked .rp-locked-tease::after { display: none; }

/* ============================================================
 * 第二轮迭代：顶栏 + 侧栏目录 + 五行染色 + 详细藏干 + 分享卡
 * ============================================================ */

/* ==================== 顶部工具栏 ==================== */
.rp-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(248, 246, 240, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 12px;
}
.rp-back {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.05);
  color: #1A1A2E;
  text-decoration: none;
  font-size: 22px; line-height: 1;
  font-weight: 600;
  transition: all 0.15s;
  flex-shrink: 0;
}
.rp-back:hover { background: rgba(0,0,0,0.1); transform: translateX(-2px); }
.rp-topbar-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 15px; font-weight: 600;
  color: #1A1A2E; letter-spacing: 1px;
  flex: 1; text-align: center;
}
.rp-topbar-actions { display: flex; gap: 8px; flex-shrink: 0; }
/* 工具栏精简模式（返回/标题/档案/普点都在主导航里，topbar 只剩工具按钮，靠右） */
.rp-topbar.rp-topbar-tools-only {
  justify-content: flex-end;
  padding: 10px 20px;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.rp-tool-btn {
  padding: 7px 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: #1A1A2E;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  letter-spacing: 0.5px;
}
.rp-tool-btn:hover { border-color: #1A1A2E; background: #1A1A2E; color: #fff; }
.rp-tool-btn-primary { background: #1661AB; color: #fff; border-color: #1661AB; }
.rp-tool-btn-primary:hover { background: #0E4A82; border-color: #0E4A82; }

/* ==================== 封面副标题 ==================== */
.rp-cover-subtitle {
  display: block;
  font-size: 16px; font-weight: 400;
  letter-spacing: 4px;
  margin-top: 10px;
  opacity: 0.85;
}

/* ==================== 八字盘：五行染色 ==================== */
[data-wx="木"] { color: #789262; }
[data-wx="火"] { color: #C8473A; }
[data-wx="土"] { color: #A0612E; }   /* 土 → 赭石褐（与金亮黄拉开差距） */
[data-wx="金"] { color: #D4A017; }   /* 金 → 亮金 */
[data-wx="水"] { color: #1661AB; }

.rp-bazi-pillar { position: relative; padding: 14px 4px 12px; }
.rp-bazi-pillar .rp-bazi-tg,
.rp-bazi-pillar .rp-bazi-dz {
  color: inherit;          /* 让 data-wx 染色生效 */
  font-size: 30px;         /* 天干地支字号一致 */
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}
.rp-bazi-pillar .rp-bazi-tg { margin-bottom: 4px; }
.rp-bazi-pillar .rp-bazi-dz { margin-top: 4px; margin-bottom: 8px; }
.rp-bazi-shi-top {
  font-size: 10px; color: #999;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.rp-bazi-zang {
  border-top: 1px dashed rgba(0,0,0,0.08);
  padding-top: 8px;
  margin-top: 4px;
  display: flex; flex-direction: column;
  gap: 3px;
}
.rp-zang-row {
  display: flex; align-items: center; justify-content: center;
  gap: 5px;
  font-size: 10.5px;
  line-height: 1.4;
}
.rp-zang-gan {
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
  font-size: 12px;
}
.rp-zang-shi { color: #555; font-weight: 500; }
.rp-zang-pos { color: #aaa; font-size: 9px; }

.rp-bazi-pillar.is-day {
  background: linear-gradient(180deg, #fff 0%, #FAF7EE 100%);
  border-color: #1661AB;
}

/* ==================== 文档布局：正文与封面对齐宽度 + 目录浮在左侧 ==================== */
.rp-doc-layout {
  position: relative;
  margin-top: 8px;
}
.rp-doc-main { min-width: 0; }

/* 目录：固定定位 + 垂直居中（始终停留在视觉中心，跟随滚动联动高亮）*/
.rp-side-toc {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 150px;
  background: #fff;
  border-radius: 12px;
  padding: 14px 0 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  font-size: 12px;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 10;
}
.rp-side-toc-head {
  font-family: 'Noto Serif SC', serif;
  font-size: 12px; font-weight: 700;
  color: #1A1A2E; letter-spacing: 2px;
  padding: 0 12px 10px;
  border-bottom: 1px solid #F0EDE3;
  margin-bottom: 4px;
}
.rp-side-toc-list { list-style: none; margin: 0; padding: 0; }
.rp-side-toc-list li { margin: 0; }
.rp-side-toc-list a {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 8px 7px 12px;
  text-decoration: none;
  color: #555;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  font-size: 11.5px;
}
.rp-side-toc-list a .n {
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
  color: #C89B40;
  font-size: 10px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  min-width: 14px;
}
.rp-side-toc-list a .t { flex: 1; line-height: 1.35; font-weight: 500; }
.rp-side-toc-list a .rp-toc-status {
  display: none;          /* 窄目录不显示状态标签，省空间 */
}
.rp-side-toc-list a:hover {
  background: rgba(22, 97, 171, 0.04);
  color: #1A1A2E;
}
.rp-side-toc-list a.is-active {
  background: rgba(22, 97, 171, 0.06);
  border-left-color: #1661AB;
  color: #1661AB;
  font-weight: 700;
}
.rp-side-toc-list a.is-active .n { color: #1661AB; }

/* ==================== 分享长图弹窗 ==================== */
.rp-share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.rp-share-overlay[hidden] { display: none; }
.rp-share-modal {
  background: #fff;
  border-radius: 20px;
  padding: 24px 20px;
  max-width: 380px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.rp-share-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 32px; height: 32px;
  border: none;
  background: rgba(0,0,0,0.05);
  border-radius: 50%;
  font-size: 18px; cursor: pointer;
  color: #555;
  z-index: 1;
}
.rp-share-close:hover { background: rgba(0,0,0,0.1); }
.rp-share-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 15px; font-weight: 700;
  color: #1A1A2E;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.rp-share-card {
  background: linear-gradient(180deg, #FAF7EE 0%, #fff 60%);
  border-radius: 16px;
  padding: 28px 22px;
  border: 1px solid #E5DCC0;
}
.rp-sc-head { text-align: center; margin-bottom: 20px; }
.rp-sc-eyebrow {
  font-size: 9px; letter-spacing: 3px;
  color: #C89B40;
  margin-bottom: 6px;
}
.rp-sc-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 24px; font-weight: 700;
  color: #1A1A2E;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.rp-sc-author { font-size: 12px; color: #888; letter-spacing: 1px; }

.rp-sc-bazi {
  display: flex; justify-content: center; gap: 6px;
  margin-bottom: 10px;
}
.rp-sc-pillar {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 10px 6px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #F0EDE3;
  min-width: 38px;
}
.rp-sc-pillar.rp-sc-day {
  border-color: #1661AB;
  box-shadow: 0 1px 4px rgba(22, 97, 171, 0.15);
}
.rp-sc-tg, .rp-sc-dz {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px; font-weight: 700;
  line-height: 1.2;
}
.rp-sc-meta { text-align: center; font-size: 11px; color: #888; margin-bottom: 18px; }

.rp-sc-quote {
  text-align: center;
  font-family: 'Noto Serif SC', serif;
  font-size: 14px;
  line-height: 2;
  color: #2A2A2A;
  padding: 14px 8px;
  margin-bottom: 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.rp-sc-quote p { margin: 0; }
.rp-sc-quote strong { color: #1661AB; }

.rp-sc-summary { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; font-size: 12px; }
.rp-sc-row { display: flex; gap: 8px; }
.rp-sc-row .k { color: #999; letter-spacing: 1px; flex-shrink: 0; width: 36px; }
.rp-sc-row .v { color: #1A1A2E; font-weight: 600; }

.rp-sc-foot {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 12px;
  background: #fff;
  border: 1px dashed #E5DCC0;
  border-radius: 10px;
}
.rp-sc-qr { width: 92px; height: 92px; flex-shrink: 0; background: #fff; }
.rp-sc-qr img,
.rp-sc-qr canvas { width: 100% !important; height: 100% !important; display: block; }
.rp-sc-foot-text { flex: 1; }
.rp-sc-foot-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 13px; font-weight: 700;
  color: #1A1A2E;
  margin-bottom: 4px;
}
.rp-sc-foot-sub { font-size: 11px; color: #888; line-height: 1.5; }

.rp-sc-brand {
  text-align: center;
  font-size: 10px;
  color: #aaa;
  letter-spacing: 2px;
  margin-top: 14px;
}

.rp-share-actions { margin-top: 16px; text-align: center; }
.rp-share-btn {
  display: block; width: 100%;
  padding: 13px 24px;
  background: #1A1A2E;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  letter-spacing: 1px;
  font-family: inherit;
}
.rp-share-btn:hover { background: #0E4A82; }
.rp-share-tip { font-size: 11px; color: #888; margin-top: 10px; line-height: 1.6; }

/* ==================== 移动端适配（侧栏 → 顶部横滑） ==================== */
@media (max-width: 920px) {
  .rp-doc-layout { display: block; }
  .rp-side-toc {
    position: static !important;
    width: auto;
    left: auto !important;
    max-height: none;
    margin-bottom: 16px;
    padding: 12px 0 4px;
    overflow: visible;
  }
  .rp-side-toc-head {
    font-size: 11px;
    padding: 0 14px 8px;
    margin-bottom: 4px;
  }
  .rp-side-toc-list {
    display: flex;
    overflow-x: auto;
    padding: 0 12px 8px;
    gap: 8px;
  }
  .rp-side-toc-list li { flex: 0 0 auto; }
  .rp-side-toc-list a {
    flex-direction: column; align-items: center;
    padding: 8px 12px;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 8px;
    background: #FAF7EE;
    min-width: 92px;
    text-align: center;
    gap: 3px;
  }
  .rp-side-toc-list a .t { font-size: 11px; line-height: 1.3; }
  .rp-side-toc-list a .rp-toc-status { display: none; }
  .rp-side-toc-list a.is-active {
    background: rgba(22, 97, 171, 0.1);
    border-bottom-color: #1661AB;
  }
}

@media (max-width: 720px) {
  .rp-topbar { padding: 10px 14px; }
  .rp-topbar-title { font-size: 13px; letter-spacing: 0.5px; }
  .rp-tool-btn { padding: 6px 11px; font-size: 11px; }
  .rp-back { width: 32px; height: 32px; font-size: 18px; }
  .rp-bazi-pillar { padding: 12px 2px 10px; }
  .rp-bazi-pillar .rp-bazi-tg,
  .rp-bazi-pillar .rp-bazi-dz { font-size: 24px; }
  .rp-zang-row { font-size: 9.5px; gap: 3px; }
  .rp-zang-gan { font-size: 11px; }
  .rp-zang-pos { display: none; }
  .rp-cover-subtitle { font-size: 13px; letter-spacing: 3px; }
}

/* ==================== 打印样式（PDF 导出 · A4 纵向 · 紧凑）==================== */
@page {
  size: A4 portrait;
  margin: 14mm 16mm;
}

@media print {
  /* 全局色彩保留 */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 隐藏所有交互元素 */
  .rp-topbar,
  .rp-side-toc,
  .rp-cta,
  .rp-locked-overlay,
  .rp-share-overlay,
  .rp-locked-tease::after,
  .rp-tool-btn,
  .rp-back { display: none !important; }

  /* 解锁所有付费内容 */
  .rp-locked .rp-locked-content {
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    max-height: none !important;
  }
  .rp-locked-tease { max-height: none !important; }

  /* 容器：去掉白边，让内容贴 @page margin */
  html, body, .rp-page {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 10.5pt !important;
    line-height: 1.65 !important;
    color: #222 !important;
  }
  .rp-container {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .rp-doc-layout {
    display: block !important;
  }
  .rp-doc-main { display: block !important; }

  /* 封面：紧凑、占满首页顶部约 1/4 */
  .rp-cover {
    background: #1A1A2E !important;
    color: #fff !important;
    padding: 14mm 12mm !important;
    margin: 0 0 6mm 0 !important;
    border-radius: 4px !important;
    page-break-after: avoid;
  }
  .rp-cover-eyebrow { font-size: 8pt !important; margin-bottom: 4mm !important; }
  .rp-cover-title { font-size: 22pt !important; margin: 0 0 2mm !important; line-height: 1.2 !important; }
  .rp-cover-subtitle { font-size: 11pt !important; margin-top: 2mm !important; }
  .rp-cover-meta { font-size: 10pt !important; margin: 4mm 0 3mm !important; }
  .rp-cover-tags { font-size: 8.5pt !important; gap: 8mm !important; }

  /* 八字盘：紧凑横排 */
  .rp-bazi-board {
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    padding: 4mm 6mm !important;
    margin: 0 0 5mm 0 !important;
    page-break-inside: avoid;
    border-radius: 4px !important;
  }
  .rp-bazi-pillars { gap: 3mm !important; margin-bottom: 4mm !important; }
  .rp-bazi-pillar { padding: 3mm 1mm !important; border-radius: 3px !important; }
  .rp-bazi-pillar .rp-bazi-tg,
  .rp-bazi-pillar .rp-bazi-dz {
    font-size: 18pt !important;
  }
  .rp-bazi-shi-top { font-size: 7.5pt !important; margin-bottom: 1.5mm !important; }
  .rp-bazi-label { font-size: 7.5pt !important; margin-bottom: 1.5mm !important; }
  .rp-zang-row { font-size: 7.5pt !important; gap: 2mm !important; }
  .rp-zang-gan { font-size: 8.5pt !important; }
  .rp-zang-pos { display: inline !important; font-size: 6.5pt !important; }
  .rp-bazi-summary {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 2mm 4mm !important;
    padding-top: 3mm !important;
    font-size: 9pt !important;
  }

  /* 章节：紧凑、章节间不强制分页（让正文流式排版）*/
  .rp-chapter {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 0 8mm 0 !important;
    border-radius: 0 !important;
    page-break-inside: auto;
  }
  .rp-chapter-head {
    margin-bottom: 4mm !important;
    padding-bottom: 2mm !important;
    border-bottom: 1px solid #C89B40 !important;
    page-break-after: avoid;
  }
  .rp-chapter-tag { display: none !important; }
  .rp-chapter-num { font-size: 8.5pt !important; margin-bottom: 1mm !important; }
  .rp-chapter-title { font-size: 16pt !important; margin: 0 !important; line-height: 1.3 !important; }
  .rp-chapter-subtitle { font-size: 9pt !important; margin-top: 1mm !important; }

  /* 正文 */
  .rp-chapter p {
    margin: 0 0 2.5mm !important;
    font-size: 10.5pt !important;
    line-height: 1.7 !important;
    text-align: justify;
    orphans: 3;
    widows: 3;
  }
  .rp-chapter p.lead { font-size: 11pt !important; }
  .rp-chapter h3 {
    font-size: 12pt !important;
    margin: 5mm 0 2mm !important;
    padding-left: 3mm !important;
    border-left: 2px solid #1661AB !important;
    page-break-after: avoid;
  }
  .rp-chapter h4 {
    font-size: 11pt !important;
    margin: 3mm 0 1.5mm !important;
    page-break-after: avoid;
  }
  .rp-chapter blockquote {
    margin: 3mm 0 !important;
    padding: 2.5mm 4mm !important;
    background: #FAF7EE !important;
    border-left: 2px solid #C89B40 !important;
    font-size: 10pt !important;
    border-radius: 0 2px 2px 0 !important;
  }
  .rp-chapter blockquote p { margin: 0 !important; font-size: 10pt !important; }

  /* 单句金句 */
  .rp-soulline {
    font-size: 12pt !important;
    margin: 4mm 0 !important;
    padding: 2mm 0 !important;
    page-break-inside: avoid;
  }

  /* 觉察金句框 */
  .rp-aha {
    margin: 3mm 0 !important;
    padding: 3mm 4mm !important;
    background: #FAF7EE !important;
    border: 1px solid #E5DCC0 !important;
    font-size: 10pt !important;
    border-radius: 3px !important;
    page-break-inside: avoid;
  }
  .rp-aha .label { font-size: 8pt !important; margin-bottom: 1mm !important; }

  /* 表格 */
  .rp-table {
    font-size: 9.5pt !important;
    margin: 3mm 0 !important;
    page-break-inside: auto;
  }
  .rp-table th, .rp-table td {
    padding: 2mm 3mm !important;
  }
  .rp-table th { background: #FAF7EE !important; }

  /* 大运时间轴：横排紧凑 */
  .rp-dayun-axis {
    gap: 1mm !important;
    margin: 0 0 4mm !important;
    padding: 3mm 0 !important;
    overflow: visible !important;
    page-break-inside: avoid;
  }
  .rp-dayun-step {
    flex: 1 !important;
    padding: 2mm 1mm !important;
    border-radius: 3px !important;
  }
  .rp-dayun-age { font-size: 7pt !important; margin-bottom: 1mm !important; }
  .rp-dayun-gz { font-size: 11pt !important; margin-bottom: 1mm !important; }
  .rp-dayun-tag { font-size: 7pt !important; }
  .rp-dayun-marker { font-size: 6pt !important; padding: 0 4px !important; }

  /* 大运详解 */
  .rp-dayun-detail {
    background: #FAFAF7 !important;
    padding: 4mm !important;
    margin: 3mm 0 !important;
    border-radius: 3px !important;
    page-break-inside: avoid;
  }
  .rp-dayun-detail-gz { font-size: 14pt !important; }
  .rp-dayun-detail-age { font-size: 9pt !important; }
  .rp-dayun-detail-badge { font-size: 8pt !important; padding: 1px 6px !important; }
  .rp-dayun-block { margin-top: 3mm !important; }
  .rp-dayun-block-label { font-size: 8.5pt !important; margin-bottom: 1mm !important; }
  .rp-dayun-block p { font-size: 10pt !important; line-height: 1.6 !important; margin: 0 0 1.5mm !important; }

  /* 流年卡 */
  .rp-flow-grid { gap: 3mm !important; margin: 3mm 0 !important; }
  .rp-flow-card {
    padding: 4mm !important;
    border-radius: 3px !important;
    page-break-inside: avoid;
  }
  .rp-flow-year { font-size: 12pt !important; margin-bottom: 1mm !important; }
  .rp-flow-gz { font-size: 9pt !important; margin-bottom: 2mm !important; }
  .rp-flow-card p { font-size: 10pt !important; margin: 1mm 0 !important; }
  .rp-flow-card blockquote { font-size: 9pt !important; margin-top: 2mm !important; padding: 1mm 3mm !important; background: transparent !important; }

  /* 收口海报 */
  .rp-finale {
    background: transparent !important;
    border: 1px solid #E5DCC0 !important;
    padding: 8mm 6mm !important;
    margin: 4mm 0 !important;
    border-radius: 3px !important;
    page-break-inside: avoid;
  }
  .rp-finale-line { font-size: 11pt !important; margin: 1.5mm 0 !important; }
  .rp-finale-strong { font-size: 13pt !important; margin: 3mm 0 2mm !important; }
  .rp-finale-foot { font-size: 8pt !important; margin-top: 4mm !important; }

  /* 五行色点强制保留 */
  .rp-wx-dot, [data-wx] {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 不要在子元素内强制断页 */
  h1, h2, h3, h4 { page-break-after: avoid; }
  table, blockquote, .rp-aha, .rp-finale, .rp-flow-card, .rp-dayun-detail { page-break-inside: avoid; }
}

.rp-share-card.is-capturing * {
  animation: none !important;
  transition: none !important;
}

/* ==================== 追问普师傅 CTA ==================== */
.rp-followup {
  margin: 40px 0 24px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #FAFCFE 0%, #F0F7FD 100%);
  border: 1px solid rgba(22, 97, 171, 0.12);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.rp-followup::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(74, 159, 232, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.rp-followup-avatar {
  flex-shrink: 0;
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 6px 18px rgba(26, 26, 46, 0.18));
  animation: rpFollowupFloat 4s ease-in-out infinite;
}
@keyframes rpFollowupFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.rp-followup-avatar svg,
.rp-followup-avatar img {
  display: block;
  width: 100%; height: 100%;
  object-fit: contain;
}

.rp-followup-text {
  flex: 1;
  min-width: 0;
}
.rp-followup-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 19px;
  font-weight: 700;
  color: #1A1A2E;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.rp-followup-sub {
  font-size: 13.5px;
  color: #555;
  line-height: 1.7;
}

.rp-followup-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  background: #1661AB;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(22, 97, 171, 0.25);
}
.rp-followup-btn:hover {
  background: #0E4A82;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 97, 171, 0.35);
}
.rp-followup-btn svg {
  transition: transform 0.2s;
}
.rp-followup-btn:hover svg {
  transform: translateX(3px);
}

@media (max-width: 720px) {
  .rp-followup {
    flex-direction: column;
    text-align: center;
    padding: 24px 18px;
    gap: 14px;
  }
  .rp-followup-avatar { width: 64px; height: 64px; }
  .rp-followup-title { font-size: 17px; }
  .rp-followup-sub { font-size: 12.5px; }
  .rp-followup-sub br { display: none; }
  .rp-followup-btn { width: 100%; justify-content: center; padding: 14px; }
}

@media print {
  .rp-followup { display: none !important; }
}
