/**
 * 前端文章编辑器样式
 * 
 * @package QiMeng
 * @since 1.0.0
 */

/* 编辑器容器 */
.qm-post-editor {
    --qm-editor-surface: #ffffff;
    --qm-editor-surface-soft: #f8fafc;
    --qm-editor-border: rgba(148, 163, 184, 0.22);
    --qm-editor-border-strong: rgba(148, 163, 184, 0.34);
    --qm-editor-shadow: 0 18px 40px rgba(15, 23, 42, 0.06), 0 6px 14px rgba(15, 23, 42, 0.04);
    --qm-editor-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.05);
    --qm-editor-text: #0f172a;
    --qm-editor-muted: #64748b;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 !important;
    position: relative;
    z-index: 1;
}

.qm-editor-container {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    position: relative;
    z-index: 1;
}

.qm-post-editor.qm-editor-container {
    box-sizing: border-box;
    width: min(100%, 1520px);
    max-width: 1520px;
    margin-left: auto;
    margin-right: auto;
}

.qm-editor-page-main {
    min-height: 100vh;
    background: #f5f7fb;
    position: relative;
    z-index: 10;
    padding-bottom: 2rem;
	overflow-x: clip;
}

/* 桌面端需要上边距，和其他页面保持一致 */
@media (min-width: 992px) {
    .qm-editor-page-main {
        padding-top: 140px !important;
    }
}

@media (max-width: 991.98px) {
    .qm-editor-page-main {
        padding-top: 0 !important;
    }
}

.qm-post-editor-wrapper {
    margin: 0;
    align-items: flex-start;
}

/* 编辑器主区域 */
.qm-editor-main {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.5rem 0.75rem;
    margin: 0;
    min-width: 0;
}

/* 编辑器头部 */
.qm-editor-header {
    background: var(--qm-editor-surface);
    border: 1px solid var(--qm-editor-border);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--qm-editor-shadow-soft);
}

.qm-editor-header-main {
    position: relative;
    padding: 1.25rem 1.375rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    background: #fcfdff;
}

.qm-editor-header__type-switcher {
    margin-bottom: 1rem;
}

.qm-editor-header__type-switcher.qm-article-type-switcher {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    gap: 12px;
}

.qm-editor-header-main__meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.875rem;
}

.qm-editor-header-main__copy {
    min-width: 0;
}

.qm-editor-header-main__eyebrow {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #94a3b8;
}

.qm-editor-header-main__hint {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--qm-editor-muted);
}

.qm-post-title-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1.875rem;
    font-weight: 500;
    line-height: 1.35;
    padding: 0;
    background: transparent;
    color: var(--qm-editor-text);
}

.qm-post-title-input::placeholder {
    color: #cbd5e1;
}

.qm-title-counter {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--qm-editor-border);
    border-radius: var(--qm-radius-pill);
    background: var(--qm-editor-surface-soft);
    font-size: 13px;
    line-height: 1;
    color: var(--qm-editor-muted);
}

.qm-title-counter.warning {
    border-color: rgba(217, 119, 6, 0.18);
    color: #b45309;
}

.qm-title-counter.error {
    border-color: var(--qm-primary-rgba-20, rgba(236, 72, 153, 0.2));
    color: var(--qm-primary, #ec4899);
}

.qm-title-count {
    color: var(--qm-primary, #ec4899);
    font-weight: 600;
}

/* 编辑器内容区 */
.qm-editor-content {
    background: var(--qm-editor-surface);
    border: 1px solid var(--qm-editor-border);
    border-radius: 14px;
    overflow: visible;
    position: relative;
    z-index: 1;
    box-shadow: var(--qm-editor-shadow);
}

.qm-import-progress {
    position: fixed;
    top: 20px;
    right: 20px;
    width: min(360px, calc(100vw - 32px));
    padding: 14px 16px 15px;
    border-radius: var(--qm-radius-card);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14), 0 6px 18px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 100000;
    opacity: 0;
    transform: translate3d(0, -12px, 0);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.qm-import-progress.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.qm-import-progress__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.qm-import-progress__meta {
    min-width: 0;
    flex: 1;
}

.qm-import-progress__title {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    color: #0f172a;
}

.qm-import-progress__detail {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
    word-break: break-word;
}

.qm-import-progress__percent {
    flex-shrink: 0;
    min-width: 42px;
    text-align: right;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    color: #2563eb;
}

.qm-import-progress__bar {
    margin-top: 12px;
    position: relative;
    width: 100%;
    height: 7px;
    border-radius: var(--qm-radius-pill);
    overflow: hidden;
    background: #e2e8f0;
}

.qm-import-progress__bar-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
    transition: width 0.22s ease;
}

.qm-import-progress.is-complete .qm-import-progress__percent {
    color: #059669;
}

.qm-import-progress.is-complete .qm-import-progress__bar-fill {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.qm-import-progress.is-error .qm-import-progress__percent {
    color: #dc2626;
}

.qm-import-progress.is-error .qm-import-progress__bar-fill {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.qm-editor-container {
    display: flex;
    flex-direction: column;
}

/* 工具栏 */
.qm-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 0.875rem;
    background: #fcfdff;
    border-bottom: 1px solid var(--qm-editor-border);
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.qm-toolbar-select {
    min-height: 36px;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--qm-editor-border);
    border-radius: 10px;
    background: #fff;
    font-size: 0.875rem;
    color: #334155;
    cursor: pointer;
    outline: none;
}

.qm-toolbar-select:hover {
    border-color: var(--qm-editor-border-strong);
}

.qm-toolbar-divider {
    width: 1px;
    height: 24px;
    background: rgba(148, 163, 184, 0.3);
    margin: 0 0.25rem;
}

.qm-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    padding: 0;
    border: 1px solid transparent;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    font-size: 0.875rem;
}

.qm-toolbar-btn:hover {
    border-color: var(--qm-primary-rgba-20, rgba(236, 72, 153, 0.2));
    background: #fff3f8;
    color: var(--qm-primary, #ec4899);
    transform: translateY(-1px);
}

.qm-toolbar-btn.active {
    border-color: var(--qm-primary, #ec4899);
    background: var(--qm-primary, #ec4899);
    color: #fff;
}

.qm-vip-discount-hint {
    display: block;
    margin-bottom: 10px;
}

.qm-vip-discount-box {
    background: #f9f9f9;
    padding: 12px;
    border-radius: var(--qm-radius-card);
    margin-top: 10px;
    border: 1px solid #e5e7eb;
}

.qm-vip-discount-title {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--qm-text-secondary, #4b5563);
    font-weight: 400;
}

.qm-vip-discount-note {
    display: block;
    margin: 0 0 5px;
    color: var(--qm-text-light, #9ca3af);
    font-size: 12px;
    font-weight: 400;
}

.qm-vip-discount-title.qm-vip-discount-title-sm {
    margin-bottom: 8px;
}

.qm-vip-discount-row {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.qm-vip-discount-row .qm-tags-input {
    width: 70px;
    min-height: 34px;
    padding: 0.35rem 0.5rem;
}

.qm-vip-discount-row .qm-underlined-input {
    width: 100%;
    flex: 1 1 auto;
    min-height: 30px;
    font-size: 0.875rem;
    text-align: center;
}

.qm-vip-discount-label {
    min-width: 80px;
    font-size: 13px;
    color: #111827;
}

.qm-vip-discount-suffix {
    color: #666;
    font-size: 12px;
}

.qm-settings-desc.qm-vip-discount-desc {
    display: block;
    margin-top: 8px;
    color: #666;
}

.qm-vip-discount-levels {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
}

html.dark .qm-vip-discount-box,
.dark .qm-vip-discount-box {
    background: var(--qm-bg-dark-800);
    border-color: var(--qm-border-dark-600);
}

html.dark .qm-vip-discount-title,
.dark .qm-vip-discount-title,
html.dark .qm-vip-discount-label,
.dark .qm-vip-discount-label {
    color: var(--qm-text-secondary);
}

html.dark .qm-vip-discount-suffix,
.dark .qm-vip-discount-suffix,
html.dark .qm-settings-desc.qm-vip-discount-desc,
.dark .qm-settings-desc.qm-vip-discount-desc {
    color: var(--qm-text-muted);
}

html.dark .qm-vip-discount-levels,
.dark .qm-vip-discount-levels {
    border-top-color: var(--qm-border-dark-600);
}

@media (max-width: 767.98px) {
    .qm-editor-toolbar {
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 0.25rem;
        padding: 0.375rem 0.5rem;
    }

    .qm-toolbar-divider {
        flex: 0 0 auto;
        margin: 0 0.125rem;
    }

    .qm-toolbar-select {
        flex: 0 0 auto;
        padding: 0.25rem 0.5rem;
        font-size: 0.8125rem;
    }

    .qm-toolbar-btn {
        flex: 0 0 auto;
        width: 1.875rem;
        height: 1.875rem;
    }

}

/* 编辑器主体 */
.qm-editor-body {
    min-height: 560px;
    padding: 1.25rem 1.5rem 1.5rem;
    outline: none;
    font-size: 15px;
    line-height: 1.8;
    color: #334155;
    background: #fff;
    border-radius: 0 0 var(--qm-radius-card) var(--qm-radius-card);
    min-width: 0;
    overflow-x: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.qm-editor-body > * {
    max-width: 100%;
}

.qm-editor-body p,
.qm-editor-body div,
.qm-editor-body h1,
.qm-editor-body h2,
.qm-editor-body h3,
.qm-editor-body h4,
.qm-editor-body h5,
.qm-editor-body h6,
.qm-editor-body blockquote,
.qm-editor-body ul,
.qm-editor-body ol,
.qm-editor-body li {
    max-width: 100%;
    box-sizing: border-box;
}

.qm-editor-body p,
.qm-editor-body li {
    text-indent: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.qm-editor-body:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
}

.qm-editor-body:focus {
    outline: none;
}

.qm-editor-body.qm-drag-over {
    background: #f0f4ff;
    border: 2px dashed #2563eb;
}

/* 上传占位符 */
.qm-upload-placeholder {
    display: inline-block;
    margin: 0.5rem 0;
    padding: 1rem;
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: var(--qm-radius-card);
    min-width: 200px;
}

.qm-upload-placeholder-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.qm-upload-placeholder-content i {
    font-size: 1.25rem;
    color: #2563eb;
}

.qm-editor-body img {
    display: block;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    max-height: min(68vh, 820px);
    object-fit: contain;
    border-radius: var(--qm-radius-card);
    margin: 1rem auto;
}

.qm-editor-body figure,
.qm-editor-body .wp-caption,
.qm-editor-body .wp-block-image {
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
}

.qm-editor-body .qm-image-wrapper,
.qm-editor-body .qm-attachment-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 1rem auto;
    box-sizing: border-box;
}

.qm-editor-body .qm-image-wrapper img {
    margin: 0;
}

.qm-editor-body .qm-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
    border-radius: var(--qm-radius-card);
}

.qm-editor-body .qm-attachment-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* 视频容器样式 */
.qm-editor-body .qm-video-wrapper,
.qm-editor-body .qm-table-wrapper,
.qm-editor-body .qm-info-box,
.qm-editor-body .qm-warning-box,
.qm-editor-body .qm-collapse-block,
.qm-editor-body .qm-paid-content,
.qm-editor-body .qm-hr-wrapper,
.qm-editor-body blockquote,
.qm-editor-body figure,
.qm-editor-body .wp-caption,
.qm-editor-body .wp-block-image {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0;
    box-sizing: border-box;
}

.qm-editor-body .qm-video-wrapper video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto;
    max-height: 500px;
    border-radius: var(--qm-radius-card);
    display: block;
}

.qm-editor-body .qm-video-wrapper iframe {
    max-width: 100% !important;
    width: 100% !important;
    aspect-ratio: 16 / 9;
    border-radius: var(--qm-radius-card);
    border: none;
    display: block;
}

.qm-editor-body .qm-video-wrapper,
.qm-editor-body .qm-table-wrapper {
    overflow: hidden;
    border-radius: var(--qm-radius-card);
}

.qm-editor-body .qm-video-wrapper > :not(.qm-block-remove) {
    max-width: 100% !important;
    box-sizing: border-box;
}

/* 工具栏插入的付费正文区块 */
.qm-editor-body .qm-paid-content {
    overflow: visible;
    min-height: 180px;
    padding: 48px 18px 18px;
    border: 2px solid #f29ab8;
    border-radius: 6px;
    background: #fff8fb;
    box-shadow: 0 0 0 3px rgba(242, 154, 184, 0.10);
}

.qm-editor-body .qm-paid-content:focus-within {
    border-color: #ec6f9a;
    box-shadow: 0 0 0 3px rgba(236, 111, 154, 0.16);
}

.qm-editor-body .qm-paid-content__toolbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 6px 48px 6px 8px;
    border-bottom: 1px solid rgba(236, 111, 154, 0.24);
    background: #fff0f5;
    color: #91445f;
    line-height: 1;
}

.qm-editor-body .qm-paid-content__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 4px;
    background: #ec6f9a;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.qm-editor-body .qm-paid-content__label i {
    color: inherit;
    font-size: 12px;
}

.qm-editor-body .qm-paid-content__pay-tabs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    padding: 2px;
    border-radius: 999px;
    background: rgba(236, 111, 154, 0.14);
}

.qm-editor-body .qm-paid-content__pay-tab {
    min-height: 20px;
    padding: 0 8px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #a3506d;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.qm-editor-body .qm-paid-content__pay-tab.is-active {
    background: #ec6f9a;
    color: #fff;
}

.qm-editor-body .qm-paid-content__price-label {
    flex: 0 0 auto;
    color: #a3506d;
    font-size: 13px;
    font-weight: 600;
}

.qm-editor-body .qm-paid-content__price-value {
    display: inline-flex;
    align-items: center;
    min-width: 68px;
    min-height: 26px;
    padding: 4px 7px;
    border: 1px solid rgba(236, 111, 154, 0.42);
    border-radius: 4px;
    background: #fff;
    color: #c84370;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    outline: none;
}

.qm-editor-body .qm-paid-content__unit {
    flex: 0 0 auto;
    color: #a3506d;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.qm-editor-body .qm-paid-content__price-value:focus {
    border-color: #ec6f9a;
    box-shadow: 0 0 0 2px rgba(236, 111, 154, 0.14);
}

.qm-editor-body .qm-paid-content__body {
    min-height: 112px;
    padding: 4px 2px;
    color: #374151;
    outline: none;
}

.qm-editor-body .qm-paid-content__body > :first-child {
    margin-top: 0;
}

.qm-editor-body .qm-paid-content__body > :last-child {
    margin-bottom: 0;
}

.qm-editor-body .qm-paid-content__body:empty::before {
    content: attr(data-placeholder);
    color: #c993a6;
    pointer-events: none;
}

.qm-editor-body .qm-paid-content > .qm-block-remove {
    top: 4px;
    right: 7px;
    width: 29px;
    height: 29px;
    background: transparent;
    color: #b65b7a;
    opacity: 1;
}

.qm-editor-body .qm-paid-content > .qm-block-remove:hover {
    background: #ec6f9a;
    color: #fff;
}

.qm-editor-body .qm-video-wrapper embed,
.qm-editor-body .qm-video-wrapper object {
    max-width: 100% !important;
    width: 100% !important;
    display: block;
}

/* 视频删除按钮 */
.qm-editor-body .qm-block-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: var(--qm-radius-circle);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
    z-index: 10;
}

