/*
assets/css/style.css
*/
/* =====================================================================
   爱思助手下载 · 全站样式
   设计：克制、留白、苹果/ v2ex 风格 · 系统字体（零 webfont，利于加载与 SEO）
   响应式：手机 / 平板 / 桌面 / 超大屏 全适配
   ===================================================================== */

:root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-2: #fafafc;
    --text: #1d1d1f;
    --text-2: #6e6e73;
    --text-3: #9a9aa1;
    --line: rgba(0, 0, 0, .09);
    --line-2: rgba(0, 0, 0, .06);

    --accent: #0b67ff;
    --accent-press: #0a4fd0;
    --accent-soft: rgba(11, 103, 255, .10);
    --mark: rgba(250, 199, 117, .4);   /* 荧光笔高亮底色 */
    --warn: #e0352b;
    --warn-soft: rgba(224, 53, 43, .08);
    --green: #1aa06d;

    --r: 16px;
    --r-sm: 12px;
    --pill: 980px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
    --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .055);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .14);

    --container: 1080px;
    --space: clamp(16px, 4vw, 28px);

    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-left: var(--space);
    padding-right: var(--space);
}

/* ----------------------------- 顶栏 ----------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--line-2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(160deg, #4094ff, #0b67ff);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .2px;
}

.brand-name {
    font-weight: 600;
    font-size: 17px;
    letter-spacing: .2px;
}

.top-nav {
    display: flex;
    gap: 22px;
}

.top-nav a {
    color: var(--text-2);
    font-size: 14.5px;
}

.top-nav a:hover {
    color: var(--text);
    text-decoration: none;
}

/* ----------------------------- Hero（首页）----------------------------- */
.hero {
    text-align: center;
    padding: clamp(40px, 8vw, 78px) 0 clamp(22px, 4vw, 34px);
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 5.4vw, 46px);
    line-height: 1.12;
    letter-spacing: -.02em;
    font-weight: 700;
}

.hero p {
    margin: 0 auto;
    max-width: 640px;
    color: var(--text-2);
    font-size: clamp(15px, 2.4vw, 19px);
}

.hero .accent {
    color: var(--accent);
}

/* ----------------------- 卡片网格（首页入口）----------------------- */
.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding-bottom: 8px;
}

.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    padding: 24px 22px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: rgba(11, 103, 255, .25);
}

.card:active {
    transform: scale(.985);
    box-shadow: var(--shadow-sm);
}

.card h2 {
    margin: 2px 0 8px;
    font-size: 19px;
    font-weight: 650;
    letter-spacing: -.01em;
}

.card p {
    margin: 0 0 16px;
    color: var(--text-2);
    font-size: 14.5px;
    flex: 1;
}

.card .kw {
    color: var(--text);
    font-weight: 600;
    background: var(--mark);
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
}

.card .go {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 9px 20px;
    border-radius: var(--pill);
    transition: background .15s ease;
}

/* 整卡 hover 时点亮按钮（整卡本来就可点），并抵消全局 a:hover 下划线 */
.card:hover .go,
.card .go:hover {
    background: rgba(11, 103, 255, .16);
    text-decoration: none;
}

/* 主推卡专用：实心 */
.card .go.is-primary {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 6px 16px rgba(11, 103, 255, .22);
}

.card:hover .go.is-primary,
.card .go.is-primary:hover {
    background: #1b73ff;
}

.card .go.is-primary:active {
    background: var(--accent-press);
}

/* 键盘可达性 */
.card .go:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* 主推角标 */
.card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 2px 9px;
    border-radius: var(--pill);
}

.card-stretched-link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

/* --------------------- 子页：应用头 + 步骤 --------------------- */
.app-head {
    text-align: center;
    padding: clamp(30px, 6vw, 52px) 0 8px;
}

.app-icon {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    margin: 0 auto 16px;
    box-shadow: var(--shadow);
}

.app-head h1 {
    margin: 0 0 6px;
    font-size: clamp(24px, 4.6vw, 34px);
    letter-spacing: -.02em;
    font-weight: 700;
}

.app-head .sub {
    margin: 0 auto;
    max-width: 560px;
    color: var(--text-2);
    font-size: 15.5px;
}

.steps {
    max-width: 620px;
    margin: 26px auto 0;
}

.step {
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    padding: 26px 22px 28px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.step-label {
    display: inline-block;
    border-left: 4px solid var(--accent);
    padding: 0 0 0 10px;
    margin: 0 auto 18px;
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    letter-spacing: .02em;
    align-self: flex-start;
}

.step-label.is-green {
    border-left-color: var(--green);
}

.step-lead {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 6px;
}

.step-lead.warn {
    color: var(--warn);
}

.step-fig {
    border-radius: var(--r-sm);
    border: 1px solid var(--line-2);
    margin: 4px auto 18px;
}

/* 准备物料清单（盒子页） */
.prep-list {
    list-style: none;
    margin: 6px 0 4px;
    padding: 0;
    text-align: left;
    max-width: 460px;
    margin-inline: auto;
}

.prep-list li {
    position: relative;
    padding: 9px 0 9px 30px;
    border-bottom: 1px solid var(--line-2);
    color: var(--text);
    font-size: 15px;
}

.prep-list li:last-child {
    border-bottom: 0;
}

.prep-list li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 17px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

/* ------------------------- 安装按钮 ------------------------- */
.install-btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 220px;
    padding: 14px 30px;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border-radius: var(--pill);
    box-shadow: 0 8px 22px rgba(11, 103, 255, .28);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    letter-spacing: .02em;
}

