/* SupDoc ???????? */

/* ============================================
   ?????? - ??????
   ============================================ */
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
    transition: none !important;
    animation: none !important;
}

/* ============================================
   CSS ???? - ????????
   ============================================ */
:root {
    /* ???? */
    --sidebar-width: 280px;
    --toc-width: 250px;
    --header-height: 50px;
    --top-nav-height: 50px;
    /* 左侧顶级大类（language-package / 一级 category）行高，供中栏分享栏、右栏 TOC 头对齐 */
    --sidebar-topcat-height: 50px;

    /* ========== ???? ========== */
    
    /* ??? */
    --docs-primary: #0d6efd;
    --docs-primary-hover: #0b5ed7;
    --docs-primary-active: #0a58ca;
    --docs-primary-light: rgba(13, 110, 253, 0.1);
    --docs-primary-lighter: rgba(13, 110, 253, 0.15);
    --docs-primary-rgb: 13, 110, 253;

    /* ??? */
    --docs-bg-body: #ffffff;
    --docs-bg-secondary: #f8f9fa;
    --docs-bg-tertiary: #f1f3f5;
    --docs-bg-hover: #e9ecef;
    --docs-bg-code: #f1f3f4;
    --docs-bg-code-block: #f8f9fa;
    --docs-bg-highlight: #e7f1ff;

    /* ??? */
    --docs-border-primary: #e9ecef;
    --docs-border-secondary: #dee2e6;
    --docs-border-light: #f1f3f5;
    --docs-border-color: #e9ecef;
    --docs-divider-color: rgba(15, 23, 42, 0.09);

    /* ??? */
    --docs-text-primary: #212529;
    --docs-text-secondary: #495057;
    --docs-text-muted: #6c757d;
    --docs-text-light: #adb5bd;

    /* ??? */
    --docs-link: #0d6efd;
    --docs-link-hover: #0b5ed7;

    /* ???? */
    --docs-code-text: #d73a49;
    --docs-code-bg: #f1f3f4;

    /* ??? */
    --docs-success: #28a745;
    --docs-success-bg: #d4edda;
    --docs-success-text: #155724;
    --docs-warning: #ffc107;
    --docs-warning-bg: #fff3cd;
    --docs-warning-text: #856404;
    --docs-danger: #dc3545;
    --docs-danger-bg: #f8d7da;

    /* ?? */
    --docs-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --docs-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --docs-shadow-md: 0 2px 4px rgba(0, 0, 0, 0.1);
    --docs-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
    --docs-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.1);

    /* ??? */
    --docs-scrollbar-track: #f2f2f2;
    --docs-scrollbar-thumb: rgba(0, 0, 0, 0.3);
    --docs-scrollbar-thumb-hover: #333;
    --docs-scrollbar-arrow: #767eea;

    /* ???? */
    --docs-favorite: #ffc107;
    --docs-favorite-hover: #ffca2c;

    /* ?? / ??????????? */
    --docs-canvas-bg: #f5f7f9;
    --docs-surface-border: rgba(15, 23, 42, 0.08);
    --docs-surface-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 6px 20px rgba(15, 23, 42, 0.06);
    --docs-surface-shadow-md: 0 2px 4px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.08);
}

/* ============================================
   CSS ???? - ????
   ============================================ */
[data-theme="dark"] {
    /* ??? */
    --docs-primary: #6366f1;
    --docs-primary-hover: #818cf8;
    --docs-primary-active: #a5b4fc;
    --docs-primary-light: rgba(99, 102, 241, 0.1);
    --docs-primary-lighter: rgba(99, 102, 241, 0.15);
    --docs-primary-rgb: 99, 102, 241;

    /* ??? */
    --docs-bg-body: #0f172a;
    --docs-bg-secondary: #1e293b;
    --docs-bg-tertiary: #334155;
    --docs-bg-hover: #334155;
    --docs-bg-code: #1e293b;
    --docs-bg-code-block: #0f172a;
    --docs-bg-highlight: #1e3a5f;

    /* ??? */
    --docs-border-primary: #334155;
    --docs-border-secondary: #475569;
    --docs-border-light: #475569;
    --docs-border-color: #334155;
    --docs-divider-color: rgba(148, 163, 184, 0.16);

    /* ??? */
    --docs-text-primary: #cbd5e1;
    --docs-text-secondary: #b8c2d0;
    --docs-text-muted: #7c8ba0;
    --docs-text-light: #5a6b7f;

    /* ??? */
    --docs-link: #6366f1;
    --docs-link-hover: #818cf8;

    /* ???? */
    --docs-code-text: #f87171;
    --docs-code-bg: #1e293b;

    /* ??????????? */
    --docs-success-bg: #155724;
    --docs-success-text: #d4edda;
    --docs-warning-bg: #856404;
    --docs-warning-text: #fff3cd;

    /* ?? */
    --docs-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --docs-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --docs-shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3);
    --docs-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4);
    --docs-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.3);

    /* ??? */
    --docs-scrollbar-track: #1e293b;
    --docs-scrollbar-thumb: rgba(255, 255, 255, 0.3);
    --docs-scrollbar-thumb-hover: #94a3b8;

    /* ?? / ??????????? */
    --docs-canvas-bg: #0b1220;
    --docs-surface-border: rgba(148, 163, 184, 0.14);
    --docs-surface-shadow: 0 2px 8px rgba(0, 0, 0, 0.28), 0 8px 24px rgba(0, 0, 0, 0.18);
    --docs-surface-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.22);
}

/* ============================================
   ????
   ============================================ */
* {
    box-sizing: border-box;
}
::-webkit-scrollbar-track-piece{width:12px;background-color:var(--docs-scrollbar-track)}
::-webkit-scrollbar{width:8px;height:6px}
::-webkit-scrollbar-thumb{height:50px;background-color:var(--docs-scrollbar-thumb); border-radius: 1000px;}
::-webkit-scrollbar-thumb:hover{background:var(--docs-scrollbar-thumb-hover)}
/* ?????????? */
::-webkit-scrollbar-button:single-button {
    display: block;
    background-color: var(--docs-bg-hover);
    border-radius: 1000px;
    height: 12px;
    width: 8px;
    border: none;
}
::-webkit-scrollbar-button:single-button:vertical:decrement {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="10"><polygon points="4,2 1,7 7,7" fill="%23767eea"/></svg>') center no-repeat;
    background-size: 60% 60%;
}
::-webkit-scrollbar-button:single-button:vertical:increment {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="10"><polygon points="1,3 7,3 4,8" fill="%23767eea"/></svg>') center no-repeat;
    background-size: 60% 60%;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--docs-scrollbar-thumb-hover);
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--docs-bg-body);
    margin: 0;
    padding: 0;
    color: var(--docs-text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] {
    color-scheme: dark;
}

/* ============================================
   ???????
   ============================================ */
.docs-top-nav {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--top-nav-height);
    min-height: var(--top-nav-height);
    background: var(--docs-bg-body);
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-sizing: border-box;
    box-shadow: var(--docs-shadow-sm);
    transition: left 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.docs-top-nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.docs-top-nav-link {
    color: var(--docs-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    transition: color 0.15s ease;
}

.docs-top-nav-link:hover {
    color: var(--docs-primary);
}

.docs-top-nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.docs-quick-start {
    color: var(--docs-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.docs-quick-start:hover {
    color: var(--docs-primary);
}

.docs-search-btn {
    background: var(--docs-bg-secondary);
    border: 1px solid var(--docs-border-primary);
    color: var(--docs-text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.docs-search-btn:hover {
    background-color: var(--docs-bg-hover);
    border-color: var(--docs-border-secondary);
    color: var(--docs-primary);
}

.docs-search-btn i {
    font-size: 1rem;
}

.search-btn-text {
    display: inline-block;
}

.search-btn-shortcut {
    display: inline-block;
    background: rgba(var(--docs-primary-rgb), 0.05);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--docs-text-muted);
}

.docs-theme-toggle,
.docs-code-toggle {
    background: none;
    border: none;
    color: var(--docs-text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
}

.docs-theme-toggle:hover,
.docs-code-toggle:hover {
    background-color: var(--docs-bg-secondary);
    color: var(--docs-primary);
}

.docs-user-center-btn {
    background: none;
    border: none;
    color: var(--docs-text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.docs-user-center-btn:hover {
    background-color: var(--docs-bg-secondary);
    color: var(--docs-primary);
}

.docs-user-center-btn i {
    font-size: 1rem;
}

.docs-user-center-btn-primary {
    background-color: var(--docs-bg-secondary);
    color: var(--docs-text-primary);
    border: 1px solid var(--docs-border);
}

.docs-user-center-btn-primary:hover {
    background-color: var(--docs-bg-tertiary, var(--docs-bg-secondary));
    color: var(--docs-primary);
}

/* ?????????????????? */
.docs-top-nav.docs-top-nav-full {
    left: 0;
    padding: 0 2rem;
}

/* Logo ?? */
.docs-top-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--docs-text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    transition: color 0.15s ease;
}

.docs-top-nav-logo:hover {
    color: var(--docs-primary);
}

.docs-top-nav-logo .site-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--logo-icon-color, var(--docs-primary, #2563eb));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.docs-top-nav-logo .site-logo-icon i {
    font-size: 1.05rem;
    color: #fff;
    line-height: 1;
}

.docs-top-nav-logo span {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.docs-top-nav-logo .site-logo-img,
.sidebar-logo .site-logo-img {
    display: block;
    height: 28px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.sidebar-logo .site-logo-img-sidebar {
    height: 32px;
    max-width: 160px;
}

/* ??????????????????? */
.docs-page-content {
    padding-top: var(--top-nav-height);
    min-height: 100vh;
}

/* ??????????????? */
.docs-page-footer {
    margin-top: auto;
    padding: 16px 24px;
    border-top: 1px solid var(--docs-border-primary);
    background-color: var(--docs-bg-body);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.docs-page-footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   ????????
   ============================================ */
.docs-layout {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   ????????
   ============================================ */
.docs-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--docs-bg-secondary);
    transition: background-color 0.3s ease;
}

/* ============================================
   ???????
   ============================================ */
.docs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--docs-bg-body);
    z-index: 1003;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--docs-scrollbar-thumb) transparent;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.docs-sidebar::-webkit-scrollbar {
    width: 2px;
}

.docs-sidebar::-webkit-scrollbar-track-piece {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--docs-scrollbar-thumb);
    border-radius: 1000px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--docs-scrollbar-thumb-hover);
}

.docs-sidebar.sidebar-collapsed {
    transform: translateX(-100%);
}

.docs-sidebar-header {
    height: var(--top-nav-height);
    min-height: var(--top-nav-height);
    padding: 0 1rem;
    background: var(--docs-bg-body);
    position: sticky;
    top: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0;
    width: 100%;
    min-height: 0;
    text-decoration: none;
    color: var(--docs-text-primary);
    transition: color 0.3s ease;
}

.sidebar-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--logo-icon-color, var(--docs-primary, #2563eb));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
}

.sidebar-logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--docs-text-primary);
    transition: color 0.3s ease;
}

.sidebar-search {
    margin-top: 1rem;
    position: relative;
}

/* ???????? */
.sidebar-search-input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 0.75rem;
    border: 1px solid var(--docs-border-primary);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: var(--docs-bg-body);
    color: var(--docs-text-primary);
}

.sidebar-search-input:focus {
    outline: none;
    border-color: var(--docs-primary);
    box-shadow: 0 0 0 3px rgba(var(--docs-primary-rgb), 0.1);
}

.sidebar-search-input::placeholder {
    color: var(--docs-text-light);
}

/* ????????? */
.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    animation: searchModalFadeIn 0.2s ease-out;
    backdrop-filter: blur(4px);
}

@keyframes searchModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.search-modal {
    background: var(--docs-bg-body);
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 640px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: searchModalSlideIn 0.3s ease-out;
    border: 1px solid var(--docs-border-primary);
}

@keyframes searchModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.search-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--docs-border-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-modal-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-modal-icon {
    position: absolute;
    left: 1rem;
    color: var(--docs-text-muted);
    font-size: 1.25rem;
    pointer-events: none;
    z-index: 1;
}

.search-modal-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    border: 2px solid var(--docs-border-primary);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: var(--docs-bg-body);
    color: var(--docs-text-primary);
}

.search-modal-input:focus {
    outline: none;
    border-color: var(--docs-primary);
    box-shadow: 0 0 0 3px rgba(var(--docs-primary-rgb), 0.1);
}