.qm-editor-body .qm-video-wrapper:hover .qm-block-remove,
.qm-editor-body .qm-image-wrapper:hover .qm-block-remove,
.qm-editor-body .qm-table-wrapper:hover .qm-block-remove,
.qm-editor-body .qm-attachment-wrapper:hover .qm-block-remove,
.qm-editor-body .qm-info-box:hover .qm-block-remove,
.qm-editor-body .qm-warning-box:hover .qm-block-remove,
.qm-editor-body .qm-collapse-block:hover .qm-block-remove,
.qm-editor-body .qm-paid-content:hover .qm-block-remove,
.qm-editor-body .qm-hr-wrapper:hover .qm-block-remove,
.qm-editor-body blockquote:hover .qm-block-remove,
.qm-editor-body figure:hover .qm-block-remove,
.qm-editor-body .wp-caption:hover .qm-block-remove,
.qm-editor-body .wp-block-image:hover .qm-block-remove {
    opacity: 1;
}

.qm-editor-body .qm-block-remove:hover {
    background: rgba(239, 68, 68, 0.9);
    transform: scale(1.1);
}

.qm-editor-body .qm-attachment {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: var(--qm-radius-card);
    background: #fff;
    color: #374151;
    text-decoration: none;
}

/* 编辑器内表格样式 */
.qm-editor-body table,
.qm-editor-body .qm-content-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    border: 1px solid #d1d5db;
}

.qm-editor-body .qm-table-wrapper table,
.qm-editor-body .qm-content-table {
    margin: 0;
}

.qm-editor-body .qm-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.qm-editor-body table th,
.qm-editor-body table td,
.qm-editor-body .qm-content-table th,
.qm-editor-body .qm-content-table td {
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.75rem;
    text-align: left;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.qm-editor-body table th,
.qm-editor-body .qm-content-table th {
    background: #f9fafb;
    font-weight: 600;
}

.qm-editor-body table tbody tr:nth-child(even),
.qm-editor-body .qm-content-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.qm-editor-body table tbody tr:hover,
.qm-editor-body .qm-content-table tbody tr:hover {
    background: #f3f4f6;
}

.qm-editor-body p {
    margin: 0.75rem 0;
}

.qm-editor-body h1,
.qm-editor-body h2,
.qm-editor-body h3,
.qm-editor-body h4,
.qm-editor-body h5,
.qm-editor-body h6 {
    margin: 1.5rem 0 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.qm-editor-body h1 {
    font-size: 2rem;
}

.qm-editor-body h2 {
    font-size: 1.75rem;
}

.qm-editor-body h3 {
    font-size: 1.5rem;
}

.qm-editor-body ul,
.qm-editor-body ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.qm-editor-body blockquote {
    margin: 1rem 0;
    padding: 1rem 3rem 1rem 1.5rem;
    border-left: 4px solid #2563eb;
    background: #f3f4f6;
    border-radius: var(--qm-radius-card);
}

.qm-editor-body .qm-hr-wrapper hr {
    margin: 0;
}

.qm-editor-body code {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: var(--qm-radius-sm);
    font-size: 0.875em;
    font-family: 'Courier New', monospace;
}

.qm-editor-body pre {
    background: #1f2937;
    color: #fff;
    padding: 1rem;
    border-radius: var(--qm-radius-card);
    overflow-x: auto;
    margin: 1rem 0;
}

.qm-editor-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* 编辑器侧边栏 */
.qm-editor-sidebar-left,
.qm-editor-sidebar-right {
    background: var(--qm-bg-white, #ffffff);
    padding: 0;
    margin: 0;
    min-width: 0;
}

.qm-editor-sidebar {
    background: transparent;
    border-radius: 0;
    padding: 0;
    position: sticky;
    top: 96px;
    max-height: none;
    overflow: visible;
    border: none;
    box-shadow: none;
}

.qm-editor-sidebar-left {
    border-right: none;
}

.qm-editor-sidebar-right {
    border-left: none;
}

.qm-editor-main {
    border-left: none;
    border-right: none;
}

@media (min-width: 992px) {
    .qm-post-editor {
        --qm-editor-rail-width: clamp(220px, 17vw, 280px);
        --qm-editor-rail-gap: clamp(18px, 1.8vw, 28px);
        --qm-editor-rail-edge: clamp(16px, 1.5vw, 24px);
        --qm-editor-top: 140px;
        --qm-editor-bottom-gap: 24px;
        padding-left: 0;
        padding-right: 0;
    }

    .qm-post-editor-wrapper {
        display: block;
        margin-left: calc(var(--qm-editor-rail-edge) + var(--qm-editor-rail-width) + var(--qm-editor-rail-gap));
        margin-right: calc(var(--qm-editor-rail-edge) + var(--qm-editor-rail-width) + var(--qm-editor-rail-gap));
    }

    .qm-editor-sidebar-left,
    .qm-editor-sidebar-right {
        position: fixed;
        top: var(--qm-editor-top);
        width: var(--qm-editor-rail-width);
        max-width: var(--qm-editor-rail-width);
        padding: 0;
        z-index: 20;
        border-radius: var(--qm-radius-card);
        overflow: hidden;
    }

    .qm-editor-sidebar-left {
        left: var(--qm-editor-rail-edge);
    }

    .qm-editor-sidebar-right {
        right: var(--qm-editor-rail-edge);
    }

    .qm-editor-sidebar-right {
        background: transparent;
        border-radius: 0;
        overflow: visible;
    }

    .qm-editor-sidebar-left .qm-editor-sidebar,
    .qm-editor-sidebar-right .qm-editor-sidebar {
        position: static;
        top: auto;
        max-height: calc(100vh - var(--qm-editor-top) - var(--qm-editor-bottom-gap));
        overflow-y: auto;
        padding: clamp(18px, 1.5vw, 24px);
    }

    .qm-editor-sidebar-right.qm-settings-panel-right {
        max-height: calc(100vh - var(--qm-editor-top) - var(--qm-editor-bottom-gap));
        overflow-y: auto;
        padding: 0;
    }

    .qm-editor-main {
        width: 100%;
        max-width: none;
        padding-left: 0;
        padding-right: 0;
    }

    .qm-editor-body {
        min-height: calc(
            100vh - var(--qm-editor-top) - var(--qm-editor-bottom-gap) - 126px
        );
    }

}

.qm-settings-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qm-settings-panel-right {
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.qm-editor-sidebar,
.qm-settings-panel-right,
.qm-category-list,
.qm-editor-body,
.qm-editor-sidebar-column,
.qm-download-field-row textarea {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.22) transparent;
}

.qm-editor-sidebar::-webkit-scrollbar,
.qm-settings-panel-right::-webkit-scrollbar,
.qm-category-list::-webkit-scrollbar,
.qm-editor-body::-webkit-scrollbar,
.qm-editor-sidebar-column::-webkit-scrollbar,
.qm-download-field-row textarea::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.qm-editor-sidebar::-webkit-scrollbar-track,
.qm-settings-panel-right::-webkit-scrollbar-track,
.qm-category-list::-webkit-scrollbar-track,
.qm-editor-body::-webkit-scrollbar-track,
.qm-editor-sidebar-column::-webkit-scrollbar-track,
.qm-download-field-row textarea::-webkit-scrollbar-track {
    background: transparent;
}

.qm-editor-sidebar::-webkit-scrollbar-thumb,
.qm-settings-panel-right::-webkit-scrollbar-thumb,
.qm-category-list::-webkit-scrollbar-thumb,
.qm-editor-body::-webkit-scrollbar-thumb,
.qm-editor-sidebar-column::-webkit-scrollbar-thumb,
.qm-download-field-row textarea::-webkit-scrollbar-thumb {
    border-radius: var(--qm-radius-pill);
    background: rgba(148, 163, 184, 0.18);
}

.qm-editor-sidebar:hover::-webkit-scrollbar-thumb,
.qm-settings-panel-right:hover::-webkit-scrollbar-thumb,
.qm-category-list:hover::-webkit-scrollbar-thumb,
.qm-editor-body:hover::-webkit-scrollbar-thumb,
.qm-editor-sidebar-column:hover::-webkit-scrollbar-thumb,
.qm-download-field-row textarea:hover::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.32);
}

.qm-settings-section {
    padding: 1rem;
    border: 1px solid var(--qm-editor-border);
    border-radius: 14px;
    background: var(--qm-editor-surface);
    box-shadow: var(--qm-editor-shadow-soft);
}

.qm-settings-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.qm-settings-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 24px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 1rem;
    color: var(--qm-editor-text);
}

