:root {
    --bg-color: #f4f5f7;
    --text-color: #2c3e50;
    --card-bg: #ffffff;
    --primary-color: #3498db;
    --border-color: #e2e8f0;
    --header-bg: #ffffff;
    --footer-bg: #f8fafc;
    --link-color: #2980b9;
    --code-bg: #f1f5f9;
}

@media (prefers-color-scheme: dark) and (max-width: 1px) {
    :root {
        --bg-color: #0f172a;
        --text-color: #e2e8f0;
        --card-bg: #1e293b;
        --primary-color: #38bdf8;
        --border-color: #334155;
        --header-bg: #1e293b;
        --footer-bg: #0f172a;
        --link-color: #7dd3fc;
        --code-bg: #0f172a;
    }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a { color: var(--link-color); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; text-decoration: underline; }

.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* Main Content */
.main-content {
    background-color: var(--card-bg);
    padding: 40px;
    margin-top: 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
@media (max-width: 600px) {
    .main-content { padding: 20px; margin-top: 15px; border-radius: 8px; }
}

/* Typography */
h1, h2, h3, h4 { margin-top: 1.5em; margin-bottom: 0.5em; font-weight: 700; color: var(--text-color); }
h1 { font-size: 2rem; border-bottom: 2px solid var(--border-color); padding-bottom: 8px; }
h2 { font-size: 1.5rem; border-bottom: 1px solid var(--border-color); padding-bottom: 6px; }
h3 { font-size: 1.25rem; }
p { margin-bottom: 1em; }

/* Lists */
ul, ol { margin-bottom: 1em; padding-left: 24px; }
li { margin-bottom: 0.5em; }

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 12px 16px;
    margin: 0 0 1em 0;
    background-color: var(--code-bg);
    border-radius: 0 8px 8px 0;
}

/* Code */
code {
    background-color: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.9em;
}

/* Tables */
table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; }
th, td { padding: 12px; border: 1px solid var(--border-color); text-align: left; }
th { background-color: var(--code-bg); font-weight: 600; }

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
    display: block;
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    opacity: 0.8;
}

/* Homepage Cards */
.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}
.card h3 { margin-top: 0; margin-bottom: 12px; font-size: 1.25rem; border: none; padding-bottom: 0; }
.card h3 a { color: var(--text-color); }
.card h3 a:hover { color: var(--primary-color); text-decoration: none; }
.card p { flex-grow: 1; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    transition: background-color 0.2s;
}
.btn:hover { background-color: var(--hover-color); color: #fff; text-decoration: none; }


/* Navbar UI Module */
.navbar-wrapper {
    position: sticky;
    top: 16px;
    z-index: 100;
    max-width: 1050px;
    margin: 16px auto;
    padding: 0 16px;
}
.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(22, 27, 34, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
@media all {
    .navbar-inner {
        background: rgba(248, 250, 252, 0.85);
        border: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    }
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-icon {
    width: 36px;
    height: 36px;
    background: rgba(56, 189, 248, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
}
@media all {
    .brand-icon { background: rgba(52, 152, 219, 0.1); border-color: rgba(52, 152, 219, 0.2); }
}
.brand-text {
    display: flex;
    flex-direction: column;
}
.brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
}
.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    margin-top: 2px;
}
.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}
.nav-item {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-1px);
}
@media all {
    .nav-item:hover { background: rgba(0, 0, 0, 0.04); }
}
.nav-item.active {
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary-color);
    border-color: rgba(56, 189, 248, 0.2);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
@media all {
    .nav-item.active {
        background: rgba(52, 152, 219, 0.1);
        border-color: rgba(52, 152, 219, 0.2);
    }
}
.nav-special {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.nav-special:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.6);
}
@media all {
    .nav-special {
        background: rgba(255, 255, 255, 0.5);
        border-color: rgba(52, 152, 219, 0.5);
    }
    .nav-special:hover {
        background: rgba(52, 152, 219, 0.15);
        border-color: rgba(52, 152, 219, 0.7);
    }
}

/* Tablet & Mobile Navigation */
@media (max-width: 992px) {
    .navbar-wrapper { margin: 10px auto; top: 10px; padding: 0 10px; }
    .brand-subtitle { display: none; }
    .nav-links { gap: 4px; }
    .nav-item { padding: 8px 10px; font-size: 0.85rem; }
}

@media (max-width: 768px) {
    .navbar-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        gap: 12px;
    }
    .nav-links {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .nav-links::-webkit-scrollbar { display: none; }
}

/* ==========================================================================
   内容页统一样式（front matter: page_class: ap-page）
   只作用于 .ap-page，首页不受影响
   ========================================================================== */
