/* ============================================================
 * newGPT-PAY 用户前台样式（Apple 设计语言）
 * 与后台 style.css 完全隔离，仅前台 index.html 引用
 * 浅色 / 深色模式跟随系统自动切换
 * ============================================================ */

/* ── 设计令牌 ── */
:root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-2: #f5f5f7;
    --text: #1d1d1f;
    --text-2: #6e6e73;
    --text-3: #86868b;
    --separator: rgba(60, 60, 67, .12);
    --fill: rgba(118, 118, 128, .12);
    --fill-2: rgba(118, 118, 128, .08);
    --fill-3: rgba(118, 118, 128, .2);

    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-press: #006edb;
    --accent-text: #0066cc;
    --accent-soft: rgba(0, 113, 227, .09);
    --accent-ring: rgba(0, 113, 227, .3);

    --green: #34c759;
    --green-text: #1d8a3a;
    --green-soft: rgba(52, 199, 89, .13);
    --red: #ff3b30;
    --red-text: #d70015;
    --red-soft: rgba(255, 59, 48, .1);
    --orange: #ff9500;
    --orange-text: #b24d00;
    --orange-soft: rgba(255, 149, 0, .13);

    --seg-bg: rgba(118, 118, 128, .12);
    --seg-thumb: #ffffff;
    --field-bg: rgba(118, 118, 128, .08);
    --field-bg-hover: rgba(118, 118, 128, .12);
    --toast-bg: rgba(255, 255, 255, .86);

    --shadow-card: 0 1px 2px rgba(0, 0, 0, .02), 0 8px 24px rgba(0, 0, 0, .04), 0 28px 72px rgba(0, 0, 0, .06);
    --shadow-chip: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .05);
    --shadow-thumb: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04);
    --shadow-toast: 0 12px 40px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(0, 0, 0, .06);

    /* Apple Intelligence 光谱色 */
    --spectrum: #0894ff, #c959dd, #ff2e54, #ff9004;

    --radius-card: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;

    --ease: cubic-bezier(.25, .1, .25, 1);
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --spring: cubic-bezier(.34, 1.36, .64, 1);
    --spring-soft: cubic-bezier(.3, 1.18, .5, 1);

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --surface: #1c1c1e;
        --surface-2: #2c2c2e;
        --text: #f5f5f7;
        --text-2: #a1a1a6;
        --text-3: #8e8e93;
        --separator: rgba(84, 84, 88, .55);
        --fill: rgba(118, 118, 128, .24);
        --fill-2: rgba(118, 118, 128, .16);
        --fill-3: rgba(118, 118, 128, .36);

        --accent: #0a84ff;
        --accent-hover: #3395ff;
        --accent-press: #0071e3;
        --accent-text: #2997ff;
        --accent-soft: rgba(10, 132, 255, .16);
        --accent-ring: rgba(10, 132, 255, .45);

        --green: #30d158;
        --green-text: #30d158;
        --green-soft: rgba(48, 209, 88, .16);
        --red: #ff453a;
        --red-text: #ff6961;
        --red-soft: rgba(255, 69, 58, .16);
        --orange: #ff9f0a;
        --orange-text: #ffb340;
        --orange-soft: rgba(255, 159, 10, .16);

        --seg-bg: rgba(118, 118, 128, .24);
        --seg-thumb: #636366;
        --field-bg: rgba(118, 118, 128, .18);
        --field-bg-hover: rgba(118, 118, 128, .26);
        --toast-bg: rgba(44, 44, 46, .86);

        --shadow-card: 0 0 0 1px rgba(255, 255, 255, .06), 0 28px 72px rgba(0, 0, 0, .5);
        --shadow-chip: 0 0 0 1px rgba(255, 255, 255, .06);
        --shadow-thumb: 0 3px 8px rgba(0, 0, 0, .3), 0 3px 1px rgba(0, 0, 0, .1);
        --shadow-toast: 0 12px 40px rgba(0, 0, 0, .5), 0 0 0 .5px rgba(255, 255, 255, .12);
    }
}

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

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

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.47;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-ring); }