.qm-settings-title::before {
    content: "";
    width: 3px;
    height: 16px;
    border-radius: var(--qm-radius-pill);
    background: var(--qm-primary, #ec4899);
    box-shadow: 0 6px 12px var(--qm-primary-rgba-16, rgba(236, 72, 153, 0.16));
    flex: 0 0 auto;
}

.qm-settings-section-download {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.qm-settings-section-download .qm-settings-title {
    margin: 0 0 0.875rem;
    padding: 0;
    border-bottom: none;
    border-radius: 0;
    background: transparent;
    color: var(--qm-text-secondary, #4b5563);
}

.qm-settings-label {
    display: block;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #475569;
}

.qm-settings-desc {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    color: var(--qm-editor-muted);
    margin-top: 0.25rem;
}

.qm-editor-notice-card {
    padding: 1rem;
    border-radius: 14px;
    background: #fff7fb;
    border-color: rgba(236, 72, 153, 0.14);
    box-shadow: none;
}

.qm-editor-notice-line {
    margin: 0 0 0.5rem;
    color: var(--qm-text-secondary, #4b5563);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.55;
}

.qm-editor-notice-line:last-child {
    margin-bottom: 0;
}

.qm-editor-notice-line.is-primary {
    color: var(--qm-primary, #e91e63);
    font-size: 0.9375rem;
}

.qm-normal-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.qm-normal-editor-stat {
    padding: 1rem;
    border: 1px solid var(--qm-editor-border);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--qm-editor-shadow-soft);
}

.qm-normal-editor-stat__label {
    display: block;
    font-size: 13px;
    line-height: 1.5;
    color: #94a3b8;
}

.qm-normal-editor-stat__value {
    display: block;
    margin-top: 0.5rem;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--qm-editor-text);
}

.qm-normal-editor-stat__meta {
    margin: 0.5rem 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--qm-editor-muted);
}

.qm-normal-editor-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.qm-normal-editor-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 0.875rem;
    border: 1px solid rgba(236, 72, 153, 0.12);
    border-radius: var(--qm-radius-pill);
    background: #fff5f9;
    color: #be185d;
    font-size: 13px;
    line-height: 1;
}

.qm-editor-normal-insight__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

.qm-editor-normal-insight__head .qm-settings-title {
    margin-bottom: 0;
}

.qm-editor-normal-insight__desc {
    margin: 0.5rem 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--qm-editor-muted);
}

.qm-editor-normal-insight__badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 0.75rem;
    border-radius: var(--qm-radius-pill);
    background: #fff1f7;
    color: var(--qm-primary, #ec4899);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.qm-editor-normal-insight__list {
    display: grid;
    gap: 0.75rem;
}

.qm-editor-normal-insight__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8125rem 0.875rem;
    border-radius: 10px;
    background: var(--qm-editor-surface-soft);
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}

.qm-editor-normal-insight__row strong {
    color: var(--qm-editor-text);
    font-size: 14px;
    font-weight: 500;
    text-align: right;
}

.qm-editor-normal-insight__hint {
    margin: 0.875rem 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--qm-editor-muted);
}

/* 分类列表 */
.qm-category-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 150px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.qm-category-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--qm-radius-sm);
    transition: background 0.2s;
}

.qm-category-item:hover {
    background: #fff5f8;
}

.qm-category-checkbox {
    margin: 0;
    cursor: pointer;
}

/* 标签输入 */
.qm-tags-input {
    width: 100%;
    min-height: 44px;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--qm-editor-border);
    border-radius: 10px;
    background: var(--qm-editor-surface-soft);
    color: #334155;
    font-size: 0.875rem;
    font-weight: 400;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.qm-tags-input:focus {
    background: #ffffff;
    border-color: var(--qm-primary-rgba-35, rgba(236, 72, 153, 0.35));
    box-shadow: 0 0 0 3px var(--qm-primary-rgba-08, rgba(236, 72, 153, 0.08));
}

select.qm-tags-input {
    padding-right: 2.5rem;
    cursor: pointer;
}

.qm-tags-input:hover {
    background: #ffffff;
}