.ap-page {
    --ap-accent: #2563eb;
    --ap-accent-strong: #1d4ed8;
    --ap-accent-soft: rgba(37, 99, 235, 0.08);
    --ap-on-accent: #ffffff;
    --ap-surface: #f8fafc;
    --ap-surface-raised: #ffffff;
    --ap-line: #e2e8f0;
    --ap-muted: #64748b;
    --ap-coupon-bg: #fff7ed;
    --ap-coupon-line: #fdba74;
    --ap-coupon-text: #9a3412;
    --ap-gold: #d97706;
    --ap-silver: #64748b;
    --ap-bronze: #b45309;
    --ap-on-medal: #ffffff;
    --ap-hero-from: #eff6ff;
    --ap-hero-to: #f5f3ff;
    --ap-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.06);
    max-width: 1040px;
    line-height: 1.75;
}
@media (prefers-color-scheme: dark) and (max-width: 1px) {
    .ap-page {
        --ap-accent: #60a5fa;
        --ap-accent-strong: #93c5fd;
        --ap-accent-soft: rgba(96, 165, 250, 0.12);
        --ap-on-accent: #0b1220;
        --ap-surface: #0f172a;
        --ap-surface-raised: #172033;
        --ap-line: #334155;
        --ap-muted: #94a3b8;
        --ap-coupon-bg: rgba(251, 146, 60, 0.12);
        --ap-coupon-line: rgba(251, 146, 60, 0.5);
        --ap-coupon-text: #fdba74;
        --ap-gold: #fbbf24;
        --ap-silver: #cbd5e1;
        --ap-bronze: #fb923c;
        --ap-on-medal: #0b1220;
        --ap-hero-from: rgba(59, 130, 246, 0.14);
        --ap-hero-to: rgba(139, 92, 246, 0.10);
        --ap-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    }
}

.ap-page h2 {
    font-size: 1.4rem;
    margin-top: 2.4em;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ap-line);
}
.ap-page h3 { font-size: 1.15rem; }
.ap-page a:focus-visible {
    outline: 2px solid var(--ap-accent);
    outline-offset: 2px;
    border-radius: 4px;
}
/* 跳到页内锚点时，标题不被吸顶导航栏挡住 */
.ap-page [id] { scroll-margin-top: 96px; }
.ap-page hr { border: 0; border-top: 1px solid var(--ap-line); margin: 2em 0; }

/* 页首 */
.ap-hero {
    background: linear-gradient(135deg, var(--ap-hero-from), var(--ap-hero-to));
    border: 1px solid var(--ap-line);
    border-radius: 16px;
    padding: 32px 32px 12px;
    margin-bottom: 8px;
}
.ap-hero h1 {
    margin-top: 0;
    border: 0;
    padding: 0;
    font-size: 2.1rem;
    line-height: 1.3;
}
.ap-hero > p { font-size: 1.05rem; }
.ap-hero blockquote {
    background: var(--ap-surface-raised);
    border-left-color: var(--ap-gold);
    font-size: 0.92rem;
    color: var(--ap-muted);
    border-radius: 0 10px 10px 0;
}

/* 快速导航 */
.ap-toc h2 { font-size: 1rem; border: 0; margin-top: 1.6em; padding: 0; color: var(--ap-muted); }
.ap-toc ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.ap-toc li { margin: 0; }
.ap-toc a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--ap-line);
    border-radius: 10px;
    background: var(--ap-surface);
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
}
.ap-toc a::after { content: "→"; margin-left: auto; padding-left: 8px; color: var(--ap-muted); }
.ap-toc a:hover { border-color: var(--ap-accent); color: var(--ap-accent); text-decoration: none; opacity: 1; }

/* 选购四问 */
.ap-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 1em; }
.ap-steps > p {
    margin: 0;
    padding: 18px 20px;
    background: var(--ap-surface);
    border: 1px solid var(--ap-line);
    border-radius: 12px;
    font-size: 0.95rem;
}
.ap-steps > p strong:first-child { display: block; margin-bottom: 6px; font-size: 1.02rem; color: var(--ap-accent-strong); }
.ap-steps > p strong:first-child + br,
.ap-faq > p strong:first-child + br { display: none; }

/* 表格 */
.ap-page table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--ap-line);
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.92rem;
}
.ap-page th,
.ap-page td { border: 0; border-bottom: 1px solid var(--ap-line); padding: 10px 14px; }
.ap-page tr:last-child td { border-bottom: 0; }
.ap-page th { background: var(--ap-surface); font-size: 0.85rem; color: var(--ap-muted); white-space: nowrap; }
.ap-page tbody tr:hover td { background: var(--ap-accent-soft); }
.ap-page td code { white-space: nowrap; }