button,
input,
textarea {
    font: inherit;
    color: inherit;
}

.customer-shell {
    min-height: 100vh;
    overflow-x: clip;
}

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

@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── Hero ── */
.hero {
    position: relative;
    max-width: 980px;
    margin: 0 auto;
    padding: 88px 22px 52px;
    text-align: center;
}

.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 24px;
    left: 50%;
    width: min(780px, 100%);
    height: 340px;
    transform: translateX(-50%);
    background:
        radial-gradient(closest-side at 26% 50%, rgba(8, 148, 255, .2), transparent),
        radial-gradient(closest-side at 54% 42%, rgba(201, 89, 221, .16), transparent),
        radial-gradient(closest-side at 78% 56%, rgba(255, 46, 84, .1), transparent);
    filter: blur(44px);
    pointer-events: none;
}

.hero h1 {
    margin: 0 0 32px;
    font-size: clamp(30px, 8.6vw, 64px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -.025em;
    color: var(--text);
}

.hero-gradient {
    background: linear-gradient(90deg, var(--spectrum));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px 0 13px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-chip);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.hero-badge svg {
    flex: none;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-status-line {
    display: flex;
    justify-content: center;
}

.hero-pause-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: min(680px, 100%);
    margin-top: 20px;
    padding: 10px 18px 10px 10px;
    border-radius: 22px;
    background: var(--orange-soft);
    color: var(--orange-text);
    text-align: left;
}

.hero-pause-status-icon {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.hero-pause-status-copy {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    min-width: 0;
}

.hero-pause-status-copy strong { font-size: 14px; font-weight: 600; }
.hero-pause-status-copy small { font-size: 13px; line-height: 1.45; opacity: .85; }

/* ── 页面容器 ── */
.page-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px 8px;
}

/* ── 分段控件（Tabs） ── */
/* 列数随按钮数量自适应，宽度按内容收缩并居中 */
.front-tabs {
    --tabs: 4;
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 24px;
    padding: 3px;
    border-radius: 999px;
    background: var(--seg-bg);
}

.front-tab {
    position: relative;
    z-index: 1;
    min-width: 96px;
    height: 36px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: color .25s var(--ease);
}

.front-tab:hover { color: var(--text); }

.front-tab.active {
    color: var(--text);
    font-weight: 600;
    background: var(--seg-thumb);
    box-shadow: var(--shadow-thumb);
}

.front-tab:focus-visible { box-shadow: 0 0 0 3px var(--accent-ring); }

/* 支持 :has() 的浏览器使用滑动指示块（宽度按按钮数量计算） */
@supports selector(:has(*)) {
    .front-tabs:has(> .front-tab:last-child:nth-child(2)) { --tabs: 2; }
    .front-tabs:has(> .front-tab:last-child:nth-child(3)) { --tabs: 3; }
    .front-tabs:has(> .front-tab:last-child:nth-child(5)) { --tabs: 5; }

    .front-tabs::before {
        content: "";
        position: absolute;
        top: 3px;
        bottom: 3px;
        left: 3px;
        width: calc((100% - 6px) / var(--tabs));
        border-radius: 999px;
        background: var(--seg-thumb);
        box-shadow: var(--shadow-thumb);
        transition: transform .5s var(--spring-soft);
    }

    .front-tabs:has(> .front-tab:nth-child(2).active)::before { transform: translateX(100%); }
    .front-tabs:has(> .front-tab:nth-child(3).active)::before { transform: translateX(200%); }
    .front-tabs:has(> .front-tab:nth-child(4).active)::before { transform: translateX(300%); }
    .front-tabs:has(> .front-tab:nth-child(5).active)::before { transform: translateX(400%); }

    .front-tab.active {
        background: transparent;
        box-shadow: none;
    }
}

/* ── 主卡片 ── */
.main-card {
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.front-pane { display: none; }

.front-pane.active {
    display: block;
    animation: fade-in .4s var(--ease-out);
}

/* ── 步骤条 ── */
.steps-bar { padding: 32px 44px 0; }

.steps-inner {
    display: flex;
    align-items: flex-start;
    max-width: 500px;
    margin: 0 auto;
}

.step-item {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 56px;
}

.step-circle {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--fill);
    color: var(--text-3);
    font-size: 14px;
    font-weight: 600;
    transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}

.step-circle.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 5px var(--accent-soft);
}