.search-modal-shortcut {
    position: absolute;
    right: 0.75rem;
    font-size: 0.75rem;
    color: var(--docs-text-light);
    background: var(--docs-bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid var(--docs-border-primary);
    font-family: monospace;
    pointer-events: none;
}

.search-modal-close {
    background: none;
    border: none;
    color: var(--docs-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
}

.search-modal-close:hover {
    background-color: var(--docs-bg-secondary);
    color: var(--docs-text-primary);
}

.search-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.search-results-header {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--docs-border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--docs-bg-secondary);
    flex-shrink: 0;
}

.search-results-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--docs-text-secondary);
}

.search-results-count {
    font-size: 0.75rem;
    color: var(--docs-text-muted);
    background: var(--docs-bg-hover);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.search-results-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    max-height: calc(80vh - 200px);
}

.search-result-item {
    border-bottom: 1px solid var(--docs-border-light);
    transition: background-color 0.15s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected {
    background-color: var(--docs-bg-secondary);
}

.search-result-item.selected {
    background-color: var(--docs-bg-highlight);
}

.search-result-link {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}

.search-result-link:hover {
    text-decoration: none;
}

.search-result-icon {
    margin-right: 0.75rem;
    color: var(--docs-text-muted);
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 500;
    color: var(--docs-text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.4;
    font-size: 0.875rem;
}

.search-result-title mark {
    background: var(--docs-warning-bg);
    color: var(--docs-warning-text);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.search-result-desc {
    font-size: 0.75rem;
    color: var(--docs-text-muted);
    line-height: 1.4;
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-desc mark {
    background: var(--docs-warning-bg);
    color: var(--docs-warning-text);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.search-result-meta {
    font-size: 0.6875rem;
    color: var(--docs-text-light);
    margin-top: 0.375rem;
}

.search-results-footer {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--docs-border-primary);
    background: var(--docs-bg-secondary);
    flex-shrink: 0;
}

.search-hint {
    font-size: 0.6875rem;
    color: var(--docs-text-muted);
}

.search-loading,
.search-empty,
.search-error {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--docs-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.search-loading i,
.search-empty i,
.search-error i {
    font-size: 1.5rem;
    color: var(--docs-text-light);
}

.search-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.search-error {
    color: var(--docs-danger);
}

.search-error i {
    color: var(--docs-danger);
}


/* ??????????? CSS ?????? */

/* ???????? */
@media (max-width: 768px) {
    .docs-search-btn .search-btn-text {
        display: none;
    }
    
    .docs-search-btn .search-btn-shortcut {
        display: none;
    }
    
    .docs-search-btn {
        padding: 0.5rem;
        min-width: 2.5rem;
        justify-content: center;
    }
    
    .search-modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 0.5rem;
    }
    
    .search-modal-header {
        padding: 1rem;
    }
    
    .search-modal-input {
        font-size: 0.875rem;
        padding: 0.75rem 2.5rem 0.75rem 2.5rem;
    }
    
    .search-results-header,
    .search-results-footer {
        padding: 0.5rem 1rem;
    }
    
    .search-result-link {
        padding: 0.625rem 1rem;
    }
    
    .search-result-title {
        font-size: 0.875rem;
    }
    
    .search-result-desc {
        font-size: 0.6875rem;
    }
}


.sidebar-search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--docs-text-muted);
    font-size: 1rem;
}

.sidebar-search-shortcut {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--docs-text-light);
    background: var(--docs-bg-body);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    border: 1px solid var(--docs-border-primary);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--docs-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.sidebar-toggle,
.docs-menu-toggle,
.docs-sidebar-close {
    background: none;
    border: none;
    font-size: 1.35rem;
    color: var(--docs-text-muted);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.sidebar-toggle:hover,
.docs-menu-toggle:hover,
.docs-sidebar-close:hover {
    background-color: var(--docs-bg-hover);
    color: var(--docs-text-secondary);
}

.docs-menu-toggle {
    display: none;
}

.docs-sidebar-close {
    display: none;
    margin-left: auto;
}

.docs-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1004;
    opacity: 0;
    transition: opacity 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}

.docs-sidebar-overlay.is-visible {
    display: block;
    opacity: 1;
}

body.docs-sidebar-open {
    overflow: hidden;
    touch-action: none;
}

/* ============================================
   ??????
   ============================================ */

.nav-item {
    position: relative;
}

.nav-item.category > .nav-link .arrow {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    color: var(--docs-text-muted);
}

.nav-item.category.expanded > .nav-link .arrow {
    transform: rotate(90deg);
}

/* ???????? */
.nav-item.language-package > .nav-link .nav-icon-topcat {
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* ???????????? */
.nav-icon-subdir {
    font-size: 0.92rem !important;
    color: var(--docs-text-muted);
    opacity: 0.9;
    flex-shrink: 0;
}

.nav-item.category > .nav-link {
    font-weight: 500;
}

.nav-item.doc > .nav-link {
    font-weight: 400;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.nav-list .nav-item.doc,
.nav-sub-list .nav-item.doc {
    margin-bottom: 0;
}

/* ?????? */
.nav-item.language-package > .nav-link {
    font-weight: 600;
    color: var(--docs-text-primary);
    height: var(--sidebar-topcat-height);
    min-height: var(--sidebar-topcat-height);
}

.nav-item.language-package.expanded > .nav-link {
    background-color: var(--docs-primary-light);
    color: var(--docs-primary);
}

.nav-item.language-package > .nav-link .arrow {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    color: var(--docs-text-muted);
}

.nav-item.language-package.expanded > .nav-link .arrow {
    transform: rotate(90deg);
}

/* ???????????? */
.nav-item.language-package > .nav-sub-list {
    background-color: var(--docs-bg-secondary);
    border-left: 2px solid var(--docs-border-primary);
    margin-left: 0;
    padding-left: 0.5rem;
}

.nav-sub-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    overflow: hidden;
    background-color: var(--docs-bg-secondary);
    border-left: 2px solid var(--docs-border-primary);
    margin-left: 1rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ???????????????/?? */
.nav-sub-list {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.nav-sub-list .nav-link {
    padding-left: 1.5rem;
    font-size: 0.85rem;
    color: var(--docs-text-muted);
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* ???????? */
.nav-sub-list .nav-sub-list {
    margin-left: 0.75rem;
    border-left-width: 1px;
}

.nav-sub-list .nav-sub-list .nav-link {
    padding-left: 1.25rem;
    font-size: 0.8125rem;
}

.nav-icon-subdir {
    opacity: 0.88;
}

.nav-sub-list .nav-link:hover {
    color: var(--docs-primary);
    background-color: var(--docs-bg-highlight);
}

.nav-sub-list .nav-link.active {
    color: var(--docs-primary);
    background-color: var(--docs-bg-highlight);
    font-weight: 500;
}

.nav-loading, .nav-empty {
    padding: 0.5rem 1.5rem;
    color: var(--docs-text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.nav-section-empty {
    padding: 0.35rem 0.75rem 0.35rem 2rem;
    list-style: none;
}

.nav-section-empty-inner {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--docs-text-muted);
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-section-empty .bx {
    font-size: 0.875rem;
    flex-shrink: 0;
    opacity: 0.5;
    color: var(--docs-text-muted);
}

.nav-section-empty-text {
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--docs-text-secondary);
}

.docs-breadcrumb {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    font-size: 0.8125rem;
    color: var(--docs-text-muted);
}
.docs-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.docs-breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 0.35rem;
    color: var(--docs-text-muted);
    opacity: 0.7;
}
.docs-breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--docs-text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.docs-breadcrumb-item a {
    color: var(--docs-text-secondary);
    text-decoration: none;
}

.docs-breadcrumb-link:hover,
.docs-breadcrumb-item a:hover {
    color: var(--docs-primary);
    text-decoration: none;
}

.docs-breadcrumb-home-icon {
    font-size: 0.9375rem;
    line-height: 1;
    color: var(--docs-text-muted);
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.docs-breadcrumb-link--home:hover .docs-breadcrumb-home-icon {
    color: var(--docs-primary);
}

.category-docs-breadcrumb {
    margin: 0;
    padding: 0;
    border-bottom: none;
}

.category-breadcrumb-row .docs-breadcrumb-list {
    align-items: center;
}
.article-summary {
    margin: 0.5rem 0 1rem;
    font-size: 0.9375rem;
    color: var(--docs-text-secondary);
    line-height: 1.6;
}

/* ?????????????? */
.article-summary-box {
    margin: 0 0 1.5rem;
    border: 1px solid var(--docs-border-primary);
    border-radius: 0.5rem;
    background: var(--docs-bg-body);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.article-summary-box__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--docs-bg-secondary);
    border-bottom: 1px solid var(--docs-border-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--docs-text-muted);
}

.article-summary-box__head i {
    font-size: 1rem;
    color: var(--docs-text-muted);
}

.article-summary-box__label {
    color: var(--docs-text-secondary);
}

.article-summary-box__body {
    padding: 0.875rem 1rem;
    background: var(--docs-bg-body);
}

.article-summary-box__text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--docs-text-secondary);
    word-break: break-word;
}

.docs-article .article-header {
    margin-bottom: 1.25rem;
}

.nav-section-title {
    height: 50px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--docs-text-secondary);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    background-color: var(--docs-bg-secondary);
    border-bottom: 1px solid var(--docs-border-primary);
    margin-bottom: 0.5rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.nav-section-title i {
    font-size: 1rem;
    color: var(--docs-text-muted);
    transition: color 0.3s ease;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ???????? */
.nav-list > .nav-item {
    margin-bottom: 0.125rem;
}

/* ?????????? */
.nav-item.category .nav-link {
    color: var(--docs-text-primary);
    transition: color 0.3s ease;
}

.nav-item.doc .nav-link {
    color: var(--docs-text-secondary);
    transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-item.doc .nav-link:hover {
    background-color: var(--docs-bg-tertiary);
}



.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--docs-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    border-radius: 0 0.375rem 0.375rem 0;
    margin-right: 0.5rem;
    cursor: pointer;
    position: relative;
    min-height: 2.25rem;
}

.nav-link:hover {
    background-color: var(--docs-bg-secondary);
    color: var(--docs-primary);
}

.nav-link.active {
    background-color: var(--docs-primary-light);
    color: var(--docs-primary);
    font-weight: 500;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--docs-primary);
    border-radius: 0 2px 2px 0;
}

/* ?????????? */
.nav-item.doc .nav-link.active {
    background-color: var(--docs-primary-lighter);
}

.nav-link i {
    margin-right: 0.2rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-link .nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link .nav-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.15s ease;
}

.nav-link.expanded .nav-arrow {
    transform: rotate(90deg);
}

/* ????????????? */
.nav-project {
    margin-bottom: 0.5rem;
}

.nav-project-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--docs-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.15s ease;
    border-radius: 0 0.25rem 0.25rem 0;
    margin-right: 0.5rem;
}

.nav-project-link:hover {
    background-color: var(--docs-bg-secondary);
    color: var(--docs-primary);
    box-shadow: inset 3px 0 0 var(--docs-primary);
}

.nav-project-link i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.nav-docs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    background: var(--docs-bg-secondary);
    margin-left: 1rem;
    border-left: 1px solid var(--docs-border-primary);
    padding-left: 0.5rem;
}

.nav-doc {
    margin: 0.125rem 0;
}

.nav-doc-link {
    display: flex;
    align-items: center;
    padding: 0.2rem;
    padding-left: 1rem;
    color: var(--docs-text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.15s ease;
    border-radius: 0 0.25rem 0.25rem 0;
    margin-right: 0.5rem;
}

.nav-doc-link:hover {
    background-color: var(--docs-bg-hover);
    color: var(--docs-primary);
    box-shadow: inset 3px 0 0 var(--docs-primary);
}

.nav-loading,
.nav-loading-small {
    padding: 1rem 1.5rem;
    color: var(--docs-text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.nav-loading-small {
    padding: 0.5rem 1.5rem;
}

.nav-error,
.nav-error-small {
    padding: 1rem 1.5rem;
    color: var(--docs-danger);
    font-size: 0.875rem;
}

.nav-error-small {
    padding: 0.5rem 1.5rem;
}

/* ============================================
   ????
   ============================================ */
.docs-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-right: var(--toc-width);
    margin-top: var(--top-nav-height);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--top-nav-height));
    background: var(--docs-canvas-bg);
    transition: margin-left 0.3s ease, margin-right 0.3s ease, background-color 0.3s ease;
    max-width: calc(100vw - var(--sidebar-width) - var(--toc-width));
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    min-width: 0;
}

/* ? TOC ????????/TOC ????????????? */
.docs-layout:not(.no-toc):not(.toc-minimized) .docs-main {
    background: var(--docs-bg-body);
}

/* ? TOC ???? */
.docs-layout.no-toc .docs-main {
    margin-right: 0;
    /* ???? TOC??????????????????? */
    max-width: calc(100vw - var(--sidebar-width) - 2rem);
}

.docs-layout.no-toc .docs-toc {
    display: none;
}

/* ????? ? ????????? phpdisk ??????? */
.docs-content.docs-content-detail,
.docs-content:has(.docs-article-detail) {
    background: var(--docs-bg-body);
}

.docs-main > .docs-footer {
    background: var(--docs-bg-body);
    border-top-color: var(--docs-border-primary);
}

.docs-article-detail .docs-breadcrumb {
    margin: 0 0 1.25rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--docs-border-primary);
}

.docs-article-detail .article-header {
    margin-bottom: 0;
}

.audit-preview-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.875rem;
    line-height: 1.5;
}