.ap-table { overflow-x: auto; margin-bottom: 1.5em; -webkit-overflow-scrolling: touch; }
.ap-table table { min-width: 680px; margin-bottom: 0; }
.ap-rank-table tbody { counter-reset: ap-row; }
.ap-rank-table tbody tr { counter-increment: ap-row; }
.ap-rank-table tbody td:first-child { white-space: nowrap; font-weight: 600; }
.ap-rank-table tbody td:first-child::before {
    content: counter(ap-row);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ap-muted);
    background: var(--ap-surface);
    border: 1px solid var(--ap-line);
}
.ap-rank-table tbody tr:nth-child(1) td:first-child::before { color: var(--ap-on-medal); background: var(--ap-gold); border-color: var(--ap-gold); }
.ap-rank-table tbody tr:nth-child(2) td:first-child::before { color: var(--ap-on-medal); background: var(--ap-silver); border-color: var(--ap-silver); }
.ap-rank-table tbody tr:nth-child(3) td:first-child::before { color: var(--ap-on-medal); background: var(--ap-bronze); border-color: var(--ap-bronze); }

/* 下单前检查清单 */
.ap-checks ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ap-checks li {
    margin: 0;
    padding: 12px 14px 12px 42px;
    position: relative;
    background: var(--ap-surface);
    border: 1px solid var(--ap-line);
    border-radius: 10px;
    font-size: 0.93rem;
}
.ap-checks li::before {
    content: "✓";
    position: absolute;
    left: 14px;
    top: 14px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ap-on-accent);
    background: var(--ap-accent);
}

/* 品牌卡片 */
.ap-brand-list { counter-reset: ap-brand; }
.ap-brand-list hr { display: none; }
.ap-brand {
    background: var(--ap-surface-raised);
    border: 1px solid var(--ap-line);
    border-radius: 14px;
    padding: 22px 24px 8px;
    margin-bottom: 18px;
    box-shadow: var(--ap-shadow);
}
.ap-brand.is-top { counter-increment: ap-brand; }
.ap-brand.is-top:first-child { border-color: var(--ap-gold); box-shadow: 0 0 0 1px var(--ap-gold), var(--ap-shadow); }
.ap-brand h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    font-size: 1.3rem;
}
.ap-brand.is-top h3::before {
    content: counter(ap-brand, decimal-leading-zero);
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--ap-accent);
    background: var(--ap-accent-soft);
}
.ap-brand.is-top:nth-child(1) h3::before { color: var(--ap-on-medal); background: var(--ap-gold); }
.ap-brand.is-top:nth-child(2) h3::before { color: var(--ap-on-medal); background: var(--ap-silver); }
.ap-brand.is-top:nth-child(3) h3::before { color: var(--ap-on-medal); background: var(--ap-bronze); }

/* 第一段「前往官网注册」显示成按钮 */
.ap-brand > p:first-of-type { margin-bottom: 12px; }
.ap-brand > p:first-of-type a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    background: var(--ap-accent);
    color: var(--ap-on-accent);
    font-size: 0.95rem;
}
.ap-brand > p:first-of-type a:hover { background: var(--ap-accent-strong); text-decoration: none; opacity: 1; }

/* 优惠码 */
.ap-brand p > code {
    display: inline-block;
    padding: 3px 10px;
    border: 1px dashed var(--ap-coupon-line);
    border-radius: 8px;
    background: var(--ap-coupon-bg);
    color: var(--ap-coupon-text);
    font-weight: 600;
}
.ap-brand ul { list-style: none; padding: 0; margin-bottom: 1em; }
.ap-brand li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 4px;
    font-size: 0.94rem;
}
.ap-brand li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ap-accent);
}
.ap-brand table { margin-bottom: 16px; }

/* FAQ */
.ap-faq > p {
    padding: 16px 20px;
    margin-bottom: 12px;
    background: var(--ap-surface);
    border: 1px solid var(--ap-line);
    border-radius: 12px;
    font-size: 0.95rem;
}
.ap-faq > p strong:first-child { display: block; margin-bottom: 4px; font-size: 1.02rem; }

@media (prefers-reduced-motion: no-preference) {
    .ap-brand,
    .ap-toc a { transition: border-color 0.2s, box-shadow 0.2s; }
}

/* 手机 */
@media (max-width: 700px) {
    .ap-hero { padding: 22px 18px 6px; border-radius: 12px; }
    .ap-hero h1 { font-size: 1.6rem; }
    .ap-steps,
    .ap-checks ul { grid-template-columns: 1fr; }
    .ap-brand { padding: 18px 16px 4px; }
    .ap-brand h3 { font-size: 1.15rem; }
    .ap-brand table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
}