.step-circle.done {
    background: var(--accent);
    color: #fff;
}

.step-connector {
    position: relative;
    flex: 1;
    height: 3px;
    margin: 14.5px 2px 0;
    overflow: hidden;
    border-radius: 3px;
    background: var(--fill);
}

.step-connector::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .55s var(--ease-out);
}

.step-connector.done::after { transform: scaleX(1); }

.step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    white-space: nowrap;
    transition: color .3s var(--ease);
}

.step-label.active { color: var(--text); }

/* ── 表单区 ── */
.form-section,
.pane-section,
.recharge-wait-section { padding: 36px 44px 44px; }

.form-section,
.recharge-wait-section { animation: rise .5s var(--ease-out); }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.section-head h3 {
    margin: 0 0 6px;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.02em;
}

.section-head p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-2);
}

.section-pill {
    flex: none;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 600;
}

.form-item { margin-bottom: 20px; }

.form-label {
    display: block;
    margin: 0 0 8px 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.form-label .req {
    margin-left: 3px;
    color: var(--red);
}

.form-input,
.form-textarea {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 18px;
    font-size: 17px;
    color: var(--text);
    background: var(--field-bg);
    border: 1px solid transparent;
    border-radius: 14px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.form-input:hover,
.form-textarea:hover { background: var(--field-bg-hover); }

.form-input:focus,
.form-textarea:focus {
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-3);
    opacity: .75;
}

.mono-input {
    font-family: var(--mono);
    font-size: 16px;
    letter-spacing: .02em;
}

.form-textarea {
    height: auto;
    min-height: 168px;
    padding: 14px 18px;
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

.input-hint {
    margin: 8px 0 0 4px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-3);
}

.input-hint.err,
.input-hint.ok {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-weight: 500;
}

.input-hint.err { color: var(--red-text); }
.input-hint.ok { color: var(--green-text); }

.input-hint.err::before,
.input-hint.ok::before {
    flex: 0 0 16px;
    height: 16px;
    margin-top: 1.5px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.input-hint.err::before { content: "!"; background: var(--red); }
.input-hint.ok::before { content: "\2713"; background: var(--green); }

.input-hint:empty { display: none; }

/* ── 提示条 ── */
.trust-note,
.warning-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 20px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.6;
}

.trust-note::before,
.warning-note::before {
    content: "";
    flex: 0 0 18px;
    height: 18px;
    margin-top: 2px;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.trust-note {
    background: var(--accent-soft);
    color: var(--text-2);
}

.trust-note::before {
    background: var(--accent);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.5-3 8.5-7 10-4-1.5-7-5.5-7-10V6l7-3z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.5-3 8.5-7 10-4-1.5-7-5.5-7-10V6l7-3z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
}

.warning-note {
    background: var(--orange-soft);
    color: var(--orange-text);
}

.warning-note::before {
    background: var(--orange);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.2L2.6 17.5a2 2 0 0 0 1.7 3h15.4a2 2 0 0 0 1.7-3L13.7 4.2a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9.5v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.2L2.6 17.5a2 2 0 0 0 1.7 3h15.4a2 2 0 0 0 1.7-3L13.7 4.2a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9.5v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
}

/* ── 按钮（胶囊） ── */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -.01em;
    cursor: pointer;
    outline: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), opacity .2s var(--ease), box-shadow .2s var(--ease);
}

