/* Main-app code surfaces share one opaque background owner in both themes.
 * Covers Quill, detail/reader, AI streamed/wrapped answers, converter/source previews and tool outputs.
 * Inline code badges are deliberately outside this block policy; guest browser documents have their own CSS.
 * Quill 工具栏的「代码块」按钮同样是 .ql-code-block（<button>），要排除，否则它一直顶着代码块的深色底。
 */
:root body.kb-paper-app :is(pre, .code-block-wrapper, .ql-code-block-container, .ql-code-block:not(button), .ql-syntax, .editor-code-block, .editor-content-code-block) {
    background: var(--kb-code-block-background, linear-gradient(135deg, #1a202c 0%, #2d3748 100%)) !important;
    color: var(--kb-code-block-foreground, #e2e8f0);
}

/* These selectors also beat the editor's legacy theme-specific !important line backgrounds.
 * No token spans are selected: diff/addition markers and syntax colors remain meaningful.
 */
:root body.kb-paper-app :is(.code-block-wrapper, .ql-code-block-container) :is(.code-block-wrapper, .ql-code-block-container, pre, code, .code-scroll-container, .ql-code-block, .ql-syntax, .editor-code-block, .editor-content-code-block),
:root body.kb-paper-app pre code {
    background: transparent !important;
}
