/* 与 admin-front EditorialCodePreview.vue 的高亮预览保持一致。 */
.editorial-content code {
    padding: 2px 6px;
    border-radius: 3px;
    background: #f5f5f5;
    color: #c7254e;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 14px;
}

.editorial-content pre {
    position: relative;
    box-sizing: border-box;
    max-width: 100%;
    margin: 1em 0;
    padding: 18px 20px;
    overflow-x: auto;
    border: 1px solid #24364e;
    border-radius: 4px;
    background: #172438;
    color: #e2e8f0;
    font: 13px/22px Consolas, Monaco, monospace;
    text-align: left;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    tab-size: 4;
}

.editorial-content pre code {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    white-space: inherit;
    word-break: inherit;
    overflow-wrap: inherit;
}

.editorial-content .content-code-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    margin: 16px 0;
    overflow: hidden;
    border-radius: 5px;
    background: #172438;
    color: #e2e8f0;
    text-align: left;
}

.editorial-content .content-code-head {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 12px;
    height: 38px;
    padding: 0 14px;
    background: #1e2e45;
    color: #aabbd1;
    font-size: 12px;
    line-height: normal;
    white-space: normal;
}

.editorial-content .content-code-copy {
    flex-shrink: 0;
    padding: 4px 8px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #c5d4ea;
    font: inherit;
    cursor: pointer;
}

.editorial-content .content-code-copy:hover { background: #2a3a50; }
.editorial-content .content-code-copy:focus-visible { outline: 2px solid #8bc9f2; outline-offset: 2px; }

.editorial-content .content-code-scroll {
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    min-height: 0;
    max-height: 430px;
    padding: 16px 0;
    overflow: auto;
    font: 13px/22px Consolas, Monaco, monospace;
    tab-size: 4;
}

.editorial-content .content-code-numbers {
    flex-shrink: 0;
    padding: 0 14px;
    border-right: 1px solid #2a3a50;
    color: #667f9f;
    font: inherit;
    text-align: right;
    user-select: none;
}

.editorial-content .content-code-numbers span { display: block; }

.editorial-content .content-code-scroll > pre {
    flex: 1 0 auto;
    /* Override saved editor sizing/scrolling and keep code aligned with line numbers. */
    height: auto !important;
    max-height: none !important;
    max-width: none;
    margin: 0;
    padding: 0 16px !important;
    overflow: visible !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    font: inherit;
}

.editorial-content .content-code-block .hljs-keyword,
.editorial-content .content-code-block .hljs-selector-tag,
.editorial-content .content-code-block .hljs-literal { color: #ff9eaf; }
.editorial-content .content-code-block .hljs-string,
.editorial-content .content-code-block .hljs-attr { color: #a9d99c; }
.editorial-content .content-code-block .hljs-number,
.editorial-content .content-code-block .hljs-variable,
.editorial-content .content-code-block .hljs-template-variable { color: #e7bb88; }
.editorial-content .content-code-block .hljs-title,
.editorial-content .content-code-block .hljs-built_in,
.editorial-content .content-code-block .hljs-name { color: #8bc9f2; }
.editorial-content .content-code-block .hljs-comment { color: #8395ad; }