.btn:focus-visible { box-shadow: 0 0 0 4px var(--accent-ring); }
.btn:active:not(:disabled) { transform: scale(.97); }

.btn:disabled {
    opacity: .38;
    cursor: not-allowed;
}

.btn.is-loading:disabled {
    opacity: .85;
    cursor: progress;
}

.btn-block { width: 100%; }

.btn-lg {
    height: 52px;
    padding: 0 28px;
    border-radius: 999px;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:active:not(:disabled) { background: var(--accent-press); }

.btn-default {
    background: var(--fill);
    color: var(--text);
}

.btn-default:hover:not(:disabled) { background: var(--fill-3); }

.btn .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: conic-gradient(from 90deg, transparent 12%, currentColor);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
    animation: spin .8s linear infinite;
}

.btn.is-loading .spinner { display: inline-block; }

.button-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.button-row .btn-default { min-width: 116px; }

.grow-btn { flex: 1; }

/* ── 信息列表（iOS 分组样式） ── */
.info-box {
    margin: 0 0 20px;
    padding: 0 18px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-height: 50px;
    padding: 13px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--separator);
}

.info-row:last-child { border-bottom: 0; }

.info-label {
    flex: none;
    color: var(--text-2);
}

.info-val {
    min-width: 0;
    max-width: 64%;
    text-align: right;
    font-weight: 500;
    color: var(--text);
    word-break: break-all;
}

.info-val.blue { color: var(--accent-text); }
.info-val.success-text { color: var(--green-text); }

.txt-mono {
    font-family: var(--mono);
    font-size: .88em;
}

/* ── 等待处理区（第 4 步） ── */
.wait-hero {
    --glow-a: rgba(8, 148, 255, .16);
    --glow-b: rgba(201, 89, 221, .13);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 48px 28px 36px;
    border-radius: var(--radius-lg);
    background: var(--surface-2);
    text-align: center;
}

.wait-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -40% -10% 20%;
    background:
        radial-gradient(38% 50% at 36% 50%, var(--glow-a), transparent 70%),
        radial-gradient(38% 50% at 64% 50%, var(--glow-b), transparent 70%);
    transition: opacity .5s var(--ease);
    pointer-events: none;
}

.wait-hero.is-success {
    --glow-a: rgba(52, 199, 89, .18);
    --glow-b: rgba(48, 209, 88, .1);
}

.wait-hero.is-failed {
    --glow-a: rgba(255, 59, 48, .14);
    --glow-b: rgba(255, 149, 0, .1);
}

.wait-orbit {
    --ring: conic-gradient(from 0deg, var(--spectrum), #0894ff);
    position: relative;
    width: 112px;
    height: 112px;
    margin: 0 auto 26px;
}

.wait-orbit::before,
.wait-orbit::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: var(--ring);
    animation: spin 2.8s linear infinite;
}

/* 光谱圆环 */
.wait-orbit::before {
    inset: 0;
    z-index: 1;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4.5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4.5px));
}

/* 柔光 */
.wait-orbit::after {
    inset: 6px;
    z-index: 0;
    opacity: .55;
    filter: blur(20px);
}

.wait-orbit-core {
    position: absolute;
    inset: 11px;
    z-index: 3;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface);
    color: #fff;
    font-size: 38px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08), inset 0 0 0 .5px var(--separator);
    transition: background-color .5s var(--ease);
}

.wait-orbit-core:empty::before {
    content: "";
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--spectrum), #0894ff);
    animation: core-breathe 1.8s ease-in-out infinite;
}

@keyframes core-breathe {
    0%, 100% { transform: scale(.7); opacity: .55; }
    50% { transform: scale(1); opacity: 1; }
}

