/* 百变小樱 iOS 版本下载教程页（E 版）：配色与首页、登录页一致（浅雾紫底，主色 #7955bb → #69459b）。
   自上而下：白色顶栏（返回首页 + 四色 logo + 标题）→「请先选择适用您的情形」两枚胶囊单选 → 当前情形的方案
   （大陆区：两张可展开白卡；海外：三步白卡 + 识别码条）→「常见问题与解答」折叠列表 → 页脚。
   独立样式，不依赖首页 e.css；渐变、品牌色、胶囊按钮与首页同一套。 */

:root {
    --g: linear-gradient(120deg, #7955bb 0%, #69459b 100%);   /* 登录页主按钮同款 */
    --brand: #7955bb;        /* 白底 5.48:1，浅灰底 5.0:1 */
    --brand-deep: #69459b;
    --pink: #e0457f;
    --ink: #2e283b;
    --body: #4b3f63;
    --muted: #6e6879;        /* 白底 5.4:1，浅灰底 4.9:1 */
    --bg: #f5f4f8;           /* 登录页底色 */
    --line: #e9e5ef;
    --rule: #bfb7cb;         /* 常见问题分隔线：比 --line 深，分隔更明显 */
    --soft: #f1ecfb;
    --card-line: #ebe6f2;
    --card-shadow: 0 1px 2px rgba(46, 40, 59, .05), 0 8px 18px -10px rgba(46, 40, 59, .22);
    --ease: cubic-bezier(.22, 1, .36, 1);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;   /* 与首页 e.css 相同 */
    color-scheme: light;
}

/* ---------- 基础 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scrollbar-color: #cbbde6 transparent;
}
html, body { overflow-x: hidden; }
@supports (overflow: clip) {
    html, body { overflow-x: clip; }
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    /* 与首页、登录页同款：左上淡紫光晕 */
    background: radial-gradient(circle at 12% 0, rgba(145, 108, 244, .14), rgba(145, 108, 244, 0) 40%) no-repeat, var(--bg);
    font: 400 15px/1.75 var(--font);
    caret-color: var(--brand);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

::selection { background: #e2d6fb; color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cbbde6; border: 3px solid var(--bg); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

a { color: var(--brand); text-decoration: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
h1, h2, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font-family: inherit; }
strong { font-weight: 700; }

.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
    display: inline-block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

.vh {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

/* 短语分组：居中短句只在短语之间换行 */
.ph { display: inline-block; max-width: 100%; }

.skip {
    position: absolute; left: 12px; top: -60px; z-index: 60;
    padding: 10px 16px;
    color: #fff; background: var(--brand);
    border-radius: 999px;
}
.skip:focus { top: 10px; color: #fff; }

/* ---------- 顶栏：白色通栏（不吸顶），与首页吸顶后的顶栏同一观感 ---------- */
.bar {
    position: relative;
    z-index: 2;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 1px 0 rgba(46, 40, 59, .06), 0 12px 28px -24px rgba(69, 45, 119, .5);
}
.bar__in {
    display: flex;
    align-items: center;
    max-width: 1200px;
    height: 60px;
    margin: 0 auto;
    padding: 0 16px 0 6px;
    padding: 0 max(16px, env(safe-area-inset-right)) 0 max(6px, env(safe-area-inset-left));
}
.bar__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: var(--ink);
    transition: background-color .18s;
}
.bar__back:active { background: rgba(105, 69, 155, .08); }
@media (hover: hover) {
    .bar__back:hover { color: var(--brand-deep); background: rgba(105, 69, 155, .06); }
}
.bar__back .icon { width: 24px; height: 24px; stroke-width: 2.2; }
.bar__logo {
    flex-shrink: 0;
    width: 30px;    /* 与首页顶栏 logo 同尺寸 */
    height: 30px;
    margin: 0 10px 0 4px;
    transform: rotate(-6deg);
}
/* 四色方块标志：与登录页、首页同色 */
.bar__logo path:nth-of-type(1) { fill: #7955bb; }
.bar__logo path:nth-of-type(2) { fill: #9c7bc8; }
.bar__logo path:nth-of-type(3) { fill: #8e6abe; }
.bar__logo path:nth-of-type(4) { fill: #69459b; }
.bar__title {
    min-width: 0;
    color: var(--ink);
    font: 700 18px/1.3 var(--font);
    font: 700 clamp(17px, 5.2vw, 20px)/1.3 var(--font);   /* ≥360px 时不小于 18.7px（粗体大字） */
    letter-spacing: .02em;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

/* ---------- 正文容器 ---------- */
.page { display: block; }
.page:focus { outline: none; }
.wrap {
    max-width: 760px;              /* 内容 720 + 左右 20 */
    margin: 0 auto;
    padding: 32px 20px 0;
}

/* 内置浏览器提示（仅 html[data-inapp]） */
.inapp {
    display: none;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 24px;
    padding: 12px 14px;
    border: 1px solid #f6cfe0;
    border-radius: 14px;
    color: #6b2f4c;
    background: #fdeef4;
    font-size: 14px;
    line-height: 1.7;
}
html[data-inapp] .inapp { display: flex; }
.inapp .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--pink); }

/* ---------- 情形单选（两枚大胶囊） ---------- */
.case__q {
    color: var(--ink);
    font: 700 24px/1.4 var(--font);
    letter-spacing: .02em;
    text-align: center;
    scroll-margin-top: 16px;
}
.case__opts {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-top: 28px;
}
.opt {
    position: relative;
    display: block;
    width: 100%;
    max-width: 300px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
/* 原生单选铺满整个胶囊并透明：点按、读屏、方向键切换都走原生控件 */
.opt__in {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.opt__in:focus-visible { outline: none; }
.opt__box {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 10px 18px 10px 24px;
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    box-shadow: 0 1px 2px rgba(46, 40, 59, .06), 0 8px 18px -10px rgba(46, 40, 59, .32);
    font: 700 17px/1.3 var(--font);
    letter-spacing: .01em;
    transition: color .2s, box-shadow .2s, transform .15s;
}
.opt__box::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--g);
    opacity: 0;
    transition: opacity .22s var(--ease);
}
.opt__txt { min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.opt__dot {
    position: relative;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: 2px solid #8f8899;    /* 白底 3.4:1 */
    border-radius: 50%;
    transition: border-color .2s;
}
.opt__dot::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    bottom: 5px;
    left: 5px;
    border-radius: 50%;
    background: #fff;
    transform: scale(0);
    transition: transform .2s var(--ease);
}
.opt__in:checked + .opt__box {
    color: #fff;
    box-shadow: 0 1px 2px rgba(69, 45, 119, .12), 0 12px 24px -12px rgba(105, 69, 155, .72);
}
.opt__in:checked + .opt__box::before { opacity: 1; }
.opt__in:checked + .opt__box .opt__dot { border-color: #fff; }
.opt__in:checked + .opt__box .opt__dot::after { transform: scale(1); }
.opt__in:focus-visible + .opt__box { outline: 2px solid var(--brand); outline-offset: 3px; }
.opt:active .opt__box { transform: scale(.985); }

/* ---------- 情形面板 ---------- */
.panel { margin-top: 40px; }
.panel__t {
    color: var(--ink);
    font: 700 22px/1.45 var(--font);
    letter-spacing: .02em;
    text-align: center;
}
.panel__t:focus { outline: none; }
.panel__t:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 6px; }

/* 切换：e-ios.js 写 html[data-case]；无脚本时用 :has() 跟随单选（不支持 :has 的旧浏览器两块都显示） */
[data-case="cn"] [data-case-panel="intl"],
[data-case="intl"] [data-case-panel="cn"] { display: none; }
.page:has(#case-cn:checked) [data-case-panel="intl"],
.page:has(#case-intl:checked) [data-case-panel="cn"] { display: none; }

/* ---------- 方案卡片（可展开白卡） ---------- */
.schemes {
    display: grid;
    gap: 28px;
    margin-top: 28px;
}
.scheme {
    background: #fff;
    border: 1px solid var(--card-line);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}
.scheme__sum {
    display: block;
    padding: 22px 22px 20px;
    border-radius: 12px;
    cursor: pointer;
    list-style: none;
}
.scheme__sum::-webkit-details-marker { display: none; }
.scheme__sum::marker { content: ""; }
.scheme__tag {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--brand);
    background: var(--soft);
    font: 700 13px/1 var(--font);
    letter-spacing: .08em;
}
.scheme__t {
    display: block;
    margin-top: 14px;
    color: var(--ink);
    font: 700 24px/1.35 var(--font);
    letter-spacing: .01em;
}
.scheme__s {
    display: block;
    margin-top: 6px;
    color: var(--body);
    font: 700 16px/1.6 var(--font);
}
.scheme__more {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 22px;
    color: var(--ink);
    font: 500 14px/1.4 var(--font);
    transition: color .18s;
}
.scheme__more .icon {
    width: 20px;
    height: 20px;
    color: var(--brand);
    stroke-width: 1.6;
    transition: transform .25s var(--ease);
}
.scheme[open] .scheme__more .icon { transform: rotate(180deg); }
.scheme[open] .scheme__more-o,
.scheme:not([open]) .scheme__more-c { display: none; }
.scheme__body {
    margin: 0 22px;
    padding: 20px 0 24px;
    border-top: 1px solid var(--line);
}
.scheme__alt { margin-top: 10px; font-size: 14.5px; line-height: 1.6; }
.scheme__alt .tl { display: inline-block; padding: 12px 0; }   /* 独占一行的切换链接：点按高度 ≥44px，短语可换行 */

/* 步骤列表（方案卡片内） */
.steps {
    display: grid;
    gap: 12px;
    counter-reset: st;
}
.steps > li {
    position: relative;
    padding-left: 36px;
    color: var(--body);
    font-size: 15.5px;
    line-height: 1.75;
    counter-increment: st;
}
.steps > li::before {
    content: counter(st);
    position: absolute;
    left: 0;
    top: 1.5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: var(--brand);
    background: var(--soft);
    font: 700 13px/24px var(--font);
    text-align: center;
}

/* ---------- 渐变胶囊按钮（与首页收尾按钮同一形态） ---------- */
.btn-g {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 360px;
    min-height: 54px;
    margin-top: 22px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--g);
    box-shadow: 0 12px 24px -14px rgba(105, 69, 155, .75);
    font: 700 17px/1.2 var(--font);
    letter-spacing: .02em;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn-g:active { transform: translateY(1px) scale(.99); }
.btn-g .icon { width: 20px; height: 20px; stroke-width: 2; }

/* 文字链接 */
.tl {
    color: var(--brand);
    text-decoration: underline;
    text-decoration-color: rgba(121, 85, 187, .38);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    padding: 13px 0;              /* 行内链接扩大点按区域，不改变行高 */
}
.tl .ph { text-decoration: inherit; }   /* 下划线不会传到 inline-block 短语里，需要单独继承 */

/* ---------- 情形二：三步白卡 ---------- */
.guide {
    margin-top: 28px;
    padding: 6px 22px;
    background: #fff;
    border: 1px solid var(--card-line);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}
.isteps { counter-reset: is; }
.istep {
    position: relative;
    padding: 20px 0 20px 40px;
    counter-increment: is;
}
.istep + .istep { border-top: 1px solid var(--line); }
.istep::before {
    content: counter(is);
    position: absolute;
    left: 0;
    top: 21px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--brand);
    background: var(--soft);
    font: 700 14px/28px var(--font);
    text-align: center;
}
.istep > p {
    color: var(--ink);
    font-size: 16.5px;
    font-weight: 500;
    line-height: 1.8;
}
.istep strong { color: var(--brand); letter-spacing: .04em; }
.istep .btn-g { margin-top: 14px; }

/* 站点识别码条 */
.code {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
    margin-top: 14px;
    padding: 10px 10px 10px 18px;
    border: 1px dashed #cdbff0;
    border-radius: 16px;
    background: #f7f4fe;
}
.code__txt { display: flex; flex-direction: column; min-width: 0; }
.code__k { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.code__v {
    color: var(--brand);
    font: 800 28px/1.15 var(--font);
    letter-spacing: .14em;
    -webkit-user-select: all;
    user-select: all;
}
.code__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 96px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #d6caf3;
    border-radius: 999px;
    color: var(--brand);
    background: #fff;
    font: 700 15px/1 var(--font);
    cursor: pointer;
    transition: color .18s, background-color .18s, border-color .18s;
}
.code__btn .icon { width: 17px; height: 17px; stroke-width: 1.9; }
.code__btn [data-ic-done] { display: none; }
.code__btn[data-copied="yes"] { color: #fff; background: var(--brand); border-color: var(--brand); }
.code__btn[data-copied="yes"] [data-ic-done] { display: inline-block; }
.code__btn[data-copied="yes"] [data-ic-idle] { display: none; }
.code__btn[data-copied="no"] { color: #a3365f; border-color: #f0c2d5; background: #fff6f9; }
.no-js .code__btn { display: none; }

.panel__tip {
    margin-top: 16px;
    padding: 0 4px;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.75;
}

/* ---------- 常见问题与解答 ---------- */
.faq { margin-top: 84px; }
.faq__title {
    color: var(--ink);
    font: 700 24px/1.4 var(--font);
    letter-spacing: .02em;
    text-align: center;
}
.faq__list { margin-top: 2px; padding: 0 18px; }
.qa { border-bottom: 1px solid var(--rule); }
.qa__q {
    display: block;
    padding: 28px 0;
    color: var(--ink);
    font: 600 17px/1.55 var(--font);
    cursor: pointer;
    list-style: none;
    transition: color .18s;
}
.qa__q::-webkit-details-marker { display: none; }
.qa__q::marker { content: ""; }
.qa__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.qa__t { min-width: 0; }
.qa__chev {
    flex-shrink: 0;
    width: 22px;
    height: 12px;
    margin-top: 7px;
    fill: none;
    stroke: #5d5470;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .25s var(--ease);
}
.qa[open] .qa__chev { transform: rotate(180deg); }
.qa__a {
    padding: 0 8px 30px 0;          /* 答案几乎通栏 */
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}
.qa__a p + p { margin-top: 10px; }
.qa__a strong { color: var(--ink); }
.qa__acts { display: flex; flex-wrap: wrap; gap: 0 22px; }
.qa__go {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    padding: 0;
    border: 0;
    color: var(--brand);
    background: none;
    font: 600 15px/1.4 var(--font);
    cursor: pointer;
}
.qa__go .icon { width: 16px; height: 16px; stroke-width: 2; }
.no-js [data-chat-open] { display: none; }

/* ---------- 页脚 ---------- */
.foot {
    margin-top: 72px;
    padding: 18px 20px calc(96px + env(safe-area-inset-bottom));   /* 右下角留给在线客服气泡 */
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}
.foot__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 18px;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.foot__home {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--brand);
    font-weight: 600;
}

/* ---------- 悬停（仅指针设备） ---------- */
@media (hover: hover) {
    .opt:hover .opt__in:not(:checked) + .opt__box {
        color: var(--body);
        box-shadow: 0 1px 2px rgba(46, 40, 59, .06), 0 12px 22px -10px rgba(46, 40, 59, .36);
    }
    .opt:hover .opt__in:not(:checked) + .opt__box .opt__dot { border-color: var(--brand); }
    .scheme__sum:hover .scheme__more { color: var(--brand); }
    .btn-g:hover { color: #fff; filter: brightness(1.06); box-shadow: 0 16px 28px -14px rgba(105, 69, 155, .8); }
    .tl:hover { text-decoration-color: currentColor; }
    .code__btn:hover:not([data-copied]) { border-color: var(--brand); background: #faf8ff; }
    .qa__q:hover { color: var(--brand); }
    .qa__q:hover .qa__chev { stroke: var(--brand); }
    .qa__go:hover { text-decoration: underline; text-underline-offset: 3px; }
    .foot__home:hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* ---------- 窄屏（320–359） ---------- */
@media (max-width: 359px) {
    .wrap { padding-left: 16px; padding-right: 16px; }
    .bar__logo { width: 26px; height: 26px; margin-right: 8px; }
    .case__q { font-size: 22px; }
    .opt__box { gap: 10px; padding-left: 18px; padding-right: 14px; font-size: 16px; }
    .opt__dot { width: 24px; height: 24px; }
    .panel__t { font-size: 20px; }
    .scheme__sum { padding: 20px 18px 18px; }
    .scheme__body { margin: 0 18px; }
    .scheme__t { font-size: 21px; }
    .scheme__s { font-size: 15px; }
    .guide { padding: 4px 16px; }
    .istep { padding-left: 34px; }
    .btn-g { padding: 0 12px; font-size: 16px; }
    .code { padding-left: 14px; }
    .code__v { font-size: 24px; }
    .code__btn { min-width: 84px; padding: 0 14px; }
    .faq__list { padding: 0 6px; }
    .qa__q { font-size: 16px; }
    .qa__chev { margin-top: 6px; }
}

/* ---------- 平板 / 桌面 ---------- */
@media (min-width: 560px) {
    .wrap { padding-top: 44px; }
    .opt { max-width: 340px; }
    .opt__box { min-height: 64px; font-size: 18px; }
    .scheme__sum { padding: 26px 30px 22px; }
    .scheme__body { margin: 0 30px; padding-bottom: 28px; }
    .guide { padding: 8px 30px; }
    .faq__list { padding: 0 8px; }
}

@media (min-width: 1024px) {
    .bar__in { height: 72px; padding: 0 32px 0 20px; }
    .bar__logo { width: 32px; height: 32px; margin-right: 12px; }
    .wrap { padding-top: 56px; }
    .faq { margin-top: 96px; }
}

/* ---------- 强制配色（Windows 高对比度）：渐变底被系统去掉后，选中态仍靠描边与圆点可辨 ---------- */
@media (forced-colors: active) {
    .opt__box { border: 1px solid CanvasText; }
    .opt__in:checked + .opt__box { border: 3px solid Highlight; }
    .opt__dot::after { forced-color-adjust: none; background: Highlight; }
    .btn-g,
    .code__btn { border: 1px solid ButtonText; }
}

/* ---------- 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
    .opt:active .opt__box,
    .btn-g:active { transform: none; }
}