.qm-download-link-control {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.qm-download-link-control .qm-tags-input {
    min-width: 0;
}

.qm-download-link-control .qm-underlined-input {
    min-width: 0;
}

.qm-download-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid rgba(233, 30, 99, 0.16);
    border-radius: var(--qm-radius-sm);
    background: var(--qm-download-file-bg, #fff3f8);
    color: var(--qm-download-file-color, #e91e63);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.qm-download-file-btn:hover {
    border-color: var(--qm-download-file-hover, #e91e63);
    background: var(--qm-download-file-hover-bg, #fdf2f8);
    color: var(--qm-download-file-hover, #e91e63);
    transform: translateY(-1px);
}

.qm-download-file-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
}

.qm-download-file-btn.is-inline {
    margin-top: 8px;
}

.qm-download-links-editor {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.qm-download-link-item {
    padding: 0.75rem;
    border-radius: var(--qm-radius-card);
    background: var(--qm-bg-gray-50, #f9fafb);
}

.qm-download-link-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.625rem;
    color: var(--qm-text-secondary, #4b5563);
    font-size: 0.8125rem;
}

.qm-download-link-remove,
.qm-download-link-add {
    border: none;
    border-radius: var(--qm-radius-sm);
    background: var(--qm-bg-gray-100, #f3f4f6);
    color: var(--qm-text-secondary, #4b5563);
    font-size: 0.75rem;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.qm-download-link-remove {
    padding: 0.25rem 0.5rem;
}

.qm-download-link-add {
    width: 100%;
    min-height: 34px;
    margin-top: 0.875rem;
}

.qm-download-link-remove:hover,
.qm-download-link-add:hover {
    background: var(--qm-primary-rgba-10, rgba(233, 30, 99, 0.1));
    color: var(--qm-primary, #e91e63);
}

.qm-download-field-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 6px;
}

.qm-download-field-row:last-child {
    margin-bottom: 0;
}

.qm-download-submodule {
    padding: 0.875rem;
    border-radius: var(--qm-radius-card);
    background: var(--qm-bg-white, #ffffff);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.qm-download-submodule + .qm-download-submodule {
    margin-top: 0.875rem;
}

.qm-download-pay-row,
.qm-download-under-row {
    display: grid;
    grid-template-columns: minmax(86px, 0.42fr) minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    min-height: 36px;
}

.qm-download-pay-row + .qm-download-under-row,
.qm-download-under-row + .qm-download-under-row {
    margin-top: 0.375rem;
}

.qm-download-under-row > .qm-settings-label,
.qm-download-pay-row > .qm-settings-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    color: var(--qm-text-secondary, #4b5563);
}

.qm-download-under-row .qm-settings-label i {
    width: 1rem;
    color: var(--qm-primary, #e91e63);
    font-size: 0.875rem;
    text-align: center;
}

.qm-download-pay-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.1875rem;
    padding: 0.125rem;
    width: fit-content;
    max-width: 100%;
    justify-self: start;
    border-radius: var(--qm-radius-pill);
    background: var(--qm-bg-gray-100, #f3f4f6);
}

.qm-download-pay-tab {
    min-height: 22px;
    padding: 0 0.625rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--qm-text-secondary, #4b5563);
    font-size: 0.75rem;
    line-height: 1;
    white-space: nowrap;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.qm-download-pay-tab.is-active {
    background: var(--qm-primary, #e91e63);
    color: #ffffff;
}

.qm-download-under-control {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
    border-bottom: 1px solid var(--qm-border-color, #e5e7eb);
}

.qm-underlined-input {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 0.25rem 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--qm-text-primary, #111827);
    font-size: 1rem;
    font-weight: 400;
    outline: none;
}

.qm-underlined-input:focus {
    box-shadow: none;
}

.qm-download-resource-module .qm-underlined-input {
    font-size: 0.875rem;
    line-height: 1.45;
}

.qm-download-resource-module .qm-underlined-input::placeholder {
    color: var(--qm-text-muted, #9ca3af);
    font-size: 0.8125rem;
    font-weight: 400;
}

.qm-download-under-control:focus-within {
    border-bottom-color: var(--qm-primary, #e91e63);
}

.qm-download-member-row .qm-switch-label,
.qm-download-member-switch {
    justify-self: end;
    margin-left: auto;
}

.qm-vip-discount-control {
    position: relative;
    padding-right: 1rem;
}

.qm-vip-discount-control .qm-download-unit {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.qm-vip-discount-control .qm-underlined-input {
    padding-right: 0;
    text-align: center;
}

.qm-download-field-row > .qm-underlined-input {
    border-bottom: 1px solid var(--qm-border-color, #e5e7eb);
}

.qm-download-field-row > .qm-underlined-input:focus {
    border-bottom-color: var(--qm-primary, #e91e63);
}

.qm-download-unit,
.qm-vip-discount-suffix {
    flex: 0 0 auto;
    color: var(--qm-text-muted, #9ca3af);
    font-size: 0.75rem;
}

.qm-download-field-row > .qm-settings-label {
    margin-bottom: 0;
}

.qm-download-field-row > .qm-settings-desc {
    grid-column: 2;
}

.qm-download-field-row textarea.qm-tags-input,
.qm-download-field-row textarea.qm-underlined-input {
    min-height: 76px;
    resize: vertical;
}

.qm-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--qm-text-secondary, #4b5563);
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
}

.qm-switch-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qm-switch-track {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: var(--qm-radius-pill);
    background: var(--qm-bg-gray-200, #e5e7eb);
    transition: background 0.2s ease;
    flex: 0 0 auto;
}

.qm-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: var(--qm-radius-circle);
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease;
}

.qm-switch-label input:checked + .qm-switch-track {
    background: var(--qm-primary, #e91e63);
}

.qm-switch-label input:checked + .qm-switch-track::after {
    transform: translateX(16px);
}

.qm-download-card {
    display: flex;
    flex-direction: column;
}

.qm-geo-editor-card .qm-download-card__body {
    display: grid;
    gap: 14px;
}

.qm-geo-editor-card .qm-download-card__toggle-row {
    border-bottom: 1px solid var(--qm-workbench-border, #e5e7eb);
}

.qm-geo-editor-card .qm-section-title i {
    color: var(--qm-workbench-accent, #d9261d);
}

.qm-download-card__toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 9px;
    border-bottom: 0;
}

.qm-download-card__toggle-copy strong {
    display: block;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--qm-workbench-text);
}

.qm-section-title {
    --qm-section-title-accent: #ff4f8b;
    --qm-section-title-soft: rgba(255, 79, 139, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.qm-section-title--notice {
    --qm-section-title-accent: #4f7cff;
    --qm-section-title-soft: rgba(79, 124, 255, 0.12);
}

.qm-section-title--resource {
    --qm-section-title-accent: #2f8fff;
    --qm-section-title-soft: rgba(47, 143, 255, 0.12);
}

.qm-section-title--resource .qm-section-title__icon {
    width: 18px;
    height: 18px;
    border-radius: 0;
    background: transparent;
}

.qm-section-title__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--qm-section-title-soft);
    color: var(--qm-section-title-accent);
    flex: 0 0 auto;
}

.qm-section-title__icon svg {
    display: block;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.qm-section-title__text {
    min-width: 0;
}

.qm-section-title .qm-settings-title,
.qm-section-title .qm-section-title__text {
    display: block;
    min-height: 0;
    margin: 0;
    line-height: 1.4;
}

.qm-section-title .qm-settings-title::before,
.qm-section-title .qm-section-title__text::before {
    display: none;
}

.qm-download-card__switch {
    margin-left: auto;
}

.qm-download-card__switch input:checked + .qm-switch-track {
    background: #52b947;
}

.qm-download-card__empty {
    padding-top: 9px;
    font-size: 14px;
    line-height: 1.8;
    color: #9ca3af;
}

.qm-download-card__body {
    padding-top: 9px;
}

.qm-download-price-module,
.qm-download-resource-module {
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.qm-download-resource-module {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 0;
}

.qm-download-card .qm-download-pay-row + .qm-download-under-row,
.qm-download-card .qm-download-under-row + .qm-download-under-row {
    margin-top: 7px;
    padding-top: 7px;
    border-top: 0;
}

.qm-download-resource-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.qm-download-resource-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--qm-workbench-text);
}

.qm-download-link-add {
    width: auto;
    min-height: 36px;
    margin-top: 0;
    min-width: 96px;
    padding: 0 14px;
    border: 1px solid #2f8fff;
    border-radius: 8px;
    background: #ffffff;
    color: #2f8fff;
    font-size: 13px;
    font-weight: 400;
}

.qm-download-link-add:hover {
    background: #eff6ff;
    border-color: #1677ff;
    color: #1677ff;
}

.qm-download-link-item {
    padding: 8px;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 12px;
    background: #ffffff;
}

.qm-download-link-item__summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.qm-download-link-item__summary-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.qm-download-link-item__summary-title {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;
    color: #374151;
}

.qm-download-link-item__summary-subtitle {
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qm-download-link-item__summary-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.qm-download-link-action {
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 8px;
    background: #ffffff;
    color: #4b5563;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.qm-download-link-action.is-danger {
    color: #ef4444;
}

.qm-download-link-item__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.qm-download-link-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    line-height: 1;
}

.qm-download-link-chip.is-muted {
    background: #f8fafc;
    color: #9ca3af;
}

.qm-download-resource-empty {
    margin-bottom: 7px;
    padding: 8px;
    border: 1px dashed var(--qm-workbench-border);
    border-radius: 12px;
    background: #fafafa;
    font-size: 13px;
    line-height: 1.7;
    color: #9ca3af;
}

.qm-download-link-modal .qm-modal-content {
    max-width: 720px;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.qm-download-link-modal__header {
    padding: 10px 14px 6px;
    border-bottom: 0;
}

.qm-download-link-modal__body {
    padding: 10px 14px 12px;
    background: #ffffff;
}

.qm-download-link-modal__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 4px 14px 8px;
    border-top: 0;
    background: #ffffff;
}

.qm-download-link-modal__title {
    gap: 4px;
}

.qm-download-link-modal__title .qm-modal-title {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 400;
}

.qm-download-link-modal .qm-modal-close {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    color: #94a3b8;
    border-radius: 999px;
}

.qm-download-link-modal .qm-modal-close svg {
    display: block;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.qm-download-link-modal .qm-modal-close:hover {
    background: var(--qm-primary-rgba-08, rgba(236, 72, 153, 0.08));
    color: var(--qm-primary, #ec4899);
}

.qm-download-link-modal__section {
    display: grid;
    gap: 6px;
}

.qm-download-link-modal__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
    color: #374151;
}

.qm-download-link-modal__label-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: var(--qm-primary, var(--qm-workbench-accent));
    flex: 0 0 auto;
}

.qm-download-link-modal__label-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.qm-download-link-modal__url-row,
.qm-download-link-modal__grid {
    display: grid;
    gap: 8px;
}

.qm-download-link-modal__url-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.qm-download-link-modal__grid {
    margin-top: 8px;
}

.qm-download-link-modal__grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qm-download-link-modal__divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.qm-download-link-modal__divider::before,
.qm-download-link-modal__divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: rgba(148, 163, 184, 0.18);
}

.qm-download-link-modal__divider-text {
    color: #64748b;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.qm-download-link-modal .qm-tags-input {
    min-height: 30px;
    padding: 0 10px;
    border: 0 !important;
    border-radius: 8px;
    background: #f8f9fc;
    color: #374151;
    font-size: 12px;
}

.qm-download-link-modal .qm-tags-input::placeholder {
    color: #b6bfcd;
    opacity: 1;
}

.qm-download-link-modal .qm-tags-input:focus {
    box-shadow: 0 0 0 2px var(--qm-primary-rgba-08, rgba(236, 72, 153, 0.08));
    background: #ffffff;
}

.qm-download-link-modal .qm-download-file-btn {
    min-height: 30px;
    padding: 0 10px;
    border: 0;
    background: #ffffff;
    color: #2f8fff;
    font-size: 12px;
    border-radius: 8px;
}

.qm-download-link-modal .qm-download-file-btn:hover {
    background: #eff6ff;
    color: #1677ff;
}

.qm-download-link-modal__footer .qm-btn {
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
}

.qm-download-link-modal__footer .qm-download-link-modal-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--qm-primary, #2f8fff);
}

.qm-download-link-modal__footer .qm-download-link-modal-save:hover {
    background: var(--qm-primary-rgba-08, rgba(236, 72, 153, 0.08));
    color: var(--qm-primary, #ec4899);
}

.qm-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.qm-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: #fff1f7;
    color: #be185d;
    border-radius: var(--qm-radius-lg);
    font-size: 0.875rem;
}

.qm-tag-remove {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: var(--qm-radius-circle);
    background: rgba(190, 24, 93, 0.12);
    transition: background 0.2s;
}

.qm-tag-remove:hover {
    background: rgba(190, 24, 93, 0.18);
}

/* 特色图片 */
.qm-featured-image {
    width: 100%;
}

.qm-featured-image-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px dashed var(--qm-editor-border-strong);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s;
    overflow: hidden;
    background: var(--qm-editor-surface-soft);
}

.qm-featured-image-preview:hover {
    border-color: var(--qm-primary, #ec4899);
    background: #fff7fb;
}

.qm-featured-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qm-featured-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    text-align: center;
    padding: 2rem;
}

.qm-featured-image-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.qm-featured-image-placeholder p {
    margin: 0;
    font-size: 0.875rem;
}

/* 付费标签页 */
.qm-paid-tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.qm-paid-tab-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.875rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    margin-bottom: -1px;
}

.qm-paid-tab-btn:hover {
    color: #e91e63;
}

.qm-paid-tab-btn.is-active {
    color: #e91e63;
    border-bottom-color: #e91e63;
}

.qm-paid-tabs-panels {
    position: relative;
}

.qm-paid-tab-panel {
    display: none;
}

.qm-paid-tab-panel.is-active {
    display: block;
}

[hidden] {
    display: none !important;
}

/* 复选框标签 */
.qm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.qm-checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* 编辑器底部 */
.qm-editor-footer {
    background: var(--qm-editor-surface);
    border: 1px solid var(--qm-editor-border);
    border-radius: 14px;
    padding: 0.5rem 0.75rem;
    margin-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    box-shadow: var(--qm-editor-shadow-soft);
}

.qm-autosave-status {
    font-size: 0.875rem;
    color: #6b7280;
}

.qm-editor-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* 底部发布操作栏 */
.qm-editor-bottom-bar {
    position: fixed;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 80;
    width: min(760px, calc(100vw - 24px));
    max-width: min(760px, calc(100vw - 24px));
    transform: translateX(-50%);
    pointer-events: none;
}

.qm-editor-bottom-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--qm-editor-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
    pointer-events: auto;
    width: 100%;
    max-width: 100%;
}

.qm-editor-bottom-bar__schedule {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.qm-editor-bottom-bar__label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0;
    color: var(--qm-text-secondary, #4b5563);
    font-size: 0.875rem;
    font-weight: 400;
    white-space: nowrap;
}

.qm-editor-bottom-bar__label i {
    color: var(--qm-primary, #e91e63);
    font-size: 0.875rem;
}

.qm-editor-bottom-bar__select,
.qm-editor-bottom-bar__time {
    min-height: 36px;
    border: 1px solid var(--qm-editor-border);
    border-radius: 10px;
    background: var(--qm-editor-surface-soft);
    color: var(--qm-text-primary, #111827);
    font-size: 0.875rem;
    font-weight: 400;
    outline: none;
}

.qm-editor-bottom-bar__select {
    width: 104px;
    padding: 0 0.875rem;
}

.qm-editor-bottom-bar__time {
    width: 188px;
    padding: 0 0.875rem;
}

.qm-editor-bottom-bar__actions {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(92px, 1fr));
    gap: 0.5rem;
}

.qm-editor-bottom-bar .qm-btn {
    min-height: 38px;
    padding: 0 1rem;
    border-radius: var(--qm-radius-pill);
    white-space: nowrap;
}

/* 按钮样式 */
.qm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--qm-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.5rem;
}

.qm-btn-primary {
    background: var(--qm-primary, #ec4899);
    color: #fff;
    box-shadow: 0 12px 24px var(--qm-primary-rgba-18, rgba(236, 72, 153, 0.18));
}

.qm-btn-primary:hover {
    background: var(--qm-primary-light, #f472b6);
    color: #fff;
}

.qm-btn-secondary {
    background: var(--qm-editor-surface-soft);
    color: #475569;
}

.qm-btn-secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* =========================
 * 普通文章工作台还原
 * ========================= */
.qm-editor-form {
    display: block;
}

.qm-editor-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.qm-post-editor {
    --qm-workbench-bg: #f7f8fb;
    --qm-workbench-surface: #ffffff;
    --qm-workbench-border: #e6e9ef;
    --qm-workbench-border-soft: #eff2f6;
    --qm-workbench-text: #1f2937;
    --qm-workbench-muted: #6b7280;
    --qm-workbench-accent: #ff4f8b;
    --qm-workbench-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
    padding-left: 18px;
    padding-right: 18px;
}

body.qm-editor-page {
    --qm-header-gap: 0px;
}

@media (min-width: 992px) {
    body.qm-editor-page.qm-header-fixed #qm-header + main.qm-editor-page-main,
    body.qm-editor-page:has(#qm-header.sticky) #qm-header + main.qm-editor-page-main {
        padding-top: 72px !important;
        margin-top: 0 !important;
    }
}

body.qm-editor-page:has(#qm-header.mobile-sticky) #qm-header + main.qm-editor-page-main,
body.qm-editor-page:has(#qm-header[data-mobile-sticky="true"]) #qm-header + main.qm-editor-page-main {
    padding-top: 72px !important;
    margin-top: 0 !important;
}

body.qm-editor-page .qm-editor-page-main {
    background: var(--qm-workbench-bg);
    padding: 72px 0 2rem !important;
}

.qm-editor-workspace-bar {
    position: static;
    top: auto;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    min-height: 58px;
    margin: 24px 18px 0;
    padding: 10px 20px;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 12px 12px 0 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: none;
}

.qm-editor-workspace-bar__publish {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex: 0 0 auto;
}

.qm-editor-workspace-bar__publish .qm-editor-bottom-bar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.qm-editor-workspace-bar__publish .qm-btn {
    min-width: 122px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
}

.qm-editor-workspace-bar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    padding-right: 18px;
    border-right: 1px solid var(--qm-workbench-border);
}

.qm-editor-workspace-bar__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, #ff4f8b 0%, #ff2d6f 100%);
    color: #ffffff;
    font-size: 16px;
}

.qm-editor-workspace-bar__brand-copy strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 500;
    color: var(--qm-workbench-text);
}

.qm-editor-workspace-bar__switcher {
    min-width: 0;
    flex: 0 0 auto;
    max-width: none;
    margin-left: 0;
}

.qm-editor-workspace-bar__type-switcher.qm-article-type-switcher {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.qm-editor-workspace-bar__type-switcher.qm-article-type-switcher--modal {
    display: flex;
    align-items: center;
}

.qm-editor-workspace-bar__type-switcher .qm-article-type-switcher__trigger {
    min-height: 38px;
    padding: 6px 12px 6px 14px;
    border-color: var(--qm-workbench-border);
    background: #fcfcfd;
    color: #4b5563;
    box-shadow: none;
}

.qm-editor-workspace-bar__type-switcher .qm-article-type-switcher__trigger-label {
    color: #9ca3af;
}

.qm-editor-workspace-bar__type-switcher .qm-article-type-switcher__trigger-value {
    color: #1f2937;
}

.qm-editor-workspace-bar__type-switcher .qm-article-type-switcher__tabs {
    flex-wrap: nowrap;
    gap: 0;
}

.qm-editor-workspace-bar__type-switcher .qm-article-type-switcher__tab {
    min-width: 104px;
    height: 42px;
    padding: 0 18px;
    border-radius: 0;
    border: 1px solid var(--qm-workbench-border);
    background: #fcfcfd;
    color: #4b5563;
    font-size: 15px;
}

.qm-editor-workspace-bar__type-switcher .qm-article-type-switcher__tab + .qm-article-type-switcher__tab {
    margin-left: -1px;
}

.qm-editor-workspace-bar__type-switcher .qm-article-type-switcher__tab:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.qm-editor-workspace-bar__type-switcher .qm-article-type-switcher__tab:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.qm-editor-workspace-bar__type-switcher .qm-article-type-switcher__tab.is-active {
    background: #fff4f8;
    border-color: rgba(255, 79, 139, 0.22);
    color: #ff2d6f;
    box-shadow: inset 0 2px 0 #ff4f8b;
}

.qm-post-editor-wrapper {
    display: grid !important;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    margin: 0 18px !important;
    padding: 0;
}

.qm-editor-sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    align-self: start;
}

/*
 * 主题全局 base.css 给 html/body 设置了 overflow-x: hidden，
 * 这会让 body 成为永不滚动的“滚动容器”，导致 position: sticky 全部失效。
 * 编辑器页改用 overflow-x: clip：同样裁剪横向溢出，但不产生滚动容器，sticky 才能生效。
 */
html:has(body.qm-editor-page) {
    overflow-x: clip;
}

body.qm-editor-page {
    overflow-x: clip;
}

/* 桌面端：左侧设置列跟随滚动悬浮，列内独立滚动 */
@media (min-width: 992px) {
    .qm-editor-sidebar-column {
        position: sticky;
        top: 88px;
        max-height: calc(100vh - 88px - 24px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .qm-editor-sidebar-column > .qm-editor-sidebar {
        flex-shrink: 0;
    }

    /* 发布操作固定悬浮在左侧面板底部 */
    .qm-post-editor .qm-editor-sidebar-actions {
        position: sticky;
        bottom: 0;
        z-index: 5;
        background: var(--qm-workbench-surface, #ffffff);
        border-top: 1px solid var(--qm-workbench-border);
        box-shadow: 0 -6px 12px rgba(15, 23, 42, 0.05);
    }
}

.qm-post-editor .qm-editor-sidebar-left,
.qm-post-editor .qm-editor-sidebar-right,
.qm-post-editor .qm-editor-main {
    position: static !important;
    width: auto !important;
    max-width: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    background: transparent;
}

.qm-post-editor .qm-editor-main {
    min-width: 0;
}

.qm-post-editor .qm-editor-sidebar,
.qm-post-editor .qm-settings-panel-right {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: transparent;
}

.qm-settings-panel,
.qm-settings-panel-right {
    height: auto;
}

.qm-editor-card,
.qm-editor-header,
.qm-editor-content,
.qm-editor-normal-insight,
.qm-editor-normal-points,
.qm-editor-notice-card,
.qm-settings-section-download,
.qm-settings-section-points,
.qm-type-editor-card--normal-overview {
    border: 1px solid var(--qm-workbench-border);
    border-radius: 10px;
    background: var(--qm-workbench-surface);
    box-shadow: var(--qm-workbench-shadow);
}

.qm-settings-section {
    padding: 14px;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 10px;
    background: var(--qm-workbench-surface);
    box-shadow: var(--qm-workbench-shadow);
}

.qm-settings-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--qm-workbench-text);
}

.qm-settings-title::before {
    display: none;
}

.qm-editor-card__head,
.qm-editor-normal-points__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.qm-editor-card--accordion {
    padding: 0 !important;
}

.qm-editor-card__toggle {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.qm-editor-card__toggle:hover {
    background: #fafbfc;
}

.qm-editor-card--accordion.is-open .qm-editor-card__toggle {
    background: transparent;
}

.qm-editor-card__toggle-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--qm-sidebar-accent-soft, #eef2ff);
    color: var(--qm-sidebar-accent, #6366f1);
    font-size: 15px;
    text-align: center;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qm-editor-card__toggle-copy {
    min-width: 0;
    flex: 1 1 auto;
    display: block;
}

.qm-editor-card__toggle-title {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 400;
    color: #374151;
}

.qm-editor-card__toggle-summary {
    display: none;
}

.qm-editor-card__toggle-caret {
    color: #6b7280;
    font-size: 15px;
    flex: 0 0 auto;
    transition: transform 0.2s ease;
}

.qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="category"] {
    --qm-sidebar-accent: #3b82f6;
    --qm-sidebar-accent-soft: #eff6ff;
}

.qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="tag"] {
    --qm-sidebar-accent: #8b5cf6;
    --qm-sidebar-accent-soft: #f5f3ff;
}

.qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="featured"] {
    --qm-sidebar-accent: #ec4899;
    --qm-sidebar-accent-soft: #fdf2f8;
}

.qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="visibility"] {
    --qm-sidebar-accent: #14b8a6;
    --qm-sidebar-accent-soft: #f0fdfa;
}

.qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="sticky"] {
    --qm-sidebar-accent: #ef4444;
    --qm-sidebar-accent-soft: #fef2f2;
}

.qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="excerpt"] {
    --qm-sidebar-accent: #f59e0b;
    --qm-sidebar-accent-soft: #fffbeb;
}

.qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="material-files"] {
    --qm-sidebar-accent: #3b82f6;
    --qm-sidebar-accent-soft: #eff6ff;
}

.qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="material-scenarios"] {
    --qm-sidebar-accent: #10b981;
    --qm-sidebar-accent-soft: #ecfdf5;
}

.qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="material-palette"] {
    --qm-sidebar-accent: #8b5cf6;
    --qm-sidebar-accent-soft: #f5f3ff;
}

.qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="software-features"] {
    --qm-sidebar-accent: #f97316;
    --qm-sidebar-accent-soft: #fff7ed;
}

.qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="software-changelog"] {
    --qm-sidebar-accent: #3b82f6;
    --qm-sidebar-accent-soft: #eff6ff;
}

.qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="software-install"] {
    --qm-sidebar-accent: #10b981;
    --qm-sidebar-accent-soft: #ecfdf5;
}

.qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="software-faqs"] {
    --qm-sidebar-accent: #8b5cf6;
    --qm-sidebar-accent-soft: #f5f3ff;
}

.qm-editor-card--accordion.is-open .qm-editor-card__toggle-caret {
    transform: rotate(90deg);
}

.qm-editor-card__body {
    padding: 0 12px 12px;
}

.qm-editor-card__body[hidden] {
    display: none !important;
}

.qm-editor-sidebar-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 12px;
}

.qm-editor-sidebar-actions__btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 42px;
    min-height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    overflow: hidden;
    color: #ffffff;
    font-size: 14px;
    line-height: 1;
    font-weight: 500;
}

button.qm-editor-sidebar-actions__btn.rounded-pill,
.qm-editor-sidebar-actions__btn.rounded-pill {
    border-radius: 999px !important;
}

.qm-editor-sidebar-actions__btn--draft {
    background: linear-gradient(135deg, #59b0ff 0%, #2563eb 100%);
}

.qm-editor-sidebar-actions__btn--draft:hover {
    background: linear-gradient(135deg, #71bbff 0%, #2d74f5 100%);
}

.qm-editor-sidebar-actions__btn--publish {
    background: linear-gradient(135deg, #ff4f8b 0%, #ff2d6f 100%);
}

.qm-editor-sidebar-actions__btn--publish:hover {
    background: linear-gradient(135deg, #ff5d93 0%, #ff3b78 100%);
}

.qm-editor-header {
    padding: 10px 14px 0;
    margin-bottom: 0;
}

.qm-editor-header-main {
    padding: 2px 2px 0;
    border: none;
    background: transparent;
}

.qm-editor-header-main__title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.qm-post-title-input {
    min-width: 0;
    min-height: 44px;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 400;
}

.qm-post-title-input::placeholder {
    color: #9ca3af;
}

.qm-title-counter {
    padding: 0;
    border: none;
    background: transparent;
    font-size: 13px;
    white-space: nowrap;
}

.qm-title-count {
    color: #4b5563;
    font-weight: 500;
}

.qm-editor-header__type-pages {
    margin-bottom: 0;
}

.qm-type-editor-card--normal-overview {
    padding: 14px;
}

.qm-normal-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(272px, 0.88fr);
    gap: 18px;
}

.qm-normal-overview__fields {
    display: grid;
    gap: 12px;
}

.qm-normal-overview__field {
    position: relative;
}

.qm-normal-overview__label,
.qm-normal-overview__summary-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #374151;
}

.qm-normal-overview__input,
.qm-normal-overview__summary-box,
.qm-normal-overview__tag-row,
.qm-normal-overview__meta-row {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 6px;
    background: #ffffff;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.55;
}

.qm-normal-overview__input {
    padding-right: 58px;
}

.qm-normal-overview__counter {
    position: absolute;
    right: 12px;
    top: 37px;
    font-size: 12px;
    line-height: 1;
    color: #9ca3af;
}

.qm-normal-overview__tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.qm-normal-overview__tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
}

.qm-normal-overview__placeholder {
    color: #9ca3af;
    font-size: 13px;
}

.qm-normal-overview__side {
    display: grid;
    gap: 12px;
    align-content: start;
}

.qm-normal-overview__summary-box {
    min-height: 74px;
    color: #4b5563;
}

.qm-normal-overview__meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 30px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.qm-normal-overview__meta-row strong {
    color: #374151;
    font-weight: 500;
}

.qm-editor-content {
    overflow: visible;
}

.qm-editor-toolbar {
    display: grid;
    gap: 0;
    position: relative;
    padding: 10px 14px 8px;
    background: #ffffff;
	border-bottom: 1px solid var(--qm-workbench-border);
}

@media (min-width: 992px) {
	body.qm-editor-page .qm-editor-page-main {
	overflow-x: clip;
		overflow-y: visible;
	}

	.qm-post-editor,
	.qm-post-editor .qm-editor-form,
	.qm-post-editor .qm-post-editor-wrapper,
	.qm-post-editor .qm-editor-main,
	.qm-post-editor .qm-editor-content,
	.qm-post-editor .qm-editor-content > .qm-editor-container {
		overflow: visible !important;
	}
}

.qm-post-editor .qm-editor-toolbar {
	position: relative;
	z-index: 45;
	width: 100%;
	border-bottom: 1px solid var(--qm-workbench-border);
}

.qm-editor-toolbar.is-sticky {
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
	border-radius: 0;
	margin: 0;
}

.dark .qm-editor-toolbar.is-sticky {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.qm-editor-toolbar__row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.qm-editor-toolbar__row + .qm-editor-toolbar__row {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f2f6;
}

.qm-toolbar-select {
    min-width: 66px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
}

.qm-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #4b5563;
    box-shadow: none;
    font-size: 13px;
}

.qm-toolbar-btn:hover {
    background: #f3f4f6;
    color: var(--qm-workbench-text);
    transform: none;
}

.qm-toolbar-btn--text {
    width: auto;
    min-width: 0;
    height: 28px;
    padding: 0 8px;
    border: 1px solid transparent;
    color: #4b5563;
    font-size: 12px;
}

.qm-toolbar-btn--text:hover {
    border-color: #eceff4;
}

.qm-toolbar-btn--text span {
    line-height: 1;
    white-space: nowrap;
}

.qm-toolbar-divider {
    width: 1px;
    height: 18px;
    background: #e5e7eb;
}

.qm-editor-body {
    min-height: 488px;
    padding: 18px 18px 26px;
    font-size: 15px;
    line-height: 1.85;
    color: #374151;
}

.qm-category-dropdown {
    position: relative;
}

.qm-category-dropdown__trigger {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qm-category-dropdown.is-open .qm-category-dropdown__trigger {
    border-color: rgba(255, 79, 139, 0.24);
    box-shadow: 0 0 0 3px rgba(255, 79, 139, 0.08);
}

.qm-category-dropdown__summary {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 13px;
    line-height: 1.5;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qm-category-dropdown__count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fff1f6;
    color: var(--qm-workbench-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}

.qm-category-dropdown__caret {
    color: #9ca3af;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.qm-category-dropdown.is-open .qm-category-dropdown__caret {
    transform: rotate(180deg);
}

.qm-category-dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    padding: 8px;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.qm-category-dropdown__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 260px;
    overflow-y: auto;
}

.qm-category-dropdown__option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    padding: 6px 10px 6px calc(10px + (var(--qm-category-level, 0) * 16px));
    border-radius: 8px;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s ease;
}

.qm-category-dropdown__option:hover {
    background: #f8fafc;
}

.qm-category-dropdown__option .qm-category-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qm-category-dropdown__checkbox {
    width: 16px;
    height: 16px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    position: relative;
    flex: 0 0 auto;
}

.qm-category-dropdown__checkbox::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
}

.qm-category-dropdown__option .qm-category-checkbox:checked + .qm-category-dropdown__checkbox {
    border-color: var(--qm-workbench-accent);
    background: var(--qm-workbench-accent);
}

.qm-category-dropdown__option .qm-category-checkbox:checked + .qm-category-dropdown__checkbox::after {
    opacity: 1;
}

.qm-category-dropdown__name {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 13px;
    line-height: 1.5;
}

.qm-category-dropdown__selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.qm-category-dropdown__chip {
    min-height: 24px;
    padding: 0 10px;
    border: 1px solid #f1d6e2;
    border-radius: 999px;
    background: #fff7fb;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.qm-tags-input {
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 6px;
    background: #ffffff;
    font-size: 13px;
}

.qm-tags-list {
    gap: 8px;
    margin-top: 10px;
}

.qm-tag-item {
    padding: 4px 8px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
}

.qm-tag-remove {
    width: 14px;
    height: 14px;
    background: rgba(107, 114, 128, 0.12);
}

.qm-featured-image {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.qm-featured-image-preview {
    aspect-ratio: 16 / 9;
    min-height: 0;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 8px;
    background: #f8fafc;
}

.qm-featured-image-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.qm-featured-image-panel__main {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.qm-featured-image-panel__name {
    font-size: 14px;
    line-height: 1.4;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qm-featured-image-panel__size {
    font-size: 12px;
    line-height: 1.4;
    color: #9ca3af;
}

.qm-featured-image-panel__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.qm-mini-action-btn,
.qm-normal-points__action {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 6px;
    background: #ffffff;
    color: #4b5563;
    font-size: 12px;
    line-height: 1;
}

.qm-mini-action-btn.is-danger {
    color: #ef4444;
}

.qm-post-visibility-select {
    width: 100%;
}

.qm-sticky-control {
    display: flex;
    width: 100%;
    min-height: 32px;
    justify-content: space-between;
}

.qm-sticky-control__label {
    min-width: 0;
    line-height: 1.5;
}

.qm-sticky-control input:focus-visible + .qm-switch-track {
    outline: 2px solid var(--qm-primary, #e91e63);
    outline-offset: 2px;
}

.qm-visibility-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 6px;
}

.qm-visibility-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
}

.qm-visibility-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qm-visibility-option__indicator {
    width: 14px;
    height: 14px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    position: relative;
    flex: 0 0 auto;
}

.qm-visibility-option__indicator::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: inherit;
    background: var(--qm-workbench-accent);
    opacity: 0;
}

.qm-visibility-option input:checked + .qm-visibility-option__indicator {
    border-color: var(--qm-workbench-accent);
}

.qm-visibility-option input:checked + .qm-visibility-option__indicator::after {
    opacity: 1;
}

.qm-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.qm-role-grid__item,
.qm-checkbox-label {
    font-size: 12px;
    color: #4b5563;
}

.qm-level-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qm-stepper-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 6px;
    background: #ffffff;
    color: #4b5563;
}

.qm-level-stepper .qm-tags-input {
    width: 72px;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

.qm-editor-card__footer-note {
    margin-top: 10px;
    text-align: right;
    font-size: 12px;
    color: #9ca3af;
}

.qm-editor-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.qm-editor-panel-heading__icon {
    color: #9ca3af;
    font-size: 14px;
}

.qm-editor-notice-card {
    background: #ffffff;
}

.qm-editor-notice-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.qm-editor-notice-line {
    margin: 0;
    padding-left: 12px;
    position: relative;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.75;
}

.qm-editor-notice-line + .qm-editor-notice-line {
    margin-top: 8px;
}

.qm-editor-notice-line::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #6b7280;
}

.qm-editor-normal-insight__head .qm-settings-title,
.qm-editor-normal-points__head .qm-settings-title {
    font-size: 18px;
}

.qm-editor-normal-insight__badge,
.qm-editor-normal-points__badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 4px;
    background: #fff7e5;
    color: #f59e0b;
    font-size: 12px;
}

.qm-editor-normal-insight__desc,
.qm-editor-normal-points__desc {
    margin: -6px 0 12px;
    font-size: 13px;
    color: #6b7280;
}

.qm-editor-normal-insight__head {
    margin-bottom: 4px;
}

.qm-editor-normal-insight__list {
    display: grid;
    gap: 0;
}

.qm-editor-normal-insight__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--qm-workbench-border-soft);
    background: transparent;
}

.qm-editor-normal-insight__row:first-child {
    padding-top: 6px;
    border-top: 0;
}

.qm-editor-normal-insight__row > span {
    font-size: 15px;
    color: #374151;
}

.qm-editor-normal-insight__row strong {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.qm-editor-normal-insight__value {
    display: grid;
    gap: 4px;
    min-width: 0;
    text-align: right;
}

.qm-editor-normal-insight__value small,
.qm-editor-normal-insight__checks {
    font-size: 12px;
    color: #9ca3af;
}

.qm-editor-normal-insight__value--inline {
    display: flex;
    align-items: center;
}

.qm-editor-normal-insight__checks {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

.qm-editor-normal-points__checks {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.qm-normal-points__action {
    width: 100%;
    margin-top: 18px;
    background: #f8fafc;
}

.qm-settings-section-download,
.qm-settings-section-points {
    padding: 8px;
}

.qm-editor-bottom-bar {
    left: 50%;
    right: auto;
    bottom: 18px;
    width: fit-content;
    max-width: calc(100vw - 36px);
    transform: translateX(-50%);
}

.qm-editor-bottom-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.qm-editor-bottom-bar__meta {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.qm-editor-bottom-bar__group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.qm-editor-bottom-bar__group--time {
    padding-left: 18px;
    border-left: 1px solid var(--qm-workbench-border);
}

.qm-editor-bottom-bar__caption {
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
}

.qm-editor-bottom-bar__radio-group {
    display: flex;
    align-items: center;
    gap: 18px;
}

.qm-editor-bottom-bar__radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
}

.qm-editor-bottom-bar__radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qm-editor-bottom-bar__radio-dot {
    width: 16px;
    height: 16px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    position: relative;
}

.qm-editor-bottom-bar__radio-dot::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: inherit;
    background: var(--qm-workbench-accent);
    opacity: 0;
}

.qm-editor-bottom-bar__radio input:checked + .qm-editor-bottom-bar__radio-dot {
    border-color: var(--qm-workbench-accent);
}

.qm-editor-bottom-bar__radio input:checked + .qm-editor-bottom-bar__radio-dot::after {
    opacity: 1;
}

.qm-editor-bottom-bar__time-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 6px;
    background: #ffffff;
}

.qm-editor-bottom-bar__time-wrap i {
    color: #6b7280;
    font-size: 14px;
}

.qm-editor-bottom-bar__time {
    width: 172px;
    min-height: 34px;
    border: none;
    background: transparent;
    padding: 0;
    font-size: 13px;
}

.qm-editor-bottom-bar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.qm-editor-bottom-bar .qm-btn {
    min-width: 122px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
}

.qm-btn-primary {
    background: linear-gradient(135deg, #ff4f8b 0%, #ff2d6f 100%);
    box-shadow: none;
}

.qm-btn-primary:hover {
    background: linear-gradient(135deg, #ff5d93 0%, #ff3b78 100%);
}

.qm-btn-secondary {
    background: #ffffff;
    border: 1px solid var(--qm-workbench-border);
}

/* 连续工作区 */
.qm-post-editor .qm-editor-main {
    border: 1px solid var(--qm-workbench-border);
    border-top: 1px solid var(--qm-workbench-border);
    border-radius: 14px;
    background: var(--qm-workbench-surface);
    box-shadow: none;
    overflow: clip;
    padding: 0 !important;
}

.qm-post-editor .qm-editor-header,
.qm-post-editor .qm-editor-content {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
}

.qm-post-editor .qm-editor-header {
    margin-bottom: 0;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--qm-workbench-border-soft);
}

.qm-post-editor .qm-editor-content {
    margin: 0;
}

.qm-post-editor .qm-editor-header__type-pages {
    margin-bottom: 0;
}

.qm-post-editor .qm-editor-sidebar-left .qm-settings-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--qm-workbench-border);
    border-radius: 14px;
    background: var(--qm-workbench-surface);
    box-shadow: none;
    overflow: hidden;
    padding: 0;
}

.qm-post-editor .qm-settings-panel-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    padding: 0;
}

