/* 前台公共样式 */

/* 英文数字用 Inter（本地托管，国内访问不了 Google Fonts），中文落到系统苹方 / 思源 / 雅黑 */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    /* optional：已预加载 + 长缓存，来得及就用 Inter，来不及这一页就用系统字体，不会加载完再跳一下 */
    font-display: optional;
    src: url("/static/fonts/inter/inter-latin-wght.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* 主色：沿用卡券网的蓝（kaquanwang.cn） */
    --primary: #3478E5;
    --primary-hover: #2463C7;
    --primary-strong: #2463C7;
    --primary-dark: #1D4F9E;
    --primary-light: #EDF5FF;
    --primary-soft: #DCEAFE;
    --brand: #3478E5;
    --grad-primary: linear-gradient(135deg, #4A8AF0 0%, #3478E5 100%);
    --accent: #EF4444;
    --price: #243247;
    --bg-page: #F6F8FC;
    --bg-card: #ffffff;
    --text-primary: #243247;
    --text-secondary: #59677B;
    --text-muted: #6A778D;
    --border: #E1E7F0;
    --border-light: #EDF1F7;
    --danger: #EF4444;
    --success: #16A34A;
    --warning: #F59E0B;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, .06);
    --shadow-md: 0 8px 24px rgba(16, 24, 40, .08);
    /* 手机端顶栏 / 底部 Tab 的毛玻璃。
       注意：模糊值不能放进变量——Safari 的 -webkit-backdrop-filter 遇到 var() 会整条失效 */
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .08) 100%);
    --glass-border: rgba(255, 255, 255, .55);
    --glass-shadow: 0 8px 24px rgba(16, 24, 40, .1), inset 0 1px 1px rgba(255, 255, 255, .9), inset 0 -1px 1px rgba(255, 255, 255, .25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    /* 底色写在根元素上：切换页面时首帧就是这个色，不会先闪一帧白 */
    background: var(--bg-page);
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* clip 不会生成滚动容器，sticky 才能生效；不支持 clip 的旧浏览器退回 hidden */
    overflow-x: hidden;
    overflow-x: clip;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
html::-webkit-scrollbar { width: 0; height: 0; }
body {
    min-width: 320px;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.65;
    font-feature-settings: "cv11", "ss01";   /* Inter：单层 a、更圆的数字，读价格更清楚 */
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-x: clip;
}
body::-webkit-scrollbar { width: 0; height: 0; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
button, input { font: inherit; }

.home-container { max-width: 1440px; margin: 0 auto; padding: 0 28px; }

.home-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 64px;
    background: rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: none;
}

/* 全站公告条：后台「系统设置 → 全站公告条」 */
.notice-closed .home-notice { display: none; }
.home-notice {
    position: relative;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}
.home-notice-in {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-right: 52px;
    text-align: center;
    line-height: 1.5;
}
.home-notice-link { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.home-notice-link:hover { color: rgba(255, 255, 255, .85); }
.home-notice-close {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
}
.home-notice-close:hover { background: rgba(255, 255, 255, .18); }
.home-header .home-container {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 34px;
}

.home-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    overflow: hidden;
}
/* logo 常驻流光：和卡片悬停那条是同一套做法，区别是无限循环、
   而且大部分时间在休息——扫光只占一个周期的前四分之一，剩下的时间光带停在画面外，
   不然一直闪会很吵，眼睛盯着导航栏会累。 */
.home-logo::after {
    content: "";
    position: absolute;
    top: -40%;
    bottom: -40%;
    left: -45%;
    width: 34%;
    pointer-events: none;
    opacity: 0;
    transform: skewX(-22deg);
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .92) 50%,
        rgba(255, 255, 255, 0) 100%);
    animation: logo-shine 4s linear infinite;
}
@keyframes logo-shine {
    0%   { left: -45%; opacity: 0; }
    3%   { opacity: 1; }
    20%  { opacity: 1; }
    24%  { left: 115%; opacity: 0; }
    100% { left: 115%; opacity: 0; }   /* 剩下四分之三的时间停在画面外，形成间隔 */
}
.home-logo-img { height: 38px; width: auto; border-radius: 10px; }
.home-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-size: 18px;
}
.home-logo-text {
    color: #31343a;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
}

