
/* richbody.css · 展示作品富文本正文（多图/视频/图文/公众号卡片/标题/引用/彩色强调） */

/* ── 基础排版 ── */
.richbody { overflow-wrap: break-word; font-size: 14px; line-height: 1.95; color: #2A3430; }
.richbody p { margin: 0.6em 0; }

/* 大标题：衬线 + 金色侧条 */
.richbody h2 {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 1.22em; font-weight: 700; color: #0B2E26;
  margin: 1.3em 0 0.55em; padding-left: 10px;
  border-left: 3px solid #C9A96A; line-height: 1.5;
}
/* 小标题：金色菱形引导 */
.richbody h3 {
  font-size: 1em; font-weight: 700; color: #1E5C4A;
  margin: 1.05em 0 0.4em; letter-spacing: 1px;
}
.richbody h3::before { content: "❖ "; color: #C9A96A; }

/* 引用块：浅金底 + 左金线 */
.richbody blockquote {
  margin: 1em 0; padding: 10px 16px;
  border-left: 3px solid #C9A96A;
  background: linear-gradient(135deg, rgba(201,169,106,.10), rgba(201,169,106,.03));
  border-radius: 0 12px 12px 0;
  color: #5A6B60; font-style: italic;
}
.richbody blockquote p { margin: 0.25em 0; }

/* 列表 */
.richbody ul, .richbody ol { padding-left: 1.5em; margin: .6em 0; }
.richbody li { margin: .28em 0; }
.richbody ul li::marker { color: #C9A96A; }

/* ── 媒体 ── */
.richbody img {
  max-width: 100%; height: auto; display: block;
  margin: 12px auto; border-radius: 12px;
  box-shadow: 0 4px 18px rgba(11,46,38,.12);
}
.richbody video {
  width: 100%; max-width: 100%; display: block;
  margin: 12px 0; border-radius: 12px;
  background: #0B2E26;
}
.richbody .rich-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin: 14px 0;
}
.richbody .rich-gallery img {
  margin: 0; width: 100%; aspect-ratio: 4/3; object-fit: cover;
  box-shadow: 0 2px 10px rgba(11,46,38,.10); cursor: zoom-in;
}
.richbody .rich-link-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 14px 0; padding: 12px 16px; text-decoration: none;
  border: 1px solid rgba(201,169,106,.45); border-radius: 12px;
  background: linear-gradient(135deg, rgba(201,169,106,.12), rgba(201,169,106,.04));
  color: #0B2E26; font-weight: 600;
}
.richbody .rich-link-card:hover { border-color: rgba(201,169,106,.8); }
.richbody .rich-link-card .rich-link-arrow { color: #C9A96A; }
.richbody .rich-divider {
  height: 1px; margin: 18px 0;
  background: linear-gradient(90deg, transparent, rgba(201,169,106,.55), transparent);
}

/* ── 编辑器态 ── */
.richbody[contenteditable] { min-height: 176px; }
.richbody[contenteditable]:focus {
  border-color: #C9A96A !important;
  box-shadow: 0 0 0 3px rgba(201,169,106,.15);
}
.richbody[contenteditable]:empty::before {
  content: attr(data-placeholder);
  color: #B9AE94; pointer-events: none;
}

@media (max-width: 640px) {
  .richbody .rich-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .richbody img { border-radius: 10px; }
}