.audit-preview-banner i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.audit-preview-banner__text {
    flex: 1;
    min-width: 0;
}

.audit-preview-banner__text strong {
    display: block;
    margin-bottom: 0.15rem;
    color: #78350f;
}

.audit-preview-banner__link {
    flex-shrink: 0;
    align-self: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #b45309;
    text-decoration: none;
    white-space: nowrap;
}

.audit-preview-banner__link:hover {
    color: #92400e;
    text-decoration: underline;
}

[data-theme="dark"] .audit-preview-banner {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fcd34d;
}

[data-theme="dark"] .audit-preview-banner__text strong {
    color: #fde68a;
}

[data-theme="dark"] .audit-preview-banner__link {
    color: #fbbf24;
}

@media (prefers-color-scheme: dark) {
    .audit-preview-banner {
        background: rgba(245, 158, 11, 0.12);
        border-color: rgba(245, 158, 11, 0.45);
        color: #fcd34d;
    }
    .audit-preview-banner__text strong {
        color: #fde68a;
    }
    .audit-preview-banner__link {
        color: #fbbf24;
    }
}

.docs-article-detail .article-title {
    font-size: clamp(1.625rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.docs-article-detail .article-meta {
    margin-bottom: 1.75rem;
    padding: 0 0 0.875rem;
    border-bottom: 1px solid var(--docs-border-light);
}

.docs-article-detail .article-stats {
    gap: 1.25rem;
}

.docs-article-detail .article-stat-actions {
    gap: 1rem;
}

.docs-article-detail .article-stat-actions .stat-item-action i {
    font-size: 1.5rem;
}

.docs-article-detail .article-stat-actions .stat-item-action .stat-value {
    font-size: 0.875rem;
    font-weight: 600;
}

.docs-article-detail .stat-item {
    color: var(--docs-text-light);
    font-size: 0.8125rem;
    gap: 0.35rem;
}

.docs-article-detail .stat-item i {
    font-size: 0.9375rem;
    color: var(--docs-text-light);
    opacity: 0.9;
}

.docs-article-detail .stat-value {
    font-weight: 400;
    color: var(--docs-text-muted);
}

.docs-article-detail .stat-item-like.active i,
.docs-article-detail .stat-item-like:hover i {
    color: var(--docs-primary);
    opacity: 1;
}

.docs-article-detail .stat-item-favorite i {
    color: var(--docs-favorite);
    opacity: 1;
}

.docs-article-detail .stat-item-favorite.active i,
.docs-article-detail .stat-item-favorite:hover i {
    color: var(--docs-favorite-hover);
}

.docs-article-detail .stat-item-comment:hover i,
.docs-article-detail .stat-item-comment:focus-visible i {
    color: var(--docs-primary);
    opacity: 1;
}

.docs-article-detail .article-stat-actions .stat-item-report {
    gap: 0;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

.docs-article-detail .stat-item-report:hover i,
.docs-article-detail .stat-item-report:focus-visible i {
    color: var(--docs-primary);
    opacity: 1;
}

.docs-article-detail .article-summary-box {
    margin-bottom: 1.75rem;
}

.docs-article-detail .article-content {
    padding-top: 0.25rem;
}

.docs-article-detail .article-content h2 {
    margin-top: 2rem;
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
}

.docs-article-detail .article-content h3 {
    margin-top: 1.5rem;
}

.docs-content {
    flex: 1;
}

/* ? TOC ????????????? */
.docs-layout.no-toc .article-content,
.docs-layout.no-toc .article-content-rendered {
    max-width: 100%;
    overflow-x: hidden;
}

.docs-layout.no-toc .code-block-wrapper {
    max-width: 100%;
    overflow-x: auto;
}

.docs-layout.no-toc .article-content pre {
    max-width: 100%;
    width: 100%;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    box-sizing: border-box;
}

.docs-layout.no-toc .article-content pre code {
    max-width: none;
    width: auto;
    min-width: 100%;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    box-sizing: content-box;
}

/* ?????? */
.docs-header {
    background: var(--docs-bg-body);
    border-bottom: 1px solid var(--docs-border-primary);
    padding: 1rem 0;
    position: sticky;
    top: 70px;
    z-index: 999;
    box-shadow: var(--docs-shadow-md);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.docs-actions {
    display: flex;
    gap: 0.5rem;
}

.docs-actions .btn {
    white-space: nowrap;
}

/* ============================================
   ?????
   ============================================ */
.docs-content {
    flex: 1;
    padding: 1rem 2rem;
    background: var(--docs-bg-body);
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    /* ?????????? */
    min-width: 0;
    transition: background-color 0.3s ease;
}

/* ??????? */
.breadcrumb-nav {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--docs-border-primary);
    transition: border-color 0.3s ease;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--docs-text-muted);
    line-height: 1.5;
    transition: color 0.3s ease;
}

.breadcrumb-item.active {
    color: var(--docs-text-primary);
}

.breadcrumb-item.active .breadcrumb-text {
    font-weight: 500;
    color: var(--docs-text-primary);
    padding-left: 0.5rem;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    color: var(--docs-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    gap: 0.25rem;
    margin-left: 3px;
}

.breadcrumb-link:hover {
    color: var(--docs-primary);
    text-decoration: none;
}

.breadcrumb-link i {
    font-size: 1rem;
    margin-right: 0.125rem;
    flex-shrink: 0;
}

.breadcrumb-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    /* ????????????? */
    text-transform: none;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    font-size: 0.75rem;
    color: var(--docs-text-light);
    flex-shrink: 0;
}

/* ?????? */
@media (max-width: 768px) {
    .breadcrumb-nav {
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .breadcrumb-item {
        font-size: 0.8125rem;
    }
    
    .breadcrumb-text {
        max-width: 120px;
    }
    
    .breadcrumb-separator {
        margin: 0 0.375rem;
        font-size: 0.6875rem;
    }
}

.docs-article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--docs-border-primary);
}

.article-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--docs-text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--docs-border-primary);
    flex-wrap: wrap;
    transition: border-color 0.3s ease;
    width: 100%;
}

.article-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.article-stat-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--docs-text-muted);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.stat-item i {
    font-size: 1.1rem;
    color: var(--docs-text-muted);
    transition: color 0.3s ease;
}

.stat-value {
    font-weight: 500;
    color: var(--docs-text-primary);
    transition: color 0.3s ease;
}

.stat-item-action {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font: inherit;
    line-height: inherit;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.stat-item-action:hover {
    opacity: 0.85;
}

.stat-item-action:focus-visible {
    outline: 2px solid var(--docs-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.stat-item-like i {
    color: var(--docs-text-muted);
    transition: color 0.2s ease;
}

.stat-item-like.active,
.stat-item-like.active i,
.stat-item-like:hover i {
    color: var(--docs-primary);
}

.stat-item-favorite i {
    color: var(--docs-favorite);
    transition: color 0.2s ease;
}

.stat-item-favorite.active i,
.stat-item-favorite:hover i {
    color: var(--docs-favorite-hover);
}

.stat-item-comment {
    cursor: pointer;
}

.stat-item-comment:hover i,
.stat-item-comment:focus-visible i {
    color: var(--docs-primary);
    opacity: 1;
}

.article-stat-actions .stat-item-action {
    gap: 0.35rem;
    font-size: 1rem;
}

.article-stat-actions .stat-item-action i {
    font-size: 1.625rem;
    line-height: 1;
}

.article-stat-actions .stat-item-action .stat-value {
    font-size: 0.9375rem;
    font-weight: 600;
    min-width: 1.25rem;
}

.article-stat-actions .stat-item-report {
    gap: 0;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

.article-stat-actions .stat-item-report:hover i,
.article-stat-actions .stat-item-report:focus-visible i {
    color: var(--docs-primary);
    opacity: 1;
}

@media (max-width: 576px) {
    .article-stat-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }
}

.article-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--docs-border-secondary);
    background: var(--docs-bg-body);
    color: var(--docs-text-muted);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: var(--docs-bg-secondary);
    border-color: var(--docs-text-light);
    color: var(--docs-text-primary);
}

.btn-action i {
    font-size: 1rem;
}

.btn-action.active {
    background: var(--docs-primary);
    border-color: var(--docs-primary);
    color: #fff;
}

.btn-action.active:hover {
    background: var(--docs-primary-hover);
    border-color: var(--docs-primary-active);
}

.btn-favorite.active {
    background: var(--docs-favorite);
    border-color: var(--docs-favorite);
    color: var(--docs-text-primary);
}

.btn-favorite.active:hover {
    background: var(--docs-favorite-hover);
    border-color: var(--docs-favorite-hover);
}

.btn-like.active {
    background: var(--docs-primary);
    border-color: var(--docs-primary);
    color: #fff;
}

.btn-like.active:hover {
    background: var(--docs-primary-hover);
    border-color: var(--docs-primary-active);
}

/* ??????????/?????? */
.article-navigation {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--docs-border-primary);
}

.article-navigation[hidden] {
    display: none !important;
}

.article-navigation .nav-item {
    flex: 1 1 0;
    min-width: 0;
    display: block;
}

.article-navigation .nav-item.nav-prev {
    text-align: left;
}

.article-navigation .nav-item.nav-next {
    text-align: right;
}

.article-navigation .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--docs-border-primary);
    border-radius: 0.5rem;
    background: var(--docs-bg-secondary);
    color: var(--docs-text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-navigation .nav-item.nav-prev .nav-link {
    flex-direction: row;
}

.article-navigation .nav-item.nav-next .nav-link {
    flex-direction: row-reverse;
}

.article-navigation .nav-link:hover {
    background: var(--docs-bg-hover);
    border-color: var(--docs-text-light);
    text-decoration: none;
    color: var(--docs-primary);
}

.article-navigation .nav-link i {
    font-size: 1.5rem;
    color: var(--docs-text-muted);
    flex-shrink: 0;
}

.article-navigation .nav-link:hover i {
    color: var(--docs-primary);
}

.article-navigation .nav-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
}