.qm-post-editor .qm-editor-sidebar-left .qm-settings-section {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.qm-post-editor .qm-settings-panel-right > .qm-settings-section {
    border: 1px solid var(--qm-workbench-border);
    border-radius: 10px;
    background: var(--qm-workbench-surface);
    box-shadow: var(--qm-workbench-shadow);
    padding: 14px;
    margin: 0;
}

.qm-post-editor .qm-settings-panel-right > .qm-settings-section:first-child {
    border-top: 1px solid var(--qm-workbench-border);
}

.qm-post-editor .qm-editor-sidebar-left .qm-editor-card__head,
.qm-post-editor .qm-settings-panel-right .qm-editor-panel-heading,
.qm-post-editor .qm-settings-panel-right .qm-settings-title {
    margin-bottom: 14px;
}

.qm-post-editor .qm-settings-panel-right .qm-section-title {
    align-items: center;
}

.qm-post-editor .qm-settings-panel-right .qm-section-title .qm-settings-title,
.qm-post-editor .qm-settings-panel-right .qm-section-title .qm-section-title__text {
    margin: 0 !important;
}

.qm-post-editor .qm-editor-notice-card {
    background: #fbfcfe;
}

.qm-post-editor .qm-editor-notice-card .qm-section-title {
    --qm-section-title-accent: var(--qm-primary, var(--qm-workbench-accent));
    --qm-section-title-soft: var(--qm-primary-rgba-08, rgba(255, 79, 139, 0.08));
}

.qm-post-editor .qm-editor-notice-card .qm-settings-title,
.qm-post-editor .qm-editor-notice-card .qm-editor-notice-line {
    color: var(--qm-primary, var(--qm-workbench-accent));
}

.qm-post-editor .qm-editor-notice-card .qm-editor-notice-line::before {
    background: var(--qm-primary, var(--qm-workbench-accent));
}

@media (max-width: 1199.98px) {
    .qm-post-editor-wrapper {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .qm-editor-workspace-bar {
        gap: 12px;
        flex-wrap: wrap;
    }

    .qm-editor-workspace-bar__publish {
        width: auto;
    }
}

@media (max-width: 991.98px) {
    .qm-editor-page-main {
        padding-top: 32px !important;
    }

    .qm-editor-workspace-bar {
        margin: 10px 12px 0;
        border-radius: 12px;
        position: static;
        flex-wrap: wrap;
    }

    .qm-editor-workspace-bar__publish {
        width: 100%;
        justify-content: stretch;
    }

    .qm-editor-workspace-bar__switcher {
        order: 3;
        width: 100%;
        margin-left: 0;
    }

    .qm-editor-workspace-bar__type-switcher .qm-article-type-switcher__trigger {
        width: 100%;
    }

    .qm-editor-workspace-bar__publish .qm-editor-bottom-bar__actions {
        width: 100%;
    }

    .qm-editor-workspace-bar__publish .qm-btn {
        width: 100%;
    }

    .qm-editor-workspace-bar__type-switcher .qm-article-type-switcher__tabs {
        flex-wrap: wrap;
        gap: 8px;
    }

    .qm-editor-workspace-bar__type-switcher .qm-article-type-switcher__tab,
    .qm-editor-workspace-bar__type-switcher .qm-article-type-switcher__tab + .qm-article-type-switcher__tab {
        margin-left: 0;
        border-radius: 8px;
    }

    .qm-post-editor-wrapper {
        gap: 12px;
        grid-template-columns: 1fr;
        margin: 0 12px !important;
        padding-top: 12px;
    }

    .qm-post-editor .qm-editor-sidebar,
    .qm-post-editor .qm-settings-panel-right {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .qm-normal-overview {
        grid-template-columns: 1fr;
    }

    .qm-post-editor .qm-editor-main {
        border: 1px solid var(--qm-workbench-border);
        border-radius: 14px;
    }

    .qm-editor-toolbar {
        padding: 10px 12px;
    }

    .qm-editor-toolbar__row {
        gap: 6px;
    }

    .qm-visibility-options,
    .qm-role-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qm-download-link-modal__url-row,
    .qm-download-link-modal__grid--two {
        grid-template-columns: 1fr;
    }

    .qm-editor-bottom-bar {
        left: 12px;
        right: 12px;
        width: auto;
        transform: none;
    }

    .qm-editor-bottom-bar__inner,
    .qm-editor-bottom-bar__meta,
    .qm-editor-bottom-bar__group {
        flex-direction: column;
        align-items: stretch;
    }

    .qm-editor-bottom-bar__group--time {
        padding-left: 0;
        border-left: 0;
    }

    .qm-editor-bottom-bar__actions {
        width: 100%;
    }

    .qm-editor-bottom-bar .qm-btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .qm-post-editor {
        padding-left: 12px;
        padding-right: 12px;
    }

    .qm-featured-image {
        gap: 10px;
    }

    .qm-editor-header-main__title-row {
        gap: 8px;
    }

    .qm-featured-image-panel {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .qm-featured-image-panel__actions {
        width: 100%;
        justify-content: flex-start;
    }

    .qm-download-card__toggle-row,
    .qm-download-resource-head,
    .qm-download-link-item__summary-head {
        align-items: stretch;
        flex-direction: column;
    }

    .qm-download-link-item__summary-actions {
        justify-content: flex-start;
    }

    .qm-download-link-add {
        width: auto;
    }

    .qm-editor-toolbar__row--primary,
    .qm-editor-toolbar__row--secondary,
    .qm-editor-toolbar__row--tertiary {
        flex-wrap: wrap;
    }

    .qm-toolbar-btn--text {
        padding: 0 8px;
    }

    .qm-visibility-options,
    .qm-role-grid {
        grid-template-columns: 1fr;
    }
}

.qm-submit-btn {
    padding: 0.625rem 1.5rem;
    font-weight: 600;
}

/* 错误页面 */
.qm-editor-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 2rem;
}

.qm-error-icon {
    font-size: 4rem;
    color: #ef4444;
    margin-bottom: 1.5rem;
}

.qm-error-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: #1a1a1a;
}

.qm-error-message {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 2rem;
}

/* 响应式设计 */
@media (max-width: 991.98px) {
    .qm-editor-sidebar-left,
    .qm-editor-sidebar-right {
        position: static;
        margin-top: 1.5rem;
    }
    
    .qm-editor-sidebar {
        position: static;
        max-height: none;
        top: auto;
    }
    
    .qm-post-editor-wrapper {
        flex-direction: column;
    }

    .qm-normal-editor-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .qm-editor-header {
        padding: 1rem;
    }

    .qm-editor-header-main {
        padding: 1rem;
    }

    .qm-editor-header-main__meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .qm-post-title-input {
        font-size: 1.375rem;
    }
    
    .qm-title-counter {
        font-size: 12px;
    }
    
    .qm-editor-toolbar {
        padding: 0.5rem;
    }
    
    .qm-editor-body {
        padding: 1rem;
        min-height: 300px;
    }
    
    .qm-editor-sidebar {
        padding: 0;
    }

    .qm-btn {
        width: 100%;
        justify-content: center;
    }

    .qm-editor-bottom-bar {
        bottom: max(10px, env(safe-area-inset-bottom));
        width: min(100% - 16px, 420px);
        max-width: min(100% - 16px, 420px);
    }

    .qm-editor-bottom-bar__inner {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.5rem;
        border-radius: var(--qm-radius-lg-soft);
        width: 100%;
    }

    .qm-editor-bottom-bar__schedule {
        display: grid;
        grid-template-columns: auto minmax(96px, 1fr);
        gap: 0.5rem;
    }

    .qm-editor-bottom-bar__label {
        justify-content: center;
    }

    .qm-editor-bottom-bar__select,
    .qm-editor-bottom-bar__time {
        width: 100%;
    }

    .qm-editor-bottom-bar__time {
        grid-column: 1 / -1;
    }

    .qm-editor-bottom-bar__actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .qm-editor-bottom-bar .qm-btn {
        width: 100%;
        padding: 0 0.75rem;
    }

    .qm-normal-editor-chip {
        width: 100%;
        justify-content: center;
    }

    .qm-editor-normal-insight__head,
    .qm-editor-normal-insight__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .qm-editor-normal-insight__row strong {
        text-align: left;
    }
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 间距工具类（替代Tailwind） */
.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.ms-1 {
    margin-left: 0.25rem !important;
}

.ml-1 {
    margin-left: 0.25rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

/* 文本大小工具类 */
.text-3xl {
    font-size: 1.875rem !important;
    line-height: 2.25rem !important;
}

/* 编辑器模态框样式 */
.qm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.qm-modal.active {
    opacity: 1;
    visibility: visible;
}

.qm-modal-content {
    position: relative;
    background: #fff;
    border-radius: var(--qm-radius-window);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.2s;
}

.qm-modal.active .qm-modal-content {
    transform: scale(1);
}

.qm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.qm-modal-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
}

.qm-modal-close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--qm-radius-sm);
    transition: all 0.2s;
}

.qm-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.qm-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.qm-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* 表单组 */
.qm-form-group {
    margin-bottom: 1rem;
}

.qm-form-group:last-child {
    margin-bottom: 0;
}

.qm-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.qm-form-group input[type="text"],
.qm-form-group input[type="url"],
.qm-form-group input[type="number"],
.qm-form-group textarea,
.qm-form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--qm-radius-sm);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.qm-form-group input:focus,
.qm-form-group textarea:focus,
.qm-form-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.qm-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 媒体标签页 */
.qm-media-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.qm-media-tabs::-webkit-scrollbar {
    display: none;
}