/* 扩散波纹 */
.wait-orbit i {
    position: absolute;
    inset: 0;
    z-index: 0;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: ripple 2.7s var(--ease-out) infinite;
}

.wait-orbit i:nth-of-type(2) { animation-delay: .9s; }
.wait-orbit i:nth-of-type(3) { animation-delay: 1.8s; }

@keyframes ripple {
    0% { transform: scale(.92); opacity: .45; }
    100% { transform: scale(1.65); opacity: 0; }
}

.wait-orbit.stopped::before,
.wait-orbit.stopped::after { animation: none; }
.wait-orbit.stopped i { display: none; }

.wait-hero.is-success .wait-orbit { --ring: var(--green); }
.wait-hero.is-failed .wait-orbit { --ring: var(--red); }

.wait-hero.is-success .wait-orbit-core,
.wait-hero.is-failed .wait-orbit-core { animation: core-pop .6s var(--spring); }

.wait-hero.is-success .wait-orbit-core { background: var(--green); }
.wait-hero.is-failed .wait-orbit-core { background: var(--red); }

@keyframes core-pop {
    from { transform: scale(.6); }
    to { transform: scale(1); }
}

.wait-eyebrow {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    background: linear-gradient(90deg, var(--spectrum));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.wait-hero.is-success .wait-eyebrow,
.wait-hero.is-failed .wait-eyebrow {
    background: none;
    -webkit-text-fill-color: currentColor;
}

.wait-hero.is-success .wait-eyebrow { color: var(--green-text); }
.wait-hero.is-failed .wait-eyebrow { color: var(--red-text); }

.wait-hero h3 {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.02em;
}

.wait-hero p {
    max-width: 460px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-2);
}

.wait-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    margin-top: 20px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-chip);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}

.wait-time::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink { 50% { opacity: .25; } }

/* 充值进度条 */
.wait-bar {
    max-width: 420px;
    margin: 22px auto 0;
    text-align: left;
}

.wait-bar-track {
    position: relative;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--fill);
}

.wait-bar-fill {
    position: relative;
    display: block;
    width: 0;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--spectrum));
    background-size: 420px 100%;
    transition: width .3s linear, background-color .4s var(--ease);
}

/* 流光：提示仍在处理中 */
.wait-bar-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: translateX(-100%);
    animation: bar-sheen 1.6s ease-in-out infinite;
}

@keyframes bar-sheen { to { transform: translateX(100%); } }

.wait-bar-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-2);
}

.wait-bar-meta b {
    flex: none;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.wait-hero.is-success .wait-bar-fill { background: var(--green); }
.wait-hero.is-failed .wait-bar-fill { background: var(--red); }

.wait-hero.is-success .wait-bar-fill::after,
.wait-hero.is-failed .wait-bar-fill::after { display: none; }

.wait-hero.is-success .wait-bar-meta b { color: var(--green-text); }

/* 失败时隐藏百分比，只保留状态文字 */
.wait-hero.is-failed .wait-bar-meta b { display: none; }

/* 进度节点 */
.wait-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 16px 0;
    padding: 24px 12px 20px;
    border-radius: var(--radius-lg);
    background: var(--surface-2);
}

.wait-progress-node {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wait-progress-node + .wait-progress-node::before {
    content: "";
    position: absolute;
    top: 15px;
    right: 50%;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--fill-3);
    transition: background-color .4s var(--ease);
}

.wait-progress-node.done::before,
.wait-progress-node.active::before { background: var(--accent); }

.wait-node-dot {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    margin-bottom: 10px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-3);
    font-size: 13px;
    font-weight: 700;
    box-shadow: inset 0 0 0 1.5px var(--fill-3);
    transition: background-color .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease);
}

.wait-progress-node.done .wait-node-dot,
.wait-progress-node.active .wait-node-dot {
    background: var(--accent);
    color: #fff;
    box-shadow: none;
}

