/* =========================================================
   前台桌面端样式（完全独立）
   仅在 >= 769px 生效；移动端样式见 front-mobile.css
   ========================================================= */
@media (min-width: 769px) {

    /* ---------- 基础 ---------- */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    body {
        font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
        font-size: 16px;
        line-height: 1.7;
        background: #f5f7fa;
        color: #1f2937;
    }
    a {
        color: #2563eb;
        text-decoration: none;
    }
    img {
        max-width: 100%;
    }
    button {
        font-family: inherit;
    }
    /* 隐藏移动端专用元素 */
    .menu-btn,
    .search-icon-btn,
    .drawer-head,
    .drawer-overlay,
    .tabbar,
    .back-top,
    .mobile-only {
        display: none !important;
    }

    /* ---------- 顶栏 ---------- */
    .site-header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: #fff;
        box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    }
    .header-inner {
        max-width: 1280px;
        margin: 0 auto;
        height: 64px;
        padding: 0 24px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
    }
    .header-left {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }
    .logo {
        font-size: 20px;
        font-weight: 700;
        color: #111827;
        white-space: nowrap;
    }
    .logo:hover {
        color: #1d4ed8;
    }
    /* 桌面端隐藏移动版左上角双框 */
    .header-brand-links { display: none; }
    .books-header h1 .title-m { display: none; }
    .header-right {
        display: flex;
        align-items: center;
        gap: 16px;
    }
    .header-search {
        position: relative;
    }
    .header-search input {
        width: 280px;
        height: 38px;
        padding: 0 12px 0 34px;
        border: 1px solid #d9dee5;
        border-radius: 8px;
        font-size: 14px;
        color: #1f2937;
        background: #f8fafc;
        outline: none;
        transition: border-color 0.2s, width 0.2s, box-shadow 0.2s;
    }
    .header-search input::placeholder {
        color: #9ca3af;
    }
    .header-search input:focus {
        width: 340px;
        border-color: #2563eb;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }
    .header-search::before {
        content: "";
        position: absolute;
        left: 11px;
        top: 50%;
        width: 14px;
        height: 14px;
        transform: translateY(-50%);
        border: 2px solid #9ca3af;
        border-radius: 50%;
        pointer-events: none;
    }
    .header-search::after {
        content: "";
        position: absolute;
        left: 22px;
        top: calc(50% + 4px);
        width: 6px;
        height: 2px;
        background: #9ca3af;
        border-radius: 1px;
        transform: rotate(45deg);
        pointer-events: none;
    }
    .admin-link {
        font-size: 14px;
        color: #4b5563;
        padding: 7px 14px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        white-space: nowrap;
        transition: all 0.15s;
    }
    .admin-link:hover {
        color: #2563eb;
        border-color: #bfdbfe;
        background: #eff6ff;
    }

    /* ---------- 页面骨架：侧栏 + 内容 ---------- */
    .page {
        max-width: 1280px;
        margin: 24px auto;
        padding: 0 24px;
        display: grid;
        grid-template-columns: 300px minmax(0, 1fr);
        gap: 28px;
        align-items: start;
    }
    .page-wide {
        grid-template-columns: minmax(0, 1fr);
    }
    .page-wide .sidebar {
        display: none;
    }
    .content {
        min-width: 0;
    }

    /* ---------- 侧栏 ---------- */
    .sidebar {
        position: sticky;
        top: 84px;
        max-height: calc(100vh - 104px);
        display: flex;
        flex-direction: column;
    }
    .sidebar-body {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding-right: 2px;
        scrollbar-width: thin;
    }
    .sidebar-body::-webkit-scrollbar {
        width: 6px;
    }
    .sidebar-body::-webkit-scrollbar-thumb {
        background: #e0e4ea;
        border-radius: 3px;
    }
    .sidebar-body::-webkit-scrollbar-thumb:hover {
        background: #c9cfd8;
    }
    .sidebar-card {
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
        margin-bottom: 16px;
        box-shadow: none;
    }
    .sidebar-card + .sidebar-card {
        border-top: 1px solid #f0f2f5;
        padding-top: 14px;
        margin-top: 14px;
    }
    .sidebar-title {
        font-size: 16px;
        font-weight: 600;
        color: #111827;
        margin-bottom: 10px;
    }
    .sidebar-card + .sidebar-card .sidebar-title {
        font-size: 12px;
        font-weight: 500;
        color: #9ca3af;
        letter-spacing: 0.08em;
        margin-bottom: 8px;
    }
    .sidebar-switch a {
        display: inline-block;
        padding: 0;
        background: none;
        border-radius: 0;
        font-size: 15px;
        color: #9ca3af;
        transition: color 0.15s;
    }
    .sidebar-switch a:hover {
        background: none;
        color: #2563eb;
    }
    .pdf-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        min-height: 38px;
        margin-top: 12px;
        background: #fff;
        color: #2563eb;
        border: 1px solid #d7e0ee;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 500;
        transition: all 0.15s;
    }
    .pdf-btn:hover {
        background: #f0f6ff;
        border-color: #bcd3f5;
        color: #1d4ed8;
    }

    /* ---------- 分类列表（默认侧栏） ---------- */
    .category-list {
        list-style: none;
    }
    .category-item a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 7px 10px;
        border-radius: 6px;
        font-size: 16px;
        color: #374151;
        transition: color 0.15s, background 0.15s;
    }
    .category-item a:hover {
        background: #f5f7fa;
        color: #1d4ed8;
    }
    .category-item a.active {
        background: #f0f6ff;
        color: #1d4ed8;
        font-weight: 500;
    }
    .category-item .count {
        font-size: 13px;
        color: #c2c8d0;
    }
    .category-children {
        list-style: none;
    }
    .level-1 a { padding-left: 24px; }
    .level-2 a { padding-left: 38px; }

    /* ---------- 目录树 ---------- */
    .toc-tree {
        list-style: none;
    }
    .toc-cat-title {
        display: flex;
        align-items: center;
        padding: 6px 8px;
        border-radius: 6px;
        font-size: 16px;
        font-weight: 500;
        color: #374151;
        cursor: pointer;
        user-select: none;
        transition: color 0.15s, background 0.15s;
    }
    .toc-cat-title:hover {
        background: #f5f7fa;
        color: #111827;
    }
    .toc-cat-title.collapsed {
        color: #6b7280;
    }
    .toc-cat-title .arrow {
        flex-shrink: 0;
        margin-right: 6px;
        font-size: 10px;
        color: #b6bdc9;
        transition: transform 0.2s;
    }
    .toc-cat-title.collapsed .arrow {
        transform: rotate(-90deg);
    }
    .toc-cat-title .count {
        margin-left: auto;
        padding-left: 8px;
        font-size: 13px;
        color: #c2c8d0;
        font-weight: 400;
    }
    .toc-cat-children {
        list-style: none;
        margin-left: 13px;
        border-left: 1px solid #e8ebf0;
        padding-left: 0;
    }
    .toc-art a {
        display: block;
        padding: 5px 10px;
        margin-left: -1px;
        border-left: 2px solid transparent;
        border-radius: 0 6px 6px 0;
        font-size: 15px;
        line-height: 1.5;
        color: #52525b;
        transition: color 0.15s, background 0.15s, border-color 0.15s;
    }
    .toc-art a:hover {
        background: #f5f7fa;
        color: #2563eb;
        border-left-color: #cbd5e4;
    }
    .toc-art a.active {
        background: #f5f8ff;
        border-left-color: #2563eb;
        color: #1d4ed8;
        font-weight: 500;
    }
    .toc-l2 > .toc-cat-title { padding-left: 20px; font-size: 14px; font-weight: 500; color: #52525b; }
    .toc-l3 > .toc-cat-title { padding-left: 32px; font-size: 14px; font-weight: 500; color: #6b7280; }
    .toc-l2 > .toc-cat-children .toc-art a { padding-left: 22px; }
    .toc-l3 > .toc-cat-children .toc-art a { padding-left: 30px; }

    /* ---------- 卡片 ---------- */
    .card {
        background: #fff;
        border: 1px solid #f0f2f5;
        border-radius: 12px;
        padding: 28px;
        box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
    }
    .card + .card {
        margin-top: 20px;
    }
    .card-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 18px;
        font-weight: 600;
        color: #111827;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f0f2f5;
    }
    .card-title a {
        font-size: 15px;
        font-weight: 400;
        color: #2563eb;
    }
    .card-title a:hover {
        color: #1d4ed8;
    }

    /* ---------- 面包屑 ---------- */
    .breadcrumb {
        font-size: 15px;
        color: #9ca3af;
        margin-bottom: 16px;
    }
    .breadcrumb a {
        color: #9ca3af;
    }
    .breadcrumb a:hover {
        color: #2563eb;
    }
    .breadcrumb span {
        margin: 0 8px;
        color: #d1d5db;
    }

    /* ---------- 文章详情 ---------- */
    .article-detail h1 {
        font-size: 26px;
        line-height: 1.45;
        color: #111827;
        margin-bottom: 14px;
    }
    .article-detail .meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 16px;
        font-size: 14px;
        color: #9ca3af;
        padding-bottom: 16px;
        margin-bottom: 20px;
        border-bottom: 1px solid #f0f2f5;
    }

    /* ---------- 正文排版 ---------- */
    /* 正文阅读使用自定义宋体（思源宋体），标题与表格使用黑体 */
    .article-content {
        font-family: "Noto Serif SC", "Songti SC", "STSong", SimSun, serif;
        font-size: 18px;
        line-height: 2;
        color: #24292f;
        overflow-wrap: break-word;
    }
    .article-content h1,
    .article-content h2,
    .article-content h3,
    .article-content h4,
    .article-content h5,
    .article-content h6 {
        font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
        color: #111827;
        line-height: 1.5;
    }
    .article-content h1 { font-size: 24px; margin: 28px 0 14px; }
    .article-content h2 {
        font-size: 21px;
        margin: 28px 0 14px;
        padding-bottom: 8px;
        border-bottom: 1px solid #eef0f3;
    }
    .article-content h3 { font-size: 19px; margin: 24px 0 12px; }
    .article-content h4 { font-size: 18px; margin: 20px 0 10px; }
    .article-content h5 { font-size: 17px; margin: 18px 0 10px; }
    .article-content h6 { font-size: 16px; margin: 16px 0 8px; }
    .article-content p {
        margin: 12px 0;
    }
    .article-content ul,
    .article-content ol {
        margin: 12px 0;
        padding-left: 24px;
    }
    .article-content li {
        margin: 6px 0;
    }
    .article-content code {
        background: #f2f4f7;
        padding: 2px 6px;
        border-radius: 5px;
        font-family: ui-monospace, SFMono-Regular, Consolas, Monaco, monospace;
        font-size: 0.88em;
        color: #d6336c;
    }
    .article-content pre {
        background: #1e293b;
        color: #e2e8f0;
        padding: 16px;
        border-radius: 10px;
        overflow-x: auto;
        margin: 16px 0;
        line-height: 1.75;
    }
    .article-content pre code {
        background: none;
        padding: 0;
        color: inherit;
        font-size: 14px;
    }
    .article-content blockquote {
        border-left: 3px solid #2563eb;
        background: #f6f9ff;
        padding: 12px 16px;
        margin: 16px 0;
        border-radius: 0 8px 8px 0;
        color: #5b6472;
    }
    .article-content blockquote p {
        margin: 4px 0;
    }
    .article-content table {
        width: 100%;
        border-collapse: collapse;
        margin: 16px 0;
        font-size: 15px;
    }
    .article-content th,
    .article-content td {
        font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
        border: 1px solid #e8ecf1;
        padding: 9px 12px;
        text-align: left;
    }
    .article-content th {
        background: #f8fafc;
        font-weight: 600;
    }
    .article-content img {
        display: block;
        max-width: 100% !important;
        height: auto !important;
        margin: 20px auto;
        border-radius: 8px;
        cursor: zoom-in;
    }
    .article-content a {
        color: #2563eb;
    }
    .article-content a:hover {
        text-decoration: underline;
    }
    .article-content hr {
        border: none;
        border-top: 1px solid #eef0f3;
        margin: 24px 0;
    }

    /* ---------- 上一篇 / 下一篇 ---------- */
    .pn-nav {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        margin-top: 40px;
        padding-top: 20px;
        border-top: 1px solid #f0f2f5;
    }
    .pn-item {
        flex: 1;
        max-width: 48%;
        display: block;
        border: 1px solid #eef1f5;
        background: #fafbfd;
        border-radius: 12px;
        padding: 14px 16px;
        transition: all 0.15s;
    }
    .pn-item:hover {
        border-color: #bfdbfe;
        background: #f0f5ff;
    }
    .pn-label {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 14px;
        color: #9ca3af;
        margin-bottom: 4px;
    }
    .pn-title {
        font-size: 16px;
        font-weight: 500;
        color: #1f2937;
        line-height: 1.45;
    }
    .pn-item.next {
        margin-left: auto;
    }
    .pn-item.next .pn-label {
        justify-content: flex-end;
    }
    .pn-item.next .pn-title {
        text-align: right;
    }

    /* ---------- 文档列表（文章行） ---------- */
    .article-list {
        list-style: none;
    }
    .article-item {
        padding: 15px 0;
        border-bottom: 1px solid #f3f4f6;
    }
    .article-item:last-child {
        border-bottom: none;
    }
    .article-title {
        font-size: 16px;
        font-weight: 500;
        line-height: 1.5;
        margin-bottom: 4px;
    }
    .article-title a {
        color: #1f2937;
    }
    .article-title a:hover {
        color: #2563eb;
    }
    .article-title .badge-top {
        margin-right: 8px;
        vertical-align: 2px;
    }
    .article-summary {
        font-size: 15px;
        color: #6b7280;
        line-height: 1.6;
        margin-top: 6px;
    }
    .article-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 16px;
        font-size: 14px;
        color: #9ca3af;
        margin-top: 8px;
    }
    .article-meta .article-book {
        background: #f3f4f6;
        padding: 1px 8px;
        border-radius: 5px;
        font-size: 13px;
        color: #6b7280;
    }

    /* ---------- 文档中心首页 ---------- */
    .books-container {
        padding: 12px 0 24px;
    }
    .books-header {
        text-align: center;
        margin-bottom: 36px;
    }
    .books-header h1 {
        font-size: 28px;
        color: #111827;
        margin-bottom: 8px;
    }
    .books-header p {
        font-size: 16px;
        color: #6b7280;
    }
    .back-link {
        display: inline-block;
        font-size: 14px;
        color: #6b7280;
        margin-bottom: 16px;
        transition: color 0.15s;
    }
    .back-link:hover {
        color: #2563eb;
    }
    .group-page-head {
        text-align: center;
        margin-bottom: 32px;
    }
    .groups-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 24px;
    }
    .group-card {
        display: flex;
        align-items: center;
        gap: 18px;
        background: #fff;
        border: 1px solid #eef1f5;
        border-radius: 14px;
        padding: 22px;
        color: inherit;
        box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    }
    .group-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(16, 24, 40, 0.1);
        border-color: #bfdbfe;
    }
    .group-icon {
        width: 64px;
        height: 64px;
        flex-shrink: 0;
        border-radius: 14px;
        background: linear-gradient(135deg, #3b82f6, #6366f1);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .group-icon span {
        font-size: 32px;
        color: rgba(255, 255, 255, 0.92);
    }
    .group-card:nth-child(2n) .group-icon { background: linear-gradient(135deg, #10b981, #059669); }
    .group-card:nth-child(3n) .group-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
    .group-card:nth-child(4n) .group-icon { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
    .group-info {
        flex: 1;
        min-width: 0;
    }
    .group-info h3 {
        font-size: 19px;
        color: #111827;
        margin-bottom: 6px;
    }
    .group-info p {
        font-size: 14px;
        color: #6b7280;
        line-height: 1.6;
        margin-bottom: 10px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .group-meta {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 14px;
        color: #9ca3af;
    }
    .books-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 24px;
    }
    .book-card {
        display: flex;
        flex-direction: column;
        background: #fff;
        border: 1px solid #eef1f5;
        border-radius: 14px;
        overflow: hidden;
        color: inherit;
        box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    }
    .book-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(16, 24, 40, 0.1);
        border-color: #bfdbfe;
    }
    .book-cover {
        height: 160px;
        flex-shrink: 0;
        background: linear-gradient(135deg, #3b82f6, #6366f1);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    .book-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .book-cover-placeholder span {
        font-size: 64px;
        color: rgba(255, 255, 255, 0.92);
    }
    .book-card:nth-child(2n) .book-cover-placeholder { background: linear-gradient(135deg, #10b981, #059669); }
    .book-card:nth-child(3n) .book-cover-placeholder { background: linear-gradient(135deg, #f59e0b, #d97706); }
    .book-card:nth-child(4n) .book-cover-placeholder { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
    .book-info {
        flex: 1;
        padding: 20px;
        display: flex;
        flex-direction: column;
    }
    .book-info h3 {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        font-size: 18px;
        color: #111827;
        margin-bottom: 8px;
    }
    .book-version {
        background: #eff6ff;
        color: #2563eb;
        font-size: 13px;
        font-weight: 500;
        padding: 2px 8px;
        border-radius: 5px;
    }
    .book-info p {
        font-size: 15px;
        color: #6b7280;
        line-height: 1.6;
        margin-bottom: 16px;
        flex: 1;
    }
    .book-meta {
        display: flex;
        align-items: center;
        gap: 12px;
        padding-top: 12px;
        border-top: 1px solid #f3f4f6;
        font-size: 14px;
        color: #9ca3af;
    }
    .book-pdf {
        display: flex;
        align-items: center;
        gap: 4px;
        color: #059669;
        font-size: 14px;
    }
    .book-enter {
        margin-left: auto;
        color: #2563eb;
        font-size: 14px;
        font-weight: 500;
        transition: color 0.15s;
    }
    .book-card:hover .book-enter {
        color: #1d4ed8;
    }

    /* ---------- 搜索页 ---------- */
    .search-form {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
    }
    .search-input {
        flex: 1;
        min-width: 0;
        height: 44px;
        padding: 0 16px;
        border: 1px solid #d9dee5;
        border-radius: 10px;
        font-size: 16px;
        color: #1f2937;
        background: #f8fafc;
        outline: none;
        transition: border-color 0.2s, box-shadow 0.2s;
    }
    .search-input:focus {
        border-color: #2563eb;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }
    .search-btn {
        height: 44px;
        padding: 0 26px;
        border: none;
        border-radius: 10px;
        background: #2563eb;
        color: #fff;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.15s;
    }
    .search-btn:hover {
        background: #1d4ed8;
    }
    .search-filter {
        flex: 0 0 auto;
        width: auto;
        max-width: 240px;
    }
    .group-search-form {
        margin-bottom: 28px;
    }
    .search-summary {
        font-size: 15px;
        color: #6b7280;
        margin-bottom: 16px;
    }
    .search-summary strong {
        color: #2563eb;
    }
    .empty-tip {
        text-align: center;
        color: #9ca3af;
        font-size: 15px;
        padding: 40px 0;
    }

    /* ---------- 徽标 ---------- */
    .badge {
        display: inline-block;
        padding: 2px 8px;
        font-size: 13px;
        font-weight: 500;
        border-radius: 5px;
        background: #eff6ff;
        color: #2563eb;
    }
    .badge-top {
        background: #fef2f2;
        color: #dc2626;
    }

    /* ---------- 分页 ---------- */
    .pagination {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 24px;
    }
    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 12px;
        border: 1px solid #e2e6eb;
        border-radius: 8px;
        background: #fff;
        font-size: 14px;
        color: #4b5563;
        transition: all 0.15s;
    }
    .pagination a:hover {
        border-color: #2563eb;
        color: #2563eb;
    }
    .pagination .active {
        background: #2563eb;
        border-color: #2563eb;
        color: #fff;
        font-weight: 500;
    }
    .pagination .disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

    /* ---------- 页脚 ---------- */
    .footer {
        text-align: center;
        padding: 24px;
        color: #9ca3af;
        font-size: 14px;
        border-top: 1px solid #f0f2f5;
        margin-top: 40px;
    }
    .footer-links {
        margin-top: 6px;
    }
    .footer-links a {
        color: #6b7280;
        margin: 0 8px;
    }
    .footer-links a:hover {
        color: #2563eb;
    }

    /* ---------- 空状态 ---------- */
    .empty-state {
        text-align: center;
        padding: 80px 20px;
        color: #9ca3af;
        font-size: 15px;
    }
    /* 灯箱打开时锁定背景滚动（桌面端复用 drawer-open 类） */
    body.drawer-open {
        overflow: hidden;
    }

    /* ---------- 图片灯箱（点击正文图片放大） ---------- */
    .img-lightbox {
        position: fixed;
        inset: 0;
        z-index: 300;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;
        padding: 24px;
        background: rgba(15, 23, 42, 0.9);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s, visibility 0.2s;
    }
    .img-lightbox.show {
        opacity: 1;
        visibility: visible;
    }
    .img-lightbox img {
        display: block;
        max-width: 94vw;
        max-height: 84vh;
        width: auto;
        height: auto;
        border-radius: 6px;
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
        cursor: zoom-out;
    }
    .img-lightbox .img-lightbox-caption {
        max-width: 90vw;
        color: #cbd5e1;
        font-size: 14px;
        line-height: 1.5;
        text-align: center;
    }
    .img-lightbox .img-lightbox-caption:empty {
        display: none;
    }

}

    /* ===== 阶段五：搜索高亮 / 反馈底栏 / 代码复制 / 页内 TOC ===== */
    .article-summary mark {
        background: #fff1a8;
        color: inherit;
        padding: 0 2px;
        border-radius: 2px;
    }
    .code-wrap {
        position: relative;
        margin: 16px 0;
    }
    .code-wrap pre {
        margin: 0;
    }
    .code-copy-btn {
        position: absolute;
        top: 8px;
        right: 8px;
        padding: 4px 10px;
        font-size: 12px;
        line-height: 1.4;
        color: #6b7280;
        background: #f3f4f6;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        cursor: pointer;
        opacity: 0;
        transition: opacity .15s;
    }
    .code-wrap:hover .code-copy-btn {
        opacity: 1;
    }
    .code-copy-btn:hover {
        color: #1d4ed8;
        border-color: #bfdbfe;
        background: #eff6ff;
    }
    .feedback-bar {
        margin-top: 32px;
        padding: 20px 24px;
        background: #f8fafc;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        text-align: center;
    }
    .feedback-question {
        font-size: 15px;
        font-weight: 600;
        color: #374151;
        margin-bottom: 12px;
    }
    .feedback-actions {
        display: flex;
        justify-content: center;
        gap: 12px;
    }
    .feedback-btn {
        padding: 8px 20px;
        font-size: 14px;
        color: #374151;
        background: #fff;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        cursor: pointer;
        transition: all .15s;
    }
    .feedback-btn:hover:not(:disabled) {
        color: #1d4ed8;
        border-color: #93c5fd;
        background: #eff6ff;
    }
    .feedback-btn:disabled {
        opacity: .6;
        cursor: default;
    }
    .feedback-comment {
        margin-top: 14px;
    }
    .feedback-comment textarea {
        width: 100%;
        max-width: 480px;
        padding: 8px 12px;
        font-size: 14px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        resize: vertical;
        font-family: inherit;
        display: block;
        margin: 0 auto 8px;
    }
    .feedback-submit {
        padding: 6px 18px;
        font-size: 13px;
        color: #fff;
        background: #2563eb;
        border: none;
        border-radius: 6px;
        cursor: pointer;
    }
    .feedback-submit:hover {
        background: #1d4ed8;
    }
    .feedback-submit:disabled {
        opacity: .6;
        cursor: default;
    }
    .feedback-counts {
        margin-top: 10px;
        font-size: 13px;
        color: #9ca3af;
    }
    .feedback-msg {
        margin-top: 8px;
        font-size: 13px;
    }
    .feedback-msg.ok {
        color: #16a34a;
    }
    .feedback-msg.err {
        color: #dc2626;
    }
    /* 页内目录：仅超宽屏显示，悬浮于内容区右侧之外 */
    .page-toc {
        display: none;
    }
    @media (min-width: 1500px) {
        .page-toc {
            display: block;
            position: fixed;
            right: 20px;
            top: 110px;
            width: 208px;
            max-height: calc(100vh - 160px);
            overflow-y: auto;
            background: transparent;
            font-size: 13px;
        }
        .page-toc-title {
            font-size: 12px;
            font-weight: 600;
            color: #9ca3af;
            text-transform: uppercase;
            letter-spacing: .04em;
            margin-bottom: 8px;
            padding-left: 12px;
        }
        .page-toc ul {
            list-style: none;
            margin: 0;
            padding: 0;
            border-left: 2px solid #e5e7eb;
        }
        .page-toc li {
            margin: 0;
        }
        .page-toc li a {
            display: block;
            padding: 4px 12px;
            color: #6b7280;
            text-decoration: none;
            line-height: 1.5;
            border-left: 2px solid transparent;
            margin-left: -2px;
        }
        .page-toc li.pt-h3 a {
            padding-left: 24px;
        }
        .page-toc li.pt-h4 a {
            padding-left: 36px;
        }
        .page-toc li a:hover {
            color: #111827;
        }
        .page-toc li a.active {
            color: #1d4ed8;
            border-left-color: #1d4ed8;
        }
    }

/* ---------- 标题锚点深链（A1） ---------- */
.article-content h2,
.article-content h3,
.article-content h4 {
    scroll-margin-top: 76px;
}
.anchor-link {
    display: inline-block;
    margin-left: 8px;
    color: #94a3b8;
    font-size: 0.72em;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.15s;
    vertical-align: middle;
}
.article-content h2:hover .anchor-link,
.article-content h3:hover .anchor-link,
.article-content h4:hover .anchor-link {
    opacity: 1;
}
.anchor-link:hover {
    color: #1d4ed8;
}
.anchor-tip {
    position: fixed;
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%) translateY(8px);
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    padding: 8px 16px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 400;
    max-width: 80vw;
    word-break: break-all;
}
.anchor-tip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 顶部导航：官网首页 / 联系客服（白底描边胶囊） ========== */
.header-right .official-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    background: #fff;
    border: 1px solid #e2e5ea;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.header-right .official-link:hover {
    background: #f6f8fb;
    border-color: #d5dae1;
    color: #1f2937;
}
.header-right .official-link:active { transform: scale(.96); }

/* ========== 联系客服 ========== */
/* 桌面端首页不展示客服区块（内容在 /contact 页面） */
.m-contact { display: none; }

/* 手机版首页的客服入口条（桌面端不显示） */
.m-contact-entry { display: none; }

/* /contact 独立页面（样式完整自足，不依赖 mobile 层） */
.contact-page { max-width: 920px; margin: 0 auto; padding: 48px 24px 72px; }
.contact-page .m-contact {
    display: block;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    margin-top: 0;
}
.contact-page .m-contact-head {
    background: none;
    padding: 0;
    text-align: center;
    margin-bottom: 36px;
}
.contact-page .m-contact-head h2 {
    font-size: 30px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
    letter-spacing: 2px;
}
.contact-page .m-contact-head p { font-size: 15px; color: #6b7280; margin: 0; }
.contact-page .m-contact-body {
    display: flex;
    flex-direction: row;
    gap: 28px;
    padding: 0;
}
.contact-page .m-wx-card,
.contact-page .m-tel-card {
    flex: 1;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eef0f4;
    box-shadow: 0 8px 28px rgba(16, 24, 40, 0.08);
    transition: transform .18s ease, box-shadow .18s ease;
}
.contact-page .m-wx-card:hover,
.contact-page .m-tel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(16, 24, 40, 0.12);
}
.contact-page .m-card-band {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}
.contact-page .m-card-band svg { flex-shrink: 0; }
.contact-page .m-band-wx { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.contact-page .m-band-tel { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); }
.contact-page .m-card-inner { padding: 34px 24px 32px; text-align: center; }
.contact-page .m-wx-card img {
    width: 210px;
    height: 210px;
    border-radius: 14px;
    background: #fff;
    padding: 10px;
    border: 1px solid #e2e5ea;
    box-shadow: 0 4px 14px rgba(22, 101, 52, 0.10);
}
.contact-page .m-wx-card .m-card-inner p,
.contact-page .m-tel-card .m-card-inner p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}
.contact-page .m-wx-card img + p { margin-top: 16px !important; }
.contact-page .m-tel-num {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    letter-spacing: 2px;
    text-decoration: none;
    margin-bottom: 6px;
}
.contact-page .m-tel-num:hover { color: #1d4ed8; }
.contact-page .m-tel-time { font-size: 13px; color: #9ca3af; margin: 0 0 20px !important; }
.contact-page .m-tel-btn {
    display: inline-block;
    padding: 11px 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.30);
    transition: transform .15s ease, box-shadow .15s ease;
}
.contact-page .m-tel-btn:hover {
    background: linear-gradient(135deg, #15803d, #166534);
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.40);
}
.contact-page .m-tel-btn:active { transform: scale(.96); }
