
        :root { --primary: #4D698E; --primary-hover: #3F5A7A; --primary-light: hsl(214.15, 29.68%, 93%); --success: #58a400; --text: var(--text-color, #111); --text-muted: hsl(214.15, 15%, 50%); --card: #fff; --border: #e8ecf3; --radius: 4px; }
        .breadcrumb-wrap { padding: 24px 0; color: #fff; margin-bottom: 0; }
        .breadcrumb-inner { margin: 0 auto; padding: 0 15px; text-align: center; width: auto; max-width: 100%; }
        .breadcrumb { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.75); margin-bottom: 12px; }
        .breadcrumb a { color: rgba(255,255,255,.85); text-decoration: none; }
        .breadcrumb a:hover { color: #fff; text-decoration: underline; }
        .breadcrumb .sep { color: rgba(255,255,255,.4); }
        .hero-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
        .hero-tag { display: inline-block; padding: 3px 10px; border-radius: 11px; font-size: 12px; font-weight: normal; color: #fff; background: rgba(255,255,255,.18); backdrop-filter: blur(4px); }
        .hero-title { font-size: 24px; font-weight: 600; color: #fff; margin: 0; line-height: 1.35; letter-spacing: 0.5px; }

        .product-page { margin: 24px auto 48px; padding: 0 12px; width: auto; max-width: 100%; }
        .product-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
        .main-col { min-width: 0; }
        .preview-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
        .preview-thumb { background: var(--primary); padding: 48px 32px; display: flex; align-items: center; justify-content: center; position: relative; min-height: 200px; }
        .preview-thumb .file-icon { font-size: 4rem; }
        .preview-thumb .badge-row { position: absolute; top: 12px; left: 15px; display: flex; gap: 6px; }
        .badge { padding: 3px 8px; border-radius: 11px; font-size: 12px; font-weight: normal; color: #fff; background: rgba(0,0,0,.2); box-shadow: 0 2px 4px rgba(0,0,0,.35); }
        .badge-category { background: rgba(255,255,255,.2); }
        .badge-type { background: rgba(255,255,255,.15); box-shadow: none; }
        .preview-info { padding: 24px 28px; }
        .preview-info h1 { font-size: 22px; font-weight: normal; color: var(--text); line-height: 1.3; margin-bottom: 12px; }
        .meta-strip { display: flex; gap: 16px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
        .meta-item { display: flex; align-items: center; gap: 5px; font-size: 14px; color: var(--text-muted); }
        .tabs { display: flex; border-bottom: 2px solid var(--border); }
        .tab-btn { padding: 10px 18px; border: none; background: none; font-size: 14px; font-weight: normal; color: var(--text-muted); cursor: pointer; position: relative; font-family: inherit; }
        .tab-btn.active { color: var(--primary); font-weight: bold; }
        .tab-btn.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--primary); border-radius: 1px; }
        .tab-content { display: none; padding: 18px 0; }
        .tab-content.active { display: block; }
        .desc-text { font-size: 14px; color: #111; line-height: 1.7; }
        .feature-list { list-style: none; margin-top: 12px; }
        .feature-list li { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; font-size: 14px; color: #111; border-bottom: 1px solid var(--border); }
        .feature-list li:last-child { border-bottom: none; }
        .fi-check { color: var(--success); font-weight: bold; flex-shrink: 0; margin-top: 1px; }
        .info-table { width: 100%; }
        .info-table tr { border-bottom: 1px solid var(--border); }
        .info-table td { padding: 10px 0; font-size: 14px; }
        .info-table td:first-child { color: var(--text-muted); width: 100px; }
        .info-table td:last-child { color: var(--text); font-weight: normal; }

        /* Sidebar (Flarum Style) */
        .sidebar { position: sticky; top: 68px; }
        .purchase-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.1); border: 1px solid #f0f0f0; margin-bottom: 20px; }
        .pc-header { background: var(--primary); padding: 32px 24px 28px; text-align: center; color: #fff; }
        .pc-header.purchased { background: var(--success); }
        .pc-header .price-tag { font-size: 2.8rem; font-weight: 300; letter-spacing: -1px; }
        .pc-header .price-tag .currency { font-size: 16px; vertical-align: top; margin-right: 2px; opacity: .9; }
        .pc-header .price-note { font-size: 13px; opacity: .9; margin-top: 6px; }
        .pc-body { padding: 24px; }
        .pc-features { list-style: none; margin-bottom: 18px; }
        .pc-features li { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 14px; color: #555; border-bottom: 1px solid #f8f8f8; }
        .pc-features li:last-child { border-bottom: none; }
        .pf-icon { color: #58a400; font-size: 16px; }
        .btn-buy { display: block; width: 100%; padding: 14px 16px; border: none; border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer; background: var(--primary); color: #fff; text-align: center; line-height: 20px; text-decoration: none; font-family: inherit; box-shadow: 0 4px 12px rgba(77, 105, 142, 0.3); transition: all 0.2s ease; }
        .btn-buy:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(77, 105, 142, 0.4); }
        .btn-login { display: block; width: 100%; padding: 12px 16px; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; background: #fff; color: var(--primary); border: 1px solid var(--primary); text-align: center; line-height: 20px; text-decoration: none; font-family: inherit; transition: all 0.2s; }
        .btn-login:hover { background: #f8f9fa; }
        .btn-dl { display: block; width: 100%; padding: 12px 16px; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--success); color: #fff; text-align: center; line-height: 20px; text-decoration: none; font-family: inherit; box-shadow: 0 4px 12px rgba(88, 164, 0, 0.3); transition: all 0.2s; }
        .btn-dl:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(88, 164, 0, 0.4); }
        .pc-footer { padding: 0 24px 20px; text-align: center; font-size: 12px; color: #999; }
        .purchased-badge { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; background: #e8f5e9; color: #2e7d32; border-radius: 6px; font-weight: 500; font-size: 14px; margin-bottom: 14px; }

        /* Access Box */
        .access-link-box { display: flex; background: var(--primary-light); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.access-link-box .link-label { display: flex; align-items: center; background: var(--primary); color: #fff; font-size: 12px; padding: 8px 12px; white-space: nowrap; flex-shrink: 0; }
        .access-link-box .link-text { flex: 1; padding: 8px 12px; font-size: 14px; color: #111; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .access-link-box .link-text a { color: var(--primary); text-decoration: none; }
        .access-label { font-size: 14px; color: var(--text-muted); margin-bottom: 4px; }
        .btn-copy { padding: 8px 13px; background: var(--primary); color: #fff; border: none; cursor: pointer; font-size: 14px; white-space: nowrap; font-family: inherit; font-weight: bold; }
        .btn-copy:hover { background: var(--primary-hover); }
        .btn-copy.copied { background: var(--success); }

        /* Cloud panel */
        .cloud-panel { background: var(--primary-light); border: 1px solid var(--border); border-radius: var(--radius); padding: 2px 14px; }
        .cloud-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 13px; }
        .cloud-row + .cloud-row { border-top: 1px dashed var(--border); }
        .cloud-ic { flex-shrink: 0; font-size: 15px; line-height: 1; }
        .cloud-url { flex: 1; color: var(--primary); text-decoration: none; word-break: break-all; overflow-wrap: anywhere; line-height: 1.4; }
        .cloud-url:hover { text-decoration: underline; }
        .cloud-key { flex: 1; min-width: 0; font-weight: 600; letter-spacing: 1px; word-break: normal; overflow-wrap: anywhere; font-family: monospace; color: #111; line-height: 1.4; }
        .cloud-row .btn-copy { padding: 5px 12px; border-radius: 4px; font-size: 12px; flex-shrink: 0; white-space: nowrap; }

        /* Modal */
        .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(77,105,142,.9); z-index: 1040; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
        .modal-overlay.show { display: flex; }
        .modal { background: #fff; border-radius: var(--radius); padding: 0; width: 440px; max-width: 92vw; box-shadow: 0 2px 6px rgba(0,0,0,.35); overflow: hidden; }
        .modal-header { padding: 18px 24px 14px; border-bottom: 1px solid var(--border); }
        .modal-header h3 { font-size: 18px; font-weight: normal; margin: 0; color: var(--text); }
        .modal-body { padding: 18px 24px; }
        .modal-footer { padding: 0 24px 18px; display: flex; gap: 8px; justify-content: flex-end; }
        .modal-footer .btn { width: auto; padding: 8px 13px; font-family: inherit; background: var(--primary-light); color: #667c99; border: none; border-radius: var(--radius); cursor: pointer; font-size: 14px; }

        /* Payment Methods */
        .pay-methods { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
        .pay-method { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all .15s; }
        .pay-method:hover { border-color: #c5cdd8; }
        .pay-method.selected { border-color: var(--primary); background: var(--primary-light); }
        .pay-method .pm-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c5cdd8; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .pay-method.selected .pm-radio { border-color: var(--primary); }
        .pay-method.selected .pm-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
        .pay-method .pm-icon { font-size: 1.2rem; flex-shrink: 0; }
        .pay-method .pm-info { flex: 1; }
        .pay-method .pm-name { font-weight: bold; font-size: 14px; color: var(--text); }
        .pay-method .pm-desc { font-size: 12px; color: #8596ad; }
        .pay-method .pm-balance { font-size: 14px; color: var(--primary); font-weight: bold; }
        .order-summary { background: var(--primary-light); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; }
        .order-summary .os-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
        .order-summary .os-total { font-weight: bold; color: var(--text); font-size: 14px; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 6px; }

        .toast { position: fixed; top: 20px; right: 20px; padding: 10px 18px; border-radius: 4px; color: #fff; font-size: 14px; z-index: 1060; animation: slideToast .3s ease; box-shadow: 0 2px 6px rgba(0,0,0,.35); font-weight: normal; }
        .toast-success { background: var(--success); } .toast-error { background: #d83e3e; }
        @keyframes slideToast { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

        /* ====== Flarum 风格 header 内小头像 ====== */
        .PostUser-name .avatar-sm {
            display: inline-flex; align-items: center; justify-content: center;
            width: 32px; height: 32px; border-radius: 50%;
            color: #fff; font-size: 14px; font-weight: 600;
            flex-shrink: 0;
        }

        /* discussion post */
        .discussion-post { background: #fff; border-radius: 8px; box-shadow: none; padding: 28px 0; display: flex; gap: 20px; border: 0; }
        .post-type-badge { font-size: 11px; color: #667c99; background: #f8f9fa; padding: 2px 8px; border-radius: 12px; display: inline-block; margin-top: 6px; }
        .post-body { flex: 1; min-width: 0; }
        /* Flarum 风格 Post-header：用户名 + 徽章 + 时间 */
        .post-header-flarum { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 0; }
        .post-header-flarum ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
        .post-header-flarum .item-user .PostUser-name { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
        .post-header-flarum .username { color: var(--text, #333); }
        .post-header-flarum .username:hover { color: var(--primary); }
        .post-header-flarum .badge-role { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 10px; background: var(--primary-light, #e4ecf5); color: var(--primary, #4d698e); }
        .post-header-flarum .badge-role.badge-admin { background: rgba(212,175,55,.16); color: #a67c00; }
        .post-header-flarum .item-meta { margin-left: auto; }
        .post-header-flarum .post-time { font-size: 12px; color: #7a8ca5; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
        .post-meta-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #f5f5f5; flex-wrap: wrap; }
        .tag-label { display: inline-block; padding: 4px 12px; border-radius: 14px; font-size: 12px; font-weight: 500; background: rgba(77, 105, 142, 0.1); color: var(--primary); }
        .post-time { font-size: 13px; color: #999; }
        .post-content { font-size: 15px; line-height: 1.8; color: #333; }
        .post-content p { margin-bottom: 12px; }
        .post-content img { max-width: 100%; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
        .post-content h1,.post-content h2 { margin: 24px 0 16px; padding-bottom: .3em; border-bottom: 1px solid #d0d7de; font-weight: 600; color: #111; }
        .post-content h3,.post-content h4 { margin: 20px 0 10px; font-weight: 600; color: #111; }
        .post-content blockquote { border-left: 4px solid #d0d7de; padding: 12px 16px; margin: 12px 0; color: #57606a; background: #f6f8fa; border-radius: 0; }
        .post-content ul,.post-content ol { padding-left: 24px; margin-bottom: 12px; }
        .post-content table { border-collapse: collapse; margin: 12px 0; width: 100%; display: block; overflow-x: auto; }
        .post-content table th,.post-content table td { border: 1px solid #d0d7de; padding: 8px 12px; font-size: 14px; }
        .post-content table th { background: #f6f8fa; font-weight: 600; }
        .post-content code { background: rgba(175,184,193,.2); padding: 2px 6px; border-radius: 6px; font-size: 13px; font-family: "SF Mono","Consolas","Liberation Mono",monospace; color: #d73a49; }
        .post-content pre { background: #fff; color: #24292e; padding: 0; border-radius: 6px; overflow: hidden; margin-bottom: 12px; font-size: 14px; line-height: 1.6; position: relative; border: 1px solid #e1e4e8; }
        /* 代码区容器：行号列 + 代码，整体滚动 */
        .post-content pre > .code-body, .Post-body pre > .code-body, .desc-text pre > .code-body, .discussion-post pre > .code-body {
            display: flex; align-items: flex-start; overflow: auto; max-height: max(50vh, 250px);
        }
        .post-content pre > .code-body .code-lines, .Post-body pre > .code-body .code-lines, .desc-text pre > .code-body .code-lines, .discussion-post pre > .code-body .code-lines {
            flex: none; position: sticky; left: 0; z-index: 1; min-width: 38px; padding: 6px 0 16px; text-align: right;
            color: #9ca3af; background: #f6f8fa; border-right: 1px solid #e1e4e8; user-select: none;
        }
        .post-content pre > .code-body .code-lines span, .Post-body pre > .code-body .code-lines span, .desc-text pre > .code-body .code-lines span, .discussion-post pre > .code-body .code-lines span {
            display: block; padding: 0 10px 0 6px; font-size: 14px; line-height: 1.6;
            font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        }
        .post-content pre > .code-body code, .Post-body pre > .code-body code, .desc-text pre > .code-body code, .discussion-post pre > .code-body code {
            flex: 1; overflow: visible; max-height: none; background: none; color: inherit; padding: 6px 16px 16px 16px; display: block; border-radius: 0; font-size: 14px; line-height: 1.6; font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        }
        /* 分类导航抽屉（hover 左上角返回按钮打开，参考目标站讨论列表） */
        .cat-drawer-mask {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,.4);
            z-index: 1580;
            opacity: 0;
            visibility: hidden;
            transition: opacity .3s ease, visibility .3s ease;
        }
        .cat-drawer-mask.active { opacity: 1; visibility: visible; }
        .cat-drawer {
            position: fixed;
            left: 0;
            top: 0;
            bottom: 0;
            width: 320px;
            max-width: 86vw;
            background: #fff;
            color: #333;
            z-index: 1590;
            transform: translateX(-100%);
            transition: transform .3s cubic-bezier(.4,0,.2,1);
            box-shadow: 2px 0 28px rgba(0,0,0,.18);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .cat-drawer.open { transform: translateX(0); }
        .cat-drawer-header {
            padding: 18px 22px 14px;
            border-bottom: 1px solid #eee;
            background: #fafbfc;
            flex-shrink: 0;
        }
        .cat-drawer-title {
            font-size: 16px;
            font-weight: 600;
            color: #333;
            margin: 0 0 3px;
        }
        .cat-drawer-sub { font-size: 12px; color: #999; }
        .cat-drawer-list {
            list-style: none;
            margin: 0;
            padding: 8px 0;
            flex: 1;
            overflow-y: auto;
        }
        .cat-drawer-list li { margin: 0; }
        .cat-drawer-list a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 22px;
            color: #333;
            text-decoration: none;
            font-size: 14px;
            transition: background .15s;
            border-left: 3px solid transparent;
        }
        .cat-drawer-list a:hover { background: #f5f7fa; border-left-color: var(--primary); color: var(--primary); }
        .cat-drawer-list a.active {
            background: rgba(77,105,142,.08);
            border-left-color: var(--primary);
            color: var(--primary);
            font-weight: 500;
        }
        .cat-drawer-list .nav-icon {
            width: 30px;
            height: 30px;
            border-radius: 6px;
            background: #f0f2f5;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            color: #4D698E;
            flex-shrink: 0;
            font-weight: 600;
        }
        .cat-drawer-list .nav-title {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            line-height: 1.4;
        }
        .cat-drawer-list .nav-meta {
            font-size: 11px;
            color: #999;
            flex-shrink: 0;
        }
        .category-nav-empty { padding: 24px; text-align: center; color: #999; font-size: 14px; }
        /* 深色模式 */
        html.dark .cat-drawer { background: #1e1f24; color: #d5d7dc; }
        html.dark .cat-drawer-header { background: #23242a; border-bottom-color: #33353d; }
        html.dark .cat-drawer-title { color: #e2e4e9; }
        html.dark .cat-drawer-list a { color: #c9ccd2; }
        html.dark .cat-drawer-list a:hover { background: #262830; color: #7ea6de; }
        html.dark .cat-drawer-list a.active { background: rgba(90,125,170,.16); color: #8fb2e8; }
        html.dark .cat-drawer-list .nav-icon { background: #2b2d35; color: #8fb2e8; }
        html.dark .cat-drawer-list .nav-meta { color: #7a7e88; }
        /* 移动端隐藏抽屉（移动端由左上角按钮/抽屉在 navBackBtn 触发，桌面 hover 为主；移动端也保留点击抽屉开关） */
        @media (max-width: 767.98px) {
            .cat-drawer { width: 86vw; }
        }
        /* 返回按钮贴最左（PC 详情页，目标站 Back to Discussion List 贴 x8；absolute 不占位，不挤站点名/导航） */
        @media (min-width: 769px) {
            .navbar-back-btn {
                position: absolute;
                left: 8px;
                top: 50%;
                transform: translateY(-50%);
                margin-left: 0;
                z-index: 5;
            }
        }
        /* macOS 编辑器风格代码块标题栏（红黄绿圆点 + 语言名 + 复制按钮） */
        .post-content pre > .code-header, .Post-body pre > .code-header, .desc-text pre > .code-header, .discussion-post pre > .code-header {
            display: flex; align-items: center; gap: 5px; padding: 7px 12px;
            background: #f3f4f6; border-bottom: 1px solid #e1e4e8;
            border-radius: 5px 5px 0 0; line-height: 1;
        }
        .post-content pre > .code-header .dot, .Post-body pre > .code-header .dot, .desc-text pre > .code-header .dot, .discussion-post pre > .code-header .dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
        .post-content pre > .code-header .dot.red, .Post-body pre > .code-header .dot.red, .desc-text pre > .code-header .dot.red, .discussion-post pre > .code-header .dot.red { background: #ff5f57; }
        .post-content pre > .code-header .dot.yellow, .Post-body pre > .code-header .dot.yellow, .desc-text pre > .code-header .dot.yellow, .discussion-post pre > .code-header .dot.yellow { background: #febc2e; }
        .post-content pre > .code-header .dot.green, .Post-body pre > .code-header .dot.green, .desc-text pre > .code-header .dot.green, .discussion-post pre > .code-header .dot.green { background: #28c840; }
        .post-content pre > .code-header .code-lang, .Post-body pre > .code-header .code-lang, .desc-text pre > .code-header .code-lang, .discussion-post pre > .code-header .code-lang {
            margin-left: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #6b7280;
            font-family: -apple-system, "PingFang SC", "Helvetica Neue", sans-serif; flex: 1;
        }
        .post-content pre > .code-header .copy-btn, .Post-body pre > .code-header .copy-btn, .desc-text pre > .code-header .copy-btn, .discussion-post pre > .code-header .copy-btn {
            position: static; opacity: 1; padding: 3px 9px; font-size: 11px; color: #6b7280;
            background: rgba(0,0,0,.05); border: 1px solid rgba(0,0,0,.12); border-radius: 4px; cursor: pointer; transition: background .15s;
        }
        .post-content pre > .code-header .copy-btn:hover, .Post-body pre > .code-header .copy-btn:hover, .desc-text pre > .code-header .copy-btn:hover, .discussion-post pre > .code-header .copy-btn:hover { background: rgba(0,0,0,.1); }
        .post-content pre > .code-header .copy-btn.copied, .Post-body pre > .code-header .copy-btn.copied { color: #16a34a; border-color: rgba(22,163,74,.4); }
        /* 代码高亮颜色（浅色模式 GitHub 风格，深色模式在下方覆盖） */
        .hl-keyword { color: #cf222e; }
        .hl-string { color: #0a3069; }
        .hl-comment { color: #6e7781; font-style: italic; }
        .hl-number { color: #0550ae; }
        .hl-function { color: #8250df; }
        /* highlight.js 配色（浅色 GitHub 风格） */
        .post-content pre code.hljs { background: none; padding: 6px 16px 16px 16px; font-size: 14px; }
        .hljs { color: #24292e; background: transparent; }
        .hljs-keyword, .hljs-literal, .hljs-selector-tag, .hljs-name { color: #cf222e; }
        .hljs-string, .hljs-regexp, .hljs-addition, .hljs-selector-attr { color: #0a3069; }
        .hljs-comment, .hljs-quote { color: #6e7781; font-style: italic; }
        .hljs-number, .hljs-symbol, .hljs-bullet { color: #0550ae; }
        .hljs-title, .hljs-section, .hljs-function .hljs-title { color: #8250df; }
        .hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable { color: #953800; }
        .hljs-built_in, .hljs-type, .hljs-class .hljs-title { color: #116329; }
        .hljs-meta, .hljs-meta .hljs-keyword { color: #cf222e; }
        .hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: bold; }
        .hl-type { color: #f9e2af; }
        .hl-operator { color: #94e2d5; }
        .hl-variable { color: #f38ba8; }
        .post-footer-bar { margin-top: 20px; padding-top: 16px; border-top: 1px solid #f0f0f0; }
        .file-info-pills { display: flex; gap: 8px; flex-wrap: wrap; }
        .info-pill { padding: 4px 12px; background: #f8f9fa; color: #667c99; border-radius: 12px; font-size: 12px; border: 1px solid #eee; }

        /* Sidebar stats */
        .sidebar-stats { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.08); border: 1px solid #f0f0f0; margin-top: 16px; overflow: hidden; }
        .sidebar-stat-item { display: flex; align-items: center; gap: 10px; padding: 12px 18px; font-size: 13px; color: #666; border-bottom: 1px solid #f8f8f8; }
        .sidebar-stat-item:last-child { border-bottom: none; }
        .sidebar-stat-item span:first-child { font-size: 16px; width: 24px; text-align: center; flex-shrink: 0; }
        /* 下载链接/网盘信息展示 */
        .stat-link-item { flex-wrap: wrap; align-items: flex-start; }
        .stat-link { flex: 1; min-width: 0; word-break: break-all; }
        .stat-link a { color: var(--primary); text-decoration: none; }
        .stat-key { background: #f4f6f9; padding: 2px 8px; border-radius: 4px; letter-spacing: 1px; font-weight: 600; color: #e17055; font-size: 12px; }
        /* 侧边栏：相关资源（原底部区块移至此处） */
        .sidebar-related { background:#fff; border-radius:8px; box-shadow:0 2px 8px rgba(0,0,0,.08); border:1px solid #f0f0f0; margin-top:16px; overflow:hidden; }
        .sidebar-related-head { font-size:14px; font-weight:600; color:#333; padding:14px 16px 10px; }
        .sidebar-related-list { list-style:none; padding:0; margin:0; }
        .sidebar-related-list li { border-top:1px solid #f5f5f5; }
        .sidebar-related-list a { display:block; padding:10px 16px; color:#444; text-decoration:none; font-size:13px; line-height:1.45; transition:background .15s,color .15s; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
        .sidebar-related-list a:hover { background:var(--control-bg-light); color:var(--primary); }


        /* audio-info-card: 评论区容器占位，无特殊样式但保留类名供扩展 */
        .audio-info-card { width: 100%; }

        /* ====== Comments (Flarum PostStream style) ====== */
        .comments-wrap { margin-top: 40px; position: relative; }
        .comments-header { padding: 0 0 18px; margin-bottom: 24px; border-bottom: 2px solid #f5f5f5; }
        .comments-header h3 { font-size: 18px; font-weight: 600; color: #333; }
        .comment-form-wrap { display: flex; gap: 16px; background: #fafafa; border-radius: 8px; padding: 20px; margin-bottom: 24px; border: 1px solid #f0f0f0; }
        .comment-form-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: bold; color: var(--primary); flex-shrink: 0; }
        .comment-form-body { flex: 1; }
        .comment-form-body textarea { width: 100%; padding: 12px 14px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 14px; font-family: inherit; color: #333; background: #fff; outline: none; resize: vertical; transition: border-color .2s, box-shadow .2s; min-height: 80px; }
        .comment-form-body textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(77, 105, 142, 0.1); }
        .comments-list { background: #fff; border-radius: 8px; border: 1px solid #f0f0f0; overflow: hidden; }
        .comment-item { display: flex; gap: 16px; padding: 20px 22px; border-bottom: 1px solid #f5f5f5; transition: background .15s; }
        .comment-item:hover { background: #fafafa; }
        .comment-item:last-child { border-bottom: none; }
        .comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; flex-shrink: 0; }
        .comment-body { flex: 1; min-width: 0; }
        .comment-header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
        .comment-author { font-size: 14px; font-weight: 600; color: #333; }
        .comment-time { font-size: 12px; color: #999; }
        .comment-content { font-size: 14px; color: #444; line-height: 1.7; word-break: break-word; }
        .comments-empty { text-align: center; padding: 40px 20px; color: #999; font-size: 14px; }
        /* ====== Flarum PostStream 评论风格 ====== */
        .PostStream-item { padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
        .PostStream-item:last-child { border-bottom: none; }
        .CommentPost .Post-container { display: flex; gap: 14px; }
        .Post-side { flex-shrink: 0; }
        .Post-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary-light, #e4ecf5); color: var(--primary, #4d698e); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex-shrink: 0; }
        .Post-main { flex: 1; min-width: 0; }
        .Post-header { margin-bottom: 4px; }
        .Post-header ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
        .PostUser-name { font-size: 14px; font-weight: 600; color: #333; margin: 0; }
        .PostUser-name .username { color: inherit; }
        .PostMeta { font-size: 12px; color: #999; }
        .Post-body { font-size: 14px; color: #444; line-height: 1.7; word-break: break-word; }
        .Post-body p { margin: 0 0 8px; }
        .Post-body p:last-child { margin-bottom: 0; }
        .Post-body code { background: rgba(175,184,193,.2); padding: 2px 6px; border-radius: 6px; font-size: 13px; font-family: "SF Mono","Consolas","Liberation Mono",monospace; color: #d73a49; }
        .Post-body pre { background: #fff; color: #24292e; padding: 0; border-radius: 6px; overflow: hidden; margin: 0 0 8px; font-size: 14px; line-height: 1.6; position: relative; border: 1px solid #e1e4e8; }
        .Post-body blockquote { border-left: 4px solid #d0d7de; padding: 8px 12px; margin: 0 0 8px; color: #57606a; background: #f6f8fa; }
        .Post-body table { border-collapse: collapse; margin: 8px 0; }
        .Post-body table th,.Post-body table td { border: 1px solid #d0d7de; padding: 6px 10px; }
        .Post-body table th { background: #f6f8fa; }
        .Post-body h1,.Post-body h2,.Post-body h3,.Post-body h4 { margin: 14px 0 8px; font-weight: 600; color: #111; }
        .Post-actions { margin-top: 6px; }
        .Post-actions ul { list-style: none; margin: 0; padding: 0; }
        .Post-actions .Button--link { background: none; border: none; color: #999; font-size: 12px; cursor: pointer; padding: 2px 6px; border-radius: 4px; font-family: inherit; }
        .Post-actions .Button--link:hover { color: var(--primary, #4d698e); background: var(--control-bg, #f0f0f0); }
        .ReplyPlaceholder { display: block; width: 100%; text-align: left; background: transparent; border: 1px dashed #d0d0d0; border-radius: 8px; padding: 12px 14px; margin: 4px 0 18px; cursor: pointer; font-family: inherit; transition: border-color .15s, background .15s; }
        .ReplyPlaceholder:hover { border-color: var(--primary, #4d698e); background: var(--control-bg-light, #f7f7f7); }
        .ReplyPlaceholder .Post-container { display: flex; gap: 12px; align-items: center; }
        .ReplyPlaceholder .Post-avatar { width: 32px; height: 32px; font-size: 13px; }
        .ReplyPlaceholder .Post-header { color: #999; font-size: 14px; margin: 0; }
        .comment-editor { display: none; margin: 4px 0 18px; }
        .comment-editor.open { display: block; }
        .comment-editor .Post-container { display: flex; gap: 14px; }
        .comment-editor textarea { width: 100%; padding: 12px 14px; border: 1px solid #e0e0e0; border-radius: 8px; font-size: 14px; font-family: inherit; color: #333; background: #fff; outline: none; resize: vertical; min-height: 80px; transition: border-color .2s, box-shadow .2s; }
        .comment-editor textarea:focus { border-color: var(--primary, #4d698e); box-shadow: 0 0 0 3px rgba(77,105,142,.1); }
        .comment-editor-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
        html.dark .PostStream-item { border-color: #2a2a3e; }
        html.dark .PostUser-name { color: #e0e0e0; }
        html.dark .Post-body { color: #ccc; }
        html.dark .Post-body code { background: rgba(110,118,129,.4); color: #f0a5c0; }
        html.dark .Post-body pre { background: #161b22; color: #d0d7de; border-color: #30363d; }
        html.dark .Post-body pre code { background: none; color: #d0d7de; }
        html.dark .Post-body blockquote { background: #161b22; color: #9da7b3; border-left-color: #30363d; }
        html.dark .Post-body table th, html.dark .Post-body table td { border-color: #30363d; }
        html.dark .Post-body table th { background: #161b22; }
        html.dark .Post-body h1, html.dark .Post-body h2, html.dark .Post-body h3, html.dark .Post-body h4 { color: #e0e0e0; }
        html.dark .ReplyPlaceholder { border-color: #444; }
        html.dark .comment-editor textarea { background: #1e1e32; border-color: #2a2a3e; color: #e0e0e0; }

        .error-page { text-align: center; padding: 80px 20px; }
        .error-page h2 { font-size: 24px; color: #d63031; margin-bottom: 16px; }
        .error-page a { color: var(--primary); text-decoration: none; font-size: 14px; }
        .error-page a:hover { text-decoration: underline; }
        @media (max-width: 767.98px) {
            .product-grid { grid-template-columns: 1fr; }
            .sidebar { position: static; }
            .preview-thumb { padding: 24px 16px; min-height: 140px; }
            .preview-thumb .file-icon { font-size: 3rem; }
            .preview-info { padding: 16px; }
            .preview-info h1 { font-size: 18px; }
            .discussion-post { flex-direction: row; gap: 12px; padding: 16px 0; }
            /* Flarum 移动端 header 单行：用户名 + 时间同行，时间溢出省略 */
            .post-header-flarum ul { flex-wrap: nowrap; }
            .post-header-flarum .item-user { flex-shrink: 0; }
            .post-header-flarum .item-user .badge-role { display: none; }
            .post-header-flarum .item-meta { flex: 1; min-width: 0; margin-left: auto; }
            .post-header-flarum .item-meta .post-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
            .post-header-flarum .item-meta .tag-label, .post-header-flarum .item-meta .dl-count { display: none; }
            .comment-form-wrap { flex-direction: column; gap: 10px; padding: 12px; }
            .comment-item { padding: 12px; gap: 10px; }
            .comment-avatar { width: 30px; height: 30px; font-size: 12px; }
            .access-link-box { flex-direction: column; }
            .access-link-box .link-text { white-space: normal; word-break: break-all; padding: 8px; }
            .access-link-box .btn-copy { width: 100%; text-align: center; }
            .cloud-row .btn-copy { width: auto; }
            .toast { top: auto !important; bottom: 16px; right: 12px; left: 12px; text-align: center; font-size: 13px; }
            .modal { width: 100%; max-width: 100%; border-radius: 12px 12px 0 0; }
            .modal-header { padding: 14px 16px 10px; }
            .modal-body { padding: 14px 16px; }
            .modal-footer { padding: 0 16px 14px; flex-wrap: wrap; }
            .modal-footer .btn { flex: 1; min-width: 80px; }
            .purchase-card { margin-bottom: 12px; }
            .pc-header { padding: 16px; }
            .pc-header .price-tag { font-size: 1.6rem; }
            .pc-body { padding: 14px 16px; }
            .sidebar-stats { margin-top: 8px; }
            .sidebar-stat-item { justify-content: center; text-align: center; }
        }
        /* Flarum 容器宽度阶梯：头条与主内容跨断点对齐 */
        @media (min-width: 768px) {
            .product-page, .breadcrumb-inner { width: min(991.98px, 100%); }
        }
        @media (min-width: 992px) {
            .product-page, .breadcrumb-inner { width: min(1099.98px, 100%); }
        }
        @media (min-width: 1100px) {
            .product-page, .breadcrumb-inner { width: min(1200px, 100%); }
        }
        @media (min-width: 1600px) {
            .product-page, .breadcrumb-inner { width: 1300px; }
        }
        @media (min-width: 2000px) {
            .product-page, .breadcrumb-inner { width: 1500px; }
        }
        /* 右栏区间固定宽度（与音频页一致，保证 Composer 对齐） */
        @media (min-width: 768px) and (max-width: 991.98px) {
            .product-grid { grid-template-columns: 1fr 280px; gap: 20px; }
        }
        @media (min-width: 992px) and (max-width: 1199.98px) {
            .product-grid { grid-template-columns: 1fr 320px; gap: 28px; }
        }
        @media (min-width: 1200px) and (max-width: 1599.98px) {
            .product-grid { grid-template-columns: 1fr 360px; gap: 36px; }
        }
        @media (min-width: 1600px) {
            .product-grid { grid-template-columns: 1fr 340px; gap: 32px; }
        }
    
        /* 详情页：站点名称/导航与内容区域对齐（PC 端返回按钮已隐藏，不再预留 52px 偏移） */
        @media (min-width: 769px) {
            .navbar-left { padding-left: 0; }
        }
        /* ====== 普通详情页夜间模式补全（配色对齐 detail-audio：#1e1e32 卡片 / #2a2a3e 边框） ====== */
        html.dark .discussion-post { background: transparent; border-color: #2a2a3e; }
        html.dark .post-meta-top { border-bottom-color: #2a2a3e; }
        html.dark .post-time { color: #8899aa; }
        html.dark .post-content { color: #ccc; }
        html.dark .post-content h1, html.dark .post-content h2, html.dark .post-content h3, html.dark .post-content h4 { color: #e0e0e0; }
        html.dark .post-content h1, html.dark .post-content h2 { border-bottom-color: #21262d; }
        html.dark .post-content blockquote { background: #161b22; color: #9da7b3; border-left-color: #30363d; }
        html.dark .post-content pre { background: #161b22; border-color: #30363d; color: #d0d7de; }
        html.dark .post-content code { background: rgba(110,118,129,.4); color: #f0a5c0; }
        html.dark .post-content pre code { background: none; color: #d0d7de; }
        html.dark .post-content pre > .code-header, html.dark .Post-body pre > .code-header, html.dark .desc-text pre > .code-header, html.dark .discussion-post pre > .code-header { background: #21262d; border-bottom-color: #30363d; }
        html.dark .post-content pre > .code-header .code-lang, html.dark .Post-body pre > .code-header .code-lang, html.dark .desc-text pre > .code-header .code-lang, html.dark .discussion-post pre > .code-header .code-lang { color: #8b949e; }
        html.dark .post-content pre > .code-header .copy-btn, html.dark .Post-body pre > .code-header .copy-btn, html.dark .desc-text pre > .code-header .copy-btn, html.dark .discussion-post pre > .code-header .copy-btn { color: #8b949e; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
        html.dark .post-content pre > .code-header .copy-btn:hover, html.dark .Post-body pre > .code-header .copy-btn:hover { background: rgba(255,255,255,.14); color: #e0e0e0; }
        html.dark .post-content pre > .code-header .copy-btn.copied { color: #7ee2a8; border-color: rgba(126,226,168,.4); }
        html.dark .post-content pre > .code-body .code-lines, html.dark .Post-body pre > .code-body .code-lines, html.dark .desc-text pre > .code-body .code-lines, html.dark .discussion-post pre > .code-body .code-lines { color: #8b949e; background: #161b22; border-right-color: #30363d; }
        html.dark .post-content table th, html.dark .post-content table td { border-color: #30363d; }
        html.dark .post-content table th { background: #161b22; }
        html.dark .hl-keyword { color: #cba6f7; }
        html.dark .hl-string { color: #a6e3a1; }
        html.dark .hl-comment { color: #6c7086; }
        html.dark .hl-number { color: #fab387; }
        html.dark .hl-function { color: #89b4fa; }
        html.dark .hl-type { color: #f9e2af; }
        html.dark .hl-operator { color: #94e2d5; }
        html.dark .hl-variable { color: #f38ba8; }
        /* highlight.js 深色配色（GitHub Dark 风格） */
        html.dark .hljs { color: #c9d1d9; }
        html.dark .hljs-keyword, html.dark .hljs-literal, html.dark .hljs-selector-tag, html.dark .hljs-name { color: #ff7b72; }
        html.dark .hljs-string, html.dark .hljs-regexp, html.dark .hljs-addition, html.dark .hljs-selector-attr { color: #a5d6ff; }
        html.dark .hljs-comment, html.dark .hljs-quote { color: #8b949e; }
        html.dark .hljs-number, html.dark .hljs-symbol, html.dark .hljs-bullet { color: #79c0ff; }
        html.dark .hljs-title, html.dark .hljs-section, html.dark .hljs-function .hljs-title { color: #d2a8ff; }
        html.dark .hljs-attr, html.dark .hljs-attribute, html.dark .hljs-variable, html.dark .hljs-template-variable { color: #79c0ff; }
        html.dark .hljs-built_in, html.dark .hljs-type, html.dark .hljs-class .hljs-title { color: #ffa657; }
        html.dark .hljs-meta, html.dark .hljs-meta .hljs-keyword { color: #ff7b72; }
        html.dark .post-header-flarum { border-bottom-color: transparent; }
        html.dark .post-header-flarum .username { color: #e0e0e0; }
        html.dark .post-header-flarum .post-time { color: #8899aa; }
        html.dark .post-header-flarum .badge-role { background: #2a2a3e; color: #8ea4f0; }
        html.dark .post-header-flarum .badge-role.badge-admin { background: rgba(212,175,55,.18); color: #d9b44a; }
        html.dark .post-footer-bar { border-top-color: #2a2a3e; }
        html.dark .purchase-card { background: #1e1e32; border-color: #2a2a3e; }
        html.dark .pc-features li { color: #b0b6c4; border-bottom-color: #2a2a3e; }
        html.dark .btn-login { background: #1e1e32; border-color: #4d698e; color: #8ea4f0; }
        html.dark .btn-login:hover { background: #2a2a3e; }
        html.dark .pc-footer { color: #7a8794; }
        html.dark .sidebar-stats { background: #1e1e32; border-color: #2a2a3e; }
        html.dark .sidebar-stat-item { color: #b0b6c4; border-bottom-color: #2a2a3e; }
        html.dark .stat-key { background: #2a2a3e; color: #f0a890; }
        html.dark .sidebar-related { background:#1e1e32; border-color:#2a2a3e; }
        html.dark .sidebar-related-head { color:#c5c9d6; }
        html.dark .sidebar-related-list li { border-top-color:#2a2a3e; }
        html.dark .sidebar-related-list a { color:#b0b6c4; }
        html.dark .sidebar-related-list a:hover { background:#2a2a3e; color:#8ea4f0; }

        html.dark .access-link-box { background: #2a2a3e; border-color: #33334a; }
        html.dark .access-link-box .link-text { color: #d0d0d8; }
        html.dark .cloud-panel { background: #2a2a3e; border-color: #33334a; }
        html.dark .cloud-row { color: #b0b6c4; }
        html.dark .cloud-row .cloud-key { color: #d0d0d8; }
        html.dark .cloud-url { color: #8ea4f0; }
        html.dark .comments-header { border-bottom-color: #2a2a3e; }
        html.dark .comments-header h3 { color: #e0e0e0; }
        html.dark .comment-form-wrap { background: #1e1e32; border-color: #2a2a3e; }
        html.dark .comment-form-body textarea { background: #1e1e32; border-color: #2a2a3e; color: #e0e0e0; }
        html.dark .comments-list { background: #1e1e32; border-color: #2a2a3e; }
        html.dark .comment-item { border-bottom-color: #2a2a3e; }
        html.dark .comment-item:hover { background: #242433; }
        html.dark .comment-author { color: #e0e0e0; }
        html.dark .comment-time { color: #8899aa; }
        html.dark .comment-content { color: #ccc; }
        html.dark .comments-empty { color: #8899aa; }
        html.dark .modal { background: #1e1e32; }
        html.dark .modal-header { border-bottom-color: #2a2a3e; }
        html.dark .modal-header h3 { color: #e0e0e0; }
        html.dark .pay-method { border-color: #33334a; }
        html.dark .pay-method .pm-name { color: #e0e0e0; }
        html.dark .pay-method .pm-desc { color: #8899aa; }
        /* 正文 desc-text 夜间模式：修复深色背景下正文黑色不可见 */
        html.dark .desc-text, html.dark .desc-text p, html.dark .desc-text li, html.dark .desc-text ul, html.dark .desc-text ol { color: #ccc; }
        html.dark .desc-text strong, html.dark .desc-text b { color: #d0d0d8; }
        html.dark .desc-text a { color: #8ea4f0; }
        html.dark .desc-text a:hover { color: #a8bdf5; }
        html.dark .desc-text table { color: #ccc; }
        html.dark .desc-text th, html.dark .desc-text td { border-color: #2a2a3e; }
        html.dark .desc-text hr { border-color: #2a2a3e; }
/* ============================================================
 * detail-scrubber.css
 * 详情页右侧时间轴 scrubber（参考 Flarum demo 极简风格）
 * 加载在 style.css + detail.css 之后，用于覆盖默认样式
 * ============================================================ */

/* 顶部"回复"按钮：与 demo "Log In to Reply" 风格一致（保留蓝色按钮） */
.scrubber-reply {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 10px 16px; margin-bottom: 14px;
    border: none; border-radius: 6px;
    background: var(--primary, #4D698E); color: #fff;
    font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    transition: opacity .15s, transform .15s;
}
.scrubber-reply:hover { opacity: .92; transform: translateY(-1px); }

/* 容器：上下两个文本链接 + 中间轨道，与 demo "↗ Original Post / ⌄ Now" 一致 */
.scrubber {
    display: flex; flex-direction: column;
    padding: 4px 0 0;
    margin-bottom: 16px;
    font-size: 13px;
}
.scrubber-first, .scrubber-last {
    display: flex; align-items: center; gap: 6px;
    border: 0; background: transparent;
    padding: 4px 0 4px 14px;
    font-size: 12px; font-weight: 400;
    color: var(--text-muted, #6c7d93);
    cursor: pointer; font-family: inherit;
    line-height: 1.4;
    transition: color .15s;
}
.scrubber-last { padding: 6px 0 0 14px; }
.scrubber-first:hover, .scrubber-last:hover { color: var(--link, #4D698E); }
.scrubber-first i, .scrubber-last i { font-size: 11px; }

/* 中间的轨道：固定高度 280px，::before 画贯穿的渐隐竖线 */
.scrubber-scrollbar {
    flex: 1;
    min-height: 200px;
    height: 280px;
    margin: 4px 0 0;
    position: relative;
    cursor: pointer;
    touch-action: none;
    user-select: none;
    z-index: 5;
}
.scrubber-scrollbar::before {
    content: "";
    position: absolute;
    left: 19px;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(160, 175, 195, .55) 8%,
        rgba(160, 175, 195, .55) 92%,
        transparent 100%
    );
    border-radius: 1px;
    z-index: 0;
}

/* 旧版占位元素隐藏 */
.scrubber-before, .scrubber-after, .scrubber-unread { display: none !important; }

/* handle：绝对定位、flex 横排、cursor grab */
.scrubber-handle {
    position: absolute;
    left: 0; right: 0;
    min-height: 28px;
    display: flex; align-items: center; gap: 10px;
    padding: 4px 12px 4px 14px;
    background: transparent;
    cursor: grab;
    z-index: 2;
    /* top/height 由 JS 用 px 注入，避免百分比算法跑偏 */
}
.scrubber-handle:active { cursor: grabbing; }

/* 圆点：替代原 4px 长条，光晕让它一眼可见 */
.scrubber-bar {
    position: relative;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--primary, #4D698E);
    box-shadow: 0 0 0 5px rgba(77, 105, 142, .18), 0 1px 2px rgba(0, 0, 0, .2);
    flex-shrink: 0;
    margin-left: 13px;
    transition: transform .15s, box-shadow .15s;
}
.scrubber-handle:hover .scrubber-bar {
    transform: scale(1.18);
    box-shadow: 0 0 0 7px rgba(77, 105, 142, .25), 0 1px 3px rgba(0, 0, 0, .25);
}
.scrubber-handle:active .scrubber-bar {
    transform: scale(1.25);
    box-shadow: 0 0 0 9px rgba(77, 105, 142, .32);
}

/* 信息块：紧贴圆点右侧，扁平化（demo 的 "X of N posts / 时间" 风格） */
.scrubber-info {
    position: static !important;
    left: auto !important; right: auto !important; top: auto !important;
    transform: none !important;
    flex: 1; min-width: 0;
    text-align: left;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    line-height: 1.35;
}
.scrubber-info strong {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text, #1c2630);
    margin: 0;
    transition: color .15s;
}
.scrubber-info strong em {
    font-style: normal;
    color: var(--text-muted, #6c7d93);
    font-weight: 400;
    margin: 0 4px;
}
.scrubber-info .scrubber-info-desc,
.scrubber-info .scrubber-desc {
    display: block;
    margin-top: 1px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted, #6c7d93);
}

/* 拖动中：数字高亮强调 */
.scrubber-handle.is-dragging .scrubber-bar {
    transform: scale(1.25);
    box-shadow: 0 0 0 9px rgba(77, 105, 142, .32);
}
.scrubber-handle.is-dragging .scrubber-info strong { color: var(--primary, #4D698E); }

/* 暗色主题：轴线、文本、背景的暗适配 */
html.dark .scrubber-scrollbar::before {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(120, 140, 170, .35) 8%,
        rgba(120, 140, 170, .35) 92%,
        transparent 100%
    );
}
html.dark .scrubber-bar { box-shadow: 0 0 0 5px rgba(110, 145, 195, .25), 0 1px 2px rgba(0, 0, 0, .4); }
html.dark .scrubber-info strong { color: var(--text-color, #e6ecf3); }
html.dark .scrubber-info em { color: var(--text-muted, #8696aa); }

/* 移动端：底部目录抽屉（替代原 scrubber 抽屉） */
.scrubber-mobile-overlay { display: none; }
.scrubber-mobile-drawer { display: none; }

@media (max-width: 767.98px) {
    #scrubber,
    .scrubber-reply { display: none !important; }

    /* 半透明遮罩 */
    .scrubber-mobile-overlay {
        display: block;
        position: fixed; inset: 0;
        background: rgba(0,0,0,.42);
        opacity: 0; pointer-events: none;
        transition: opacity .25s ease;
        z-index: 90;
    }
    .scrubber-mobile-overlay.is-open {
        opacity: 1; pointer-events: auto;
    }

    /* 底部抽屉容器 */
    .scrubber-mobile-drawer {
        display: flex; flex-direction: column;
        position: fixed; left: 0; right: 0; bottom: 0;
        background: #fff;
        border-radius: 14px 14px 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,.18);
        padding: 8px 0 calc(16px + env(safe-area-inset-bottom, 0px));
        transform: translateY(100%);
        transition: transform .3s cubic-bezier(.2,.8,.2,1);
        z-index: 100;
        max-height: 70vh;
    }
    .scrubber-mobile-drawer.is-open {
        transform: translateY(0);
    }
    .smd-handle {
        width: 36px; height: 4px; border-radius: 2px;
        background: #e3e8ef;
        margin: 0 auto 12px;
        flex-shrink: 0;
    }

    /* 目录抽屉：标题 */
    .toc-mobile-header {
        display: flex; align-items: center; justify-content: space-between;
        padding: 0 16px 12px;
        border-bottom: 1px solid #f5f5f5;
        font-size: 15px; font-weight: 600;
        color: #333;
        flex-shrink: 0;
    }
    .toc-mobile-header i { color: var(--primary, #4D698E); margin-right: 6px; }
    .toc-mobile-close {
        background: transparent; border: 0; padding: 4px 8px;
        font-size: 18px; color: #8a94a6; cursor: pointer;
        line-height: 1;
    }

    /* 目录抽屉：可滚动列表 */
    .toc-mobile-body {
        overflow-y: auto;
        flex: 1 1 auto;
        min-height: 0;
        padding: 4px 0;
    }
    .toc-mobile-list { list-style: none; margin: 0; padding: 0; }
    .toc-mobile-list li { margin: 0; padding: 0; }
    .toc-mobile-list a {
        display: block;
        padding: 11px 16px 11px 18px;
        font-size: 14px; line-height: 1.4;
        color: #444;
        text-decoration: none;
        border-left: 3px solid transparent;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        transition: background .15s, color .15s, border-color .15s;
    }
    .toc-mobile-list a:active,
    .toc-mobile-list a.active {
        background: var(--control-bg-light, #f5f7fa);
        color: var(--primary, #4D698E);
        border-left-color: var(--primary, #4D698E);
    }
    .toc-mobile-list .toc-h2 a { padding-left: 18px; }
    .toc-mobile-list .toc-h3 a { padding-left: 32px; font-size: 13px; }
    .toc-mobile-list .toc-h4 a { padding-left: 46px; font-size: 12px; color: #6c7d93; }
    .toc-mobile-list .toc-h5 a,
    .toc-mobile-list .toc-h6 a { padding-left: 60px; font-size: 12px; color: #6c7d93; }

    /* 暗色主题适配 */
    html.dark .scrubber-mobile-drawer { background: #1e1e32; border-top: 1px solid rgba(255,255,255,.08); }
    html.dark .smd-handle { background: rgba(255,255,255,.18); }
    html.dark .toc-mobile-header { color: #c5c9d6; border-bottom-color: #2a2a3e; }
    html.dark .toc-mobile-close { color: #8696aa; }
    html.dark .toc-mobile-list a { color: #b0b6c4; }
    html.dark .toc-mobile-list a:active,
    html.dark .toc-mobile-list a.active { background: #2a2a3e; color: #8ea4f0; border-left-color: #8ea4f0; }
    html.dark .toc-mobile-list .toc-h4 a,
    html.dark .toc-mobile-list .toc-h5 a,
    html.dark .toc-mobile-list .toc-h6 a { color: #8696aa; }
}

/* 避免旧 CSS 中遗留的 z-index 兜底与我们冲突 */
.scrubber-scrollbar > * { box-sizing: border-box; }

/* 移动端底部购买栏（非文档类资源）：常驻底部，便于移动端购买/下载 */
.mobile-buybar { display: none; }
@media (max-width: 767.98px) {
    .mobile-buybar.show {
        display: flex;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
        align-items: center; gap: 12px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: #fff; border-top: 1px solid var(--border);
        box-shadow: 0 -4px 16px rgba(0,0,0,.12);
    }
    html.dark .mobile-buybar.show { background: #1e1e32; border-top-color: #2a2a3e; }
    .mobile-buybar.show .mbb-price { flex: 1; min-width: 0; display: flex; flex-direction: column; }
    .mobile-buybar.show .mbb-price #mbbPrice { font-size: 18px; font-weight: 700; color: var(--primary); line-height: 1.15; }
    .mobile-buybar.show .mbb-price .mbb-note { font-size: 11px; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-buybar.show .mbb-btn {
        flex-shrink: 0; border: none; border-radius: 8px; padding: 12px 22px;
        font-size: 15px; font-weight: 600; color: #fff; background: var(--primary);
        cursor: pointer; font-family: inherit;
    }
    .mobile-buybar.show .mbb-btn:active { opacity: .9; }
    body.detail-mobile-buybar { padding-bottom: 72px; }
}

/* 详情页：导航栏容器直接沿用全局 .container 宽度阶梯，
   与 .product-page 完全对齐，保证 logo/导航 与 正文左右边缘一致。 */

/* ====== 资源评分组件 ====== */
.rating-widget { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 16px; background: var(--primary-light); border: 1px solid var(--border); border-radius: var(--radius); flex-wrap: wrap; }
.rw-stars { display: inline-flex; gap: 4px; font-size: 22px; line-height: 1; cursor: pointer; }
.rw-star { color: var(--text-muted); opacity: .4; transition: color .12s, transform .12s, opacity .12s; user-select: none; }
.rw-star.on { color: #f5a623; opacity: 1; }
.rw-star:hover { transform: scale(1.12); }
.rw-meta { font-size: 14px; color: var(--text); }
.rw-meta b { color: #f5a623; font-size: 16px; }
.rw-sub { color: var(--text-muted); font-size: 13px; margin-left: 4px; }
.rw-hint { font-size: 12px; color: var(--text-muted); width: 100%; margin-top: 2px; }

/* ============================================================
 * Markdown 文档目录（右侧边栏，替换原 scrubber 区域）
 * 根据正文 Markdown 大标题（h1~h6）生成可跳转目录
 * ============================================================ */
.toc-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    border: 1px solid #f0f0f0;
    margin-bottom: 16px;
    overflow: hidden;
}
.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f5f5f5;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}
.toc-header i { color: var(--primary, #4D698E); margin-right: 6px; }
.toc-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted, #6c7d93);
    background: var(--control-bg-light, #f5f7fa);
    padding: 2px 8px;
    border-radius: 10px;
}
.toc-nav {
    max-height: 460px;
    overflow-y: auto;
    padding: 4px 0 8px;
}
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { margin: 0; padding: 0; }
.toc-list a {
    display: block;
    padding: 7px 16px 7px 18px;
    font-size: 13px;
    line-height: 1.45;
    color: #444;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.toc-list a:hover {
    background: var(--control-bg-light, #f5f7fa);
    color: var(--primary, #4D698E);
}
.toc-list a.active {
    border-left-color: var(--primary, #4D698E);
    color: var(--primary, #4D698E);
    background: var(--control-bg-light, #f5f7fa);
    font-weight: 500;
}
.toc-list .toc-h2 a { padding-left: 18px; }
.toc-list .toc-h3 a { padding-left: 32px; font-size: 12.5px; }
.toc-list .toc-h4 a { padding-left: 46px; font-size: 12px; color: var(--text-muted, #6c7d93); }
.toc-list .toc-h5 a,
.toc-list .toc-h6 a { padding-left: 60px; font-size: 12px; color: var(--text-muted, #6c7d93); }
.toc-empty {
    display: none;
    padding: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted, #6c7d93);
}
.toc-empty.show { display: block; }

/* 暗色主题：对齐右侧其它卡片（sidebar-stats / sidebar-related） */
html.dark .toc-card { background: #1e1e32; border-color: #2a2a3e; }
html.dark .toc-header { color: #c5c9d6; border-bottom-color: #2a2a3e; }
html.dark .toc-count { background: #2a2a3e; color: #8696aa; }
html.dark .toc-list a { color: #b0b6c4; }
html.dark .toc-list a:hover { background: #2a2a3e; color: #8ea4f0; }
html.dark .toc-list a.active { background: #2a2a3e; color: #8ea4f0; border-left-color: #8ea4f0; }

/* 移动端：详情页右侧栏整体下移，目录随侧边栏隐藏（保持与旧 scrubber 一致的行为） */
@media (max-width: 767.98px) {
    #tocCard { display: none !important; }
}