.qm-media-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.875rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    margin-bottom: -1px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.qm-media-tab:hover {
    color: #2563eb;
}

.qm-media-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.qm-media-tab-content {
    display: none;
}

.qm-media-tab-content.active {
    display: block;
}

/* 媒体库列表 */
.qm-media-library-toolbar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.qm-media-search {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    padding: 0.45rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: var(--qm-radius-sm);
    font-size: 0.875rem;
    outline: none;
}

.qm-media-search:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.qm-media-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
    max-height: 320px;
    overflow: auto;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--qm-radius-card);
    background: #f9fafb;
}

.qm-media-library-item {
    border: 1px solid transparent;
    background: #fff;
    border-radius: var(--qm-radius-card);
    padding: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 0;
}

.qm-media-library-toolbar .qm-media-refresh {
    flex: 0 0 auto;
    width: auto;
}

.qm-media-library-progress {
    position: relative;
    height: 3px;
    margin: -0.25rem 0 0.75rem;
    overflow: hidden;
    border-radius: var(--qm-radius-pill);
    background: #e5e7eb;
}

.qm-media-library-progress[hidden] {
    display: none;
}

.qm-media-library-progress span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 38%;
    border-radius: inherit;
    background: var(--qm-primary, #ec4899);
    animation: qm-media-library-loading 1s ease-in-out infinite;
}