.home-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex: 1;
    min-width: 0;
    height: 100%;
}
.home-nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
    color: #3f434b;
    font-size: 16.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: color .2s;
}
.home-nav-item:hover,
.home-nav-item.active { color: var(--primary); }
.home-nav-item.active { font-weight: 600; }
.home-nav-caret { margin-left: 3px; font-size: 12px; opacity: .7; }
/* 后台「样式类名」填 nav-hot 即可把这一项做成醒目样式 */
.home-nav-item.nav-hot { color: var(--accent); font-weight: 700; }
.home-nav-item.nav-hot::before {
    content: "HOT";
    margin-right: 5px;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    line-height: 1.5;
}
.home-nav-item.nav-hot:hover { color: var(--accent); filter: brightness(1.1); }
.home-nav-item.nav-hot.active { color: var(--accent); }

/* 抽屉里的两个比价入口，宽屏用头部右侧的按钮，这里隐藏 */
.home-nav-cta { display: none; }

.home-nav-dropdown { position: relative; }
.home-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -16px;
    min-width: 148px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}
.home-nav-dropdown:hover .home-dropdown-menu { display: block; }
.home-dropdown-item {
    display: block;
    padding: 9px 12px;
    color: var(--text-secondary);
    border-radius: 7px;
    font-size: 15px;
}
.home-dropdown-item:hover { color: var(--primary); background: var(--primary-light); }

.home-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.home-top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 220px;
    min-width: 0;
    height: 38px;
    padding: 0 14px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--border-light);
    color: var(--text-muted);
    font-size: 14px;
    transition: border-color .2s, background .2s;
}
.home-top-search:focus-within { border-color: var(--primary); background: #fff; }
.home-top-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
}
.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 66px;
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: all .2s;
    white-space: nowrap;
}
.home-btn-primary {
    color: #fff;
    background: var(--primary);
}
.home-btn-primary:hover { color: #fff; background: var(--primary-hover); }
.home-btn-outline {
    color: var(--text-primary);
    background: #fff;
    border: 1px solid var(--border);
}
.home-btn-outline:hover { color: var(--primary); border-color: var(--primary); }

/* 页头会员入口 */
.home-member-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--primary-soft);
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .15s, border-color .15s;
}
.home-member-login i { font-size: 13px; }
.home-member-login:hover { border-color: var(--primary); background: #fff; color: var(--primary); }
.home-member { display: inline-flex; align-items: center; gap: 7px; max-width: 120px; color: #3f434b; }
.home-member:hover { color: var(--primary); }
.home-member-avatar {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-soft);
}
.home-member-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; font-weight: 600; }

.home-mobile-actions { display: none; }
.home-mobile-search { display: none; }
.home-mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.home-mobile-toggle span,
.home-mobile-toggle::before,
.home-mobile-toggle::after {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    content: "";
    border-radius: 2px;
    background: #3f434b;
}

.home-main { min-height: calc(100vh - 64px - 150px); }

.home-footer {
    padding: 36px 0 26px;
}

/* footer 上方的小鱼跃水条：水面和小鱼是白色（= footer 背景，footer-fish.js 里的 COLOR），视觉上连成一片。
   页面底色太浅，白水面单独看不出来，用 drop-shadow 沿水面和鱼身描一道细灰边（原来 footer 的上边框色） */
.footer-fish {
    position: relative;
    height: 110px;
    margin-top: 16px;
    margin-bottom: -1px;   /* 防止和 footer 之间露出一条细缝 */
    overflow: hidden;
}
.footer-fish canvas { display: block; filter: drop-shadow(0 -1px 0 var(--border)); }
@media (max-width: 640px) {
    .footer-fish { height: 80px; }
}
.home-footer-top {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}
.home-footer-brand { max-width: 440px; }
.home-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 800;
}
.home-footer-logo img { height: 38px; width: auto; border-radius: 10px; }
.home-footer-brand p { margin-top: 14px; font-size: 14.5px; font-weight: 400; line-height: 1.75; }
.home-footer-cols { display: flex; gap: 64px; }
.home-footer-col h3 { margin-bottom: 14px; color: var(--text-primary); font-size: 16px; font-weight: 700; }
.home-footer-col a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 14.5px;
    font-weight: 400;
    white-space: nowrap;
    transition: color .15s, transform .15s;
}
.home-footer-col a i { width: 16px; color: var(--text-muted); font-size: 13.5px; text-align: center; transition: color .15s; }
.home-footer-col a:hover { transform: translateX(2px); }
.home-footer-col a:hover i { color: var(--primary); }
.home-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 24px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    font-size: 13.5px;
    font-weight: 400;
}
.home-footer-statement { margin-left: auto; }