.wait-progress-node.active .wait-node-dot { animation: node-pulse 1.8s var(--ease-out) infinite; }

@keyframes node-pulse {
    0% { box-shadow: 0 0 0 0 var(--accent-ring); }
    100% { box-shadow: 0 0 0 12px transparent; }
}

.wait-progress.failed .wait-progress-node.active::before,
.wait-progress.failed .wait-progress-node.active .wait-node-dot { background: var(--red); }
.wait-progress.failed .wait-progress-node.active .wait-node-dot { animation: none; }

.wait-hero.is-success ~ .wait-progress .wait-progress-node::before,
.wait-hero.is-success ~ .wait-progress .wait-node-dot { background: var(--green); }

.wait-progress-node strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    transition: color .3s var(--ease);
}

.wait-progress-node:not(.done):not(.active) strong { color: var(--text-3); }

.wait-progress-node small {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-3);
}

/* 订单信息 */
.wait-order-card {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 10px;
}

.wait-order-card > div {
    min-width: 0;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.wait-order-card > div:nth-child(4) {
    grid-column: 1 / -1;
    background: var(--red-soft);
}

.wait-order-card span {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--text-3);
}

.wait-order-card b {
    display: block;
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.wait-order-card > div:nth-child(4) b { color: var(--red-text); }

.result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.result-actions .btn { min-width: 180px; }

.wait-safe-tip {
    max-width: 460px;
    margin: 20px auto 0;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    color: var(--text-3);
}

/* ── 查询结果 ── */
.result-slot {
    margin-top: 24px;
    animation: rise .45s var(--ease-out);
}

.result-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-2);
}

.result-banner strong { font-weight: 600; color: var(--text); }

.result-banner.success { background: var(--green-soft); }
.result-banner.success strong { color: var(--green-text); }
.result-banner.failed { background: var(--red-soft); color: var(--red-text); }
.result-banner.failed strong { color: var(--red-text); }
.result-banner.pending { background: var(--accent-soft); }
.result-banner.pending strong { color: var(--accent-text); }

.result-banner-icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.result-banner.success .result-banner-icon { background: var(--green); }
.result-banner.failed .result-banner-icon { background: var(--red); }

/* ── 使用教程（时间线） ── */
.tutorial-steps {
    display: grid;
    margin: 4px 0 24px;
}

.tutorial-step {
    position: relative;
    display: flex;
    gap: 16px;
    padding-bottom: 24px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
}

.tutorial-step:last-child { padding-bottom: 0; }

.tutorial-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 36px;
    bottom: 6px;
    left: 14px;
    width: 2px;
    border-radius: 2px;
    background: var(--separator);
}

.tutorial-step b {
    flex: 0 0 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 14px;
    font-weight: 700;
}

.tutorial-step > span { padding-top: 3px; }

.tutorial-step .txt-mono {
    padding: 1px 7px;
    border-radius: 7px;
    background: var(--fill-2);
    word-break: break-all;
}

/* ── 页脚 ── */
.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 36px 16px calc(36px + env(safe-area-inset-bottom));
    font-size: 12px;
    color: var(--text-3);
}

.footer-dot { opacity: .5; }

/* ── Toast（毛玻璃胶囊） ── */
#toast-root {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top));
    left: 50%;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: calc(100vw - 32px);
    transform: translateX(-50%);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 11px 20px 11px 11px;
    border-radius: 24px;
    background: var(--toast-bg);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    box-shadow: var(--shadow-toast);
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    animation: toast-in .5s var(--spring), toast-out .35s var(--ease) 2.6s forwards;
}

.toast::before {
    content: "i";
    flex: 0 0 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.toast.success::before { content: "\2713"; background: var(--green); }
.toast.error::before { content: "!"; background: var(--red); }
.toast.warning::before { content: "!"; background: var(--orange); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-16px) scale(.92); }
    to { opacity: 1; transform: none; }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateY(-8px) scale(.96); }
}