.article-navigation .nav-label {
    font-size: 0.75rem;
    color: var(--docs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-navigation .nav-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--docs-text-primary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-navigation .nav-link:hover .nav-title {
    color: var(--docs-primary);
}

.article-navigation .nav-item:empty {
    display: none;
}

/* 文章上一篇/下一篇 - 小屏保持同一行 */
@media (max-width: 768px) {
    .article-navigation {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.5rem;
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
    
    .article-navigation .nav-item {
        flex: 1 1 0;
        min-width: 0;
    }
    
    .article-navigation .nav-link {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .article-navigation .nav-link i {
        font-size: 1.1rem;
    }
    
    .article-navigation .nav-label {
        font-size: 0.6875rem;
    }
    
    .article-navigation .nav-title {
        font-size: 0.8125rem;
    }
}

/* ??????????? CSS ?????? */

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-content {
    line-height: 1.7;
    color: var(--docs-text-primary);
    max-width: 100%;
    width: 100%;
    /* ?????????? */
    box-sizing: border-box;
    /* ????????????????????? */
    overflow-x: hidden;
    overflow-y: visible;
    /* ?????????? */
    min-width: 0;
    transition: color 0.3s ease;
}

/* ????????????? */
.article-content-rendered {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    /* ????????????????????? */
    overflow-x: hidden;
    overflow-y: visible;
    min-width: 0;
}

.article-content-rendered img.sd-viewer-image {
    cursor: zoom-in;
}

.viewer-container {
    z-index: 1085 !important;
}
.viewer-container.viewer-fixed {
    z-index: 2015 !important;
}

/* Viewer.js 底部：文件名与操作栏分两行居中 */
.viewer-footer {
    text-align: center;
}
.viewer-title {
    display: block;
    max-width: 90%;
    margin: 0 auto 5px;
    text-align: center;
}
.viewer-toolbar {
    width: auto;
    min-width: 280px;
    display: inline-block;
    margin: 0 auto 5px;
    padding: 3px 0;
    list-style: none;
    text-align: left;
}

/* ???? */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6,
.article-content-rendered h1,
.article-content-rendered h2,
.article-content-rendered h3,
.article-content-rendered h4,
.article-content-rendered h5,
.article-content-rendered h6 {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--docs-text-primary);
    line-height: 1.3;
    transition: color 0.3s ease;
    /* 锚点定位：顶栏 + 置顶分享栏 */
    scroll-margin-top: calc(var(--top-nav-height) + var(--sidebar-topcat-height) + 0.75rem);
}

.article-content h1 {
    font-size: 1.3rem;
    border-bottom: 2px solid var(--docs-border-primary);
    padding-bottom: 0.5rem;
    transition: border-color 0.3s ease;
}

.article-content h2 {
    font-size: 1.2rem;
    border-bottom: 1px solid var(--docs-border-primary);
    padding-bottom: 0.25rem;
    transition: border-color 0.3s ease;
}

.article-content h3 {
    font-size: 1.1rem;
}

.article-content h4 {
    font-size: 1.05rem;
}

.article-content h5 {
    font-size: 1.02rem;
}

.article-content h6 {
    font-size: 1rem;
}

/* ??????? */
.article-content p {
    margin-bottom: 1rem;
    text-align: justify;
    color: inherit;
}

.article-content blockquote {
    border-left: 4px solid var(--docs-primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--docs-text-muted);
    font-style: italic;
    background: var(--docs-bg-secondary);
    padding: 1rem 1.5rem;
    border-radius: 0 0.25rem 0.25rem 0;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ???? */
.article-content code {
    background: var(--docs-code-bg);
    color: var(--docs-code-text);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    transition: background-color 0.2s ease, color 0.2s ease, border 0.2s ease;
}

/* ?? code ???????? */
.article-content code.code-copy-enabled {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.article-content code.code-copy-enabled:hover {
    background-color: var(--docs-bg-highlight);
}

.article-content code.code-copy-copied {
    background-color: var(--docs-success-bg) !important;
    color: var(--docs-success-text) !important;
    border: 1px solid var(--docs-success);
}

.article-content pre {
    background: var(--docs-bg-code-block);
    border: 1px solid var(--docs-border-primary);
    padding: 1rem;
    padding-top: 2.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    overflow-y: visible;
    max-width: 100%;
    width: 100%;
    /* ????????? */
    min-width: 0;
    margin: 0;
    box-shadow: var(--docs-shadow-inset);
    line-height: 1.5;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    box-sizing: border-box;
    /* ????????????? */
    -webkit-overflow-scrolling: touch;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    max-width: none;
    width: max-content;
    min-width: 100%;
    white-space: pre;
    display: block;
    /* ??? overflow????? pre ???? */
    word-break: normal;
    overflow-wrap: normal;
    box-sizing: content-box;
}

/* ?????????????????? */
.article-content pre code * {
    max-width: none;
    word-break: normal;
    overflow-wrap: normal;
    white-space: pre;
}

/* ??????? */
.code-block-wrapper {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0;
    overflow-x: auto;
    overflow-y: visible;
    /* ????????????? */
    box-sizing: border-box;
    /* ???????????? */
    min-width: 0;
}

/* ???????? */
.code-lang-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.75rem;
    background: var(--docs-primary-light);
    color: var(--docs-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 5;
    pointer-events: none;
    user-select: none;
}

.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--docs-bg-body);
    border: 1px solid var(--docs-border-primary);
    border-radius: 0.25rem;
    font-size: 0.8rem;
    color: var(--docs-text-secondary);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    display: flex !important;
    align-items: center;
    gap: 0.25rem;
    z-index: 10000 !important;
    box-shadow: var(--docs-shadow-md);
    white-space: nowrap;
    pointer-events: auto;
    visibility: visible !important;
}

/* hover ??????? */
.code-block-wrapper.show-copy-btn .code-copy-btn,
.code-block-wrapper:hover .code-copy-btn {
    opacity: 1 !important;
}

/* ???? hover ????? */
.code-copy-btn:hover {
    opacity: 1 !important;
    background: var(--docs-bg-body);
    border-color: var(--docs-primary);
    color: var(--docs-primary);
}

.code-copy-btn.copied {
    background: var(--docs-success-bg);
    border-color: var(--docs-success);
    color: var(--docs-success-text);
}

.code-copy-btn i {
    font-size: 1rem;
}

/* ???? */
.article-content ul,
.article-content ol {
    margin: 0.75rem 0;
    padding-left: 0;
    line-height: 1.5;
    list-style: none;
    font-size: 0.95rem;
    color: inherit;
}

.article-content li {
    margin-bottom: 0.2rem;
    padding-left: 0;
    position: relative;
    line-height: 1.5;
    color: inherit;
}

/* ?????? */
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 0;
}

/* ???? */
.article-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    border: 1px solid var(--docs-border-primary);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--docs-shadow-md);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.article-content th,
.article-content td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--docs-border-primary);
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    color: var(--docs-text-secondary);
}

.article-content th {
    background: var(--docs-bg-secondary);
    font-weight: 600;
    color: var(--docs-text-secondary);
}

.article-content tr:nth-child(even) {
    background: var(--docs-bg-secondary);
}

/* ============================================
   Bootstrap ????????
   ============================================ */
.table {
    color: var(--docs-text-primary);
    border-color: var(--docs-border-primary);
}

.table > thead {
    color: var(--docs-text-primary);
}

.table > thead > tr > th {
    background-color: var(--docs-bg-tertiary);
    color: var(--docs-text-primary);
    border-color: var(--docs-border-primary);
}

.table > tbody > tr > td {
    color: var(--docs-text-secondary);
    border-color: var(--docs-border-primary);
    background-color: var(--docs-bg-body);
}

.table-bordered {
    border-color: var(--docs-border-primary);
}

.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > th,
.table-bordered > tbody > tr > td {
    border-color: var(--docs-border-primary);
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: var(--docs-bg-body);
}

.table-striped > tbody > tr:nth-of-type(even) > td {
    background-color: var(--docs-bg-secondary);
}

/* ?? hover ?? */
.table-hover > tbody > tr:hover > td {
    background-color: var(--docs-bg-hover);
}

/* ???????? */
.table strong {
    color: var(--docs-text-primary);
}

/* ??????? emoji */
.table td {
    vertical-align: middle;
}

/* ???? */
.article-content a {
    color: var(--docs-link);
    text-decoration: none;
    transition: color 0.15s ease;
}

.article-content a:hover {
    color: var(--docs-link-hover);
    text-decoration: underline;
}

/* ???? */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
}

/* ???? */
.docs-article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    padding: 2rem 0;
}

.article-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tags-label {
    font-weight: 500;
    color: #495057;
    margin-right: 0.5rem;
}

.article-actions {
    display: flex;
    gap: 0.5rem;
}

/* ???? */
.docs-footer {
    margin-top: auto;
    padding: 14px 24px;
    border-top: 1px solid var(--docs-border-primary);
    background-color: var(--docs-bg-body);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--docs-text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0 0.5rem;
    transition: color 0.3s ease;
}