.install-btn:hover {
    background: #1b73ff;
    transform: translateY(-1px);
    text-decoration: none;
}

.install-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(11, 103, 255, .26);
}

.install-btn.is-green {
    background: var(--green);
    box-shadow: 0 8px 22px rgba(26, 160, 109, .28);
}

.install-btn.is-green:hover {
    background: #1cae77;
}

.install-btn .ico {
    width: 22px;
    height: 22px;
    border-radius: 6px;
}

.note-muted {
    color: var(--text-3);
    font-size: 13px;
    margin: 14px 0 0;
}

.note-warn {
    color: var(--warn);
    font-size: 13px;
    margin: 14px 0 0;
}

/* ------------------------- 密码弹窗 ------------------------- */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .42);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
    opacity: 0;
    transition: opacity .2s ease;
}

.modal-mask.open {
    opacity: 1;
}

.modal {
    width: 100%;
    max-width: 344px;
    background: var(--surface);
    border-radius: var(--r);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    transform: translateY(10px) scale(.98);
    transition: transform .2s ease;
}

.modal-mask.open .modal {
    transform: translateY(0) scale(1);
}

/* 通知栏：默认=获取密码入口；空提交=蓝色轻提示；失败=红色错误
   所有状态文案均内联「获取密码」链接（内容由 install.js 写入） */
.notice {
    background: var(--bg);
    border-radius: var(--r-sm);
    padding: 10px 12px;
    margin-bottom: 12px;
    text-align: center;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-2);
    transition: background .2s ease, color .2s ease;
}

.notice a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;          /* 链接文字不被拦腰折行 */
    text-underline-offset: 3px;   /* 下划线下沉，避免咬住中文字底部显得高低不齐 */
}

.notice a:hover {
    text-decoration: underline;
}

.notice.is-hint {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.notice.is-error {
    background: var(--warn-soft);
    color: var(--warn);
    font-weight: 600;
}

.notice.is-hint a,
.notice.is-error a {
    text-decoration: underline;
}

.modal input {
    width: 100%;
    padding: 12px 13px;
    font-size: 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--text);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.modal input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: #fff;
}

.modal input.is-error {
    border-color: var(--warn);
    box-shadow: 0 0 0 3px var(--warn-soft);
}

.btn-ok {
    width: 100%;
    appearance: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    margin-top: 12px;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--r-sm);
    background: var(--accent);
    color: #fff;
    transition: background .15s ease, opacity .15s ease;
}

.btn-ok:hover {
    background: #1b73ff;
}

.btn-ok:active {
    background: var(--accent-press);
}

.btn-ok:disabled {
    opacity: .6;
    cursor: default;
}

.spin {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    vertical-align: -2px;
    margin-right: 8px;
    animation: rot .7s linear infinite;
}

@keyframes rot {
    to { transform: rotate(360deg); }
}

/* 抖动分级（尊重减弱动效偏好）：密码错误抖整卡，空提交/网络失败抖提示条 */
@media (prefers-reduced-motion: no-preference) {
    .modal.shake {
        animation: shake .45s cubic-bezier(.36, .07, .19, .97);
    }

    .notice.shake {
        animation: shake-sm .4s cubic-bezier(.36, .07, .19, .97);
    }

    @keyframes shake {
        10%, 90% { transform: translateX(-1px); }
        20%, 80% { transform: translateX(2px); }
        30%, 50%, 70% { transform: translateX(-6px); }
        40%, 60% { transform: translateX(6px); }
    }

    @keyframes shake-sm {
        20%, 60% { transform: translateX(-4px); }
        40%, 80% { transform: translateX(4px); }
    }
}

/* ------------------------- guide 内容区（置于安装区下方）------------------------- */
.guide {
    max-width: 760px;
    margin: clamp(34px, 7vw, 64px) auto 0;
    padding-top: clamp(26px, 5vw, 40px);
    border-top: 1px solid var(--line-2);
}

.guide h2 {
    font-size: clamp(20px, 3.4vw, 26px);
    margin: 34px 0 12px;
    letter-spacing: -.01em;
    font-weight: 700;
}

.guide h2:first-child {
    margin-top: 0;
}

.guide h3 {
    font-size: 17px;
    margin: 22px 0 6px;
    font-weight: 650;
}

.guide p {
    color: var(--text-2);
    margin: 0 0 14px;
}