/* 卡片悬停反光：一条斜的半透明白光从左扫到右，像玻璃面反光扫过去。
   用 animation 而不是 transition，这样每次移入都完整扫一遍，移出也不会倒着退回来。 */
.glare { position: relative; overflow: hidden; }
.glare::after {
    content: "";
    position: absolute;
    top: -60%;
    bottom: -60%;
    left: -50%;
    width: 45%;
    pointer-events: none;
    opacity: 0;
    transform: skewX(-22deg);
    /* 纯白，不掺颜色：两侧压蓝会让整条光看起来发蓝，像蒙了层色而不是反光。
       动起来之后不靠颜色对比也看得见，所以中间那点白够用了。 */
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .38) 50%,
        rgba(255, 255, 255, 0) 100%);
}
/* linear 而不是 ease-out：缓动会让光带在前两成时间里就冲过卡片，剩下的时间在卡片外面空跑，
   看起来就跟没有一样。起止位置也压到刚好贴着卡片边缘，不浪费行程。 */
.glare:hover::after { animation: glare-sweep .85s linear; }
@keyframes glare-sweep {
    0%   { left: -50%; opacity: 0; }
    10%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { left: 110%; opacity: 0; }
}

.home-empty { padding: 46px 20px; color: var(--text-muted); text-align: center; }
.home-pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 28px; }
.home-pagination a,
.home-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 15px;
}
.home-pagination a { background: #fff; border: 1px solid var(--border); color: var(--text-secondary); }
.home-pagination a:hover,
.home-pagination a.current { border-color: var(--primary); color: var(--primary); }
.home-pagination span.current { color: #fff; background: var(--primary); }
.home-pagination span.disabled { opacity: .5; color: var(--text-muted); }

@media (max-width: 1360px) {
    .home-header .home-container { gap: 20px; }
    .home-nav { gap: 20px; }
    .home-top-search { display: none; }     /* 导航项多，先让出搜索框；站点列表页顶部本来就有搜索 */
}

@media (max-width: 1100px) {
    .home-header .home-container { gap: 14px; }
    .home-nav { gap: 13px; }
    .home-nav-item { font-size: 14.5px; }
    .home-btn { min-width: 0; padding: 0 12px; }
}

@media (max-width: 900px) {
    .home-header-right { display: none; }
    /* 头部本身透明，只留中间一条悬浮的毛玻璃胶囊；两侧空白不挡下面内容的点击 */
    .home-header {
        height: auto;
        padding: calc(8px + env(safe-area-inset-top)) 12px 0;
        background: transparent;
        border-bottom: 0;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        pointer-events: none;
    }
    .home-header .home-container {
        position: relative;
        height: 56px;
        padding: 0 8px;
        gap: 10px;
        pointer-events: auto;
    }
    /* 玻璃画在伪元素上：容器自己带 backdrop-filter 的话，里面的下拉菜单就只能模糊到容器内部，磨砂会失效 */
    .home-header .home-container::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        border: 1px solid var(--glass-border);
        border-radius: 999px;
        background: var(--glass-bg);
        box-shadow: var(--glass-shadow);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
        backdrop-filter: blur(12px) saturate(180%);
    }
    .home-logo { gap: 9px; }
    .home-logo-mark { width: 32px; height: 32px; border-radius: 50%; font-size: 15px; }
    .home-logo-img { height: 32px; }
    .home-logo-text { font-size: 18px; }
    .home-mobile-toggle,
    .home-round-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        border: 1px solid rgba(255, 255, 255, .7);
        border-radius: 50%;
        background: rgba(255, 255, 255, .18);
        box-shadow: 0 2px 8px rgba(16, 24, 40, .06), inset 0 1px 1px rgba(255, 255, 255, .9);
        color: #3f434b;
        font-size: 16px;
    }
    .home-mobile-toggle { order: -1; }
    .home-mobile-toggle span,
    .home-mobile-toggle::before,
    .home-mobile-toggle::after { width: 17px; margin: 2px auto; }
    .home-mobile-actions { display: flex; gap: 8px; margin-left: auto; }
    /* 搜索框：和菜单抽屉一样从胶囊下方展开 */
    .home-mobile-search.is-open {
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 8px);
        display: flex;
        align-items: center;
        gap: 10px;
        height: 52px;
        padding: 0 6px 0 18px;
        border: 1px solid var(--glass-border);
        border-radius: 999px;
        background: rgba(255, 255, 255, .5);
        box-shadow: var(--glass-shadow);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
        backdrop-filter: blur(12px) saturate(180%);
    }
    .home-mobile-search i { color: var(--text-muted); }
    .home-mobile-search input {
        flex: 1;
        min-width: 0;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--text-primary);
        font-size: 16px;
        -webkit-appearance: none;
        appearance: none;
    }
    .home-mobile-search button {
        flex-shrink: 0;
        height: 40px;
        padding: 0 18px;
        border: 0;
        border-radius: 999px;
        background: var(--primary);
        color: #fff;
        font-size: 15px;
        font-weight: 600;
    }
    .home-nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 8px);
        height: auto;
        padding: 10px 22px 16px;
        border: 1px solid var(--glass-border);
        border-radius: 22px;
        background: rgba(255, 255, 255, .5);
        box-shadow: var(--glass-shadow);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
        backdrop-filter: blur(12px) saturate(180%);
    }
    .home-nav.is-open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
    .home-nav-cta {
        display: inline-flex;
        justify-content: center;
        height: 38px;
        margin-top: 6px;
        border-radius: 8px;
        background: var(--primary);
        color: #fff;
        font-weight: 600;
    }
    .home-nav-cta:hover { color: #fff; }
    .home-nav-cta-start { grid-column: 1; }   

    .home-nav-cta-ghost { background: #fff; color: var(--primary); border: 1px solid var(--primary-soft); }
    .home-nav-cta-ghost:hover { color: var(--primary); }
    .home-nav-item { height: 38px; }
    .home-nav-item.active::after { display: none; }
}

@media (max-width: 640px) {
    .home-container { padding: 0 16px; }
    .home-header .home-container { padding: 0 8px; }
    .home-footer { padding-top: 32px; }
    .home-footer-top { flex-direction: column; gap: 26px; }
    .home-footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
    .home-footer-col h3 { margin-bottom: 8px; font-size: 15px; }
    .home-footer-col a { gap: 7px; font-size: 13.5px; }
    .home-footer-bottom { flex-direction: column; align-items: flex-start; }
    .home-footer-statement { margin-left: 0; }
}

/* ============================================================
   广告条组件 .ad-bar
   .ad-bar-top    导航下方全站通栏（外层需 .ad-bar-slot 限宽）
   .ad-bar-detail 站点详情页正文下方
============================================================ */
.ad-bar-slot { max-width: 1440px; margin: 14px auto 0; padding: 0 28px; }

.ad-bar {
    display: block;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.ad-bar:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .14);
}
.ad-bar-detail { margin-bottom: 20px; }

