/* 「添加到桌面」教程：在 promotion.css + promotion-ios-guide.css 的基础上 */

.home-main {
    width: min(760px, calc(100% - 32px));
}

.home-hero {
    padding-bottom: 6px;
}

.home-app-icon {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(52, 61, 145, .18), 0 0 0 1px var(--line);
}

.home-notice.is-ok {
    border-color: #b5ecd6;
    background: #effcf6;
}

.home-notice.is-ok .guide-notice-icon {
    background: var(--success);
}

.home-notice.is-ok p {
    color: #3d6b59;
}

/* 三个平台切换 */
.home-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 24px 0 0;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, .7);
}

.home-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 50px;
    padding: 8px 10px;
    color: #59607a;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    border: 0;
    border-radius: 15px;
    background: transparent;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.home-tab:hover {
    color: var(--ink);
}

.home-tab.is-active {
    color: var(--primary-dark);
    background: #fff;
    box-shadow: 0 8px 22px rgba(52, 61, 145, .12), 0 0 0 1px rgba(79, 92, 246, .22);
}

.home-tab-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 22px;
    height: 22px;
}

.home-tab-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.home-tab-icon-desktop svg {
    fill: none;
}

.home-tab-icon-android {
    color: #12a677;
}

.home-tab-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-tab-badge {
    position: absolute;
    top: -9px;
    inset-inline-end: 8px;
    display: none;
    max-width: calc(100% - 16px);
    overflow: hidden;
    padding: 3px 8px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 999px;
    background: linear-gradient(135deg, #5463fa, #734fe6);
    box-shadow: 0 6px 14px rgba(79, 92, 246, .25);
}

.home-tab.is-device .home-tab-badge {
    display: block;
}

/* 步骤卡片 */
.home-panel {
    margin-top: 14px;
    padding: 22px 24px 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.home-panel[hidden],
.home-steps[hidden],
.home-action[hidden] {
    display: none;
}

.home-action {
    max-width: none;
    margin: 0 0 8px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    border: 0;
    cursor: pointer;
}

.home-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: home-step;
}

.home-steps > li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-height: 30px;
    padding: 10px 0 12px 44px;
    counter-increment: home-step;
}

[dir="rtl"] .home-steps > li {
    padding: 10px 44px 12px 0;
}

/* 步骤序号用 CSS 计数器，不放在文字里 */
.home-steps > li::before {
    content: counter(home-step);
    position: absolute;
    top: 8px;
    inset-inline-start: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    border-radius: 10px;
    background: linear-gradient(135deg, #6d74ff, var(--primary-dark));
    box-shadow: 0 8px 18px rgba(79, 92, 246, .26);
}

/* 步骤之间的竖线 */
.home-steps > li + li::after {
    content: "";
    position: absolute;
    top: -14px;
    inset-inline-start: 13.5px;
    width: 1px;
    height: 20px;
    background: linear-gradient(180deg, rgba(79, 92, 246, .12), rgba(79, 92, 246, .45));
}

.home-steps b {
    color: var(--ink);
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.45;
}

.home-steps small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #7a8199;
    font-size: 13px;
    line-height: 1.55;
}

.home-steps small:empty {
    display: none;
}

.home-share-glyph {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 22px;
    height: 22px;
    color: #1677ff;
    border-radius: 6px;
    background: #eef5ff;
}

.home-share-glyph svg {
    width: 16px;
    height: 16px;
}

.home-inline-button {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    padding: 7px 14px;
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 700;
    border: 1px solid rgba(79, 92, 246, .2);
    border-radius: 12px;
    background: var(--primary-soft);
}

.home-subtitle {
    margin: 18px 0 4px;
    padding-top: 16px;
    color: #3e4560;
    font-size: 15px;
    border-top: 1px dashed var(--line);
}

.home-note {
    margin: 6px 0 4px;
    padding: 10px 12px;
    color: #59607a;
    font-size: 13px;
    line-height: 1.6;
    border-inline-start: 3px solid rgba(79, 92, 246, .45);
    border-radius: 10px;
    background: #f5f6ff;
}

.home-note:empty {
    display: none;
}

.home-guide-page .guide-faq {
    margin-top: 26px;
}

.home-toast {
    position: fixed;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 50%;
    z-index: 50;
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    border-radius: 14px;
    background: rgba(17, 23, 47, .92);
    box-shadow: 0 14px 34px rgba(17, 23, 47, .3);
    transform: translateX(-50%);
}

.home-toast[hidden] {
    display: none;
}

@media (max-width: 760px) {
    /* 这页步骤多，手机上保留说明文字，只隐藏三个小标签 */
    .home-guide-page .guide-hero .eyebrow {
        display: none;
    }

    .home-guide-page .guide-lead {
        display: block;
        margin-top: 8px;
        font-size: 14px;
        line-height: 1.6;
    }

    .home-app-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 8px;
        border-radius: 14px;
    }

    .home-guide-page .guide-hero h1 {
        font-size: 24px;
    }

    .home-tabs {
        gap: 4px;
        margin-top: 20px;
        padding: 4px;
        border-radius: 16px;
    }

    .home-tab {
        flex-direction: column;
        gap: 3px;
        min-height: 56px;
        padding: 6px 4px;
        font-size: 12.5px;
        border-radius: 12px;
    }

    .home-tab-label {
        max-width: 100%;
    }

    .home-tab-badge {
        top: -10px;
        inset-inline-end: 50%;
        transform: translateX(50%);
        font-size: 9.5px;
        padding: 2px 7px;
    }

    [dir="rtl"] .home-tab-badge {
        transform: translateX(-50%);
    }

    .home-panel {
        padding: 16px 14px 12px;
        border-radius: 20px;
    }

    .home-steps > li {
        padding: 8px 0 10px 40px;
    }

    [dir="rtl"] .home-steps > li {
        padding: 8px 40px 10px 0;
    }

    .home-steps b {
        font-size: 14.5px;
    }

    .home-steps small {
        font-size: 12.5px;
    }
}