.guide a {
    font-weight: 600;
}

.guide strong {
    color: var(--text);
}

.compare {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 18px;
    font-size: 14.5px;
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-radius: var(--r-sm);
    overflow: hidden;
}

.compare th, .compare td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line-2);
}

.compare th {
    background: var(--surface-2);
    font-weight: 650;
    color: var(--text);
}

.compare tr:last-child td {
    border-bottom: 0;
}

.compare td:first-child {
    color: var(--text);
    font-weight: 600;
    width: 28%;
}

.faq h3 {
    position: relative;
    padding-left: 22px;
}

.faq h3::before {
    content: "Q";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: 800;
}

/* ----------------------------- 页脚 ----------------------------- */
.site-footer {
    margin-top: clamp(46px, 9vw, 88px);
    padding: 30px 0 38px;
    border-top: 1px solid var(--line-2);
    background: var(--surface);
    text-align: center;
}

.foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    justify-content: center;
    margin-bottom: 16px;
}

.foot-links a {
    color: var(--text-2);
    font-size: 13.5px;
}

.foot-links a:hover {
    color: var(--accent);
    text-decoration: none;
}

.foot-meta {
    color: var(--text-3);
    font-size: 12.5px;
    max-width: 640px;
    margin: 0 auto 10px;
}

.foot-meta strong {
    color: var(--text-2);
}

.foot-copy {
    color: var(--text-3);
    font-size: 12.5px;
    margin: 0;
}

.foot-copy a {
    color: var(--text-3);
}

/* ----------------------------- 入场动画 ----------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        animation: rise .6s cubic-bezier(.2, .7, .2, 1) backwards;
    }

    .reveal.d1 {
        animation-delay: .05s;
    }

    .reveal.d2 {
        animation-delay: .12s;
    }

    .reveal.d3 {
        animation-delay: .19s;
    }

    .reveal.d4 {
        animation-delay: .26s;
    }

    .reveal.d5 {
        animation-delay: .33s;
    }

    @keyframes rise {
        from {
            opacity: 0;
            transform: translateY(14px);
        }
    }
}

/* ----------------------------- 响应式 ----------------------------- */
/* 平板：双列卡片 */
@media (min-width: 600px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

/* 桌面：三列卡片，顶栏导航始终可见 */
@media (min-width: 900px) {
    .cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 超大屏：限制最大宽度，避免内容过度拉伸 */
@media (min-width: 1400px) {
    :root {
        --container: 1140px;
    }
}

/* 手机：顶栏导航保持单行，空间不足时横向滑动 */
@media (max-width: 560px) {
    .header-inner { gap: 14px; }
    .brand { flex: 0 0 auto; }

    .top-nav {
        flex: 1 1 auto;
        min-width: 0;
        gap: 14px;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .top-nav::-webkit-scrollbar {
        display: none;
    }

    .top-nav a {
        flex: 0 0 auto;
        padding: 8px 0;
        font-size: 13px;
    }

    .install-btn { width: 100%; min-width: 0; }
    .card .go { width: 100%; }
}


/* ===================== 微信内置浏览器引导层 ===================== */
.wx-tip {
    position: fixed; inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, .72);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    animation: wxFade .22s ease;
}
@keyframes wxFade { from { opacity: 0; } to { opacity: 1; } }
.wx-tip-arrow {
    position: absolute; top: 12px; right: 18px;
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
    color: #fff;
    animation: wxBounce 1.2s ease-in-out infinite;
    pointer-events: none;
}
.wx-tip-arrow-ico { font-size: 42px; line-height: 1; }
.wx-tip-arrow-txt { font-size: 14px; font-weight: 600; }
@keyframes wxBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}
.wx-tip-card {
    width: 100%; max-width: 360px;
    background: var(--surface);
    border-radius: 18px;
    padding: 28px 24px 22px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.wx-tip-icon { font-size: 36px; line-height: 1; }
.wx-tip-card h3 { margin: 10px 0 12px; font-size: 19px; }
.wx-tip-card p  { margin: 0 0 16px; color: var(--text-2); font-size: 14px; line-height: 1.75; }
.wx-tip-card strong { color: var(--accent); }
.wx-tip-url {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 8px 8px 12px;
}
.wx-tip-url-text {
    flex: 1; min-width: 0;
    text-align: left; font-size: 12.5px; color: var(--text-2);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wx-tip-copy {
    flex: none;
    appearance: none; border: 0; cursor: pointer; font-family: inherit;
    background: var(--accent); color: #fff;
    font-weight: 600; font-size: 13px;
    padding: 8px 14px; border-radius: 9px;
}
.wx-tip-copy:active { background: var(--accent-press); }
.wx-tip-sub { margin: 12px 0 0 !important; color: var(--text-3); font-size: 12px; }
/* 浏览器内自动安装提示 */
.auto-note { margin: 14px 0 0; color: var(--green); font-size: 13.5px; font-weight: 600; }