/* ── 本地预览提示条（file:// 打开时显示） ── */
.preview-banner {
    padding: 10px 16px;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    color: var(--orange-text);
    background: var(--orange-soft);
}

.preview-banner b { font-weight: 600; }

/* ── 工具类 ── */
.hidden { display: none !important; }
.mb-16 { margin-bottom: 16px; }

/* ── 响应式（Apple 断点 734px） ── */
@media (max-width: 734px) {
    .hero { padding: 52px 20px 32px; }
    .hero h1 { margin-bottom: 24px; letter-spacing: -.02em; }
    .hero-badges { gap: 8px; }

    .hero-badge {
        height: 34px;
        padding: 0 13px 0 11px;
        font-size: 13px;
    }

    .hero-badge svg { width: 15px; height: 15px; }

    .page-wrap { padding: 0 12px; }

    .front-tabs {
        width: auto;
        margin-bottom: 16px;
    }

    .front-tab {
        min-width: 0;
        height: 34px;
        padding: 0 4px;
        font-size: 13.5px;
    }

    .main-card { border-radius: 26px; }

    .steps-bar { padding: 24px 16px 0; }
    .step-item { min-width: 48px; }

    .step-circle {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .step-connector { margin-top: 13.5px; }
    .step-label { font-size: 11px; }

    .form-section,
    .pane-section,
    .recharge-wait-section { padding: 24px 20px 28px; }

    .section-head {
        flex-direction: column-reverse;
        gap: 10px;
        margin-bottom: 20px;
    }

    .section-head h3 { font-size: 22px; }
    .section-head p { font-size: 14px; }

    /* 16px 以上避免 iOS Safari 聚焦时自动缩放 */
    .form-textarea { font-size: 16px; }

    .button-row {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 10px;
    }

    .button-row .btn { width: 100%; }

    .wait-hero {
        padding: 36px 20px 28px;
        border-radius: 22px;
    }

    .wait-orbit {
        width: 96px;
        height: 96px;
        margin-bottom: 22px;
    }

    .wait-orbit-core { inset: 10px; font-size: 32px; }
    .wait-hero h3 { font-size: 23px; }
    .wait-hero p { font-size: 14px; }

    .wait-progress {
        padding: 20px 4px 16px;
        border-radius: 22px;
    }

    .wait-node-dot {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .wait-progress-node + .wait-progress-node::before { top: 13px; }
    .wait-progress-node strong { font-size: 12px; }
    .wait-progress-node small { font-size: 10.5px; }

    .wait-order-card { grid-template-columns: 1fr; }

    .result-actions { flex-direction: column; }
    .result-actions .btn { width: 100%; }

    .info-row { font-size: 14px; }
    .info-val { max-width: 60%; }

    .result-banner { font-size: 14px; }
    .tutorial-step { font-size: 14px; }
    .toast { font-size: 14px; }
}

/* ── 减少动态效果 ── */
@media (prefers-reduced-motion: reduce) {
    *,
   *::before,
   *::after {
       animation-duration: .01ms !important;
       animation-iteration-count: 1 !important;
       transition-duration: .01ms !important;
   }
}

/* ── 引擎实时进度（engine_log）与弹窗验证（2026-09-19） ── */
.wait-engine-log {
    margin: 18px 0 4px;
    padding: 14px 16px;
    border: 1px solid rgba(47, 95, 76, .14);
    border-radius: 14px;
    background: rgba(196, 234, 211, .16);
}

.wait-engine-head {
    font-size: 13px;
    font-weight: 600;
    color: #2f5f4c;
    margin-bottom: 8px;
}

.wait-engine-log ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 172px;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.95;
    color: rgba(31, 61, 49, .72);
}

.wait-engine-log li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wait-engine-verify {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wait-engine-verify small {
    color: rgba(31, 61, 49, .6);
    font-size: 12px;
    line-height: 1.6;
}
