/* iPhone 安装教程（TestFlight）：在 promotion.css 的基础上 */

.guide-main {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 56px;
}

.guide-hero {
    text-align: center;
    padding: 28px 0 16px;
}

.guide-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.15;
    letter-spacing: -.02em;
}

.guide-lead {
    max-width: 620px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.guide-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    color: #49506b;
    font-size: 14px;
    font-weight: 600;
}

.guide-facts i {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    color: #fff;
    font-style: normal;
    font-size: 11px;
    border-radius: 50%;
    background: var(--success);
}

/* 不在 iPhone 上 / 在 App 内置浏览器里打开 */
.guide-notice {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px auto 0;
    max-width: 760px;
    padding: 14px 16px;
    border: 1px solid #ffd8a8;
    border-radius: 16px;
    background: #fff8ef;
}

.guide-notice[hidden] {
    display: none;
}

.guide-notice-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #fff;
    font-weight: 800;
    border-radius: 50%;
    background: #f59f00;
}

.guide-notice b {
    display: block;
    font-size: 15px;
}

.guide-notice p {
    margin: 4px 0 0;
    color: #6b5a3c;
    font-size: 14px;
    line-height: 1.6;
}

.guide-copy {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 9px 14px;
    color: #9a5b00;
    font-weight: 700;
    border: 1px solid #ffc979;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

/* 两个步骤 */
/* 两个步骤并排一行，一屏看完 */
.guide-steps {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    max-width: 680px;
    margin: 26px auto 0;
    padding: 0;
    list-style: none;
}

/* 两步之间的箭头 */
.guide-steps::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border-radius: 50%;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 5l7 7-7 7" fill="none" stroke="%234f5cf6" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/></svg>') center / 18px no-repeat;
    box-shadow: 0 6px 16px rgba(17, 23, 47, .14), 0 0 0 1px var(--line);
}

/* 从右到左的语言（阿拉伯语、乌尔都语）：箭头朝左 */
[dir="rtl"] .guide-steps::after {
    transform: scaleX(-1);
}

.guide-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 20px 18px 22px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.step-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 38px;
}

.step-head h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
}

.step-tip {
    flex: 1 0 auto;
    margin: 14px 0 0;
    color: #3e4560;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

.step-number {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6d74ff, var(--primary-dark));
    box-shadow: 0 10px 22px rgba(79, 92, 246, .28);
}

.guide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 260px;
    margin-top: 12px;
    padding: 13px 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 16px;
    background: linear-gradient(135deg, #5b66ff, var(--primary-dark));
    box-shadow: 0 14px 28px rgba(79, 92, 246, .3);
    transition: transform .15s ease, box-shadow .15s ease;
}

.guide-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(79, 92, 246, .36);
}

.guide-button-light {
    color: var(--primary-dark);
    background: var(--primary-soft);
    box-shadow: none;
    border: 1px solid rgba(79, 92, 246, .16);
}

.guide-button-light:hover {
    box-shadow: 0 10px 22px rgba(79, 92, 246, .14);
}

.guide-button-icon {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
}

.apple-mark svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.guide-button-icon img,
img.guide-button-icon {
    border-radius: 6px;
}

/* 真实界面截图 + 手机外框 */
.step-shot {
    position: relative;
    margin: 16px 0 0;
    display: flex;
    justify-content: center;
}

.step-shot img {
    display: block;
    width: 190px;
    max-width: 100%;
    height: auto;
    padding: 6px;
    border-radius: 34px;
    background: #0d0f16;
    box-shadow:
        0 0 0 1.5px #3a3f50,
        0 26px 50px rgba(17, 23, 47, .24),
        0 6px 14px rgba(17, 23, 47, .12);
}

/* 常见问题 */
.guide-faq {
    margin-top: 40px;
    padding: 26px 30px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
}

.guide-faq h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.guide-faq details {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.guide-faq details:first-of-type {
    border-top: 0;
}

.guide-faq summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
}

.guide-faq p {
    margin: 10px 0 0;
    color: #59607a;
    line-height: 1.75;
}

.guide-footer {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 0 16px 40px;
    color: var(--muted);
    font-size: 14px;
}

.guide-footer a {
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 760px) {
    .guide-main {
        padding-top: 8px;
    }

    .guide-hero {
        padding: 10px 0 0;
    }

    .guide-hero h1 {
        margin: 4px 0 0;
        font-size: 22px;
    }

    /* 手机上只留标题，让两个步骤和按钮一屏看完 */
    .guide-hero .eyebrow,
    .guide-lead,
    .guide-facts {
        display: none;
    }

    .guide-steps {
        gap: 10px;
        margin-top: 16px;
    }

    .guide-steps::after {
        width: 26px;
        height: 26px;
        margin: -13px 0 0 -13px;
        background-size: 14px;
    }

    .guide-step {
        padding: 12px 8px 12px;
        border-radius: 20px;
    }

    .step-head {
        gap: 6px;
        min-height: 38px;
    }

    .step-number {
        width: 26px;
        height: 26px;
        font-size: 14px;
        border-radius: 9px;
    }

    .step-head h2 {
        font-size: 15px;
    }

    .step-shot {
        margin-top: 10px;
    }

    .step-shot img {
        /* 按屏幕高度缩放，小屏 iPhone 也能一屏看到两个按钮（截图宽高比 393:852） */
        width: max(92px, min(160px, 100%, calc((100vh - 350px) * .461)));
        width: max(92px, min(160px, 100%, calc((100svh - 350px) * .461)));
        padding: 4px;
        border-radius: 22px;
    }

    .step-tip {
        margin-top: 10px;
        font-size: 12.5px;
    }

    .guide-button {
        margin-top: 8px;
        padding: 10px 6px;
        gap: 5px;
        font-size: 13px;
        border-radius: 12px;
    }

    .guide-button-icon,
    .apple-mark svg {
        width: 17px;
        height: 17px;
    }

    .guide-notice {
        flex-wrap: wrap;
    }

    .guide-copy {
        margin-left: 42px;
    }

    .guide-faq {
        padding: 20px 18px;
    }
}

/* 320 宽的小 iPhone：字号再小一点 */
@media (max-width: 360px) {
    .guide-steps {
        gap: 8px;
    }

    .guide-step {
        padding: 10px 6px 12px;
    }

    .step-head {
        gap: 5px;
    }

    .step-head h2 {
        font-size: 13.5px;
    }

    .step-number {
        width: 22px;
        height: 22px;
        font-size: 12px;
        border-radius: 7px;
    }

    .step-tip {
        font-size: 11.5px;
    }

    .guide-button {
        gap: 4px;
        padding: 9px 4px;
        font-size: 12px;
    }

    .guide-button-icon,
    .apple-mark svg {
        width: 15px;
        height: 15px;
    }
}