@keyframes qm-media-library-loading {
    0% {
        transform: translateX(-105%);
    }
    100% {
        transform: translateX(365%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .qm-media-library-progress span {
        width: 100%;
        animation: none;
        opacity: 0.65;
    }

    .qm-upload-progress-fill {
        transition: none;
    }
}

.qm-media-library-item img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    display: block;
    border-radius: var(--qm-radius-card);
}

.qm-media-library-item:hover {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.qm-media-library-item:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.qm-media-library-video {
    display: flex;
    min-width: 0;
    height: 72px;
    padding: 0.5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: var(--qm-radius-card);
    background: #f3f4f6;
    color: #4b5563;
}

.qm-media-library-video i {
    font-size: 1.25rem;
    color: #2563eb;
}

.qm-media-library-video__name {
    display: block;
    width: 100%;
    overflow: hidden;
    color: #374151;
    font-size: 0.75rem;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qm-media-library-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.qm-media-library-status {
    font-size: 0.75rem;
    color: #6b7280;
}

.qm-media-library-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* 上传区域 */
.qm-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: var(--qm-radius-card);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
}

.qm-upload-area:hover {
    border-color: #2563eb;
    background: #f0f4ff;
}

.qm-upload-area.dragover {
    border-color: #2563eb;
    background: #e0e7ff;
}

.qm-upload-area.is-uploading {
    opacity: 0.6;
    pointer-events: none;
}

.qm-upload-progress {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: none;
    box-sizing: border-box;
    width: min(340px, calc(100vw - 32px));
    padding: 14px 16px 15px;
    flex-direction: column;
    gap: 11px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--qm-radius-card);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14), 0 6px 18px rgba(15, 23, 42, 0.08);
}

.qm-upload-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.qm-upload-progress-label {
    min-width: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
}

.qm-upload-progress-text {
    flex: 0 0 auto;
    color: var(--qm-primary, #ec4899);
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.qm-upload-progress-bar {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: var(--qm-radius-pill);
    background: #e2e8f0;
}

.qm-upload-progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--qm-primary, #ec4899);
    transition: width 0.2s ease;
}

.qm-upload-area i {
    font-size: 2.5rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    display: block;
}

.qm-upload-area p {
    margin: 0.5rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.qm-upload-hint {
    font-size: 0.75rem !important;
    color: #9ca3af !important;
}

/* 链接输入 */
.qm-link-url-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--qm-radius-sm);
    font-size: 0.875rem;
    outline: none;
}

.qm-link-url-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* =========================
 * 暗色模式适配（前端发布页）
 * ========================= */
.dark .qm-editor-header,
.dark .qm-editor-content,
.dark .qm-editor-footer {
    background: var(--qm-bg-dark-800);
    border-color: var(--qm-border-dark-600);
    box-shadow: none;
}

.dark .qm-editor-sidebar {
    background: var(--qm-bg-dark-600);
    border: none;
    box-shadow: none;
}

.dark .qm-editor-main,
.dark .qm-editor-sidebar-left,
.dark .qm-editor-sidebar-right {
    border-color: transparent;
}

.dark .qm-editor-sidebar-left,
.dark .qm-editor-sidebar-right {
    background: var(--qm-bg-dark-600);
}

.dark .qm-settings-panel-right {
    background: transparent;
}

.dark .qm-download-link-item {
    background: var(--qm-bg-dark-700);
}

.dark .qm-download-link-remove,
.dark .qm-download-link-add {
    background: var(--qm-bg-dark-700);
    color: var(--qm-text-secondary);
}

.dark .qm-editor-sidebar,
.dark .qm-settings-panel-right,
.dark .qm-category-list,
.dark .qm-editor-body,
.dark .qm-download-field-row textarea {
    scrollbar-color: rgba(148, 163, 184, 0.18) transparent;
}

.dark .qm-editor-sidebar::-webkit-scrollbar-thumb,
.dark .qm-settings-panel-right::-webkit-scrollbar-thumb,
.dark .qm-category-list::-webkit-scrollbar-thumb,
.dark .qm-editor-body::-webkit-scrollbar-thumb,
.dark .qm-download-field-row textarea::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.16);
}

.dark .qm-editor-sidebar:hover::-webkit-scrollbar-thumb,
.dark .qm-settings-panel-right:hover::-webkit-scrollbar-thumb,
.dark .qm-category-list:hover::-webkit-scrollbar-thumb,
.dark .qm-editor-body:hover::-webkit-scrollbar-thumb,
.dark .qm-download-field-row textarea:hover::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
}

.dark .qm-editor-main {
    background: transparent;
}

.dark .qm-editor-main {
    box-shadow: none;
}

.dark .qm-editor-page-main {
    background: var(--qm-bg-dark-700);
}

.dark .qm-editor-header-main,
.dark .qm-normal-editor-stat,
.dark .qm-editor-normal-insight__row {
    background: var(--qm-bg-dark);
    border-color: var(--qm-border-dark-600);
}

.dark .qm-post-title-input {
    color: var(--qm-text-secondary);
}

.dark .qm-post-title-input::placeholder {
    color: var(--qm-text-lighter);
}

.dark .qm-title-counter {
    background: var(--qm-bg-dark);
    border-color: var(--qm-border-dark-600);
    color: var(--qm-text-muted);
}

.dark .qm-editor-toolbar {
    background: var(--qm-bg-dark-800);
    border-bottom-color: var(--qm-border-dark-600);
}

.dark .qm-toolbar-select,
.dark .qm-tags-input,
.dark .qm-link-url-input,
.dark .qm-form-group input[type="text"],
.dark .qm-form-group input[type="url"],
.dark .qm-form-group input[type="number"],
.dark .qm-form-group textarea,
.dark .qm-form-group select {
    background: var(--qm-bg-dark);
    border-color: var(--qm-border-dark-600);
    color: var(--qm-text-secondary);
}

.dark .qm-toolbar-select:hover,
.dark .qm-tags-input:hover,
.dark .qm-link-url-input:hover {
    border-color: var(--qm-bg-dark-600);
}

.dark .qm-form-group input:focus,
.dark .qm-form-group textarea:focus,
.dark .qm-form-group select:focus,
.dark .qm-link-url-input:focus,
.dark .qm-tags-input:focus,
.dark .qm-toolbar-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.dark .qm-download-file-btn {
    background: rgba(244, 114, 182, 0.12);
    border-color: rgba(244, 114, 182, 0.28);
    color: #f9a8d4;
}

.dark .qm-category-dropdown__trigger,
.dark .qm-category-dropdown__menu,
.dark .qm-category-dropdown__checkbox {
    background: var(--qm-bg-dark);
    border-color: var(--qm-border-dark-600);
}

.dark .qm-category-dropdown__summary,
.dark .qm-category-dropdown__name {
    color: var(--qm-text-secondary);
}

.dark .qm-category-dropdown__option:hover {
    background: var(--qm-bg-dark-600);
}

.dark .qm-category-dropdown__chip {
    background: rgba(244, 114, 182, 0.1);
    border-color: rgba(244, 114, 182, 0.2);
    color: #fbcfe8;
}