.ad-bar-in {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 10px 16px;
}
.ad-bar-tag {
    flex: none;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}
.ad-bar-body {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    line-height: 1;
}
.ad-bar-name {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}
.ad-bar-desc {
    min-width: 0;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ad-bar-old {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
}
.ad-bar-now {
    display: inline-flex;
    align-items: baseline;
    color: var(--price);
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
.ad-bar-now small { margin-right: 1px; font-size: 14px; font-weight: 700; }
.ad-bar-cut {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border-radius: 3px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}
.ad-bar-sep {
    flex: none;
    width: 1px;
    height: 14px;
    margin: 0 2px;
    background: var(--border);
}
.ad-bar-go {
    flex: none;
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    height: 32px;
    padding: 0 16px;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s;
}
.ad-bar:hover .ad-bar-go { background: var(--primary-hover); }

@media (max-width: 768px) {
    .ad-bar-slot { margin-top: 12px; padding: 0 16px; }
    .ad-bar-in { gap: 9px; min-height: 46px; padding: 9px 12px; }
    .ad-bar-body { gap: 8px; }
    .ad-bar-name, .ad-bar-sep { display: none; }
    /* 没填现价时，移动端保留商品名，否则整条只剩一个按钮 */
    .ad-bar-noprice .ad-bar-name {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ad-bar-noprice .ad-bar-desc { display: none; }
    .ad-bar-tag { padding: 3px 8px; font-size: 12px; }
    .ad-bar-old { font-size: 13px; }
    .ad-bar-now { font-size: 19px; }
    .ad-bar-cut { height: 18px; padding: 0 6px; font-size: 12px; }
    .ad-bar-go { height: 30px; padding: 0 13px; font-size: 14px; }
}

/* 清爽浅蓝主题：页脚保持轻量 */
.home-footer { background: #fff; color: var(--text-muted); }
.home-footer-col a, .home-footer-bottom a { color: var(--text-secondary); }
/* 浅底 footer 覆盖了背景色，上面那条 :hover{color:#fff} 会让链接消失，这里一并改掉 */
.home-footer a:hover { color: var(--primary); }

/* 页脚友情链接：独立一行，链接多时自动换行 */
.home-friend-links {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(15, 23, 42, .18);
    font-size: 14px;
}
.home-friend-label { flex-shrink: 0; color: var(--text-muted); }
.home-friend-items { display: flex; flex-wrap: wrap; gap: 8px 18px; min-width: 0; }
.home-friend-items a { color: #606774; }
.home-friend-items a:hover { color: var(--primary); }
@media (max-width: 700px) {
    .home-friend-links { flex-direction: column; gap: 9px; margin-top: 18px; padding-top: 14px; }
    .home-friend-items { gap: 8px 14px; }
}

/* ============================================================
   移动端兜底：iOS 聚焦放大
   输入框字号小于 16px 时，iOS Safari / 微信聚焦后会把整页放大且不会缩回。
   这里统一抬到 16px。用 !important 是因为各页自己的 CSS 在 home.css 之后加载，
   普通声明会被盖掉；视觉上需要更小的地方请用 transform: scale() 改外观，
   不要把 font-size 调回去。
   ============================================================ */
@media (max-width: 768px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* ============================================================
   列表页页头长条：面包屑 + H1 + 一句话，挤在同一条白色横幅里
   分类页、精选副业列表共用。窄屏自动换行，面包屑掉到下一行。
   ============================================================ */
.home-pagebar {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0 0 14px;
    padding: 15px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.home-pagebar h1 {
    flex: none;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.2px;
    line-height: 1.5;
}
.home-pagebar > p {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.home-pagebar-crumb { flex: none; margin-left: auto; }
.home-pagebar-crumb > :first-child { margin-left: 0; }

/* 面包屑：全站统一，首页带图标，分隔用浅色箭头，当前页加粗 */
.home-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; font-size: 13.5px; line-height: 1; color: var(--text-muted); }
.home-crumb a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; color: var(--text-muted); white-space: nowrap; transition: background .2s, color .2s; }
.home-crumb > :first-child { margin-left: -8px; }
.home-crumb a i { font-size: 12px; }
.home-crumb a:hover { background: var(--primary-light); color: var(--primary); }
.home-crumb-sep { font-size: 9px; color: #C3CBD8; }
.home-crumb-current { min-width: 0; max-width: 320px; padding: 6px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; color: var(--text-primary); }
@media (max-width: 768px) { .home-crumb-current { max-width: 200px; } }

@media (max-width: 900px) {
    .home-pagebar { padding: 13px 15px; margin: 0 0 12px; border-radius: var(--radius-sm); }
    .home-pagebar h1 { font-size: 18px; }
    .home-pagebar-crumb { flex-basis: 100%; margin-left: 0; }
    .home-pagebar-crumb > :first-child { margin-left: -8px; }
}

/* 没有图标时的首字头像底色（AI 工具导航、首页工具卡片共用） */
.tone-0 { background: linear-gradient(135deg, #6EA8FF, #3478E5) !important; color: #fff !important; }
.tone-1 { background: linear-gradient(135deg, #A78BFA, #7C3AED) !important; color: #fff !important; }
.tone-2 { background: linear-gradient(135deg, #34D399, #059669) !important; color: #fff !important; }
.tone-3 { background: linear-gradient(135deg, #FDBA74, #EA580C) !important; color: #fff !important; }
.tone-4 { background: linear-gradient(135deg, #F9A8D4, #DB2777) !important; color: #fff !important; }
.tone-5 { background: linear-gradient(135deg, #67E8F9, #0891B2) !important; color: #fff !important; }

/* ============================================================
   内页页头：小标签 + 带渐变重点词的标题 + 说明 + 信息胶囊
   查价页、官方订阅页共用
============================================================ */
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    border: 1px solid var(--primary-soft);
    border-radius: 999px;
    background: #fff;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
}
.page-title {
    margin-top: 14px;
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -.5px;
}
.page-title em {
    font-style: normal;
    background: linear-gradient(90deg, #3478E5 0%, #6A5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.page-desc { margin-top: 10px; max-width: 760px; color: var(--text-secondary); font-size: 15.5px; line-height: 1.75; }
.page-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.page-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
}
.page-chip i { color: var(--primary); font-size: 12px; }
.page-chip b { color: var(--text-primary); font-weight: 700; }
@media (max-width: 768px) {
    .page-title { font-size: 24px; }
    .page-desc { font-size: 14.5px; }
}

/* ============================================================
   勾选框 / 单选框：替换浏览器默认外观
   用 :where() 把优先级压到 0，已有的自定义开关（如 .form-switch-wrap input { display:none }）不受影响
============================================================ */
:where(input[type="checkbox"], input[type="radio"]) {
    -webkit-appearance: none;
    appearance: none;
    display: inline-grid;
    place-content: center;
    flex: none;
    width: 17px;
    height: 17px;
    margin: 0;
    border: 1.5px solid #C5CEDB;
    border-radius: 5px;
    background: #fff;
    vertical-align: -3px;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
:where(input[type="radio"]) { border-radius: 50%; }
:where(input[type="checkbox"])::before {
    content: "";
    width: 10px;
    height: 10px;
    background: #fff;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    transform: scale(0);
    transition: transform .12s ease-out;
}
:where(input[type="radio"])::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    transform: scale(0);
    transition: transform .12s ease-out;
}
:where(input[type="checkbox"], input[type="radio"]):hover { border-color: var(--primary); }
:where(input[type="checkbox"], input[type="radio"]):checked { background: var(--primary); border-color: var(--primary); }
:where(input[type="checkbox"], input[type="radio"]):checked::before { transform: scale(1); }
:where(input[type="checkbox"]):indeterminate { background: var(--primary); border-color: var(--primary); }
:where(input[type="checkbox"]):indeterminate::before { clip-path: inset(40% 10%); transform: scale(1); }
:where(input[type="checkbox"], input[type="radio"]):focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(52, 120, 229, .22); }
:where(input[type="checkbox"], input[type="radio"]):disabled { opacity: .5; cursor: not-allowed; }

/* ============================================================
   回到顶部：圆形按钮，外圈描出阅读进度（周长 2π×22 ≈ 138.2）
============================================================ */
.home-totop {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 940;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    box-shadow: 0 6px 20px rgba(16, 24, 40, .12);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    color: var(--primary);
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s, transform .25s, visibility .25s;
}
.home-totop.is-show { opacity: 1; visibility: visible; transform: none; }
.home-totop:hover { box-shadow: 0 8px 24px rgba(52, 120, 229, .25); }
.home-totop svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.home-totop circle { fill: none; stroke-width: 2.5; }
.home-totop-track { stroke: var(--primary-soft); }
.home-totop-bar {
    stroke: var(--primary);
    stroke-linecap: round;
    stroke-dasharray: 138.2;
    stroke-dashoffset: 138.2;
}

/* ============================================================
   手机端底部 Tab：悬浮毛玻璃胶囊，当前项再叠一块亮白小胶囊
============================================================ */
.home-tabbar { display: none; }
@media (max-width: 768px) {
    .home-tabbar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 950;
        display: flex;
        height: 64px;
        padding: 6px;
        border: 1px solid var(--glass-border);
        border-radius: 999px;
        background: var(--glass-bg);
        box-shadow: var(--glass-shadow);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
        backdrop-filter: blur(12px) saturate(180%);
    }
    .home-tabbar a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        border-radius: 999px;
        color: #7A8597;
        font-size: 11.5px;
        font-weight: 500;
        line-height: 1;
        -webkit-tap-highlight-color: transparent;
        transition: color .2s, background .2s, box-shadow .2s;
    }
    .home-tabbar a i { font-size: 19px; }
    .home-tabbar a.is-on {
        color: var(--primary);
        background: rgba(255, 255, 255, .35);
        box-shadow: 0 2px 10px rgba(16, 24, 40, .08), inset 0 1px 1px rgba(255, 255, 255, .95);
    }
    .home-tabbar a:active { transform: scale(.96); }
    /* 给 Tab 让出位置 */
    .home-footer { padding-bottom: calc(26px + 84px + env(safe-area-inset-bottom)); }
    .home-totop { right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); width: 46px; height: 46px; }
    /* 产品详情自带底部固定操作栏，这页不叠 Tab */
    body:has(.sq-actions) .home-tabbar { display: none; }
    /* 副业页的「领取体验卡」条抬到 Tab 上方，做成同样悬浮的圆角卡片 */
    body .sh-mobile-claim {
        left: 12px;
        right: 12px;
        bottom: calc(84px + env(safe-area-inset-bottom));
        padding: 10px 12px 10px 16px;
        border: 1px solid var(--border-light);
        border-radius: 16px;
    }
    body:has(.sh-mobile-claim) .home-footer { padding-bottom: calc(26px + 156px + env(safe-area-inset-bottom)); }
    body:has(.sh-mobile-claim) .home-totop { bottom: calc(160px + env(safe-area-inset-bottom)); }
}

/* 不支持毛玻璃的浏览器：把底色调实，免得文字压在内容上看不清 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root { --glass-bg: rgba(255, 255, 255, .95); }
}

/* ============================================================
   常见问题（首页 / 比价 / 官方低价区共用），和 FAQPage 结构化数据对应
============================================================ */
.home-faq { margin-top: 36px; }
.home-faq h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.home-faq h2 i { color: var(--primary); }
/* 两列等高：同一行的两张卡片一样高，不会一高一矮留空 */
.home-faq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.home-faq-item {
    padding: 20px 22px;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    background: var(--bg-card);
    box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}
/* 题数是单数时，最后一张占满整行，不在右边留半格空 */
.home-faq-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.home-faq-item h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}
.home-faq-no {
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.home-faq-item p {
    margin-top: 10px;
    padding-left: 38px;
    color: var(--text-secondary);
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.8;
}
@media (max-width: 768px) {
    .home-faq-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .home-faq h2 { font-size: 18px; }
    .home-faq-item { padding: 16px; border-radius: 14px; }
    .home-faq-item h3 { font-size: 15px; }
    .home-faq-item p { padding-left: 0; font-size: 14px; }
}

/* 平台卡网星标（16688、链动小铺等平台内店铺），首页卡片 / 平台列表 / 详情页 / 比价结果共用 */
.platform-star {
    margin-right: 5px;
    color: #F59E0B;
    font-size: .8em;
    vertical-align: .08em;
    cursor: help;
}

/* 只给搜索引擎和读屏软件看、页面上不显示的文字（如去掉标题卡片后保留的 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;
}

/* ============================================================
   手机端隐藏各页顶部的介绍区（标签、说明、特点胶囊、装饰图），直接看到功能。
   h1 只是视觉隐藏，搜索引擎仍能读到页面主题；功能控件（工具搜索框、广场的提交按钮和分类筛选）保留。
   各页自己的 css 在 home.css 之后加载，所以这里用 !important。
============================================================ */
@media (max-width: 768px) {
    /* 比价页、官方低价区：整个页头都是介绍，整块视觉隐藏 */
    .pc-head, .op-head,
    .tools-hero-text,
    .sq-hero .page-title {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }
    /* 产品广场：头部里有提交按钮和分类筛选，只去掉介绍文字和装饰图 */
    .sq-hero .page-kicker, .sq-hero .page-desc, .sq-hero .page-chips, .sq-hero-art { display: none !important; }
}

/* ============================================================
   手机端搜索框文字看起来小一号（比价页、AI 工具页），长提示语能多显示几个字。
   不能直接把字号调到 16px 以下：iOS 聚焦时会把整页放大且不缩回（上面有 16px 兜底）。
   所以保持 16px，用 scale(.875) 缩成约 14px 的观感；缩完右边空出的约 1/8，用负 margin 让输入框多占回来。
============================================================ */
@media (max-width: 768px) {
    .pc-bar-search input,
    .tools-search input {
        flex: 1 1 0;
        width: auto;
        margin-right: -14.3%;
        transform: scale(.875);
        transform-origin: left center;
    }
}

