/* ================================================================
   GMP 支付组件样式（与前台浅色主题一致）
   ================================================================ */
.gmp-pay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
.gmp-pay[hidden] { display: none !important; }

.gmp-pay__mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
    animation: gmpFade .18s ease;
}

.gmp-pay__panel {
    position: relative;
    z-index: 1;
    width: min(410px, 100%);
    max-height: min(90vh, 780px);
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
    animation: gmpPop .24s cubic-bezier(.2, .9, .3, 1);
}

.gmp-pay__head {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #f1f1f4;
}

.gmp-pay__heading { min-width: 0; }
.gmp-pay__heading b {
    display: block;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -.2px;
    color: #111;
}
.gmp-pay__heading span {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #929299;
    line-height: 1.45;
}

.gmp-pay__close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    margin-top: -3px;
    border: 0;
    border-radius: 50%;
    background: #f4f4f7;
    color: #666;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.gmp-pay__body {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
}

/* ---------------- 商品 ---------------- */
.gmp-product {
    border: 1px solid #ededf1;
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(160deg, #fff7f9, #fff 60%);
    margin-bottom: 14px;
}
.gmp-product__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.gmp-product__top b { display: block; font-size: 14.5px; font-weight: 900; color: #111; }
.gmp-product__top span { display: block; margin-top: 2px; font-size: 11px; color: #888; line-height: 1.45; }
.gmp-product__top em {
    flex-shrink: 0;
    font-style: normal;
    font-size: 9.5px;
    font-weight: 800;
    color: #b0183a;
    background: #ffe9ee;
    border-radius: 4px;
    padding: 3px 6px;
}
.gmp-product__price { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 4px; }
.gmp-product__price b { font-size: 28px; font-weight: 900; color: #e11d48; letter-spacing: -1px; line-height: 1; }
.gmp-product__price s { font-size: 11px; color: #b3b3ba; }
.gmp-product ul {
    list-style: none;
    margin: 8px 0 0;
    padding: 8px 0 0;
    border-top: 1px dashed #f0dce2;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gmp-product li { font-size: 11.5px; color: #666; line-height: 1.5; }

/* ---------------- 支付方式 ---------------- */
.gmp-methods { display: flex; flex-direction: column; gap: 10px; }
.gmp-method {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ededf1;
    border-radius: 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.gmp-method:active { background: #fafafc; border-color: #ddd; }
.gmp-method__icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #eef0f2;
    overflow: hidden;
}
.gmp-method__icon img {
    width: 28px;
    height: 28px;
    display: block;
    object-fit: contain;
}
.gmp-method__text { flex: 1; min-width: 0; }
.gmp-method__text b { display: block; font-size: 13.5px; font-weight: 800; color: #111; }
.gmp-method__text small { display: block; margin-top: 2px; font-size: 10.5px; color: #999; }
.gmp-method__arrow { color: #c4c4cc; font-size: 21px; line-height: 1; }

.gmp-free {
    width: 100%;
    height: 42px;
    margin-top: 10px;
    border: 1px dashed #f0b6c3;
    border-radius: 11px;
    background: #fff7f9;
    color: #b0183a;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
}
.gmp-free:active { background: #ffe9ef; }

.gmp-pay__safe {
    text-align: center;
    font-size: 10.5px;
    color: #9a9aa2;
    margin: 13px 0 0;
}
.gmp-pay__links {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f2f2f5;
}
.gmp-pay__links button {
    border: 0;
    background: none;
    color: #8a8a91;
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
    padding: 3px;
}

/* ---------------- 订单 / 二维码 ---------------- */
.gmp-order {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fafafc;
    border: 1px solid #f0f0f3;
    margin-bottom: 14px;
}
.gmp-order__amount span { display: block; font-size: 10.5px; color: #999; }
.gmp-order__amount b { font-size: 24px; font-weight: 900; color: #111; letter-spacing: -.6px; line-height: 1.2; }
.gmp-order__amount em {
    display: inline-block;
    margin-left: 8px;
    vertical-align: 4px;
    font-style: normal;
    font-size: 9.5px;
    color: #666;
    background: #fff;
    border: 1px solid #e8e8ee;
    border-radius: 4px;
    padding: 2px 5px;
}
.gmp-order__countdown {
    flex-shrink: 0;
    font-size: 10.5px;
    color: #999;
    text-align: right;
}
.gmp-order__countdown b {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #e11d48;
    font-variant-numeric: tabular-nums;
    letter-spacing: .5px;
}

.gmp-qr { text-align: center; margin-bottom: 14px; }
.gmp-qr__box {
    width: 206px;
    height: 206px;
    margin: 0 auto 9px;
    border-radius: 14px;
    border: 1px solid #ededf1;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .06);
}
.gmp-qr__box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gmp-qr__fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    color: #999;
    font-size: 11px;
    background: #fafafa;
}
.gmp-qr p { margin: 0; font-size: 12px; color: #444; }
.gmp-qr p b { color: #e11d48; }
.gmp-qr > small { display: block; margin-top: 3px; font-size: 10px; color: #a0a0a8; }

/* ---------------- 上传 ---------------- */
.gmp-upload { margin: 12px 0 4px; }
.gmp-upload__btn {
    width: 100%;
    height: 44px;
    border: 1px dashed #d8d8e0;
    border-radius: 11px;
    background: #fafafc;
    color: #333;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.gmp-upload__btn:disabled { opacity: .55; cursor: default; }
.gmp-upload__msg { font-size: 11px; line-height: 1.5; color: #8a8a91; text-align: center; margin: 8px 0 0; min-height: 1px; }
.gmp-upload__msg.is-error { color: #d92d20; }

.gmp-progress {
    margin-top: 10px;
    padding: 10px 12px;
    background: #fafafc;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.gmp-progress__item { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #999; }
.gmp-progress__item i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid #d5d5dd;
    flex-shrink: 0;
    position: relative;
}
.gmp-progress__item.is-active { color: #111; }
.gmp-progress__item.is-active i { border-color: #e11d48; border-top-color: transparent; animation: gmpSpin .7s linear infinite; }
.gmp-progress__item.is-done { color: #0a8f4d; }
.gmp-progress__item.is-done i { background: #0a8f4d; border-color: #0a8f4d; }
.gmp-progress__item.is-done i::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 1px;
    width: 3px;
    height: 6px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}
.gmp-progress__item.is-fail { color: #d92d20; }
.gmp-progress__item.is-fail i { border-color: #d92d20; background: #d92d20; }
.gmp-progress__item.is-fail i::after {
    content: "×";
    position: absolute;
    inset: -3px 0 0 2px;
    color: #fff;
    font-size: 9px;
    line-height: 16px;
}

/* ---------------- 超时 ---------------- */
.gmp-timeout {
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    text-align: center;
}
.gmp-timeout b { display: block; font-size: 12.5px; color: #b45309; }
.gmp-timeout span { display: block; font-size: 10.5px; color: #a16207; margin-top: 2px; }
.gmp-timeout button {
    margin-top: 9px;
    border: 0;
    border-radius: 999px;
    padding: 7px 18px;
    background: #b45309;
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}

/* ---------------- 加载 ---------------- */
.gmp-loading { text-align: center; padding: 40px 0; }
.gmp-loading__spinner {
    width: 30px;
    height: 30px;
    margin: 0 auto 12px;
    border: 3px solid #f0f0f3;
    border-top-color: #e11d48;
    border-radius: 50%;
    animation: gmpSpin .8s linear infinite;
}
.gmp-loading p { font-size: 12px; color: #888; margin: 0; }

/* ---------------- 成功 ---------------- */
.gmp-success { text-align: center; padding: 8px 2px 2px; }
.gmp-success__icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #0a8f4d;
    color: #fff;
    font-size: 30px;
    line-height: 58px;
    box-shadow: 0 8px 24px rgba(10, 143, 77, .25);
}
.gmp-success h3 { margin: 0 0 4px; font-size: 17px; font-weight: 900; color: #111; }
.gmp-success > p { margin: 0; font-size: 11px; color: #999; }
.gmp-code {
    margin: 14px 0 10px;
    padding: 13px 10px;
    border-radius: 10px;
    border: 1px dashed #f0c2ce;
    background: #fff7f9;
    color: #b0183a;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .4px;
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.gmp-copy {
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}
.gmp-success__meta {
    margin: 12px 0;
    font-size: 10.5px;
    color: #a0a0a8;
    line-height: 1.7;
}
.gmp-success__go {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff4d6d, #e11d48);
    color: #fff;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(225, 29, 72, .25);
}
.gmp-success__tip { margin: 10px 0 0; font-size: 10px; color: #b3b3ba; }

.gmp-success-links {
    margin: 14px 0 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}
.gmp-success-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid #ededf1;
    border-radius: 9px;
    background: #fafafc;
    color: #333;
    font-size: 12px;
    text-decoration: none;
}
.gmp-success-links a span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gmp-success-links a span:last-child { color: #e11d48; flex-shrink: 0; }
.gmp-success__empty { font-size: 11.5px; color: #9a9aa2; line-height: 1.6; }
.gmp-success__service {
    display: block;
    margin: 11px auto 0;
    border: 0;
    background: none;
    color: #8a8a91;
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
}

/* ---------------- 会员码 ---------------- */
.gmp-code-step { text-align: center; padding: 4px 0; }
.gmp-code-step__icon { font-size: 32px; line-height: 1; margin-bottom: 8px; }
.gmp-code-step h3 { margin: 0 0 4px; font-size: 17px; font-weight: 900; }
.gmp-code-step p { margin: 0 0 14px; font-size: 10.5px; color: #999; }
.gmp-code-step input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #e4e4ea;
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
    outline: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #111;
}
.gmp-code-step input:focus { border-color: #111; }
.gmp-code-step__err { min-height: 17px; margin: 5px 0 3px; font-size: 10.5px; color: #d92d20; }
.gmp-code-step__submit {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
}
.gmp-code-step__submit:disabled { opacity: .55; }
.gmp-code-step__back {
    margin-top: 12px;
    border: 0;
    background: none;
    color: #999;
    font-size: 11.5px;
    text-decoration: underline;
    cursor: pointer;
}

/* ---------------- 客服 ---------------- */
.gmp-service { text-align: center; padding: 6px 0; }
.gmp-service__icon { font-size: 32px; margin-bottom: 6px; }
.gmp-service h3 { margin: 0 0 6px; font-size: 17px; font-weight: 900; }
.gmp-service p { margin: 0 0 10px; font-size: 11.5px; color: #777; line-height: 1.6; }
.gmp-service__qq {
    margin: 10px 0;
    padding: 12px;
    border-radius: 10px;
    background: #f6f6f8;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #111;
    user-select: all;
}
.gmp-service__none { color: #d92d20 !important; }
.gmp-service__back {
    margin-top: 12px;
    border: 0;
    background: none;
    color: #999;
    font-size: 11.5px;
    text-decoration: underline;
    cursor: pointer;
}

/* ---------------- 第一步解锁窗口 ---------------- */
.unlock-sheet {
    position: fixed;
    inset: 0;
    z-index: 190;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.unlock-sheet[hidden] { display: none !important; }
.unlock-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
    animation: gmpFadeIn .18s ease;
}
.unlock-panel {
    position: relative;
    z-index: 1;
    width: min(430px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 50px rgba(0, 0, 0, .2);
    animation: gmpSlideUp .26s cubic-bezier(.2, .9, .3, 1);
}
.unlock-close {
    position: absolute;
    z-index: 3;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f4f4f7;
    color: #666;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.unlock-body { padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); }
.unlock-top { display: flex; gap: 11px; align-items: center; padding-right: 30px; }
.unlock-cover {
    width: 88px;
    height: 56px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f5f8;
    border: 1px solid #ececf1;
}
.unlock-kicker {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--brand, #e11d48);
    letter-spacing: .5px;
    margin-bottom: 2px;
}
.unlock-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    letter-spacing: -.3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.unlock-meta {
    margin: 3px 0 0;
    font-size: 10.5px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.unlock-price-note {
    margin: 18px 0 9px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #fff5f7;
    color: #7c2438;
    font-size: 12px;
    line-height: 1.5;
}
.unlock-paid {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff4d6d, var(--brand, #e11d48));
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(225, 29, 72, .28);
}
.unlock-paid:disabled { opacity: .5; cursor: default; box-shadow: none; }
.unlock-free {
    width: 100%;
    height: 50px;
    margin-top: 9px;
    border: 1px dashed #f0c98b;
    border-radius: 999px;
    background: #fffaf0;
    color: #8a5b00;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
}
.unlock-free small { font-size: 10.5px; font-weight: 500; color: #b07a1a; }
.unlock-free:active { background: #fff3d9; }
.unlock-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 10px;
    color: #999;
    font-size: 10.5px;
}
.unlock-divider::before,
.unlock-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #ececf1;
}
.unlock-code-row { display: flex; gap: 8px; }
.unlock-code-row input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 13px;
    border: 1px solid #dedee5;
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    color: #111;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: #fff;
}
.unlock-code-row input:focus { border-color: #111; }
.unlock-code-row button {
    width: 88px;
    height: 46px;
    flex-shrink: 0;
    border: 0;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}
.unlock-code-row button:disabled { opacity: .55; }
.unlock-code-tip {
    margin: 5px 2px 0;
    font-size: 10px;
    line-height: 1.5;
    color: #999;
}
.unlock-code-error {
    min-height: 16px;
    margin: 3px 2px 0;
    font-size: 10.5px;
    color: #d92d20;
}
@media (min-width: 760px) {
    .unlock-sheet { align-items: center; }
    .unlock-panel { border-radius: 20px; }
}

/* ---------------- 解锁播报浮窗 ---------------- */
.gmp-broadcast-host {
    position: fixed;
    left: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-width: min(78vw, 340px);
    pointer-events: none;
}
.gmp-broadcast {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(17, 17, 20, .9);
    color: #fff;
    font-size: 11px;
    line-height: 1.5;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .22);
    backdrop-filter: blur(8px);
    animation: gmpBroadcastIn .28s cubic-bezier(.2, .9, .3, 1);
    transition: opacity .3s, transform .3s;
}
.gmp-broadcast.is-hide { opacity: 0; transform: translateY(6px); }
.gmp-broadcast__icon { flex-shrink: 0; font-size: 12px; }
.gmp-broadcast__text { word-break: break-word; }

@keyframes gmpBroadcastIn {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: none; }
}

@keyframes gmpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gmpSlideUp {
    from { opacity: .6; transform: translateY(30px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 360px) {
    .gmp-broadcast-host { left: 9px; max-width: 82vw; }
    .gmp-broadcast { font-size: 10.5px; padding: 8px 10px; }
}

/* ---------------- 动画 / 移动端 ---------------- */
@keyframes gmpFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gmpPop { from { opacity: .5; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes gmpSpin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
    .gmp-pay { align-items: flex-end; padding: 0; }
    .gmp-pay__panel {
        width: 100%;
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
        animation: gmpSlide .26s cubic-bezier(.2, .9, .3, 1);
    }
    .gmp-pay__body { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

@keyframes gmpSlide { from { transform: translateY(50px); opacity: .6; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    .gmp-pay__mask, .gmp-pay__panel, .gmp-loading__spinner, .gmp-progress__item.is-active i { animation-duration: .01ms !important; }
}
