/* 前台富文本排版 */
.rich-content {
    color: #475569;
    line-height: 1.85;
    font-size: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.rich-content > *:first-child { margin-top: 0; }
.rich-content > *:last-child { margin-bottom: 0; }

.rich-content p { margin: 0 0 1em; }
.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4,
.rich-content h5,
.rich-content h6 {
    color: #0f172a;
    font-weight: 800;
    line-height: 1.4;
    margin: 1.6em 0 0.75em;
}
.rich-content h1 { font-size: 1.75rem; }
.rich-content h2 { font-size: 1.5rem; }
.rich-content h3 { font-size: 1.3rem; }
.rich-content h4 { font-size: 1.15rem; }
.rich-content h5 { font-size: 1.05rem; }
.rich-content h6 { font-size: 1rem; }

.rich-content a {
    color: #0284c7;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.rich-content a:hover { color: #0ea5e9; }

.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.25em auto;
    display: block;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.rich-content ul,
.rich-content ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
}
.rich-content li { margin: 0.35em 0; }

.rich-content blockquote {
    margin: 1.25em 0;
    padding: 14px 18px;
    border-left: 4px solid #0ea5e9;
    background: #f0f9ff;
    border-radius: 0 12px 12px 0;
    color: #334155;
}

.rich-content pre,
.rich-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
}
.rich-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px 18px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.25em 0;
}
.rich-content code {
    background: #f1f5f9;
    color: #be123c;
    padding: 2px 6px;
    border-radius: 6px;
}
.rich-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25em 0;
    font-size: 0.95rem;
    display: block;
    overflow-x: auto;
}
.rich-content th,
.rich-content td {
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    text-align: left;
}
.rich-content th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
}
.rich-content tr:nth-child(even) td { background: #fafbfc; }

.rich-content hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1.75em 0;
}

.rich-content iframe,
.rich-content video {
    max-width: 100%;
    border-radius: 12px;
    margin: 1.25em 0;
}

.rich-content .rich-content-compact { font-size: 0.92rem; }

@media (max-width: 767.98px) {
    .rich-content { font-size: 0.95rem; }
    .rich-content h1 { font-size: 1.45rem; }
    .rich-content h2 { font-size: 1.3rem; }
    .rich-content h3 { font-size: 1.15rem; }
    .rich-content img { border-radius: 10px; }
}
