:root {
    --bg: #f4efe7;
    --bg-deep: #161311;
    --paper: #fffdfa;
    --paper-soft: rgba(255, 251, 245, 0.84);
    --line: #d7c8ba;
    --ink: #1e1714;
    --muted: #6b5c53;
    --accent: #bc4b1d;
    --accent-deep: #8f3010;
    --accent-soft: #f2d8c7;
    --gold: #b88a45;
    --success: #1b6b3f;
    --danger: #8b2b2b;
    --shadow: 0 18px 48px rgba(57, 33, 19, 0.10);
    --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(214, 145, 97, 0.16), transparent 28%),
        linear-gradient(180deg, #f7f1e9 0%, #f3ece5 55%, #f0e8df 100%);
    font: 16px/1.7 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button {
    padding: 11px 18px;
    border: 0;
    background: linear-gradient(135deg, var(--accent) 0%, #d16434 100%);
    color: #fff;
    cursor: pointer;
    border-radius: 999px;
}
textarea, input, select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
textarea { min-height: 120px; }
code { padding: 2px 6px; border-radius: 999px; background: #f4ece4; }

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.auth-card,
.panel,
.hero-panel,
.detail-main-card,
.sidebar-card,
.section-card,
.info-card {
    background: var(--paper-soft);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(141, 103, 76, 0.14);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-card {
    width: min(560px, 100%);
    padding: 32px;
}

.auth-card-wide { width: min(680px, 100%); }
.auth-header { margin-bottom: 18px; }
.install-card { width: min(760px, 100%); }
.form-grid { display: grid; gap: 16px; }
.checkbox-field { display: flex; align-items: center; gap: 10px; }
.checkbox-field input { width: auto; }
.alert { margin: 16px 0; padding: 14px 16px; border-radius: 18px; }
.alert.error { background: #fff2f0; color: var(--danger); }
.alert.success { background: #eef8f1; color: var(--success); }

.admin-body { min-height: 100vh; }
.admin-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.admin-sidebar {
    padding: 32px 26px;
    color: #f6e6d7;
    background:
        radial-gradient(circle at top, rgba(207, 110, 57, 0.24), transparent 28%),
        linear-gradient(180deg, #171311 0%, #261814 60%, #1a1310 100%);
}
.admin-sidebar .brand {
    font: 700 32px/1.05 "Noto Serif SC", "Source Han Serif SC", serif;
    margin-bottom: 8px;
}
.sidebar-tagline {
    margin: 0 0 22px;
    color: rgba(246, 230, 215, 0.68);
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.admin-sidebar nav { display: grid; gap: 10px; margin-bottom: 22px; }
.admin-sidebar a {
    padding: 10px 14px;
    color: #f7e8dd;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}
.admin-sidebar a:hover { background: rgba(255, 255, 255, 0.08); }
.admin-main { padding: 30px; display: grid; gap: 22px; }
.panel { padding: 26px; }
.panel-grid { display: grid; gap: 20px; }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stats-grid-wide { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat-card strong {
    display: block;
    margin-top: 8px;
    font: 700 42px/1 "Noto Serif SC", "Source Han Serif SC", serif;
}
.panel-header,
.form-actions,
.table-actions,
.quick-links,
.meta-grid,
.section-header-row,
.sidebar-contact { display: flex; gap: 14px; }
.panel-header,
.form-actions,
.section-header-row { justify-content: space-between; align-items: center; }
.panel-intro,
.table-note,
.ai-help,
.detail-lead,
.site-topbar { color: var(--muted); }
.field-help {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}
.ghost-button:disabled,
button:disabled {
    opacity: 0.55;
    cursor: wait;
}
.table-note { margin-top: 6px; font-size: 14px; }
.meta-grid { flex-wrap: wrap; }
.meta-grid > label { flex: 1 1 220px; }
.textarea-sm { min-height: 100px; }
.textarea-lg { min-height: 260px; }
.button-link, .text-link { text-decoration: none; }
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent) 0%, #d16434 100%);
    color: #fff;
}
.hero-link, .text-link { color: var(--accent); font-weight: 600; }
.quick-links { margin-top: 18px; flex-wrap: wrap; }
.table-actions { align-items: center; flex-wrap: wrap; }
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
}
.status-pill.is-online { background: #eef8f1; color: var(--success); }
.status-pill.is-draft { background: #f4eee6; color: var(--muted); }
.two-column { display: grid; gap: 24px; grid-template-columns: 320px 1fr; }
.admin-split { align-items: start; }
.dashboard-grid { grid-template-columns: 1.1fr 0.9fr; }
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(18, 12, 9, 0.42);
}
.modal-backdrop.is-open { display: flex; }
.modal-card {
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 26px;
    background: var(--paper);
    border: 1px solid rgba(141, 103, 76, 0.18);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.dashboard-note-list { display: grid; gap: 14px; }
.dashboard-note { padding: 18px; border-radius: 20px; background: rgba(255,255,255,0.5); }
.compact-form { align-content: start; }
.import-panel { margin-top: 18px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
    padding: 12px 8px;
    border-bottom: 1px solid rgba(112, 84, 62, 0.14);
    text-align: left;
    vertical-align: top;
}
.ghost-button {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(87, 62, 43, 0.25);
}
.ghost-button.danger { color: var(--danger); border-color: rgba(139, 43, 43, 0.45); }
.ai-model-stack { display: grid; gap: 16px; }
.mini-panel { padding: 18px; }
.editor-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 340px;
}
.ai-workbench { position: sticky; top: 24px; height: fit-content; }
.compact-header { align-items: flex-start; }
.ai-button-stack { display: grid; gap: 10px; margin: 18px 0; }
.ai-status {
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.7);
    color: var(--muted);
}
.ai-progress-box { margin-top: 14px; }
.ai-progress-track {
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    background: rgba(188, 75, 29, 0.12);
}
.ai-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #df7b41);
    transition: width 0.35s ease;
}

.site-body { background: linear-gradient(180deg, #f8f1e8 0%, #f6efe7 100%); }
.home-body {
    background:
        radial-gradient(circle at right top, rgba(188, 75, 29, 0.14), transparent 26%),
        radial-gradient(circle at left bottom, rgba(58, 34, 23, 0.12), transparent 24%),
        linear-gradient(180deg, #f9f4ed 0%, #f5efe6 100%);
}
.site-shell { width: min(1280px, calc(100% - 40px)); margin: 0 auto; }
.site-topbar {
    border-bottom: 1px solid rgba(87, 62, 43, 0.08);
    font-size: 13px;
}
.site-topbar-inner {
    padding: 10px 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.site-header {
    padding: 26px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-header-solid {
    margin-top: 18px;
    padding: 18px 24px;
    background: rgba(255,255,255,0.55);
    border-radius: 22px;
    border: 1px solid rgba(114, 86, 65, 0.1);
}
.logo-lockup { display: inline-flex; align-items: center; gap: 14px; }
.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent) 0%, #dd7a3f 100%);
    color: #fff;
    font-weight: 700;
}
.logo-text {
    font: 700 26px/1.15 "Noto Serif SC", "Source Han Serif SC", serif;
}
.site-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
}
.site-nav a:hover { background: rgba(188, 75, 29, 0.08); color: var(--ink); }
.site-main { padding-bottom: 56px; }
.home-hero {
    padding: 38px 0 22px;
    display: grid;
    gap: 28px;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: stretch;
}
.hero-copy {
    padding: 48px;
    border-radius: 32px;
    color: #fdf9f6;
    background:
        linear-gradient(135deg, rgba(24, 19, 17, 0.96) 0%, rgba(72, 38, 24, 0.92) 64%, rgba(188, 75, 29, 0.88) 100%),
        url('/assets/img/hero-pattern.svg');
    box-shadow: var(--shadow);
}
.hero-copy h1 {
    margin: 0 0 14px;
    font: 700 clamp(38px, 6vw, 72px)/1.02 "Noto Serif SC", "Source Han Serif SC", serif;
}
.hero-description {
    max-width: 720px;
    color: rgba(255,255,255,0.82);
    font-size: 18px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.hero-link { color: #fff4e8; align-self: center; }
.hero-panel {
    display: grid;
    gap: 16px;
    padding: 24px;
}
.hero-stat {
    padding: 22px;
    border-radius: 22px;
    background: rgba(255,255,255,0.62);
}
.hero-stat strong {
    display: block;
    font: 700 34px/1 "Noto Serif SC", "Source Han Serif SC", serif;
    color: var(--accent-deep);
}
.hero-stat span { color: var(--muted); }
.section-stack { display: grid; gap: 24px; }
.section-card { padding: 28px; }
.section-title {
    margin: 0;
    font: 700 34px/1.15 "Noto Serif SC", "Source Han Serif SC", serif;
}
.section-header-row { margin-bottom: 18px; }
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card-grid-compact { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.info-card { padding: 22px; }
.elevated-card { position: relative; overflow: hidden; }
.elevated-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.16), transparent 36%);
    pointer-events: none;
}
.price-inline, .price-strip {
    color: var(--accent-deep);
    font-weight: 700;
}
.price-strip {
    margin: 22px 0;
    padding: 16px 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(188, 75, 29, 0.10), rgba(242, 216, 199, 0.88));
}
.capability-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.capability-grid article {
    padding: 20px;
    border-radius: 22px;
    background: rgba(255,255,255,0.52);
}
.product-list-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.product-card {
    display: grid;
    gap: 14px;
}
.product-card-media {
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255,255,255,0.65);
    aspect-ratio: 4 / 3;
}
.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.detail-page-shell { padding-top: 24px; }
.detail-layout {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
}
.detail-main-card { padding: 34px; }
.detail-title {
    margin: 0 0 14px;
    font: 700 clamp(30px, 5vw, 52px)/1.08 "Noto Serif SC", "Source Han Serif SC", serif;
}
.detail-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    color: var(--muted);
}
.detail-badge, .detail-date {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(188, 75, 29, 0.08);
}
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 22px;
}
.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(87, 62, 43, 0.08);
    color: var(--muted);
}
.tag-chip.is-linked {
    color: var(--accent-deep);
    background: rgba(188, 75, 29, 0.12);
}
.rich-content p { margin: 0 0 18px; }
.rich-content h2, .rich-content h3 {
    margin: 28px 0 12px;
    font-family: "Noto Serif SC", "Source Han Serif SC", serif;
}
.rich-content ul { padding-left: 20px; }
.detail-sidebar {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 24px;
}
.sidebar-card { padding: 22px; }
.sidebar-head { margin-bottom: 14px; }
.sidebar-head h3 { margin: 0; font-family: "Noto Serif SC", "Source Han Serif SC", serif; }
.sidebar-list { display: grid; gap: 12px; }
.sidebar-item {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.55);
}
.sidebar-item span, .sidebar-empty, .advisory-card p { color: var(--muted); }
.sidebar-item em { color: var(--accent-deep); font-style: normal; }
.sidebar-contact { display: grid; gap: 6px; margin: 16px 0; }
.listing-shell { padding-top: 24px; }
.listing-card { padding: 30px; }
.listing-head { margin-bottom: 18px; }
.listing-hero-alt {
    margin-bottom: 22px;
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(188, 75, 29, 0.08), rgba(255,255,255,0.5));
}
.listing-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.landing-page-card {
    text-align: center;
}
.category-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.category-chip {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(188, 75, 29, 0.08);
    color: var(--accent-deep);
}
.site-footer-wrap {
    padding: 30px 0 50px;
    border-top: 1px solid rgba(87, 62, 43, 0.08);
}
.friend-links-wrap {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(87, 62, 43, 0.08);
}
.friend-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 10px;
}
.friend-links-row a {
    color: var(--muted);
}
.template-manager {
    display: grid;
    gap: 24px;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
}
.template-list,
.template-editor-card {
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.56);
}
.template-list h2 {
    margin-top: 0;
    font-family: "Noto Serif SC", "Source Han Serif SC", serif;
}
.template-file-link {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 18px;
    color: var(--muted);
}
.template-file-link.is-active {
    background: rgba(188, 75, 29, 0.10);
    color: var(--accent-deep);
}
.template-file-link span,
.template-meta p {
    color: var(--muted);
    font-size: 14px;
}
.template-textarea {
    min-height: 560px;
    font: 14px/1.7 Consolas, "SFMono-Regular", Menlo, monospace;
}
.template-meta {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(87, 62, 43, 0.08);
}
.site-footer-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1.2fr 0.8fr 1fr;
}
.site-footer-grid h3 { margin-top: 0; }
.site-footer-grid a, .site-footer-grid p { display: block; margin: 0 0 8px; color: var(--muted); }
.footer-brand {
    margin: 0 0 10px;
    font: 700 24px/1.1 "Noto Serif SC", "Source Han Serif SC", serif;
    color: var(--ink);
}