/* 链接卡片列表（教程、客户端、资源导航等页面） */
.ap-links > ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 1.5em;
}
.ap-links > ul > li {
    margin: 0;
    padding: 14px 18px;
    background: var(--ap-surface);
    border: 1px solid var(--ap-line);
    border-radius: 12px;
    font-size: 0.93rem;
}
.ap-links > ul > li:hover { border-color: var(--ap-accent); }
.ap-links > ul > li > a,
.ap-links > ul > li > strong:first-child,
.ap-links > ul > li > p:first-child > strong:first-child { display: block; font-size: 1rem; margin-bottom: 4px; }
.ap-links > ul > li > p { margin: 0 0 4px; }
.ap-links em { font-style: normal; color: var(--ap-muted); }
.ap-links ul ul { margin: 6px 0 0; padding-left: 18px; }

/* 编号步骤 */
.ap-numbered > ol { list-style: none; padding: 0; counter-reset: ap-step; margin-bottom: 1.5em; }
.ap-numbered > ol > li {
    counter-increment: ap-step;
    position: relative;
    margin: 0 0 10px;
    padding: 12px 16px 12px 52px;
    background: var(--ap-surface);
    border: 1px solid var(--ap-line);
    border-radius: 10px;
    font-size: 0.94rem;
}
.ap-numbered > ol > li::before {
    content: counter(ap-step);
    position: absolute;
    left: 14px;
    top: 12px;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ap-on-accent);
    background: var(--ap-accent);
}

/* 页尾导航 */
.ap-footer-nav p {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0;
}
.ap-footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--ap-line);
    border-radius: 999px;
    background: var(--ap-surface);
    color: var(--text-color);
    font-size: 0.9rem;
}
.ap-footer-nav a:hover { border-color: var(--ap-accent); color: var(--ap-accent); text-decoration: none; opacity: 1; }

@media (max-width: 700px) {
    .ap-links > ul { grid-template-columns: 1fr; }
}

/* 站内搜索弹窗（assets/js/search.js） */
.site-search-open { overflow: hidden; }
.site-search[hidden] { display: none; }
.site-search {
    --ss-accent: #2563eb;
    --ss-muted: #64748b;
    --ss-mark: #fef08a;
    --ss-mark-text: #1e293b;
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10vh 16px 16px;
}
@media (prefers-color-scheme: dark) and (max-width: 1px) {
    .site-search {
        --ss-accent: #60a5fa;
        --ss-muted: #94a3b8;
        --ss-mark: rgba(250, 204, 21, 0.3);
        --ss-mark-text: #fef9c3;
    }
}
.site-search-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.site-search-panel {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
.site-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}
.site-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
.site-search-form input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    font-size: 16px;
    color: var(--text-color);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    outline: none;
}
.site-search-form input:focus { border-color: var(--ss-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); }
.site-search-close {
    flex: 0 0 44px;
    height: 44px;
    font-size: 18px;
    color: var(--ss-muted);
    background: none;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}
.site-search-close:hover,
.site-search-close:focus-visible { background: var(--bg-color); color: var(--text-color); }
.site-search-status { padding: 10px 16px; font-size: 0.85rem; color: var(--ss-muted); }
.site-search-results { list-style: none; overflow-y: auto; padding: 0 8px 8px; }
.site-search-results a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-color);
}
.site-search-results a:hover,
.site-search-results a:focus-visible { background: var(--bg-color); text-decoration: none; opacity: 1; outline: none; }
.site-search-title { display: block; font-weight: 600; color: var(--ss-accent); }
.site-search-where { display: block; font-size: 0.78rem; color: var(--ss-muted); }
.site-search-body { display: block; margin-top: 2px; font-size: 0.88rem; line-height: 1.6; color: var(--ss-muted); }
.site-search mark { background: var(--ss-mark); color: var(--ss-mark-text); border-radius: 3px; padding: 0 2px; }
@media (max-width: 700px) {
    .site-search { padding: 0; }
    .site-search-panel { max-width: none; max-height: 100%; height: 100%; border-radius: 0; border: 0; }
}