.dark .qm-download-file-btn:hover {
    background: rgba(233, 30, 99, 0.16);
    border-color: rgba(244, 114, 182, 0.34);
    color: #f9a8d4;
}

.dark .qm-toolbar-btn {
    background: var(--qm-bg-dark);
    border-color: transparent;
    color: var(--qm-text-secondary);
}

.dark .qm-toolbar-btn:hover {
    background: rgba(244, 114, 182, 0.12);
    border-color: rgba(244, 114, 182, 0.26);
    color: #f9a8d4;
}

.dark .qm-import-progress {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(100, 116, 139, 0.34);
    box-shadow: 0 24px 44px rgba(2, 8, 23, 0.42);
}

.dark .qm-import-progress__title {
    color: var(--qm-text-primary);
}

.dark .qm-import-progress__detail {
    color: var(--qm-text-muted);
}

.dark .qm-import-progress__bar {
    background: rgba(71, 85, 105, 0.7);
}

.dark .qm-editor-body {
    background: var(--qm-bg-dark);
    color: var(--qm-text-dark-secondary);
}

.dark .qm-editor-body :is(p, li, blockquote, figcaption, span, em, b, i, u, small, mark) {
    color: inherit !important;
}

.dark .qm-editor-body :is(h1, h2, h3, h4, h5, h6, strong) {
    color: var(--qm-text-dark-primary) !important;
}

.dark .qm-editor-body blockquote {
    color: var(--qm-text-dark-secondary) !important;
}

.dark .qm-editor-body .qm-video-wrapper,
.dark .qm-editor-body .qm-table-wrapper,
.dark .qm-editor-body .qm-image-wrapper {
    background: rgba(15, 23, 42, 0.28);
}

.dark .qm-editor-body .qm-paid-content {
    border-color: #c45a80;
    background: #2a2028;
    box-shadow: 0 0 0 3px rgba(196, 90, 128, 0.12);
}

.dark .qm-editor-body .qm-paid-content__toolbar {
    border-bottom-color: rgba(244, 114, 182, 0.22);
    background: #38232f;
    color: #f9a8c4;
}

.dark .qm-editor-body .qm-paid-content__pay-tabs {
    background: rgba(244, 114, 182, 0.16);
}

.dark .qm-editor-body .qm-paid-content__pay-tab {
    color: #f9a8c4;
}

.dark .qm-editor-body .qm-paid-content__pay-tab.is-active {
    background: #ec6f9a;
    color: #fff;
}

.dark .qm-editor-body .qm-paid-content__price-label,
.dark .qm-editor-body .qm-paid-content__body {
    color: #f3d5e0 !important;
}

.dark .qm-editor-body .qm-paid-content__unit {
    color: #f9a8c4;
}

.dark .qm-editor-body .qm-paid-content__price-value {
    border-color: rgba(244, 114, 182, 0.40);
    background: #21191f;
    color: #f9a8c4 !important;
}

.dark .qm-editor-body .qm-paid-content__label {
    color: #fff !important;
}

@media (max-width: 640px) {
    .qm-editor-body .qm-paid-content {
        min-height: 200px;
        padding: 82px 12px 14px;
    }

    .qm-editor-body .qm-paid-content__toolbar {
        flex-wrap: wrap;
        gap: 7px;
        min-height: 72px;
        padding: 7px 44px 7px 7px;
    }
}

.dark .qm-editor-body:empty:before {
    color: var(--qm-text-lighter);
}

.dark .qm-editor-body.qm-drag-over {
    background: rgba(37, 99, 235, 0.12);
    border-color: #60a5fa;
}

.dark .qm-settings-section {
    border-color: var(--qm-border-dark-600);
    background: var(--qm-bg-dark-800);
    border-bottom: none;
}

.dark .qm-post-editor .qm-editor-sidebar-left .qm-settings-panel {
    border-color: var(--qm-border-dark-600);
    background: var(--qm-bg-dark-800);
}

.dark .qm-post-editor .qm-editor-sidebar-actions {
    background: var(--qm-bg-dark-800);
    border-top-color: var(--qm-border-dark-600);
}

.dark .qm-post-editor .qm-editor-sidebar-left .qm-settings-section {
    background: transparent;
}

.dark .qm-editor-card__toggle {
    background: transparent;
}

.dark .qm-editor-card__toggle:hover,
.dark .qm-editor-card--accordion.is-open .qm-editor-card__toggle {
    background: rgba(148, 163, 184, 0.06);
}

.dark .qm-editor-card__toggle-title,
.dark .qm-editor-card__toggle-icon,
.dark .qm-editor-card__toggle-caret {
    color: var(--qm-text-secondary);
}

.dark .qm-editor-card__toggle-summary {
    color: var(--qm-text-muted);
}

.dark .qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="category"] {
    --qm-sidebar-accent-soft: rgba(59, 130, 246, 0.16);
}

.dark .qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="tag"] {
    --qm-sidebar-accent-soft: rgba(139, 92, 246, 0.16);
}

.dark .qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="featured"] {
    --qm-sidebar-accent-soft: rgba(236, 72, 153, 0.16);
}

.dark .qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="visibility"] {
    --qm-sidebar-accent-soft: rgba(20, 184, 166, 0.16);
}

.dark .qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="sticky"] {
    --qm-sidebar-accent-soft: rgba(239, 68, 68, 0.16);
}

.dark .qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="excerpt"] {
    --qm-sidebar-accent-soft: rgba(245, 158, 11, 0.16);
}

.dark .qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="material-files"] {
    --qm-sidebar-accent-soft: rgba(59, 130, 246, 0.16);
}

.dark .qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="material-scenarios"] {
    --qm-sidebar-accent-soft: rgba(16, 185, 129, 0.16);
}

.dark .qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="material-palette"] {
    --qm-sidebar-accent-soft: rgba(139, 92, 246, 0.16);
}

.dark .qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="software-features"] {
    --qm-sidebar-accent-soft: rgba(249, 115, 22, 0.16);
}

.dark .qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="software-changelog"] {
    --qm-sidebar-accent-soft: rgba(59, 130, 246, 0.16);
}

.dark .qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="software-install"] {
    --qm-sidebar-accent-soft: rgba(16, 185, 129, 0.16);
}

.dark .qm-post-editor .qm-editor-sidebar-left [data-qm-sidebar-section="software-faqs"] {
    --qm-sidebar-accent-soft: rgba(139, 92, 246, 0.16);
}

.dark .qm-settings-section-download {
    border: none;
    background: transparent;
}

.dark .qm-settings-section-download .qm-settings-title {
    border-bottom: none;
    background: transparent;
    color: var(--qm-text-secondary);
}

.dark .qm-settings-title {
    color: var(--qm-text-secondary);
}

.dark .qm-download-link-modal .qm-tags-input::placeholder {
    color: var(--qm-text-muted);
}

.dark .qm-download-link-modal__divider-text {
    color: var(--qm-text-muted);
}

.dark .qm-download-link-modal__divider::before,
.dark .qm-download-link-modal__divider::after {
    background: rgba(148, 163, 184, 0.14);
}

.dark .qm-settings-label {
    color: var(--qm-text-secondary);
}

.dark .qm-settings-desc {
    color: var(--qm-text-muted);
}

.dark .qm-category-item:hover {
    background: var(--qm-bg-dark-600);
}

.dark .qm-tag-item {
    background: rgba(244, 114, 182, 0.14);
    color: #f9a8d4;
}

.dark .qm-tag-remove {
    background: rgba(249, 168, 212, 0.14);
}

.dark .qm-tag-remove:hover {
    background: rgba(249, 168, 212, 0.22);
}

.dark .qm-featured-image-preview {
    background: var(--qm-bg-dark);
    border-color: var(--qm-border-dark-600);
}

.dark .qm-featured-image-preview:hover {
    border-color: #f472b6;
}

.dark .qm-featured-image-placeholder {
    color: var(--qm-text-muted);
}

.dark .qm-autosave-status {
    color: var(--qm-text-muted);
}

.dark .qm-btn-secondary {
    background: var(--qm-bg-dark-600);
    color: var(--qm-text-secondary);
}

.dark .qm-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.dark .qm-normal-editor-stat__label,
.dark .qm-editor-header-main__eyebrow {
    color: var(--qm-text-muted);
}

.dark .qm-normal-editor-stat__value,
.dark .qm-editor-normal-insight__row strong,
.dark .qm-editor-normal-insight__badge {
    color: var(--qm-text-primary);
}

.dark .qm-normal-editor-stat__meta,
.dark .qm-editor-header-main__hint,
.dark .qm-editor-normal-insight__desc,
.dark .qm-editor-normal-insight__hint {
    color: var(--qm-text-muted);
}

.dark .qm-normal-editor-chip,
.dark .qm-editor-normal-insight__badge {
    background: rgba(244, 114, 182, 0.12);
    border-color: rgba(244, 114, 182, 0.22);
    color: #f9a8d4;
}

.dark .qm-media-library-grid {
    background: var(--qm-bg-dark);
    border-color: var(--qm-border-dark-600);
}

.dark .qm-media-library-item {
    background: var(--qm-bg-dark-800);
}

.dark .qm-media-library-video {
    background: var(--qm-bg-dark);
    color: var(--qm-text-muted);
}

.dark .qm-media-library-video i {
    color: #60a5fa;
}

.dark .qm-media-library-video__name {
    color: var(--qm-text-secondary);
}

.dark .qm-media-library-progress {
    background: rgba(255, 255, 255, 0.12);
}

.dark .qm-upload-progress {
    border-color: var(--qm-border-dark-600);
    background: var(--qm-bg-dark-800);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

.dark .qm-upload-progress-label {
    color: var(--qm-text-primary);
}

.dark .qm-upload-progress-bar {
    background: rgba(255, 255, 255, 0.12);
}

.dark .qm-media-search {
    background: var(--qm-bg-dark);
    border-color: var(--qm-border-dark-600);
    color: var(--qm-text-secondary);
}

.dark .qm-media-library-status,
.dark .qm-media-library-empty {
    color: var(--qm-text-muted);
}

.dark .qm-modal-content {
    background: var(--qm-bg-dark-800);
}

.dark .qm-modal-header {
    border-bottom-color: var(--qm-border-dark-600);
}

.dark .qm-modal-title {
    color: var(--qm-text-secondary);
}

.dark .qm-modal-close {
    color: var(--qm-text-muted);
}

.dark .qm-modal-close:hover {
    background: var(--qm-bg-dark-600);
    color: var(--qm-text-secondary);
}

.dark .qm-modal-footer {
    background: var(--qm-bg-dark);
    border-top-color: var(--qm-border-dark-600);
}

.dark .qm-form-group label {
    color: var(--qm-text-secondary);
}

.dark .qm-media-tabs {
    border-bottom-color: var(--qm-border-dark-600);
}

.dark .qm-media-tab {
    color: var(--qm-text-muted);
}

.dark .qm-media-tab:hover {
    color: #60a5fa;
}

.dark .qm-media-tab.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

.dark .qm-upload-placeholder {
    background: var(--qm-bg-dark);
    border-color: var(--qm-border-dark-600);
}

.dark .qm-upload-placeholder-content {
    color: var(--qm-text-muted);
}

.dark .qm-upload-placeholder-content i {
    color: #60a5fa;
}

.dark .qm-upload-area {
    border-color: var(--qm-border-dark-600);
    background: var(--qm-bg-dark);
}

.dark .qm-upload-area:hover {
    border-color: #60a5fa;
    background: rgba(37, 99, 235, 0.12);
}

.dark .qm-upload-area.dragover {
    border-color: #60a5fa;
    background: rgba(37, 99, 235, 0.18);
}

.dark .qm-upload-area i {
    color: var(--qm-text-lighter);
}

.dark .qm-upload-area p {
    color: var(--qm-text-muted);
}

.dark .qm-upload-hint {
    color: var(--qm-text-lighter) !important;
}

@media (max-width: 640px) {
    .qm-import-progress {
        top: auto;
        right: 10px;
        left: 10px;
        bottom: 20px;
        width: auto;
        padding: 12px 13px 13px;
    }

    .qm-import-progress__title {
        font-size: 13px;
    }

    .qm-import-progress__detail {
        font-size: 11px;
    }

    .qm-import-progress__percent {
        min-width: 38px;
        font-size: 16px;
    }

    .qm-import-progress__bar {
        height: 6px;
    }
}
