/* ==========================================================================
   会员服务 · 移动端捐赠
   按效果图实现：淡蓝背景、白色卡片、蓝色验证按钮、红色会员服务按钮。
   ========================================================================== */

:root {
    --page-bg: #f0f7fd;
    --card: #ffffff;
    --ink: #222222;
    --muted: #999999;
    --muted-2: #b6bac2;
    --line: #e1e5ea;
    --blue: #4a90f7;
    --blue-active: #3b7fe4;
    --red: #e5443f;
    --red-active: #d33833;
    --gray-btn: #d4d7dc;
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

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

body.donate-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
}

body.donate-body input,
body.donate-body button { font-family: inherit; }

body.donate-body a { color: inherit; text-decoration: none; }

.mobile-page {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(86px, 12vh) 15px calc(30px + env(safe-area-inset-bottom));
}

.member-card {
    width: 100%;
    max-width: 430px;
    padding: 34px 24px 28px;
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 2px 12px rgba(48, 82, 120, .04);
}

.member-card--login { padding-top: 38px; padding-bottom: 34px; }
.member-card--amount { padding-top: 30px; }
.member-card--pay { padding-top: 34px; padding-bottom: 30px; }

.member-card__title {
    margin: 0;
    color: var(--ink);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .01em;
}

.member-card__title--red {
    color: var(--red);
    text-align: center;
    font-size: 31px;
}

.member-card__subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}

.member-card--amount .member-card__subtitle {
    text-align: center;
    margin-top: 14px;
    font-size: 15px;
}

.form-error {
    margin: 14px 0 0;
    color: var(--red);
    font-size: 13px;
    line-height: 1.7;
}

.member-form { margin: 0; }

.form-item { margin-top: 22px; }

.form-item label {
    display: block;
    margin-bottom: 8px;
    color: #333333;
    font-size: 15px;
    font-weight: 400;
}

.form-item input,
.custom-amount {
    width: 100%;
    height: 50px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    color: var(--ink);
    background: #ffffff;
    font-size: 15px;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .18s, box-shadow .18s;
}

.form-item input::placeholder,
.custom-amount::placeholder {
    color: var(--muted-2);
}

.form-item input:focus,
.custom-amount:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 247, .08);
}

.primary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    margin-top: 26px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background .18s, opacity .18s;
}

.primary-btn--blue { background: var(--blue); }
.primary-btn--blue:hover { background: var(--blue-active); }
.primary-btn--red { background: var(--red); }
.primary-btn--red:hover { background: var(--red-active); }
.primary-btn:disabled,
.primary-btn.is-disabled {
    background: var(--gray-btn);
    cursor: not-allowed;
}

.text-red { color: var(--red); }

.donate-toast {
    position: fixed;
    left: 50%;
    bottom: calc(34px + env(safe-area-inset-bottom));
    z-index: 99;
    max-width: 80vw;
    padding: 10px 16px;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(30, 34, 40, .88);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity .2s, transform .2s;
}

.donate-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.back-link {
    display: block;
    width: fit-content;
    margin: 20px auto 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.back-link:hover { color: var(--ink); }

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ------------------------------ 金额页 ------------------------------ */

.amount-label {
    margin: 32px 0 14px;
    color: #333333;
    font-size: 17px;
    font-weight: 600;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.amount-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #333333;
    background: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: border-color .18s, color .18s, background .18s;
}

.amount-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.amount-card small {
    margin-left: 1px;
    font-size: 12px;
    font-weight: 400;
}

.amount-card.is-selected {
    border-color: var(--red);
    color: var(--red);
    background: #fff7f6;
}

.amount-card:focus-within {
    border-color: var(--red);
}

.custom-amount { margin-top: 18px; height: 52px; }

.primary-btn[data-amount-submit] { margin-top: 24px; }

/* ------------------------------ 支付确认 ------------------------------ */

.pay-box {
    padding: 28px 16px 24px;
    border-radius: 10px;
    background: #f7f7f7;
    text-align: center;
}

.pay-box span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.pay-box strong {
    display: block;
    margin-top: 10px;
    color: var(--red);
    font-size: 46px;
    font-weight: 700;
    line-height: 1.15;
}

.pay-box small {
    margin-left: 2px;
    font-size: 18px;
    font-weight: 500;
}

/* ------------------------------ 结果 / 错误 ------------------------------ */

.result-symbol {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 50%;
    font-size: 26px;
    font-weight: 600;
}

.result-symbol--ok { color: #1a9c5b; background: #e9f8ef; }
.result-symbol--wait { color: var(--blue); background: #edf4ff; }
.result-symbol--fail { color: var(--red); background: #fdeeed; }

.result-panel .member-card__title,
.member-card .result-symbol + .member-card__title { text-align: center; }

.result-amount {
    margin: 14px 0 0;
    color: var(--red);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.result-amount small { margin-left: 2px; font-size: 16px; font-weight: 500; }

.result-info {
    margin-top: 22px;
    padding: 15px 14px;
    border-radius: 9px;
    background: #f8f8f8;
}

.result-info p {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.result-info p + p { margin-top: 6px; }

.result-info strong {
    color: #444444;
    font-size: 12px;
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}

.paying-order {
    margin: 18px 0 0;
    color: var(--muted-2);
    font-size: 12px;
    text-align: center;
    word-break: break-all;
}

.jsapi-stage { margin-top: 18px; text-align: center; }
.jsapi-stage__hint { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.7; }

.wechat-tip {
    margin: 18px 0 0;
    padding: 14px;
    border-radius: 9px;
    color: #666666;
    background: #f7f7f7;
    font-size: 13px;
    line-height: 1.8;
}

/* ------------------------------ 隐私声明 ------------------------------ */

.privacy-text { margin-top: 20px; }
.privacy-text p {
    margin: 0 0 14px;
    color: #666666;
    font-size: 14px;
    line-height: 1.9;
}

@media (max-width: 360px) {
    .mobile-page { padding-left: 10px; padding-right: 10px; }
    .member-card { padding: 26px 17px 22px; }
    .member-card__title { font-size: 27px; }
    .member-card__title--red { font-size: 28px; }
    .amount-grid { gap: 8px; }
    .amount-card { height: 54px; font-size: 18px; }
    .pay-box strong { font-size: 40px; }
}

@media (min-width: 600px) {
    .member-card { max-width: 430px; }
}