@media (max-width: 1100px) {
    .home-hero,
    .detail-layout,
    .editor-grid,
    .dashboard-grid,
    .template-manager,
    .site-footer-grid,
    .admin-shell,
    .two-column {
        grid-template-columns: 1fr;
    }
    .detail-sidebar,
    .ai-workbench { position: static; }
}

@media (max-width: 760px) {
    .site-shell { width: min(100% - 24px, 1280px); }
    .site-header,
    .site-topbar-inner,
    .panel-header,
    .section-header-row,
    .form-actions,
    .meta-grid,
    .hero-actions { flex-direction: column; align-items: stretch; }
    .site-nav { gap: 8px; }
    .hero-copy,
    .detail-main-card,
    .section-card,
    .panel,
    .auth-card { padding: 22px; }
    .admin-main { padding: 18px; }
}

.admin-sidebar a.is-active {
    background: linear-gradient(135deg, rgba(188, 75, 29, 0.32), rgba(222, 122, 67, 0.18));
    color: #fff8f1;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.site-nav a.is-active {
    background: rgba(188, 75, 29, 0.10);
    color: var(--accent-deep);
}
.card-title-link {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}
.card-title-link:hover {
    color: var(--accent-deep);
}
.template-toolbar {
    margin-bottom: 20px;
}
.theme-switcher-form {
    display: flex;
    gap: 14px;
    align-items: end;
    flex-wrap: wrap;
}
.about-shell,
.contact-shell {
    display: grid;
    gap: 24px;
    padding-top: 24px;
}
.about-hero-card,
.contact-hero-card {
    display: grid;
    gap: 20px;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
}
.about-hero-image {
    width: 100%;
    border-radius: 24px;
    background: rgba(255,255,255,0.6);
}
.company-grid,
.contact-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1.15fr 0.85fr;
}
.metrics-card {
    display: grid;
    gap: 18px;
}
.metrics-card div {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.56);
}
.metrics-card strong {
    display: block;
    font: 700 34px/1 "Noto Serif SC", "Source Han Serif SC", serif;
}
.honor-image {
    width: 100%;
    border-radius: 18px;
    margin-bottom: 14px;
}
.contact-info-list {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}
.contact-info-list div {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.56);
}
.contact-info-list strong,
.contact-info-list span {
    display: block;
}
.contact-map-wrap iframe {
    width: 100%;
    min-height: 320px;
    border: 0;
    border-radius: 20px;
}
.product-detail-media img {
    width: 100%;
    display: block;
    border-radius: 24px;
}
.listing-stack {
    display: grid;
    gap: 16px;
}
.listing-row-card {
    display: grid;
    gap: 14px;
    grid-template-columns: 240px 1fr;
    align-items: start;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255,255,255,0.58);
}
.product-row-card {
    grid-template-columns: 180px 1fr auto;
    align-items: center;
}
.product-row-card img {
    width: 180px;
    height: 132px;
    object-fit: cover;
    border-radius: 18px;
}
.magazine-card {
    min-height: 220px;
}
.showcase-product-card .price-inline {
    display: inline-flex;
    margin-top: 8px;
}
.editorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 28px 0 18px;
}
.editorial-header-inner {
    padding-top: 22px;
}
.editorial-nav a {
    border-radius: 10px;
}
.editorial-hero {
    margin-top: 18px;
    background: linear-gradient(145deg, rgba(22,19,17,0.96), rgba(87,55,39,0.92));
    color: #fff9f2;
}
.editorial-hero .hero-description {
    color: rgba(255,255,255,0.76);
}
.listing-editorial-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.74), rgba(247,241,231,0.96));
}
.theme-editorial-shell .site-footer-wrap {
    border-top-color: rgba(87, 62, 43, 0.16);
}
@media (max-width: 1100px) {
    .about-hero-card,
    .company-grid,
    .contact-grid,
    .listing-row-card,
    .product-row-card {
        grid-template-columns: 1fr;
    }
}

