body.mx269-preview-active .content-hidden .content-cap {
    display: none !important;
}

/* 本插件独立查单，目标文章不再显示B2的第二套支付成功层。 */
body.mx269-purchase-page #pay-check {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.mx269-payment-complete #scan-box,
body.mx269-payment-complete #ds-box {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.mx269-purchase,
.mx269-purchase * {
    box-sizing: border-box;
}

/* 外层不再包深色大卡片，地址区域继续使用 MX 实时地址卡片自己的原始 CSS。 */
.mx269-purchase {
    margin: 20px 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #1e293b;
}

.mx269-purchase[hidden] {
    display: none !important;
}

/* 购买提示使用独立暖色，与下方灰蓝地址卡明显区分。 */
.mx269-purchase-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 104px;
    margin-bottom: 16px;
    padding: 20px 22px;
    border: 2px solid #fdba74;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 100%);
    box-shadow: none;
}

.mx269-purchase.mx269-purchase-unlocked .mx269-purchase-head {
    border-color: #86efac;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    box-shadow: none;
}

.mx269-purchase.mx269-purchase-unlocked .mx269-purchase-copy strong {
    color: #14532d;
}

.mx269-purchase.mx269-purchase-unlocked .mx269-purchase-copy span {
    color: #3f6212;
}

.mx269-purchase.mx269-purchase-unlocked .mx269-pay-button {
    background: #16a34a !important;
    box-shadow: 0 6px 16px rgba(22, 163, 74, .22);
}

.mx269-purchase.mx269-purchase-unlocked .mx269-pay-button:hover {
    background: #15803d !important;
}

.mx269-purchase-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.mx269-purchase-copy strong {
    display: block;
    margin: 0;
    color: #1e2937;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.4;
}

.mx269-purchase-copy span {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.mx269-purchase-copy b {
    color: #e11d48;
    font-size: 16px;
}

.mx269-pay-button {
    flex: 0 0 auto;
    min-width: 154px;
    min-height: 46px;
    padding: 0 23px !important;
    border: 0 !important;
    border-radius: 9999px !important;
    background: #2563eb !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .2);
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 46px !important;
    cursor: pointer;
}

.mx269-pay-button:hover {
    background: #1d4ed8 !important;
    color: #fff !important;
}

.mx269-pay-button:disabled {
    cursor: wait;
    opacity: .62;
}

.mx269-guest-warning {
    margin: -4px 0 14px !important;
    padding: 10px 12px;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    background: #fff1f2;
    color: #be123c !important;
    font-size: 13px;
}

.mx269-preview-label {
    display: inline-flex;
    align-items: center;
    margin: 0 0 12px;
    padding: 5px 11px;
    border: 1px solid rgba(251, 146, 60, .3);
    border-radius: 9999px;
    background: rgba(251, 146, 60, .08);
    color: #c2410c;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

/* 不指定任何 mxrac 卡片颜色、边框或布局，让原插件的 mxrac-front 样式原样生效。 */
.mx269-address-preview {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
}

.mx269-preview-block + .mx269-preview-block {
    margin-top: 14px;
}

.mx269-address-preview .mx269-preview-locked {
    pointer-events: auto;
}

.mx269-preview-empty,
.mx269-config-error {
    padding: 14px;
    border: 1px solid #fde047;
    border-radius: 12px;
    background: #fefce8;
    color: #854d0e;
    font-size: 14px;
}

.mx269-unlocked-content {
    margin: 20px 0;
}

.mx269-unlocked-content[hidden] {
    display: none !important;
}

.mx269-preview-label[hidden],
.mx269-address-preview[hidden] {
    display: none !important;
}

.mx269-success-overlay {
    display: none;
    position: fixed;
    z-index: 2147483000;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.mx269-success-overlay.mx269-success-open {
    display: flex;
}

.mx269-success-card {
    position: relative;
    width: 100%;
    max-width: 390px;
    padding: 34px 24px 26px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: #1c1e24;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
    color: #fff;
    text-align: center;
}

.mx269-success-icon {
    display: flex;
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #18b566;
    color: #fff;
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.mx269-success-card h3 {
    margin: 0 0 10px !important;
    color: #fff !important;
    font-size: 24px !important;
    line-height: 1.35 !important;
}

.mx269-success-card p {
    margin: 0 0 18px !important;
    color: #b9bbc3 !important;
    font-size: 15px !important;
    line-height: 1.75 !important;
}

.mx269-success-close {
    min-width: 120px;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    background: #18b566;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 640px) {
    .mx269-success-card {
        padding: 30px 18px 23px;
    }

    .mx269-success-close {
        width: 100%;
    }

    .mx269-purchase {
        margin: 16px 0;
    }

    .mx269-purchase-head {
        align-items: stretch;
        flex-direction: column;
        gap: 15px;
        min-height: 0;
        margin-bottom: 14px;
        padding: 16px 14px;
        border-radius: 15px;
    }

    .mx269-purchase-copy strong {
        font-size: 18px;
        line-height: 1.45;
    }

    .mx269-purchase-copy span {
        margin-top: 5px;
        font-size: 13px;
    }

    .mx269-pay-button {
        width: 100%;
        min-height: 44px;
        line-height: 44px !important;
    }
}
