html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    padding-top: 64px;
}

body>header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

/* ====== 卡片 ====== */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* ====== 筛选标签 ====== */
.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    padding: 0.55rem 1.1rem;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    align-self: center;
    box-sizing: border-box;
    height: 38px;
}

.filter-chip:hover {
    border-color: #bfdbfe;
    color: var(--brand);
    background: #f8fbff;
}

.filter-chip.is-active {
    border-color: var(--brand);
    background: #eff6ff;
    color: var(--brand);
    box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.25);
    font-weight: 600;
}

.filter-chip--fav.is-active {
    border-color: #e11d48;
    background: #fff1f2;
    color: #e11d48;
}

/* ====== 卡片显隐 ====== */
.tool-card-hidden {
    display: none !important;
}

.section-hidden {
    display: none !important;
}

/* ====== 主推 / 徽标 ====== */
.tool-card-featured {
    background: linear-gradient(135deg, #eff6ff 0%, #fafcff 100%) !important;
    border-color: #bfdbfe !important;
    border-left: 3px solid var(--brand) !important;
    box-shadow: 0 14px 34px -20px rgba(37, 99, 235, 0.5);
}

/* 普通区：左边主题色竖条（颜色取自图标块 accent） */
.tool-card--accent {
    border-left: 3px solid var(--card-accent, var(--brand));
}

.tool-featured-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: var(--brand-700);
    border: 1px solid #bfdbfe;
    padding: 0.12rem 0.5rem;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    margin-left: 0.4rem;
    flex-shrink: 0;
}

.tool-closed-badge {
    display: inline-block;
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    line-height: 1;
    margin-left: 0.4rem;
    flex-shrink: 0;
}

/* ====== 标签行 ====== */
.tool-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.tool-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 0.28rem 0.68rem;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
}

.tool-tag--compact {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 0.13rem 0.5rem;
    font-size: 0.62rem;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
}

/* ====== 收藏 ====== */
.favorite-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    user-select: none;
    transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
    z-index: 20;
}

.favorite-toggle:hover {
    color: #e11d48;
    border-color: #fecdd3;
}

.favorite-toggle svg {
    transition: transform 0.22s ease, fill 0.22s ease, stroke 0.22s ease;
}

.favorite-toggle.is-favorited {
    color: #e11d48;
    background: #fff1f2 !important;
    border-color: #fecdd3;
}

.favorite-toggle.is-favorited svg {
    fill: currentColor;
    stroke: currentColor;
    transform: scale(1.08);
}

.favorite-toggle.is-bumping {
    animation: favorite-bump 0.35s ease;
}

.favorite-burst {
    position: absolute;
    right: 0.15rem;
    top: -1rem;
    color: #e11d48;
    font-size: 0.72rem;
    font-weight: 700;
    pointer-events: none;
    animation: favorite-rise 0.7s ease forwards;
}

@keyframes favorite-bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.14); }
    100% { transform: scale(1); }
}

@keyframes favorite-rise {
    0% { opacity: 0; transform: translateY(0) scale(0.8); }
    15% { opacity: 1; transform: translateY(-0.1rem) scale(1); }
    100% { opacity: 0; transform: translateY(-1.15rem) scale(1); }
}

/* ====== 缩略图（可选） ====== */
.tool-thumb {
    width: 100%;
    height: 132px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
    background: #f1f5f9;
}

/* ====== 分区 ====== */
.section-block {
    margin-bottom: 2rem;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.1rem;
}

.section-head__icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: var(--brand);
    flex-shrink: 0;
}

.section-head__icon svg {
    width: 18px;
    height: 18px;
}