.rich-editor-shell {
    border: 1px solid rgba(141, 96, 58, 0.18);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    overflow: hidden;
}
.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid rgba(141, 96, 58, 0.14);
    background: linear-gradient(180deg, rgba(255,248,239,0.96), rgba(255,255,255,0.92));
}
.editor-button {
    min-width: 72px;
    padding: 10px 14px;
    border-radius: 14px;
}
.editor-divider {
    width: 1px;
    min-height: 38px;
    background: rgba(141, 96, 58, 0.14);
}
.rich-editor-canvas,
.rich-editor-source {
    min-height: 360px;
    padding: 22px 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.rich-editor-canvas {
    outline: none;
    line-height: 1.82;
}
.rich-editor-canvas.is-empty::before {
    content: attr(data-placeholder);
    color: rgba(94, 67, 48, 0.48);
}
.rich-editor-canvas h2,
.rich-editor-canvas h3 {
    margin: 1.1em 0 0.55em;
}
.rich-editor-canvas p,
.rich-editor-canvas ul,
.rich-editor-canvas ol,
.rich-editor-canvas blockquote {
    margin: 0 0 1em;
}
.rich-editor-canvas blockquote {
    padding: 14px 18px;
    border-left: 4px solid #c95d2a;
    border-radius: 0 16px 16px 0;
    background: rgba(238, 229, 213, 0.6);
}
.rich-editor-canvas img,
.rich-content .article-media img {
    display: block;
    max-width: 100%;
    border-radius: 18px;
}
.rich-editor-canvas .article-media,
.rich-content .article-media {
    margin: 1.4em 0;
}
.rich-editor-canvas .article-media figcaption,
.rich-content .article-media figcaption {
    margin-top: 10px;
    font-size: 0.92rem;
    color: rgba(94, 67, 48, 0.76);
}
.rich-editor-canvas .article-video,
.rich-content .article-video {
    position: relative;
    margin: 1.4em 0;
    padding-top: 56.25%;
    overflow: hidden;
    border-radius: 20px;
    background: #0f0f0f;
}
.rich-editor-canvas .article-video iframe,
.rich-content .article-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.rich-editor-shell.is-source-mode .rich-editor-toolbar {
    border-bottom-style: dashed;
}
.rich-editor-source {
    width: 100%;
    resize: vertical;
    font-family: Consolas, Monaco, monospace;
    line-height: 1.65;
}
@media (max-width: 900px) {
    .editor-button {
        min-width: 0;
        flex: 1 1 calc(33.333% - 10px);
    }
}
.rich-editor-shell {
    border: 1px solid #d9d9d9;
    border-radius: 0;
    background: #ffffff;
    overflow: hidden;
}
.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 0 12px;
    min-height: 52px;
    border-bottom: 1px solid #d9d9d9;
    background: #ffffff;
}
.editor-style-select {
    min-width: 128px;
    height: 38px;
    margin-right: 10px;
    border: 0;
    background: transparent;
    color: #3d3d3d;
    font-size: 1rem;
    outline: none;
}
.editor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    margin: 0 2px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #3d3d3d;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
}
.editor-button:hover {
    background: #f3f3f3;
}
.editor-button strong,
.editor-button em,
.editor-button span {
    font-size: inherit;
}
.editor-button.is-icon {
    min-width: 34px;
    padding: 0 6px;
}
.editor-divider {
    width: 1px;
    height: 22px;
    margin: 0 8px;
    background: #dddddd;
}
.editor-underline {
    text-decoration: underline;
}
.editor-strike {
    text-decoration: line-through;
}
.rich-editor-canvas,
.rich-editor-source {
    min-height: 280px;
    padding: 18px 20px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    font-size: 1rem;
}
.rich-editor-canvas {
    outline: none;
    line-height: 1.8;
}
.rich-editor-canvas.is-empty::before {
    content: attr(data-placeholder);
    color: #8f8f8f;
}
.rich-editor-canvas h2,
.rich-editor-canvas h3 {
    margin: 1em 0 0.55em;
}
.rich-editor-canvas p,
.rich-editor-canvas ul,
.rich-editor-canvas ol,
.rich-editor-canvas blockquote,
.rich-editor-canvas pre {
    margin: 0 0 1em;
}
.rich-editor-canvas blockquote {
    padding-left: 14px;
    border-left: 3px solid #d8d8d8;
    color: #555555;
}
.rich-editor-canvas pre {
    padding: 14px 16px;
    border-radius: 4px;
    background: #f6f6f6;
    overflow: auto;
}
.rich-editor-canvas img,
.rich-content .article-media img {
    display: block;
    max-width: 100%;
    border-radius: 8px;
}
.rich-editor-canvas .article-media,
.rich-content .article-media {
    margin: 1.2em 0;
}
.rich-editor-canvas .article-media figcaption,
.rich-content .article-media figcaption {
    margin-top: 8px;
    font-size: 0.92rem;
    color: #6b6b6b;
}
.rich-editor-source {
    width: 100%;
    resize: vertical;
    font-family: Consolas, Monaco, monospace;
    line-height: 1.65;
}
@media (max-width: 900px) {
    .rich-editor-toolbar {
        padding: 8px 10px;
    }
    .editor-style-select {
        min-width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
        border-bottom: 1px solid #ececec;
    }
}
.rich-editor-shell {
    border: 1px solid #d9d9d9;
    border-radius: 0;
    background: #fff;
    overflow: hidden;
}
.rich-editor-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    padding: 8px 12px;
    border-bottom: 1px solid #d9d9d9;
    background: #fff;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}