/* 手机表格：一行一张卡片，文字自动换行，不需要左右滑动（assets/js/tables.js 加上 ap-stack 和 data-label） */
@media (max-width: 700px) {
    .ap-page .ap-table { overflow: visible; }
    .ap-page table.ap-stack,
    .ap-page .ap-brand table.ap-stack {
        display: block;
        min-width: 0;
        width: 100%;
        overflow: visible;
        white-space: normal;
        border: 0;
        border-radius: 0;
    }
    .ap-page table.ap-stack thead { display: none; }
    .ap-page table.ap-stack tbody,
    .ap-page table.ap-stack tr { display: block; }
    .ap-page table.ap-stack tr {
        margin-bottom: 10px;
        padding: 10px 14px;
        background: var(--ap-surface-raised);
        border: 1px solid var(--ap-line);
        border-radius: 12px;
    }
    .ap-page table.ap-stack td {
        display: block;
        position: relative;
        min-height: 2em;
        padding: 5px 0 5px 7.2em;
        border: 0;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: left !important;
        background: none;
    }
    .ap-page table.ap-stack tbody tr:hover td { background: none; }
    .ap-page table.ap-stack td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 5px;
        width: 6.6em;
        font-size: 0.8rem;
        line-height: 1.8;
        color: var(--ap-muted);
    }
    .ap-page table.ap-stack td.is-empty { display: none; }
    .ap-page table.ap-stack td:first-child {
        display: flex;
        align-items: center;
        padding-left: 0;
        margin-bottom: 4px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--ap-line);
        font-size: 1rem;
        font-weight: 700;
    }
    .ap-page table.ap-stack td:first-child::before { content: none; }
    .ap-page .ap-rank-table table.ap-stack td:first-child::before { content: counter(ap-row); position: static; width: 24px; }
    .ap-page table.ap-stack td code { white-space: normal; }
}

/* kramdown 会把页尾「链接 | 链接」识别成表格，这里把它还原成一排按钮 */
.ap-footer-nav table,
.ap-footer-nav tbody,
.ap-footer-nav tr { display: flex; flex-wrap: wrap; gap: 10px; border: 0; background: none; box-shadow: none; overflow: visible; min-width: 0; }
.ap-footer-nav table { margin: 0 0 1.5em; }
.ap-footer-nav td { display: block; padding: 0; border: 0; background: none !important; }
.ap-footer-nav td:empty { display: none; }

/* 机场页推荐卡片（page_class 加 ap-has-aside）：宽屏放在正文左右两侧，平板是页首下方的「快速购买」小卡片，手机不显示 */
.ap-aside-card {
    background: linear-gradient(160deg, var(--ap-hero-from), var(--ap-surface-raised));
    border: 1px solid var(--ap-line);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: var(--ap-shadow);
}
.ap-aside-card p { margin: 0 0 8px; }
.ap-aside-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ap-on-accent);
    background: var(--ap-accent);
    border-radius: 999px;
    padding: 2px 10px;
}
.ap-aside-name { font-size: 1.35rem; font-weight: 800; line-height: 1.3; }
.ap-aside-name span { font-size: 0.85rem; font-weight: 600; color: var(--ap-muted); margin-left: 4px; }
.ap-aside-lead { font-size: 0.92rem; line-height: 1.65; }
.ap-aside-price { font-size: 0.92rem; color: var(--ap-muted); }
.ap-aside-price strong { font-size: 1.5rem; color: var(--ap-accent-strong); }
.ap-aside-coupon {
    font-size: 0.88rem;
    color: var(--ap-coupon-text);
    background: var(--ap-coupon-bg);
    border: 1px dashed var(--ap-coupon-line);
    border-radius: 10px;
    padding: 6px 10px;
}
.ap-aside-coupon code { background: none; color: inherit; font-weight: 700; padding: 0; }
.ap-aside-card ul { margin: 4px 0 14px; padding-left: 1.2em; font-size: 0.88rem; line-height: 1.7; }
.ap-aside-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    background: var(--ap-accent);
    color: var(--ap-on-accent);
    font-weight: 700;
}
.ap-aside-cta:hover { background: var(--ap-accent-strong); color: var(--ap-on-accent); text-decoration: none; opacity: 1; }
.ap-aside-more { display: block; text-align: center; font-size: 0.88rem; margin: 10px 0 6px; }
.ap-aside-card .ap-aside-note {
    margin: 12px 0 0;
    padding: 10px 12px;
    font-size: 0.82rem;
    line-height: 1.65;
    background: var(--ap-accent-soft);
    border-radius: 10px;
}