.section-head__title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.section-head__count {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ====== 搜索框 ====== */
.search-box {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    height: 38px;
    box-sizing: border-box;
}

.search-box:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-box svg {
    color: #94a3b8;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.search-box input,
.search-box input[type="search"] {
    flex: 1;
    border: 0 !important;
    outline: none !important;
    font-size: 0.88rem;
    color: #0f172a !important;
    background: transparent !important;
    background-color: transparent !important;
    min-width: 0;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    height: 100% !important;
    line-height: 1.5;
    -webkit-appearance: none;
    appearance: none;
}

.search-box input:focus,
.search-box input.input-focus-ring:focus {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

.search-box input::placeholder {
    color: #94a3b8;
}

/* ====== 暂未开放板块：灰度弱化 ====== */
.tool-card-closed {
    opacity: 0.72;
    background-color: #f8fafc;
    cursor: default;
}

.tool-card-closed.card-hover:hover {
    transform: none;
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.05);
}

.tool-card-closed .tool-tag {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
}

/* ====== 联系栏（可折叠 FAB） ====== */
.contact-fab {
    position: fixed;
    z-index: 60;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.contact-fab__btn {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--brand);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
    cursor: pointer;
    border: none;
    transition: transform 0.18s ease, background 0.18s ease;
}

.contact-fab__btn:hover {
    background: var(--brand-700);
    transform: scale(1.05);
}

.contact-fab__btn svg {
    width: 22px;
    height: 22px;
}

.contact-fab__label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.contact-rail {
    width: 86px;
    overflow: visible;
    border-radius: 15px;
    padding-top: 8px;
    background: #fff;
    box-shadow: 0 16px 32px rgba(43, 64, 88, .16);
    opacity: 0;
    visibility: hidden;
    transform: translateX(14px);
    transition: .2s ease;
    pointer-events: none;
}

.contact-fab.is-open .contact-rail {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.contact-rail__item {
    position: relative;
    display: flex;
    min-height: 64px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
}

.contact-rail__item + .contact-rail__item { border-top: 1px solid #edf0f4; }
.contact-rail__item svg { width: 23px; height: 23px; color: var(--brand); stroke-width: 1.8; }
.contact-rail__item--phone:hover { background: #f4f9ff; color: #1263f3; }

.contact-rail__qr {
    position: absolute;
    top: 50%;
    right: calc(100% + 12px);
    display: flex;
    width: 174px;
    transform: translateY(-50%) translateX(8px);
    visibility: hidden;
    opacity: 0;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid #e6ebf1;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(22, 37, 61, .18);
    color: #384152;
    font-size: 13px;
    transition: .18s ease;
    pointer-events: none;
}

.contact-rail__qr img { display: block; width: 150px; height: 150px; object-fit: contain; }
.contact-rail__item:hover .contact-rail__qr { transform: translateY(-50%); visibility: visible; opacity: 1; }
.contact-rail__phone { display: block; max-height: 0; overflow: hidden; padding: 0 2px; border-top: 0 solid #edf0f4; color: #2878d8; font-size: 12px; font-weight: 800; letter-spacing: -.35px; line-height: 1; text-align: center; text-decoration: none; white-space: nowrap; opacity: 0; transition: max-height .18s ease, padding .18s ease, opacity .15s ease; }
.contact-rail:hover .contact-rail__phone { max-height: 28px; padding: 7px 2px 9px; border-top-width: 1px; opacity: 1; }

@media (max-width: 768px) {
    .contact-fab { right: 12px; }
    .contact-fab__btn { width: 48px; height: 48px; }
}

/* ====== 降噪 / 无障碍 ====== */
@media (prefers-reduced-motion: reduce) {
    .card-hover, .card-hover:hover, .favorite-toggle, .favorite-toggle svg, .filter-chip { transition: none !important; }
    .card-hover:hover { transform: none !important; }
    .favorite-bump { animation: none !important; }
    .contact-fab__btn, .contact-rail { transition: none !important; }
}


/* ====== 仅供屏幕阅读器（SEO 用 H1） ====== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ====== 搜索关键词高亮 ====== */
mark.hl {
    background: #fef08a;
    color: inherit;
    border-radius: 3px;
    padding: 0 1px;
    font-weight: 600;
}

/* ====== 搜索框 / 快捷键提示 ====== */
.search-box {
    position: relative;
}

.search-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.search-box:focus-within .search-kbd {
    display: none;
}

/* ============================================================
 * 暗色模式适配（与全站 index / pricing 统一）
 * 复用 tokens.css 的 --bg-* / --text-* / --line / --brand 变量
 * ============================================================ */
[data-theme="dark"] body {
    background-color: var(--bg-primary);
    color: var(--ink);
}

/* 主体容器：white / slate 背景统一切换为深色变量 */
[data-theme="dark"] .bg-white {
    background-color: var(--bg-secondary) !important;
}
[data-theme="dark"] .bg-slate-50 {
    background-color: var(--bg-primary) !important;
}
[data-theme="dark"] .border-slate-200,
[data-theme="dark"] .border-slate-200\/70 {
    border-color: var(--line) !important;
}
[data-theme="dark"] .shadow-sm {
    box-shadow: var(--shadow) !important;
}

/* 文字色 */
[data-theme="dark"] .text-slate-800,
[data-theme="dark"] .text-slate-900 { color: var(--text-primary) !important; }
[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-slate-500 { color: var(--text-secondary) !important; }
[data-theme="dark"] .text-slate-400 { color: var(--text-muted) !important; }

/* 品牌蓝相关（保留强调色，暗色下用亮蓝变量） */
[data-theme="dark"] .text-blue-600 { color: var(--brand) !important; }
[data-theme="dark"] .bg-blue-600 { background-color: var(--brand) !important; }
[data-theme="dark"] .bg-blue-50 { background-color: rgba(96, 165, 250, .14) !important; }
[data-theme="dark"] .bg-blue-50\/40 { background-color: rgba(96, 165, 250, .12) !important; }
[data-theme="dark"] .border-blue-100,
[data-theme="dark"] .border-blue-200 { border-color: var(--brand-700) !important; }
[data-theme="dark"] .hover\:bg-blue-50:hover { background-color: rgba(96, 165, 250, .12) !important; }
[data-theme="dark"] .hover\:text-blue-600:hover { color: var(--brand) !important; }

/* ====== 顶部 Hero 升级引导卡片 ====== */
.home-banner {
    position: relative;
    border-radius: 16px;
    border: 1px solid #bfdbfe;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    padding: 24px 28px !important;
    margin-bottom: 24px;
    box-sizing: border-box;
    box-shadow: 0 4px 20px -4px rgba(37, 99, 235, 0.08);
}

[data-theme="dark"] .home-banner {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14) 0%, #1e293b 100%) !important;
    border-color: rgba(96, 165, 250, 0.25) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35) !important;
}

.home-banner__inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
}

@media (min-width: 900px) {
    .home-banner__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
    }
}

.home-banner__content {
    flex: 1;
    min-width: 0;
}

.home-banner__badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #047857;
    margin-bottom: 10px;
}

[data-theme="dark"] .home-banner__badge {
    background: rgba(16, 185, 129, 0.16) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #34d399 !important;
}

.home-banner__title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    line-height: 1.35;
}

@media (min-width: 640px) {
    .home-banner__title {
        font-size: 22px;
    }
}

[data-theme="dark"] .home-banner__title {
    color: #f1f5f9 !important;
}

.home-banner__desc {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

[data-theme="dark"] .home-banner__desc {
    color: #94a3b8 !important;
}

.home-banner__actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.home-banner__btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #2563eb;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    white-space: nowrap;
    border: 1px solid transparent;
}

.home-banner__btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

[data-theme="dark"] .home-banner__btn-primary {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

.home-banner__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #bfdbfe;
    background: #ffffff;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    color: #2563eb !important;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.home-banner__btn-secondary:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

[data-theme="dark"] .home-banner__btn-secondary {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(96, 165, 250, 0.3) !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .home-banner__btn-secondary:hover {
    background: rgba(37, 99, 235, 0.15) !important;
    border-color: #60a5fa !important;
}


/* 自定义组件：筛选标签 */
[data-theme="dark"] .filter-chip {
    background: var(--bg-tertiary);
    border-color: var(--line);
    color: var(--text-secondary);
}
[data-theme="dark"] .filter-chip:hover {
    background: var(--bg-secondary);
    color: var(--brand);
}
[data-theme="dark"] .filter-chip.is-active {
    background: rgba(96, 165, 250, .16);
    border-color: var(--brand);
    color: var(--brand);
}
[data-theme="dark"] .filter-chip--fav.is-active {
    background: rgba(225, 29, 72, .16);
    border-color: #fb7185;
    color: #fb7185;
}

/* 自定义组件：搜索框 */
[data-theme="dark"] .search-box {
    background: var(--bg-tertiary, #334155);
    border-color: var(--line, #334155);
}
[data-theme="dark"] .search-box:focus-within {
    border-color: var(--brand, #60a5fa);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}
[data-theme="dark"] .search-box input,
[data-theme="dark"] .search-box input[type="search"] {
    color: var(--text-primary, #f1f5f9) !important;
    background: transparent !important;
    background-color: transparent !important;
}
[data-theme="dark"] .search-box input::placeholder {
    color: var(--text-muted, #94a3b8);
}
[data-theme="dark"] .search-box svg {
    color: var(--text-muted, #94a3b8);
}
[data-theme="dark"] .search-kbd {
    background: var(--bg-secondary, #1e293b);
    border-color: var(--line, #334155);
    color: var(--text-muted, #94a3b8);
}

/* 自定义组件：工具标签 / 缩略图 / 分区图标 */
[data-theme="dark"] .tool-tag,
[data-theme="dark"] .tool-tag--compact {
    background: var(--bg-tertiary);
    border-color: var(--line);
    color: var(--text-secondary);
}
[data-theme="dark"] .tool-card-closed { background-color: var(--bg-tertiary); }
[data-theme="dark"] .tool-card-closed .tool-tag {
    background: var(--bg-secondary);
    border-color: var(--line);
    color: var(--text-muted);
}
[data-theme="dark"] .tool-thumb { background: var(--bg-tertiary); }
[data-theme="dark"] .section-head__icon { background: rgba(96, 165, 250, .16); }
[data-theme="dark"] .section-head__title { color: var(--text-primary); }

/* 自定义组件：联系栏 FAB */
[data-theme="dark"] .contact-rail,
[data-theme="dark"] .contact-rail__qr {
    background: var(--bg-card);
    border-color: var(--line);
    box-shadow: var(--shadow-md);
}
[data-theme="dark"] .contact-rail__item { color: var(--text-secondary); }
[data-theme="dark"] .contact-rail__item + .contact-rail__item { border-top-color: var(--line); }
[data-theme="dark"] .contact-rail__item--phone:hover { background: var(--bg-secondary); color: var(--brand); }

/* 主推卡片（蓝色渐变保持品牌色，仅边框微调） */
[data-theme="dark"] .tool-card-featured {
    background: linear-gradient(135deg, rgba(96, 165, 250, .14) 0%, var(--bg-card) 100%) !important;
    border-color: var(--brand-700) !important;
}