.footer-left p {
    margin: 0;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-text {
    color: var(--docs-text-muted);
}

.footer-link {
    color: var(--docs-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--docs-primary-hover);
    text-decoration: none;
}

.footer-link-brand {
    color: var(--docs-text-primary);
    font-weight: 500;
}

.footer-link-brand:hover {
    color: var(--docs-primary);
}

.footer-divider {
    color: var(--docs-border-secondary);
    font-size: 0.8125rem;
    user-select: none;
}

.footer-version,
.footer-edition,
.footer-product-badge {
    display: inline-flex;
    align-items: center;
    background: var(--docs-bg-secondary);
    padding: 0.15rem 0.55rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid var(--docs-border-primary);
    color: var(--docs-text-muted);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .docs-footer {
        padding: 12px 16px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
        padding: 0;
    }

    .footer-right {
        justify-content: center;
    }
}

/* ============================================
   ??TOC???
   ============================================ */
.docs-toc {
    position: fixed;
    top: var(--top-nav-height);
    right: 0;
    width: var(--toc-width);
    height: calc(100vh - var(--top-nav-height));
    background: var(--docs-bg-body);
    border-left: 1px solid var(--docs-border-primary);
    z-index: 998;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    box-sizing: border-box;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.toc-header {
    height: var(--sidebar-topcat-height);
    min-height: var(--sidebar-topcat-height);
    padding: 0 0.75rem;
    border-bottom: 1px solid var(--docs-border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-sizing: border-box;
    background: var(--docs-bg-body);
    position: sticky;
    top: 0;
    z-index: 1;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.toc-nav {
    padding: 1rem 0;
}

.toc-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    color: var(--docs-text-secondary);
    flex: 1;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    transition: color 0.3s ease;
}

.toc-toggle-btn {
    background: none;
    border: none;
    color: var(--docs-text-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toc-toggle-btn:hover {
    background-color: var(--docs-bg-secondary);
    color: var(--docs-primary);
}

/* TOC ????? */
.docs-toc.minimized {
    display: none !important;
}

/* ? TOC ????????????? */
.docs-layout.toc-minimized {
    --toc-width: 0px;
}

.docs-layout.toc-minimized .docs-main {
    margin-right: 0;
    max-width: calc(100vw - var(--sidebar-width) - 2rem);
}

/* TOC ?????? TOC ???????????? */
.docs-layout.toc-minimized .article-content,
.docs-layout.toc-minimized .article-content-rendered {
    max-width: 100%;
    overflow-x: hidden;
}

.docs-layout.toc-minimized .code-block-wrapper {
    max-width: 100%;
    overflow-x: auto;
}

.docs-layout.toc-minimized .article-content pre {
    max-width: 100%;
    width: 100%;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    box-sizing: border-box;
}

.docs-layout.toc-minimized .article-content pre code {
    max-width: none;
    width: auto;
    min-width: 100%;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    box-sizing: content-box;
}

/* TOC ????????? */
.toc-minimized-btn {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--docs-primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: var(--docs-shadow-lg);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.toc-minimized-btn:hover {
    background: var(--docs-primary-hover);
    box-shadow: 0 6px 16px rgba(var(--docs-primary-rgb), 0.3);
    transform: scale(1.1);
}

.toc-minimized-btn:active {
    transform: scale(0.95);
}

/* ?????????????? */
@media (max-width: 1200px) {
    .toc-toggle-btn {
        display: none;
    }
    
    .toc-minimized-btn {
        display: none !important;
    }
}


.toc-nav {
    overflow-x: hidden;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}


.toc-link {
    display: block;
    padding: 0.375rem 0.5rem 0.375rem 1rem;
    color: var(--docs-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
    cursor: pointer;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

.toc-link:hover {
    color: var(--docs-primary);
    background-color: var(--docs-bg-secondary);
    border-left-color: var(--docs-primary);
}

.toc-link.active {
    color: var(--docs-primary);
    border-left-color: var(--docs-primary);
    background-color: var(--docs-primary-light);
    font-weight: 500;
}

/* TOC???? */
.toc-level-2 .toc-link { padding-left: 0.5rem; }
.toc-level-3 .toc-link { padding-left: 1rem; }
.toc-level-4 .toc-link { padding-left: 1.5rem; }
.toc-level-5 .toc-link { padding-left: 2rem; }
.toc-level-6 .toc-link { padding-left: 2.5rem; }

/* ============================================
   ?????
   ============================================ */
@media (max-width: 1200px) {
    :root {
        --toc-width: 0px;
    }

    .docs-main {
        margin-right: 0;
    }

    .docs-toc {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
        --mobile-sidebar-width: min(300px, 86vw);
    }

    .docs-menu-toggle {
        display: inline-flex;
    }

    .docs-sidebar-close {
        display: inline-flex;
    }

    .docs-top-nav {
        left: 0;
        padding: 0 0.75rem;
        gap: 0.5rem;
        z-index: 1006;
    }

    .docs-sidebar-overlay {
        top: var(--top-nav-height);
        z-index: 1004;
    }

    .docs-top-nav-left {
        gap: 0.35rem;
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }

    .docs-top-nav-right {
        gap: 0.35rem;
        flex-shrink: 0;
    }

    .docs-top-nav-link {
        display: none;
    }

    .docs-sidebar {
        width: var(--mobile-sidebar-width);
        max-width: 100%;
        transform: translateX(-105%);
        transition: transform 0.28s ease;
        top: var(--top-nav-height);
        height: calc(100% - var(--top-nav-height));
        height: calc(100dvh - var(--top-nav-height));
        z-index: 1005;
        box-shadow: 8px 0 24px rgba(15, 23, 42, 0.18);
        -webkit-overflow-scrolling: touch;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .docs-sidebar.sidebar-collapsed,
    .docs-sidebar:not(.is-open) {
        transform: translateX(-105%);
    }

    .docs-sidebar.is-open {
        transform: translateX(0);
    }

    .docs-sidebar-header {
        padding-right: 0.5rem;
        gap: 0.5rem;
    }

    .docs-main {
        margin-left: 0;
        padding-left: env(safe-area-inset-left, 0);
        padding-right: env(safe-area-inset-right, 0);
    }

    .docs-content,
    .docs-content-detail {
        padding: 1rem 0.85rem 2rem;
        max-width: 100%;
    }

    .docs-header {
        padding: 0.75rem 0;
    }

    .article-title {
        font-size: 1.5rem;
        line-height: 1.3;
        word-break: break-word;
    }

    .article-content {
        font-size: 0.95rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .article-content pre,
    .article-content table {
        max-width: 100%;
        overflow-x: auto;
    }

    .article-content img {
        max-width: 100%;
        height: auto;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
        padding: 0.75rem 0;
    }

    .article-stats {
        flex-wrap: wrap;
        gap: 0.65rem 1rem;
        width: 100%;
    }

    .article-stat-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 1.25rem;
        width: 100%;
        margin-left: 0;
        padding-top: 0.65rem;
        border-top: 1px solid var(--docs-border-primary);
    }

    .article-stat-actions .stat-item-action {
        min-height: 36px;
        padding: 0.2rem 0.15rem;
    }

    .article-stat-actions .stat-item-action i {
        font-size: 1.5rem;
    }

    .article-footer-content {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .docs-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .docs-actions .btn {
        flex: 1;
        min-width: 120px;
    }

    .docs-top-nav.docs-top-nav-full {
        padding: 0 0.75rem;
        left: 0;
    }

    .docs-top-nav.docs-top-nav-full .docs-top-nav-left {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.85rem;
        scrollbar-width: none;
    }

    .docs-top-nav.docs-top-nav-full .docs-top-nav-left::-webkit-scrollbar {
        display: none;
    }

    .docs-top-nav.docs-top-nav-full .docs-top-nav-link {
        display: inline-flex;
        flex-shrink: 0;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .docs-top-nav-logo > span:not(.site-logo-icon) {
        display: none;
    }

    .docs-top-nav-logo .site-logo-icon {
        width: 32px;
        height: 32px;
    }

    .docs-top-nav-logo .site-logo-icon i {
        font-size: 1.15rem;
    }

    .docs-breadcrumb {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .docs-footer .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1rem 0.75rem;
    }

    .doc-comments-section,
    .modal-dialog {
        max-width: calc(100vw - 1.5rem);
    }

    input.form-control,
    select.form-select,
    textarea.form-control {
        font-size: 16px;
    }
}

/* ????????? CSS ????????? @media (prefers-color-scheme: dark) */

/* ============================================
   ?????
   ============================================ */
.scroll-progress {
    position: fixed;
    top: calc(var(--top-nav-height) + 2.5rem);
    right: 10px;
    background: linear-gradient(135deg, var(--docs-primary) 0%, var(--docs-primary-hover) 100%);
    color: #ffffff;
    padding: 0.5rem;
    border-radius: 1000px;
    font-size: 10px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(var(--docs-primary-rgb), 0.3);
    text-align: center;
}

.scroll-progress.visible {
    opacity: 0.5;
    transform: translateY(0);
}

/* ????? */
@media (max-width: 1200px) {
    .scroll-progress {
        right: 1rem;
    }
}

@media (max-width: 768px) {
    .scroll-progress {
        top: calc(var(--top-nav-height) + 0.5rem);
        right: 0.5rem;
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
        min-width: 50px;
    }
}

/* ============================================
   ??????
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--docs-primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--docs-shadow-lg);
    transition: all 0.3s ease;
    z-index: 1001;
}

.scroll-to-top:hover {
    background: var(--docs-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--docs-primary-rgb), 0.3);
}

/* ============================================
   ???????
   ============================================ */
.article-loading,
.error-content,
.welcome-content,
.docs-nav-hint,
.category-landing {
    min-height: 400px;
}

.docs-nav-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.docs-nav-hint-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 480px;
    padding: 2rem 2rem 1.75rem;
    background: var(--docs-bg-secondary, #f9fafb);
    border: 1px dashed var(--docs-border, #e5e7eb);
    border-radius: 16px;
    color: var(--docs-text-muted, #6b7280);
}

.docs-nav-hint-brand {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--docs-border, #e5e7eb);
    width: 100%;
}

.docs-nav-slogan {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--docs-text-primary, #111827);
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.docs-nav-slogan-sub {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--docs-text-muted, #6b7280);
}

.docs-nav-hint-figure {
    width: 88px;
    height: 88px;
    margin-bottom: 1.25rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
}

.docs-nav-hint-doc-icon {
    font-size: 2.75rem;
    line-height: 1;
    color: var(--docs-accent, #2563eb);
}

.docs-nav-hint-text {
    margin: 0 0 0.85rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--docs-text-secondary, #4b5563);
}

.docs-nav-hint-arrow {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--docs-text-muted, #9ca3af);
}

.error-content,
.welcome-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

/* 分类目录页 */
.category-landing {
    padding: 0.25rem 0 2rem;
    animation: fadeIn 0.3s ease-out;
    max-width: 920px;
}

.category-landing--sub {
    padding-top: 0;
}

.category-breadcrumb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--docs-divider-color);
}

.category-breadcrumb-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    flex: 1;
    min-width: 0;
}

.category-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem;
    border: 1px solid var(--docs-border-color);
    border-radius: 8px;
    background: var(--docs-bg-secondary);
    flex-shrink: 0;
}

.category-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--docs-text-muted);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.category-view-btn:hover {
    color: var(--docs-text-primary);
    background: var(--docs-bg-tertiary, #f3f4f6);
}

.category-view-btn.is-active {
    color: var(--docs-primary, #3b82f6);
    background: rgba(59, 130, 246, 0.1);
}

.category-breadcrumb {
    margin-bottom: 0;
}

.category-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--docs-text-muted);
}

.category-breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 0.35rem;
    color: var(--docs-border-color);
}

.category-breadcrumb-link {
    color: var(--docs-text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.category-breadcrumb-link:hover {
    color: var(--docs-primary);
}

.category-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--docs-divider-color);
}

.category-landing--sub .category-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
}

.category-header-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--docs-bg-secondary);
    border: 1px solid var(--docs-border-color);
    border-radius: 10px;
    color: var(--docs-text-secondary);
    font-size: 1.5rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--docs-text-primary);
    margin: 0 0 0.375rem;
    line-height: 1.35;
}

.category-landing--sub .category-title {
    font-size: 1.375rem;
}

.category-desc {
    color: var(--docs-text-secondary);
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.category-count {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.625rem;
    border-radius: 999px;
    background: var(--docs-bg-tertiary, #f3f4f6);
    color: var(--docs-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.category-items {
    margin-top: 0.25rem;
}

.category-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.category-items-panel.is-grid .category-items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.875rem;
}

.category-items-panel.is-grid .category-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 1rem;
    min-height: 118px;
}

.category-items-panel.is-grid .category-item-main {
    width: 100%;
}

.category-items-panel.is-grid .category-item-arrow {
    display: none;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: var(--docs-bg-secondary);
    border: none;
    border-bottom: 1px solid var(--docs-divider-color);
    border-radius: 10px;
    text-decoration: none !important;
    color: var(--docs-text-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.category-item:hover,
.category-item:focus,
.category-item:visited,
.category-item:hover .category-item-title,
.category-item:hover .category-item-meta {
    text-decoration: none !important;
}

.category-landing a:hover {
    text-decoration: none !important;
}

.category-item:hover {
    border-bottom-color: var(--docs-divider-color);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
    color: var(--docs-text-primary);
}

.category-item-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.25rem;
    background: var(--docs-bg-tertiary, #f3f4f6);
    color: var(--docs-text-secondary);
}

.category-item--folder .category-item-icon {
    background: rgba(196, 160, 53, 0.12);
    color: #b8860b;
}

.category-item--doc .category-item-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--docs-primary, #3b82f6);
}

.category-item-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.category-item-title {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.45;
    word-break: break-word;
}

.category-item-meta {
    font-size: 0.75rem;
    color: var(--docs-text-muted);
    line-height: 1.3;
}

.category-item-arrow {
    flex-shrink: 0;
    color: var(--docs-text-muted);
    font-size: 1.125rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.category-item:hover .category-item-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--docs-primary);
}

.category-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.875rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem 1.125rem;
    background: var(--docs-bg-secondary);
    border: 1px solid var(--docs-border-color);
    border-radius: 10px;
    text-decoration: none;
    color: var(--docs-text-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.category-card:hover {
    border-color: var(--docs-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
    color: var(--docs-text-primary);
}

.category-card-icon {
    font-size: 1.375rem;
    color: var(--docs-text-secondary);
}

.category-card--folder .category-card-icon {
    color: #c4a035;
}

.category-card-title {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    word-break: break-word;
}

.category-card-meta {
    font-size: 0.75rem;
    color: var(--docs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.category-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--docs-text-muted);
    background: var(--docs-bg-secondary);
    border: 1px dashed var(--docs-border-color);
    border-radius: 12px;
}

.category-empty .bx {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.category-empty p {
    margin: 0 0 0.5rem;
    color: var(--docs-text-secondary);
}

.category-empty-hint {
    font-size: 0.875rem;
    color: var(--docs-text-muted) !important;
}

[data-theme="dark"] .category-card:hover,
[data-theme="dark"] .category-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .category-item-icon {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .category-item--folder .category-item-icon {
    background: rgba(196, 160, 53, 0.15);
}

[data-theme="dark"] .category-item--doc .category-item-icon {
    background: rgba(59, 130, 246, 0.15);
}

@media (max-width: 767px) {
    .category-landing {
        max-width: none;
    }

    .category-header {
        flex-direction: column;
        gap: 0.875rem;
    }

    .category-items-grid {
        grid-template-columns: 1fr;
    }

    .category-item {
        padding: 0.75rem 0.875rem;
    }

    .category-items-panel.is-grid .category-items-list {
        grid-template-columns: 1fr;
    }

    .category-item-arrow {
        opacity: 0.55;
        transform: translateX(0);
    }
}

.welcome-content h2 {
    color: var(--docs-text-primary);
    margin-bottom: 1rem;
}

.welcome-content .lead {
    color: var(--docs-text-secondary);
}

.welcome-content .bx {
    color: var(--docs-text-muted);
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* ?????? */
[data-theme="dark"] .welcome-content h2 {
    color: var(--docs-text-primary);
}

[data-theme="dark"] .welcome-content .lead {
    color: var(--docs-text-secondary);
}

[data-theme="dark"] .welcome-content .bx {
    color: var(--docs-text-muted);
    opacity: 0.8;
}

[data-theme="dark"] .docs-nav-hint-inner {
    background: var(--docs-bg-secondary, #1f2937);
    border-color: var(--docs-border, #374151);
}

[data-theme="dark"] .docs-nav-hint-brand {
    border-bottom-color: var(--docs-border, #374151);
}

[data-theme="dark"] .docs-nav-slogan {
    color: var(--docs-text-primary, #f3f4f6);
}

[data-theme="dark"] .docs-nav-slogan-sub {
    color: var(--docs-text-muted, #9ca3af);
}

[data-theme="dark"] .docs-nav-hint-figure {
    background: linear-gradient(145deg, #1e3a5f 0%, #1e293b 100%);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.18);
}

[data-theme="dark"] .docs-nav-hint-doc-icon {
    color: #60a5fa;
}

[data-theme="dark"] .docs-nav-hint-text {
    color: var(--docs-text-secondary, #d1d5db);
}

[data-theme="dark"] .docs-nav-hint-arrow {
    color: var(--docs-text-muted, #9ca3af);
}

.article-loading .spinner-border,
.error-content .bx {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* ???? */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-content {
    animation: fadeIn 0.3s ease-out;
}

/* 代码块横向滚动条（跟随主题变量） */
.article-content pre,
.code-block-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--docs-scrollbar-thumb) var(--docs-scrollbar-track);
}

.article-content pre::-webkit-scrollbar,
.code-block-wrapper::-webkit-scrollbar {
    height: 8px;
}

.article-content pre::-webkit-scrollbar-track,
.code-block-wrapper::-webkit-scrollbar-track {
    background: var(--docs-scrollbar-track);
    border-radius: 4px;
}

.article-content pre::-webkit-scrollbar-thumb,
.code-block-wrapper::-webkit-scrollbar-thumb {
    background: var(--docs-scrollbar-thumb);
    border-radius: 4px;
}

.article-content pre::-webkit-scrollbar-thumb:hover,
.code-block-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--docs-scrollbar-thumb-hover);
}

/* ============================================
   Light mode ? frontend depth / hierarchy
   ============================================ */
:root:not([data-theme="dark"]) body,
:root:not([data-theme="dark"]) .docs-layout,
:root:not([data-theme="dark"]) .docs-container {
    background-color: var(--docs-canvas-bg);
}

:root:not([data-theme="dark"]) .docs-top-nav {
    border-bottom: none;
    box-shadow: 0 1px 0 var(--docs-surface-border), 0 2px 10px rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] .docs-top-nav {
    border-bottom: 1px solid var(--docs-border-primary);
    box-shadow: var(--docs-shadow-sm);
}

[data-theme="dark"] .docs-sidebar {
    border-right: 1px solid var(--docs-border-primary);
    box-shadow: var(--docs-shadow-sm);
}

[data-theme="dark"] .docs-sidebar-header {
    border-bottom: 1px solid var(--docs-border-primary);
}

:root:not([data-theme="dark"]) .docs-sidebar {
    border-right: none;
    box-shadow: 1px 0 0 var(--docs-surface-border), 2px 0 12px rgba(15, 23, 42, 0.04);
}

:root:not([data-theme="dark"]) .docs-sidebar-header {
    border-bottom: none;
    box-shadow: 0 1px 0 var(--docs-surface-border);
}

:root:not([data-theme="dark"]) .docs-toc {
    background: var(--docs-bg-body);
    border-left-color: var(--docs-surface-border);
    box-shadow: -1px 0 0 var(--docs-surface-border), -2px 0 12px rgba(15, 23, 42, 0.04);
}

:root:not([data-theme="dark"]) .docs-search-btn {
    background: var(--docs-bg-body);
    border-color: var(--docs-surface-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

:root:not([data-theme="dark"]) .search-modal {
    border-color: var(--docs-surface-border);
    box-shadow: var(--docs-surface-shadow-md);
}

:root:not([data-theme="dark"]) .category-card,
:root:not([data-theme="dark"]) .category-item {
    background: var(--docs-bg-body);
    border-bottom-color: var(--docs-divider-color);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

:root:not([data-theme="dark"]) .category-card:hover,
:root:not([data-theme="dark"]) .category-item:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

:root:not([data-theme="dark"]) .category-header-icon {
    background: var(--docs-bg-body);
    border-color: var(--docs-surface-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

:root:not([data-theme="dark"]) .category-empty {
    background: var(--docs-bg-tertiary);
    border-color: rgba(15, 23, 42, 0.1);
}

:root:not([data-theme="dark"]) .docs-nav-hint-inner {
    background: var(--docs-bg-body);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: var(--docs-surface-shadow);
}

:root:not([data-theme="dark"]) .welcome-content .text-center {
    background: var(--docs-bg-body);
    border: 1px solid var(--docs-surface-border);
    border-radius: 16px;
    box-shadow: var(--docs-surface-shadow);
    max-width: 560px;
    margin: 0 auto;
    padding: 3rem 2rem !important;
}

:root:not([data-theme="dark"]) .footer-version,
:root:not([data-theme="dark"]) .footer-product-badge {
    background: var(--docs-bg-body);
    border-color: var(--docs-surface-border);
}

:root:not([data-theme="dark"]) .docs-page-footer {
    background: var(--docs-bg-body);
    border-top-color: var(--docs-surface-border);
}



@media (max-width: 768px) {
    .docs-content.docs-content-detail,
    .docs-content:has(.docs-article-detail) {
        margin: 0.75rem 0.75rem 0;
        padding: 1.25rem 1rem 1.5rem;
        border-radius: 8px;
    }

    .docs-article-detail .article-title {
        font-size: 1.5rem;
    }
}

/* ???? */
@media print {
    .docs-sidebar,
    .docs-toc,
    .docs-header,
    .docs-article-footer,
    .scroll-to-top {
        display: none !important;
    }

    .docs-main {
        margin: 0 !important;
    }

    .docs-content {
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .article-content {
        font-size: 12pt !important;
        line-height: 1.5 !important;
    }

    .article-content h1,
    .article-content h2,
    .article-content h3,
    .article-content h4,
    .article-content h5,
    .article-content h6 {
        page-break-after: avoid;
    }
}

/* ????? */
.doc-comments-section {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--docs-border-primary);
}
.doc-comments-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--docs-text-primary);
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.doc-comments-count {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--docs-text-muted);
}
.doc-comments-form {
    background: var(--docs-bg-secondary);
    border: 1px solid var(--docs-border-primary);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.doc-comment-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.doc-comment-reply-bar {
    margin-bottom: 0.75rem;
}
.doc-comment-reply-bar-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--docs-primary-light);
    border: 1px solid rgba(var(--docs-primary-rgb), 0.2);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--docs-primary);
}
.doc-comment-reply-bar-text {
    flex: 1;
    min-width: 0;
    font-weight: 500;
}
.doc-comment-reply-cancel {
    border: none;
    background: transparent;
    color: var(--docs-text-muted);
    cursor: pointer;
    padding: 0.15rem;
    line-height: 1;
    font-size: 1.1rem;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}
.doc-comment-reply-cancel:hover {
    color: var(--docs-text-primary);
    background: rgba(var(--docs-primary-rgb), 0.1);
}
.doc-comments-form textarea.form-control {
    background-color: var(--docs-bg-body);
    border: 1px solid var(--docs-border-primary);
    color: var(--docs-text-primary);
    font-size: 0.875rem;
    resize: vertical;
    border-radius: 8px;
}
.doc-comments-form textarea.form-control:focus {
    background-color: var(--docs-bg-body);
    border-color: var(--docs-primary);
    color: var(--docs-text-primary);
    box-shadow: 0 0 0 3px rgba(var(--docs-primary-rgb), 0.15);
}
.doc-comments-form textarea.form-control::placeholder {
    color: var(--docs-text-muted);
}
.doc-comments-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.doc-comments-form-actions.has-captcha {
    justify-content: space-between;
}
.doc-comment-captcha-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}
.doc-comment-captcha-wrap.is-collapsed {
    display: none;
}
.doc-comments-form .doc-comment-captcha-input.form-control {
    width: 5.5rem;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--docs-bg-body);
    border: 1px solid var(--docs-border-primary);
    color: var(--docs-text-primary);
}
.doc-comments-form .doc-comment-captcha-input.form-control:focus {
    background-color: var(--docs-bg-body);
    border-color: var(--docs-primary);
    color: var(--docs-text-primary);
    box-shadow: 0 0 0 3px rgba(var(--docs-primary-rgb), 0.15);
}
.doc-comments-form .doc-comment-captcha-input.form-control::placeholder {
    color: var(--docs-text-muted);
}
.doc-comment-captcha-input {
    width: 5.5rem;
    flex-shrink: 0;
}
.doc-comment-captcha-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--docs-border-primary);
    border-radius: 6px;
    background: var(--docs-bg-tertiary);
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.doc-comment-captcha-box:hover {
    border-color: var(--docs-primary);
}
.doc-comment-captcha-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    background: #f1f5f9;
    border-radius: 4px;
}
[data-theme="dark"] .doc-comment-captcha-box {
    background: var(--docs-bg-tertiary);
    border-color: var(--docs-border-secondary);
}
[data-theme="dark"] .doc-comments-form .doc-comment-captcha-input.form-control {
    background-color: var(--docs-bg-body);
    border-color: var(--docs-border-primary);
    color: var(--docs-text-primary);
}
[data-theme="dark"] .doc-comments-form .doc-comment-captcha-input.form-control:focus {
    background-color: var(--docs-bg-body);
    border-color: var(--docs-primary);
    color: var(--docs-text-primary);
}
[data-theme="dark"] .doc-comments-form .btn-primary {
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}
[data-theme="dark"] .doc-comment-reply-bar-inner {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.28);
    color: var(--docs-primary-hover);
}
[data-theme="dark"] .doc-comment-card {
    background: var(--docs-bg-secondary);
    border-color: var(--docs-border-primary);
}
[data-theme="dark"] .doc-comment-card:hover {
    border-color: var(--docs-border-secondary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .doc-comments-empty {
    background: var(--docs-bg-secondary);
    border-color: var(--docs-border-primary);
}
.doc-comment-captcha-loading {
    font-size: 0.75rem;
    color: var(--docs-text-muted);
}
.doc-comments-form .btn-primary {
    background-color: var(--docs-primary);
    border-color: var(--docs-primary);
    padding: 0.4rem 1.1rem;
    border-radius: 8px;
    flex-shrink: 0;
}
.doc-comments-form .btn-primary:hover {
    background-color: var(--docs-primary-hover);
    border-color: var(--docs-primary-hover);
}
.doc-comments-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.doc-comment-item {
    --comment-depth: 0;
}
.doc-comment-item--reply {
    margin-left: calc(var(--comment-depth) * 1.25rem);
}
.doc-comment-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: var(--docs-bg-secondary);
    border: 1px solid var(--docs-border-light);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.doc-comment-card:hover {
    border-color: var(--docs-border-primary);
    box-shadow: 0 2px 8px rgba(var(--docs-primary-rgb), 0.06);
}
.doc-comment-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--docs-primary), rgba(var(--docs-primary-rgb), 0.7));
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.doc-comment-main {
    flex: 1;
    min-width: 0;
}
.doc-comment-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    font-size: 0.8125rem;
    margin-bottom: 0.4rem;
    color: var(--docs-text-secondary);
}
.doc-comment-author {
    color: var(--docs-text-primary);
    font-size: 0.875rem;
}
.doc-comment-time {
    color: var(--docs-text-muted);
    font-size: 0.75rem;
}
.doc-comment-body {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--docs-text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}
.doc-comment-actions {
    margin-top: 0.5rem;
}
.doc-comment-reply-btn {
    border: none;
    background: none;
    padding: 0.2rem 0.4rem;
    margin-left: -0.4rem;
    font-size: 0.8125rem;
    color: var(--docs-link);
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.doc-comment-reply-btn:hover {
    background: var(--docs-primary-light);
    color: var(--docs-primary);
}
.doc-comment-replies {
    margin-top: 0.5rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--docs-border-light);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.doc-comment-pending {
    font-size: 0.6875rem;
    color: #856404;
    background: #fff3cd;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
}
.doc-comments-empty {
    color: var(--docs-text-muted);
    font-size: 0.875rem;
    text-align: center;
    padding: 2rem 1rem;
    background: var(--docs-bg-secondary);
    border-radius: 10px;
    border: 1px dashed var(--docs-border-primary);
}
.doc-comments-empty i {
    display: block;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}
[data-theme="dark"] .doc-comment-pending {
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.15);
}
@media (max-width: 576px) {
    .doc-comments-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .doc-comment-captcha-wrap {
        min-width: 0;
    }
    .doc-comments-form .btn-primary {
        width: 100%;
    }
    .doc-comment-item--reply {
        margin-left: calc(var(--comment-depth) * 0.75rem);
    }
}
/* ============================================
   ?????????????
   ============================================ */
.doc-text-share-toolbar {
    position: absolute;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem;
    background: var(--docs-bg-body);
    border: 1px solid var(--docs-border-primary);
    border-radius: 10px;
    box-shadow: var(--docs-shadow-md);
    opacity: 0;
    transform: translateY(6px) scale(0.96);
    overflow: hidden;
}

.doc-text-share-toolbar.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-color: rgba(var(--docs-primary-rgb), 0.32);
    box-shadow: var(--docs-shadow-md), 0 0 0 1px rgba(var(--docs-primary-rgb), 0.1);
}

.doc-text-share-toolbar.is-entering {
    animation: doc-text-share-pop 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes doc-text-share-pop {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.doc-text-share-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    background: var(--docs-bg-secondary);
    color: var(--docs-text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.doc-text-share-btn:hover {
    background: var(--docs-primary-light);
    border-color: rgba(var(--docs-primary-rgb), 0.28);
    color: var(--docs-primary);
    box-shadow: 0 2px 8px rgba(var(--docs-primary-rgb), 0.12);
}

.doc-text-share-btn:active {
    background: var(--docs-primary-lighter);
    border-color: rgba(var(--docs-primary-rgb), 0.38);
    color: var(--docs-primary-active);
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(var(--docs-primary-rgb), 0.1);
}

.doc-text-share-btn:focus-visible {
    outline: none;
    border-color: rgba(var(--docs-primary-rgb), 0.45);
    box-shadow: 0 0 0 3px rgba(var(--docs-primary-rgb), 0.18);
}

.doc-text-share-btn i {
    font-size: 1rem;
    color: var(--docs-text-secondary);
    transition: color 0.18s ease;
}

.doc-text-share-btn:hover i,
.doc-text-share-btn:active i {
    color: var(--docs-primary);
}

.doc-text-share-toolbar.is-entering::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 42%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.04) 35%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(255, 255, 255, 0.04) 65%,
        transparent 100%
    );
    transform: skewX(-18deg);
    pointer-events: none;
    animation: doc-text-share-shimmer 1.45s ease-in-out 1;
    z-index: 0;
}

@keyframes doc-text-share-shimmer {
    0% {
        left: -120%;
    }
    100% {
        left: 160%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .doc-text-share-toolbar.is-visible {
        opacity: 1;
        transform: none;
    }

    .doc-text-share-toolbar.is-entering {
        animation: none;
    }

    .doc-text-share-toolbar.is-entering::before {
        animation: none;
        display: none;
    }
}

mark.doc-text-share-mark,
#doc-text-share-target {
    background: rgba(250, 204, 21, 0.45);
    color: inherit;
    padding: 0.05em 0;
    border-radius: 2px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

[data-theme="dark"] .doc-text-share-toolbar {
    background: var(--docs-bg-secondary);
    border-color: var(--docs-border-secondary);
}

[data-theme="dark"] .doc-text-share-toolbar.is-visible {
    border-color: rgba(var(--docs-primary-rgb), 0.4);
    box-shadow: var(--docs-shadow-md), 0 0 0 1px rgba(var(--docs-primary-rgb), 0.14);
}

[data-theme="dark"] .doc-text-share-btn {
    background: var(--docs-bg-tertiary);
    color: var(--docs-text-primary);
}

[data-theme="dark"] .doc-text-share-toolbar.is-entering::before {
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.02) 35%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(255, 255, 255, 0.02) 65%,
        transparent 100%
    );
}

[data-theme="dark"] .doc-text-share-btn:hover {
    background: var(--docs-primary-light);
    border-color: rgba(var(--docs-primary-rgb), 0.35);
    color: var(--docs-primary-hover);
    box-shadow: 0 2px 10px rgba(var(--docs-primary-rgb), 0.2);
}

[data-theme="dark"] .doc-text-share-btn:active {
    background: var(--docs-primary-lighter);
    color: var(--docs-primary-active);
}

[data-theme="dark"] .doc-text-share-btn:hover i,
[data-theme="dark"] .doc-text-share-btn:active i {
    color: var(--docs-primary-hover);
}

[data-theme="dark"] mark.doc-text-share-mark,
[data-theme="dark"] #doc-text-share-target {
    background: rgba(250, 204, 21, 0.35);
    color: #f8fafc;
}

/* ========== 文档详情页分享栏（单行图标 + 滚动置顶） ========== */
.doc-share-bar {
    margin: 0 0 1.125rem;
    padding: 0.375rem 0 0.625rem;
    border-top: 1px solid var(--docs-border-light);
}

.docs-article-detail .doc-share-bar {
    z-index: 1001;
    background: var(--docs-bg-body);
    margin-left: -2rem;
    margin-right: -2rem;
    min-height: var(--sidebar-topcat-height);
    padding: 0 2rem;
    border-top: 1px solid var(--docs-border-light);
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    overflow: visible;
}

.docs-article-detail .doc-share-bar.is-fixed {
    position: fixed;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.docs-article-detail .doc-share-bar.is-stuck {
    min-height: var(--sidebar-topcat-height);
    padding-top: 0;
    padding-bottom: 0;
    border-top: none;
    border-bottom-color: var(--docs-border-primary);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.docs-article-detail .doc-share-bar.is-stuck .doc-share-icons {
    width: 100%;
}

.doc-share-bar-inner {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.doc-share-bar-h5-panel {
    display: contents;
}

.doc-share-bar-h5-toggle {
    display: none;
    align-items: center;
    gap: 0.375rem;
    flex: 1 1 auto;
    min-width: 0;
    height: 2rem;
    padding: 0 0.625rem;
    border: 1px solid var(--docs-border-primary);
    border-radius: 6px;
    background: var(--docs-bg-secondary);
    color: var(--docs-text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.doc-share-bar-h5-toggle i {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.doc-share-bar-h5-toggle-label {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-share-bar-h5-toggle:hover,
.doc-share-bar-h5-toggle:focus-visible {
    background: var(--docs-bg-hover);
    color: var(--docs-text-primary);
    outline: none;
}

.doc-share-stat-actions {
    display: none;
    flex-shrink: 0;
    margin-left: auto;
}

.doc-share-actions-divider {
    display: none;
    flex-shrink: 0;
}

.docs-article-detail .doc-share-bar.is-stuck .doc-share-bar-inner {
    justify-content: space-between;
    gap: 0.625rem;
}

.docs-article-detail .doc-share-bar.is-stuck .doc-share-icons {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
}

.docs-article-detail .doc-share-bar.is-stuck .doc-share-stat-actions {
    display: flex;
    align-items: center;
}

.doc-share-font-size-tools {
    display: inline-flex;
    flex-shrink: 0;
}

.doc-share-font-size-divider {
    display: none;
}

/* 与 .doc-reading-tools 同节点时需更高优先级，避免被后面的 inline-flex 覆盖 */
.doc-reading-tools.doc-share-reading-tools {
    display: none;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.docs-article-detail .doc-share-bar.is-stuck .doc-share-actions-divider {
    display: block;
}

.docs-article-detail .doc-share-stat-actions .article-stat-actions {
    gap: 0.75rem;
    margin-left: 0;
}

.docs-article-detail .doc-share-stat-actions .article-stat-actions .stat-item-action i {
    font-size: 1.25rem;
}

.docs-article-detail .doc-share-stat-actions .article-stat-actions .stat-item-action .stat-value {
    font-size: 0.8125rem;
    font-weight: 600;
}

.docs-article-detail .doc-share-stat-actions .article-stat-actions .stat-item-report i {
    font-size: 1.125rem;
}

.doc-share-bar-spacer {
    display: none;
    width: 100%;
}

.doc-share-icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4375rem;
}

.doc-share-icons-divider {
    width: 1px;
    height: 1.125rem;
    margin: 0 0.25rem;
    background: var(--docs-border-secondary);
    flex-shrink: 0;
    opacity: 0.85;
}

.doc-share-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
}

.doc-share-icon-btn i {
    font-size: 1.125rem;
    line-height: 1;
}

.doc-share-svg-icon {
    width: 1.125rem;
    height: 1.125rem;
    display: block;
    flex-shrink: 0;
}

.doc-share-svg-icon--x {
    width: 1.0625rem;
    height: 1.0625rem;
}

.doc-share-svg-icon--wechat {
    width: 1.25rem;
    height: 1.25rem;
}

.doc-share-svg-icon--weibo {
    width: 1.3125rem;
    height: 1.3125rem;
}

.doc-share-svg-icon--qzone {
    width: 1.25rem;
    height: 1.25rem;
}

.doc-share-icon-btn:hover,
.doc-share-icon-btn:focus-visible {
    transform: translateY(-1px);
    opacity: 0.9;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
    outline: none;
}

.doc-share-icon-letter {
    font-size: 0.8875rem;
    line-height: 1;
    letter-spacing: -0.02em;
}

.doc-share-icon--link {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.doc-share-icon--qrcode {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.18);
}

.doc-share-icon--email {
    background: var(--docs-bg-body);
    color: var(--docs-text-secondary);
    border: 1.5px solid var(--docs-border-secondary);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.doc-share-icon--qrcode .doc-share-svg-icon {
    width: 1.1875rem;
    height: 1.1875rem;
}

.doc-share-icon--native {
    background: var(--docs-bg-body);
    color: var(--docs-text-secondary);
    border: 1.5px solid var(--docs-border-secondary);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.doc-share-icon--whatsapp { background: #25d366; }
.doc-share-icon--telegram { background: #229ed9; }
.doc-share-icon--facebook { background: #1877f2; }
.doc-share-icon--x { background: #000; color: #fff; }
.doc-share-icon--linkedin { background: #0a66c2; }
.doc-share-icon--pinterest { background: #e60023; }
.doc-share-icon--reddit { background: #ff4500; }
.doc-share-icon--threads { background: #000; color: #fff; }
.doc-share-icon--bluesky { background: #0085ff; }
.doc-share-icon--hackernews { background: #ff6600; color: #fff; border: 1px solid rgba(255, 255, 255, 0.85); }
.doc-share-icon--wechat { background: #07c160; }
.doc-share-icon--qq { background: #12b7f5; }
.doc-share-icon--qzone { background: #face00; color: #12b7f5; }
.doc-share-icon--weibo { background: #e6162d; color: #fff; }
.doc-share-icon--tieba { background: #2d58ff; }
.doc-share-icon--douban { background: #007722; }

.doc-share-svg-icon--threads {
    width: 1.125rem;
    height: 1.125rem;
}

.doc-share-svg-icon--hackernews {
    width: 1rem;
    height: 1rem;
}

.doc-share-svg-icon--bluesky {
    width: 1.1875rem;
    height: 1.1875rem;
}

.doc-share-modal .modal-content {
    border: 1px solid var(--docs-border-light);
    border-radius: 12px;
    background-color: var(--docs-bg-body);
    box-shadow: var(--docs-shadow-lg);
    overflow: hidden;
}

.doc-share-modal .modal-header {
    background-color: var(--docs-bg-body);
    border-bottom: 1px solid var(--docs-border-light);
    padding: 0.875rem 1.25rem;
}

.doc-share-modal .modal-title {
    color: var(--docs-text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.doc-share-modal .modal-body {
    background-color: var(--docs-bg-body);
}

#docShareQrModal,
#docShareWechatModal {
    z-index: 1060;
}

body.modal-open .modal-backdrop {
    z-index: 1050;
    background-color: rgba(15, 23, 42, 0.45);
}

[data-theme="dark"] body.modal-open .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.62);
}

.doc-share-modal__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem 1.5rem;
}

.doc-share-qr-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--docs-border-light);
}

.doc-share-qr-wrap--wechat {
    border-color: rgba(7, 193, 96, 0.25);
}

.doc-share-qr-canvas img,
.doc-share-qr-canvas canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.doc-share-qr-hint {
    margin: 0;
    font-size: 0.875rem;
    color: var(--docs-text-muted);
}

[data-theme="dark"] .doc-share-icon--link {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.25);
}

[data-theme="dark"] .doc-share-icon--qrcode {
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.25);
}

[data-theme="dark"] .doc-share-icon--email {
    background: var(--docs-bg-secondary);
    color: var(--docs-text-muted);
    border: 1.5px solid var(--docs-border-secondary);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .doc-share-icon--native {
    background: var(--docs-bg-secondary);
    color: var(--docs-text-muted);
    border: 1.5px solid var(--docs-border-secondary);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .doc-share-modal .modal-content,
[data-theme="dark"] .doc-share-modal .modal-header,
[data-theme="dark"] .doc-share-modal .modal-body {
    background-color: var(--docs-bg-body);
    border-color: var(--docs-border-secondary);
}

[data-theme="dark"] .doc-share-modal .modal-title {
    color: var(--docs-text-primary);
}

[data-theme="dark"] .docs-article-detail .doc-share-bar.is-stuck {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .doc-share-qr-wrap {
    background: #ffffff;
}

@media (max-width: 768px) {
    .docs-article-detail .doc-share-bar {
        margin-left: -0.85rem;
        margin-right: -0.85rem;
        padding-left: 0.85rem;
        padding-right: 0.85rem;
        height: auto;
        min-height: 0;
        padding-top: 0.625rem;
        padding-bottom: 0.625rem;
        align-items: center;
    }

    .docs-article-detail .doc-share-bar.is-stuck {
        height: auto;
        min-height: 0;
        padding-top: 0.375rem;
        padding-bottom: 0.375rem;
        align-items: center;
    }

    .docs-article-detail .doc-share-bar.is-stuck .doc-share-bar-h5-toggle {
        display: inline-flex;
    }

    .docs-article-detail .doc-share-bar.is-stuck .doc-share-bar-inner {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.375rem;
    }

    .docs-article-detail .doc-share-bar.is-stuck .doc-share-bar-h5-panel {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        width: 100%;
        order: 3;
    }

    .docs-article-detail .doc-share-bar.is-stuck.is-h5-expanded .doc-share-bar-h5-panel {
        display: flex;
    }

    .docs-article-detail .doc-share-bar.is-stuck .doc-share-stat-actions {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        margin-left: 0;
        order: 2;
    }

    .docs-article-detail .doc-share-bar.is-stuck .doc-share-bar-h5-toggle {
        order: 1;
    }

    .docs-article-detail .doc-share-bar.is-stuck.is-h5-minimized {
        min-height: 0;
    }

    .docs-article-detail .doc-share-bar.is-stuck.is-h5-expanded {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .docs-article-detail .doc-share-bar.is-stuck.is-h5-expanded .doc-share-icons,
    .docs-article-detail .doc-share-bar.is-stuck.is-h5-expanded .doc-share-reading-tools {
        width: 100%;
    }

    .docs-article-detail .doc-share-bar.is-stuck.is-h5-expanded .doc-reading-tools.doc-share-reading-tools {
        justify-content: center;
    }

    .docs-article-detail .doc-share-bar.is-stuck .doc-share-font-size-divider,
    .docs-article-detail .doc-share-bar.is-stuck .doc-share-actions-divider {
        display: none;
    }

    .docs-article-detail .doc-share-bar:not(.is-stuck) .doc-share-bar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .docs-article-detail .doc-share-bar:not(.is-stuck) .doc-share-bar-h5-panel {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .docs-article-detail .doc-share-bar:not(.is-stuck) .doc-share-icons {
        width: 100%;
    }

    /* H5：字号/最大化仅在分享按钮旁；标题区隐藏，避免与 PC 标题栏重复逻辑冲突 */
    .docs-article-detail:has(#docShareBar:not([hidden])) #articleMeta > .doc-reading-tools {
        display: none;
    }

    .docs-article-detail .doc-share-bar .doc-reading-tools.doc-share-reading-tools {
        display: flex;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-left: 0;
    }

    .docs-article-detail .doc-share-bar:not(.is-stuck) .doc-share-stat-actions {
        display: none;
    }

    .doc-share-bar-inner {
        align-items: center;
    }

    .toc-header {
        height: var(--sidebar-topcat-height);
        min-height: var(--sidebar-topcat-height);
    }

    .doc-share-icons {
        gap: 0.375rem;
        width: 100%;
        flex-wrap: wrap;
    }

    .doc-share-icon-btn {
        width: 1.875rem;
        height: 1.875rem;
    }

    .doc-share-icon-btn i {
        font-size: 1rem;
    }

    .doc-share-svg-icon {
        width: 1rem;
        height: 1rem;
    }

    .doc-share-svg-icon--wechat {
        width: 1.125rem;
        height: 1.125rem;
    }

    .doc-share-icon-letter {
        font-size: 0.8875rem;
    }

    .doc-share-icons-divider {
        height: 1rem;
        margin: 0 0.1875rem;
    }
}

/* ========== 文档正文字号调节 ========== */
#articleContent {
    --article-font-scale: 1;
}

#articleContent.article-content,
#articleContent .article-content-rendered {
    font-size: calc(var(--article-font-scale, 1) * 1rem);
}

#articleContent.article-content h1,
#articleContent .article-content-rendered h1 {
    font-size: calc(var(--article-font-scale, 1) * 1.3rem);
}

#articleContent.article-content h2,
#articleContent .article-content-rendered h2 {
    font-size: calc(var(--article-font-scale, 1) * 1.2rem);
}

#articleContent.article-content h3,
#articleContent .article-content-rendered h3 {
    font-size: calc(var(--article-font-scale, 1) * 1.1rem);
}

#articleContent.article-content h4,
#articleContent .article-content-rendered h4 {
    font-size: calc(var(--article-font-scale, 1) * 1.05rem);
}

#articleContent.article-content h5,
#articleContent .article-content-rendered h5 {
    font-size: calc(var(--article-font-scale, 1) * 1.02rem);
}

#articleContent.article-content h6,
#articleContent .article-content-rendered h6 {
    font-size: calc(var(--article-font-scale, 1) * 1rem);
}

#articleContent.article-content ul,
#articleContent.article-content ol,
#articleContent .article-content-rendered ul,
#articleContent .article-content-rendered ol {
    font-size: calc(var(--article-font-scale, 1) * 0.95rem);
}

#articleContent.article-content pre,
#articleContent .article-content-rendered pre {
    font-size: calc(var(--article-font-scale, 1) * 0.9rem);
}

.article-font-size-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.35rem;
    border: 1px solid var(--docs-border-primary);
    border-radius: 999px;
    background: var(--docs-bg-secondary);
    flex-shrink: 0;
}

.article-font-size-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    min-width: 2rem;
    height: 1.75rem;
    padding: 0 0.45rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--docs-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.article-font-size-btn-label {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
}

.article-font-size-btn i {
    font-size: 0.875rem;
    line-height: 1;
}

.article-font-size-btn:hover:not(:disabled),
.article-font-size-btn:focus-visible:not(:disabled) {
    background: var(--docs-bg-hover);
    color: var(--docs-text-primary);
    outline: none;
}

.article-font-size-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.article-font-size-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    height: 1.75rem;
    padding: 0 0.45rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--docs-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.article-font-size-reset:hover,
.article-font-size-reset:focus-visible {
    background: var(--docs-bg-hover);
    color: var(--docs-text-primary);
    outline: none;
}

.article-font-size-reset.is-default {
    color: var(--docs-text-secondary);
}

.article-font-size-tools--compact {
    padding: 0.15rem 0.25rem;
    gap: 0.15rem;
    border-radius: 8px;
    background: var(--docs-bg-secondary);
}

.article-font-size-tools--compact .article-font-size-btn,
.article-font-size-tools--compact .article-font-size-reset {
    min-width: 1.65rem;
    height: 1.55rem;
    padding: 0 0.3rem;
}

.article-font-size-tools--compact .article-font-size-btn-label {
    font-size: 0.75rem;
}

.article-font-size-tools--compact .article-font-size-btn i {
    font-size: 0.8125rem;
}

.article-font-size-tools--compact .article-font-size-reset {
    min-width: 2.35rem;
    font-size: 0.6875rem;
}

.docs-article-detail .article-meta {
    gap: 0.75rem;
}

.doc-reading-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* PC：分享栏内阅读工具保持隐藏（覆盖上方 .doc-reading-tools 的 inline-flex） */
.doc-reading-tools.doc-share-reading-tools {
    display: none;
}

.doc-content-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--docs-border-primary);
    border-radius: 6px;
    background: var(--docs-bg-secondary);
    color: var(--docs-text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.doc-content-view-btn i {
    font-size: 1.125rem;
    line-height: 1;
}

.doc-content-view-btn:hover,
.doc-content-view-btn:focus-visible {
    background: var(--docs-bg-hover);
    color: var(--docs-text-primary);
    outline: none;
}

.docs-layout.content-maximized .doc-content-view-btn {
    border-color: var(--docs-primary);
    color: var(--docs-primary);
}

/* ========== 文档阅读区最大化 ========== */
body.docs-content-maximized {
    --top-nav-height: 0px;
}

body.docs-content-maximized .docs-top-nav,
body.docs-content-maximized .h5-tabbar {
    display: none !important;
}

body.docs-content-maximized.has-h5-tabbar .docs-main,
body.docs-content-maximized.has-h5-tabbar .docs-content {
    padding-bottom: 1rem !important;
}

/* 最大化：仅隐藏左侧导航，保留右侧 TOC */
.docs-layout.content-maximized {
    --sidebar-width: 0px;
}

.docs-layout.content-maximized .docs-sidebar,
.docs-layout.content-maximized .docs-sidebar-overlay {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
}

body.docs-content-maximized .docs-layout.content-maximized:not(.no-toc):not(.toc-minimized) .docs-toc {
    display: block;
    top: 0;
    height: 100vh;
    height: 100dvh;
}

.docs-layout.content-maximized .docs-main {
    margin-left: 0 !important;
    margin-top: 0 !important;
    max-width: calc(100vw - var(--toc-width)) !important;
    width: 100%;
    min-height: 100vh !important;
    min-height: 100dvh !important;
}

.docs-layout.content-maximized.no-toc .docs-main,
.docs-layout.content-maximized.toc-minimized .docs-main {
    margin-right: 0 !important;
    max-width: 100vw !important;
}

.docs-layout.content-maximized .docs-content {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.docs-layout.content-maximized .docs-footer {
    display: none;
}

@media (max-width: 1200px) {
    body.docs-content-maximized .docs-layout.content-maximized:not(.no-toc):not(.toc-minimized) {
        --toc-width: 250px;
    }

    body.docs-content-maximized .docs-layout.content-maximized:not(.no-toc):not(.toc-minimized) .docs-main {
        margin-right: var(--toc-width) !important;
        max-width: calc(100vw - var(--toc-width)) !important;
    }
}

@media (max-width: 768px) {
    .docs-article-detail .article-meta .doc-reading-tools {
        order: 2;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .docs-article-detail .article-meta .doc-reading-tools .article-font-size-tools {
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 3rem);
        justify-content: center;
    }

    .article-font-size-tools--compact {
        width: auto;
        max-width: 100%;
    }

    .article-font-size-tools--compact .article-font-size-btn,
    .article-font-size-tools--compact .article-font-size-reset {
        min-width: 1.75rem;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .doc-content-view-btn {
        width: 1.875rem;
        height: 1.875rem;
    }

    .doc-content-view-btn i {
        font-size: 1rem;
    }

    .docs-article-detail .article-stat-actions {
        margin-left: 0;
    }
}

/* Mermaid diagram blocks */
.mermaid-diagram-wrapper {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid var(--docs-border-primary);
    border-radius: 0.5rem;
    background: var(--docs-bg-body);
    overflow-x: auto;
    box-sizing: border-box;
}

.mermaid-diagram-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 4rem;
}

.mermaid-diagram-container .mermaid,
.mermaid-diagram-container svg {
    max-width: 100%;
    height: auto;
}

.mermaid-diagram-container pre.mermaid {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
}

.mermaid-diagram-error {
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    background: rgba(220, 53, 69, 0.08);
    color: var(--docs-text-secondary);
    font-size: 0.875rem;
}

.mermaid-source-fallback {
    margin: 0;
    padding: 0.875rem 1rem;
    border-radius: 0.375rem;
    background: var(--docs-bg-secondary);
    border: 1px solid var(--docs-border-primary);
    overflow-x: auto;
}

.mermaid-source-fallback[hidden],
.mermaid-diagram-error[hidden] {
    display: none !important;
}

.mermaid-source-fallback code {
    display: block;
    white-space: pre;
    font-family: var(--docs-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
    font-size: 0.8125rem;
    color: var(--docs-text-primary);
    background: transparent;
    padding: 0;
}

[data-theme="dark"] .mermaid-diagram-wrapper {
    background: var(--docs-bg-secondary);
}

[data-theme="dark"] .mermaid-diagram-error {
    background: rgba(220, 53, 69, 0.16);
}

.sd-attach-modal__name {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--docs-text-primary);
    word-break: break-all;
}

.sd-attach-modal__name > i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 1.35rem;
    color: var(--docs-primary, #0d6efd);
}

.sd-attach-modal__meta {
    margin-top: 0.35rem;
    margin-left: 2rem;
    font-size: 0.8125rem;
    color: var(--docs-text-muted);
}

[data-theme="dark"] .sd-attach-modal__name {
    color: var(--docs-text-primary);
}

[data-theme="dark"] .sd-attach-modal__name > i {
    color: #93c5fd;
}

[data-theme="dark"] .sd-attach-modal__meta {
    color: var(--docs-text-secondary);
}

.sd-attach-modal__field {
    margin-top: 1rem;
}

.sd-attach-modal__url-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sd-attach-modal__url-row .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.sd-attach-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.sd-doc-attach-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    cursor: pointer;
    text-decoration: none;
    vertical-align: middle;
}

.sd-doc-attach-link:hover {
    text-decoration: underline;
}

.sd-doc-attach-link__icon {
    font-size: 1.05em;
    line-height: 1;
    flex-shrink: 0;
}

.sd-doc-attach-link__label {
    min-width: 0;
    word-break: break-all;
}

.sd-doc-attach-link--pdf .sd-doc-attach-link__icon { color: #dc2626; }
.sd-doc-attach-link--doc .sd-doc-attach-link__icon { color: #2563eb; }
.sd-doc-attach-link--sheet .sd-doc-attach-link__icon { color: #059669; }
.sd-doc-attach-link--slide .sd-doc-attach-link__icon { color: #d97706; }
.sd-doc-attach-link--archive .sd-doc-attach-link__icon { color: #7c3aed; }
.sd-doc-attach-link--video .sd-doc-attach-link__icon { color: #7c3aed; }
.sd-doc-attach-link--audio .sd-doc-attach-link__icon { color: #db2777; }
.sd-doc-attach-link--code .sd-doc-attach-link__icon { color: #0891b2; }
.sd-doc-attach-link--text .sd-doc-attach-link__icon { color: #64748b; }
.sd-doc-attach-link--default .sd-doc-attach-link__icon { color: var(--docs-text-muted, #6b7280); }

.sd-doc-video-wrap {
    margin: 1rem 0;
    max-width: 100%;
}

.sd-doc-video-wrap--modal {
    margin-top: 0.75rem;
}

.sd-doc-video {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: min(72vh, 720px);
    border-radius: 8px;
    background: #0f172a;
    border: 1px solid var(--docs-border-primary, #e5e7eb);
}

.sd-doc-video-fallback {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
}

.sd-attach-modal--video .sd-doc-video {
    max-height: 420px;
}