/* 平板和小屏电脑：四张卡片排成一排，只留名称、价格和购买按钮，详细介绍在下方品牌卡片 */
.ap-quickbuy {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0 8px;
}
.ap-quickbuy-title { grid-column: 1 / -1; margin: 0; font-weight: 700; }
.ap-quickbuy .ap-aside,
.ap-quickbuy .ap-aside-stack { display: contents; }
.ap-pick-feiv { order: 1; }
.ap-pick-weifeng { order: 2; }
.ap-pick-muguang { order: 3; }
.ap-pick-wavenet { order: 4; }
.ap-quickbuy .ap-aside-card { display: flex; flex-direction: column; padding: 12px; border-radius: 12px; }
.ap-quickbuy .ap-aside-card p { margin-bottom: 6px; }
.ap-quickbuy .ap-aside-badge { align-self: flex-start; font-size: 0.72rem; padding: 1px 8px; }
.ap-quickbuy .ap-aside-name { font-size: 1.05rem; }
.ap-quickbuy .ap-aside-name span { display: none; }
.ap-quickbuy .ap-aside-price { font-size: 0.8rem; }
.ap-quickbuy .ap-aside-price strong { font-size: 1.25rem; }
.ap-quickbuy .ap-aside-coupon { font-size: 0.74rem; line-height: 1.5; padding: 4px 8px; }
.ap-quickbuy .ap-aside-lead,
.ap-quickbuy .ap-aside-card ul,
.ap-quickbuy .ap-aside-card .ap-aside-note { display: none; }
.ap-quickbuy .ap-aside-cta { margin-top: auto; min-height: 40px; font-size: 0.9rem; border-radius: 10px; }
.ap-quickbuy .ap-aside-more { font-size: 0.76rem; margin: 6px 0 0; }
/* 手机上不显示推荐卡片，读者直接看正文 */
@media (max-width: 639px) {
    .ap-quickbuy { display: none; }
}
@media (min-width: 640px) {
    .ap-quickbuy { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 宽屏：左栏 250px + 正文 + 右栏 250px 整体居中，两侧各放两张完整卡片，随页面滚动吸顶 */
@media (min-width: 1280px) {
    .main-content.ap-has-aside {
        --ap-total: min(100vw - 48px, 1580px);
        position: relative;
        width: calc(var(--ap-total) - 540px);
        max-width: none;
        margin-left: calc((100vw - var(--ap-total)) / 2 + 270px);
        margin-right: auto;
    }
    .ap-has-aside .ap-quickbuy { display: block; margin: 0; }
    .ap-has-aside .ap-quickbuy-title { display: none; }
    .ap-has-aside .ap-quickbuy .ap-aside {
        display: block;
        position: absolute;
        top: 0;
        bottom: 0;
        left: calc(100% + 20px);
        width: 250px;
    }
    .ap-has-aside .ap-quickbuy .ap-aside-left { left: auto; right: calc(100% + 20px); }
    .ap-has-aside .ap-quickbuy .ap-aside-stack {
        display: flex;
        flex-direction: column;
        gap: 14px;
        position: sticky;
        top: 96px;
        max-height: calc(100vh - 112px);
        overflow-y: auto;
        scrollbar-width: thin;
    }
    .ap-has-aside .ap-quickbuy .ap-aside-card { display: block; flex: 0 0 auto; padding: 18px 20px; border-radius: 16px; }
    .ap-has-aside .ap-quickbuy .ap-aside-card p { margin-bottom: 8px; }
    .ap-has-aside .ap-quickbuy .ap-aside-name { font-size: 1.35rem; }
    .ap-has-aside .ap-quickbuy .ap-aside-name span { display: inline; }
    .ap-has-aside .ap-quickbuy .ap-aside-price { font-size: 0.92rem; }
    .ap-has-aside .ap-quickbuy .ap-aside-price strong { font-size: 1.5rem; }
    .ap-has-aside .ap-quickbuy .ap-aside-coupon { font-size: 0.8rem; padding: 6px 10px; }
    .ap-has-aside .ap-quickbuy .ap-aside-lead,
    .ap-has-aside .ap-quickbuy .ap-aside-card ul,
    .ap-has-aside .ap-quickbuy .ap-aside-card .ap-aside-note { display: block; }
    .ap-has-aside .ap-quickbuy .ap-aside-cta { min-height: 44px; font-size: 1rem; }
    .ap-has-aside .ap-quickbuy .ap-aside-more { font-size: 0.88rem; margin: 10px 0 6px; }
}

/* ==========================================================================
   深色科技风（page_class 加 ap-theme-cyber）：只改颜色与外观，不动内容
   固定为深色，不随系统浅色 / 深色切换
   ========================================================================== */
:root:has(main.ap-theme-cyber) {
    color-scheme: dark;
    --bg-color: #070d18;
    --text-color: #dbe4f3;
    --card-bg: rgba(11, 18, 32, 0.78);
    --primary-color: #22d3ee;
    --border-color: rgba(56, 189, 248, 0.18);
    --header-bg: #0b1220;
    --footer-bg: #050a14;
    --link-color: #38bdf8;
    --code-bg: #0b1426;
    --text-muted: #94a3b8;
    --ss-accent: #22d3ee;
    --ss-muted: #94a3b8;
    --ss-mark: rgba(34, 211, 238, 0.25);
    --ss-mark-text: #ecfeff;
}
:root:has(main.ap-theme-cyber) body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(34, 211, 238, 0.12), transparent 70%),
        linear-gradient(rgba(34, 211, 238, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.035) 1px, transparent 1px);
    background-size: 100% 100%, 32px 32px, 32px 32px;
    background-attachment: fixed;
}
:root:has(main.ap-theme-cyber) .navbar-inner {
    background: rgba(7, 13, 24, 0.82);
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
:root:has(main.ap-theme-cyber) .brand-icon { background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.35); }
:root:has(main.ap-theme-cyber) .nav-item:hover { background: rgba(34, 211, 238, 0.08); }
:root:has(main.ap-theme-cyber) .nav-item.active { background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.35); }
:root:has(main.ap-theme-cyber) .nav-special { background: rgba(34, 211, 238, 0.06); border-color: rgba(34, 211, 238, 0.45); }
/* 布局里的内嵌样式写死了浅色，这里用更高优先级改成深色 */
:root:has(main.ap-theme-cyber) .nav-item { color: #cbd5e1; }
:root:has(main.ap-theme-cyber) .nav-item:hover { background: rgba(34, 211, 238, 0.1); color: #67e8f9; }
:root:has(main.ap-theme-cyber) .nav-item.active { background: #22d3ee; color: #04121c; box-shadow: 0 0 14px rgba(34, 211, 238, 0.4); }
:root:has(main.ap-theme-cyber) .brand-subtitle { color: #94a3b8; }
:root:has(main.ap-theme-cyber) .hamburger-btn { color: #e2e8f0; }
:root:has(main.ap-theme-cyber) .mobile-menu.open { background: #0b1220; border: 1px solid rgba(56, 189, 248, 0.25); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
:root:has(main.ap-theme-cyber) .site-footer { opacity: 1; color: #94a3b8; background: #050a14; border-top-color: rgba(56, 189, 248, 0.15); }
:root:has(main.ap-theme-cyber) .footer-col h4 { color: #e2e8f0; }
:root:has(main.ap-theme-cyber) .footer-col a { color: #94a3b8; }
:root:has(main.ap-theme-cyber) .footer-col a:hover { color: #67e8f9; }
:root:has(main.ap-theme-cyber) .footer-bottom { color: #64748b; border-top-color: rgba(56, 189, 248, 0.12); }

.ap-page.ap-theme-cyber {
    --ap-accent: #22d3ee;
    --ap-accent-strong: #67e8f9;
    --ap-accent-soft: rgba(34, 211, 238, 0.08);
    --ap-on-accent: #04121c;
    --ap-surface: #0b1426;
    --ap-surface-raised: rgba(13, 22, 40, 0.85);
    --ap-line: rgba(56, 189, 248, 0.16);
    --ap-muted: #94a3b8;
    --ap-coupon-bg: rgba(34, 211, 238, 0.06);
    --ap-coupon-line: rgba(34, 211, 238, 0.45);
    --ap-coupon-text: #67e8f9;
    --ap-gold: #fbbf24;
    --ap-silver: #e2e8f0;
    --ap-bronze: #fb923c;
    --ap-on-medal: #0b1220;
    --ap-hero-from: rgba(34, 211, 238, 0.10);
    --ap-hero-to: rgba(59, 130, 246, 0.05);
    --ap-shadow: 0 0 0 1px rgba(56, 189, 248, 0.04), 0 8px 24px rgba(0, 0, 0, 0.35);
    --ap-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--card-bg);
    border: 1px solid var(--ap-line);
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.05), 0 20px 50px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.ap-theme-cyber h1,
.ap-theme-cyber h2,
.ap-theme-cyber h3,
.ap-theme-cyber strong { color: #f1f5f9; }
.ap-theme-cyber h2 { border-bottom-color: var(--ap-line); }
.ap-theme-cyber a { color: var(--link-color); }
.ap-theme-cyber code {
    font-family: var(--ap-mono);
    background: var(--ap-coupon-bg);
    color: var(--ap-coupon-text);
    border: 1px solid var(--ap-coupon-line);
    border-radius: 4px;
    padding: 1px 6px;
}

/* 页首：发光边框和渐变标题 */
.ap-theme-cyber .ap-hero {
    border-color: rgba(34, 211, 238, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 32px rgba(34, 211, 238, 0.08);
}
.ap-theme-cyber .ap-hero h1 {
    background: linear-gradient(90deg, #67e8f9, #38bdf8 55%, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.ap-theme-cyber .ap-hero blockquote { background: rgba(251, 191, 36, 0.06); border-left-color: var(--ap-gold); color: #cbd5e1; }

/* 卡片、导航块悬停时发光 */
.ap-theme-cyber .ap-toc a,
.ap-theme-cyber .ap-steps > p,
.ap-theme-cyber .ap-checks li,
.ap-theme-cyber .ap-faq > p,
.ap-theme-cyber .ap-links > ul > li,
.ap-theme-cyber .ap-footer-nav a { border-radius: 8px; }
.ap-theme-cyber .ap-toc a:hover,
.ap-theme-cyber .ap-links > ul > li:hover,
.ap-theme-cyber .ap-brand:hover { box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35), 0 0 24px rgba(34, 211, 238, 0.12); }
.ap-theme-cyber .ap-brand { border-radius: 10px; }
.ap-theme-cyber .ap-brand.is-top:first-child { box-shadow: 0 0 0 1px var(--ap-gold), 0 0 28px rgba(251, 191, 36, 0.12); }

/* 表格：深色表头、等宽数字 */
.ap-theme-cyber table { border-radius: 8px; }
.ap-theme-cyber th { background: #08101f; color: #7dd3fc; font-family: var(--ap-mono); font-size: 0.78rem; letter-spacing: 0.04em; }
.ap-theme-cyber td { font-variant-numeric: tabular-nums; }

/* 排名徽章改成方形等宽数字：01、02…，前三名金银铜发光 */
.ap-theme-cyber .ap-rank-table tbody td:first-child::before,
.ap-theme-cyber .ap-brand.is-top h3::before {
    content: counter(ap-row, decimal-leading-zero);
    border-radius: 4px;
    font-family: var(--ap-mono);
}
.ap-theme-cyber .ap-brand.is-top h3::before { content: counter(ap-brand, decimal-leading-zero); }
.ap-theme-cyber .ap-rank-table tbody td:first-child::before { width: 30px; }
.ap-theme-cyber .ap-rank-table tbody tr:nth-child(1) td:first-child::before,
.ap-theme-cyber .ap-brand.is-top:nth-child(1) h3::before { box-shadow: 0 0 12px rgba(251, 191, 36, 0.45); }
.ap-theme-cyber .ap-rank-table tbody tr:nth-child(2) td:first-child::before,
.ap-theme-cyber .ap-brand.is-top:nth-child(2) h3::before { box-shadow: 0 0 12px rgba(226, 232, 240, 0.3); }
.ap-theme-cyber .ap-rank-table tbody tr:nth-child(3) td:first-child::before,
.ap-theme-cyber .ap-brand.is-top:nth-child(3) h3::before { box-shadow: 0 0 12px rgba(251, 146, 60, 0.4); }

/* 按钮：青色实心，悬停发光 */
.ap-theme-cyber .ap-brand > p:first-of-type a,
.ap-theme-cyber .ap-aside-cta { border-radius: 6px; font-weight: 700; color: var(--ap-on-accent); }
.ap-theme-cyber .ap-brand > p:first-of-type a:hover,
.ap-theme-cyber .ap-aside-cta:hover { box-shadow: 0 0 18px rgba(34, 211, 238, 0.45); color: var(--ap-on-accent); }

/* 右侧推荐栏 */
.ap-theme-cyber .ap-aside-card {
    background: linear-gradient(170deg, rgba(34, 211, 238, 0.10), rgba(11, 18, 32, 0.92) 45%);
    border-color: rgba(34, 211, 238, 0.4);
    border-radius: 10px;
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.12), 0 12px 32px rgba(0, 0, 0, 0.45);
}
.ap-theme-cyber .ap-aside-badge { border-radius: 4px; font-family: var(--ap-mono); }
.ap-theme-cyber .ap-aside-price strong { color: var(--ap-accent); text-shadow: 0 0 18px rgba(34, 211, 238, 0.45); font-family: var(--ap-mono); }
.ap-theme-cyber .ap-aside-coupon { font-family: var(--ap-mono); font-size: 0.8rem; border-radius: 6px; }
.ap-theme-cyber .ap-aside-coupon code { background: none; border: 0; padding: 0; }
.ap-theme-cyber .ap-aside-card .ap-aside-note { background: rgba(34, 211, 238, 0.06); border: 1px solid var(--ap-line); }

/* 手机卡片表格的排名徽章 */
@media (max-width: 700px) {
    .ap-theme-cyber.ap-page .ap-rank-table table.ap-stack td:first-child::before { content: counter(ap-row, decimal-leading-zero); width: 30px; }
    .ap-theme-cyber.ap-page table.ap-stack tr { background: rgba(13, 22, 40, 0.85); }
}