.rich-editor-toolbar.is-source-mode .editor-style-select,
.rich-editor-toolbar.is-source-mode .editor-button:not([data-action="source"]) {
    opacity: 0.45;
}
.editor-style-select {
    flex: 0 0 168px;
    width: 168px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    color: #3d3d3d;
    font-size: 0.98rem;
    outline: none;
}
.editor-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    margin: 0 2px;
    padding: 0 8px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #333;
    font-size: 1.02rem;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}
.editor-button:hover,
.editor-button.is-active {
    background: #f2f2f2;
}
.editor-button.is-text {
    min-width: 46px;
    font-size: 0.98rem;
}
.editor-divider {
    width: 1px;
    height: 22px;
    margin: 0 10px;
    background: #dddddd;
    flex: 0 0 auto;
}
.editor-underline {
    text-decoration: underline;
}
.editor-strike {
    text-decoration: line-through;
}
.rich-editor-canvas,
.rich-editor-source {
    min-height: 300px;
    padding: 18px 20px;
    border: 0;
    border-radius: 0;
    background: #fff;
    font-size: 1rem;
    line-height: 1.8;
}
.rich-editor-canvas {
    outline: none;
}
.rich-editor-canvas.is-empty::before {
    content: attr(data-placeholder);
    color: #8f8f8f;
}
.rich-editor-canvas h2,
.rich-editor-canvas h3 {
    margin: 1em 0 0.55em;
}
.rich-editor-canvas p,
.rich-editor-canvas ul,
.rich-editor-canvas ol,
.rich-editor-canvas blockquote,
.rich-editor-canvas pre {
    margin: 0 0 1em;
}
.rich-editor-canvas blockquote {
    padding-left: 14px;
    border-left: 3px solid #d8d8d8;
    color: #555;
}
.rich-editor-canvas pre {
    padding: 14px 16px;
    border-radius: 4px;
    background: #f6f6f6;
    overflow: auto;
}
.rich-editor-canvas img,
.rich-content .article-media img {
    display: block;
    max-width: 100%;
    border-radius: 8px;
}
.rich-editor-canvas .article-media,
.rich-content .article-media {
    margin: 1.2em 0;
}
.rich-editor-canvas .article-media figcaption,
.rich-content .article-media figcaption {
    margin-top: 8px;
    font-size: 0.92rem;
    color: #6b6b6b;
}
.rich-editor-source {
    width: 100%;
    resize: vertical;
    font-family: Consolas, Monaco, monospace;
}
.rich-editor-source[hidden] {
    display: none !important;
}
@media (max-width: 900px) {
    .editor-style-select {
        flex-basis: 140px;
        width: 140px;
    }
}