:root {
    /* Brand colors - consistent with login/register */
    --bg-body: #0b0b18;
    --bg-glass: rgba(11,11,24,.78);
    --bg-card: rgba(13,14,28,.68);
    --rose: #d94a6f;
    --rose-light: #f09aaf;
    --ink: #e4e4f0;
    --muted: #8a8aa0;
    --border: rgba(217,74,111,.14);
    --border-hover: rgba(217,74,111,.32);
    --gold: #facc15;
    --gold-dark: #d97757;
    --success: #22c55e;
    --danger: #ef4444;
    --font-heading: Poppins, -apple-system, 'PingFang SC', sans-serif;
    --font-body: Lora, 'Times New Roman', serif;
}

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

/* Body background with atmospheric glow - matching auth pages */
body {
    margin: 0;
    background: var(--bg-body);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Atmospheric background glows */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 600px 600px at 20% -10%, rgba(217,74,111,.12) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 80% 10%, rgba(240,154,175,.06) 0%, transparent 70%),
        radial-gradient(ellipse 400px 400px at 50% 50%, rgba(217,74,111,.04) 0%, transparent 70%);
    pointer-events: none;
}

/* Noise texture overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Glass Card System ===== */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 24px 72px rgba(0,0,0,.48), inset 0 1px 0 rgba(217,74,111,.12);
    backdrop-filter: blur(24px) saturate(140%);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
    pointer-events: none;
}

/* ===== Header / Topbar ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 8000;
    background: var(--bg-glass);
    backdrop-filter: blur(24px) saturate(140%);
    border-bottom: 1px solid var(--border);
    padding-top: max(12px, env(safe-area-inset-top));
}

.topbar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 6px;
    text-decoration: none;
    color: var(--ink);
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--rose), var(--rose-light));
    display: grid;
    place-items: center;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.brand h1 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.01em;
    background: linear-gradient(135deg, var(--rose-light) 0%, var(--rose) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav a, .nav summary, .nav .pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--muted);
    border: 1px solid transparent;
    transition: all .25s ease;
    cursor: pointer;
    background: none;
}

.nav a:hover, .nav summary:hover, .nav .pill:hover {
    color: var(--ink);
    border-color: var(--border);
}

.nav a.primary {
    background: linear-gradient(135deg, var(--rose), #b03a5b);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(217,74,111,.28);
}

.nav a.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(217,74,111,.36);
}

/* ===== Premium Page Layout ===== */
.premium-shell {
    flex: 1;
    padding: clamp(80px, 8vw, 120px) clamp(16px, 3vw, 40px) 60px;
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    width: 100%;
    isolation: isolate;
    background:
        radial-gradient(ellipse 90% 60% at 50% 0%, rgba(217,74,111,.06) 0%, transparent 65%),
        linear-gradient(180deg, rgba(11,13,23,.45) 0%, transparent 25%, transparent 75%, rgba(11,13,23,.55) 100%);
}

.premium-inner {
    padding: 0;
}

/* ===== Hero / Headline ===== */
.topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
}

.headline {
    text-align: center;
    margin-bottom: 48px;
}

.headline h2 {
    margin: 0 0 8px;
    font-family: var(--font-heading);
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 700;
    letter-spacing: -.02em;
    background: linear-gradient(135deg, var(--rose-light) 0%, var(--rose) 40%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.headline p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

/* ===== Plan Rail ===== */
.plan-rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 1.5vw, 20px);
    margin-bottom: 48px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.plan {
    min-width: 0;
    padding: 28px 24px;
    border-radius: 20px;
    position: relative;
    background: linear-gradient(145deg, rgba(217,74,111,.08) 0%, rgba(13,14,28,.85) 50%, rgba(217,74,111,.04) 100%);
    border: 1px solid rgba(217,74,111,.12);
    transition: all .4s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.3), 0 0 0 1px rgba(217,74,111,.06);
}

/* Glow overlay */
.plan::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(217,74,111,.12) 0%, transparent 50%);
    pointer-events: none;
    transition: opacity .4s ease;
    opacity: 0;
}

.plan:hover::before {
    opacity: 1;
}

.plan:hover {
    transform: translateY(-6px);
    border-color: rgba(217,74,111,.35);
    box-shadow: 
        0 12px 48px rgba(217,74,111,.25),
        0 4px 16px rgba(0,0,0,.4),
        inset 0 1px 0 rgba(255,255,255,.08),
        0 0 0 1px rgba(217,74,111,.15);
}

.plan .plan-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--ink);
}

.plan .plan-desc {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
}

.plan .plan-price {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    color: var(--rose-light);
    margin-bottom: 4px;
}

.plan .plan-price small {
    font-size: 14px;
    font-weight: 400;
    color: var(--muted);
}

.plan .plan-features {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.plan .plan-features li {
    padding: 4px 0;
    font-size: 13px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan .plan-features li::before {
    content: '✦';
    color: var(--rose);
    font-size: 10px;
}

/* Featured plan */
.plan.featured {
    border-color: rgba(217,74,111,.4);
    background: 
        linear-gradient(160deg, rgba(217,74,111,.18) 0%, rgba(13,14,28,.9) 60%),
        radial-gradient(ellipse at 20% 0%, rgba(217,74,111,.25) 0%, transparent 60%);
    box-shadow: 
        0 8px 40px rgba(217,74,111,.3),
        0 2px 12px rgba(0,0,0,.4),
        inset 0 1px 0 rgba(255,255,255,.1),
        0 0 0 1px rgba(217,74,111,.2);
}

.plan.featured::before {
    opacity: .6;
    background: radial-gradient(circle at 25% 15%, rgba(217,74,111,.2) 0%, transparent 50%);
}

.plan.featured:hover {
    border-color: rgba(217,74,111,.6);
    box-shadow: 
        0 16px 64px rgba(217,74,111,.35),
        0 6px 20px rgba(0,0,0,.5),
        inset 0 1px 0 rgba(255,255,255,.12),
        0 0 0 1px rgba(217,74,111,.25);
    transform: translateY(-8px);
}

.plan.featured::after {
    content: '热门';
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--rose), var(--gold-dark));
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}

/* ===== Payment Section ===== */
.price-box {
    text-align: center;
    margin: 12px 0 6px;
}

.price-box .amount {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 700;
    color: var(--rose);
    line-height: 1;
}

.price-box .amount small {
    font-size: 16px;
    font-weight: 400;
    color: var(--muted);
}

.per-day {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose), #b03a5b);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 16px rgba(217,74,111,.28);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(217,74,111,.36);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary.loading {
    pointer-events: none;
    opacity: .7;
    position: relative;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
}

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

/* ===== Pay Section ===== */
.pay-note {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin: 24px 0;
}

.bottom-action {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 32px 0;
}

.other-pay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px;
    color: var(--muted);
    font-size: 13px;
}

.other-pay::before,
.other-pay::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ===== Pay Grid ===== */
.pay-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    margin-top: 40px;
}

.pay-card {
    padding: 32px;
}

.pay-info h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--ink);
}

/* Amount card */
/* Unified pay info card: amount + address share the same look.
   Replaces the previous inconsistent rose-tint vs white-tint split. */
.pay-info-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 24px;
    margin-bottom: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    transition: border-color .25s ease, background .25s ease;
}

.pay-info-card:last-child { margin-bottom: 0; }

.pay-info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: .04em;
    margin-bottom: 14px;
}

.pay-info-label > span:first-child {
    text-transform: none;
}

/* Amount card */
.amount-card .amount-value {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--font-heading);
    line-height: 1.1;
}

.amount-card .amount-number {
    font-size: 44px;
    font-weight: 700;
    color: var(--rose);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.amount-card .amount-unit {
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: .03em;
    transform: translateY(-1px);
}

/* Address card — auto middle-truncated by PHP, no expand button. */
.address-card .address-text {
    display: block;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink);
    letter-spacing: .01em;
    word-break: break-all;
    margin-bottom: 12px;
    user-select: text;
    cursor: text;
}

.address-card .address-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.copy-btn .copy-icon {
    font-size: 14px;
    line-height: 1;
}

/* Block-style copy button: full-width within the card, with consistent
   left/right edges to match the address text above. */
.copy-btn-block {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 600;
}

/* Pay switch */
.pay-switch {
    display: flex;
    background: rgba(255,255,255,.04);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 20px;
}

.pay-switch button {
    flex: 1;
    padding: 8px 16px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 13px;
    cursor: pointer;
    transition: all .25s;
}

.pay-switch button.active {
    background: var(--rose);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(217,74,111,.3);
}

/* ===== Premium Modal ===== */
.premium-modal {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: none;
    place-items: center;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
}

.premium-modal.show {
    display: grid;
    animation: modalBgIn .3s ease;
}

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

/* ===== Support Panel ===== */
.support-panel {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 24px 72px rgba(0,0,0,.48);
    backdrop-filter: blur(24px);
    z-index: 99997;
    overflow: hidden;
    display: none;
    transform: translateY(20px);
    opacity: 0;
    transition: all .3s ease;
}

.support-panel.show {
    display: block;
    animation: supportIn .35s cubic-bezier(.22,1,.36,1) forwards;
}

@keyframes supportIn {
    to { transform: translateY(0); opacity: 1; }
}

.support-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.support-head h4 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
}

.support-close {
    background: none;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: color .2s;
}

.support-close:hover { color: var(--ink); }

.support-body {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.support-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.support-bubble.ai {
    background: rgba(217,74,111,.08);
    border: 1px solid var(--border);
    color: var(--ink);
    margin-right: 40px;
}

.support-bubble.user {
    background: linear-gradient(135deg, var(--rose), #b03a5b);
    color: #fff;
    margin-left: 40px;
    border-radius: 14px 14px 4px 14px;
}

.support-input {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.support-input input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.04);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 13px;
    outline: none;
    transition: all .25s;
}

.support-input input:focus {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 3px rgba(217,74,111,.1);
}

.support-input button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 0;
    background: linear-gradient(135deg, var(--rose), #b03a5b);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all .25s;
    font-size: 16px;
}

.support-input button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(217,74,111,.28);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    z-index: 99999;
    padding: 12px 20px;
    border-radius: 999px;
    background: rgba(13,14,28,.96);
    border: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error { background: rgba(100,20,20,.96); }


/* ===== Additional Styles (Custom) ===== */
.pay-page-shell {
    padding: 20px 16px;
    max-width: 600px;
    margin: 0 auto;
}
.pay-page-inner {
    padding: 0;
}
.pay-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
}
.pay-back:hover {
    color: var(--ink);
}
.pay-header {
    text-align: center;
    margin-bottom: 20px;
}
.pay-header h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--ink);
}
.pay-sub {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}
.pay-switch-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}
.pay-network-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--rose);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.qr-label {
    font-size: 13px;
    color: var(--muted);
}
.pay-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--rose);
    color: #fff;
    border: 0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 6px 16px rgba(217,74,111,.22);
}

.copy-btn:hover {
    background: var(--rose-light);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(217,74,111,.30);
}
.copy-btn:hover {
    background: var(--border-hover);
}
.order-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}
.order-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: rgba(255,255,255,.03);
    border-radius: 12px;
    font-size: 13px;
}
.order-item strong {
    font-size: 15px;
    color: var(--ink);
}
.tips-card {
    margin-top: 20px;
    padding: 16px;
    background: rgba(255,255,255,.03);
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--muted);
}
.tips-card strong {
    color: var(--ink);
    font-size: 15px;
}

@media (max-width: 620px) {
    .pay-page-shell { padding: 12px 10px; }
    .pay-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
    .order-grid { grid-template-columns: 1fr !important; }
    .pay-card { padding: 16px !important; }
    .pay-info-card { padding: 16px 18px; border-radius: 16px; }
    .pay-info-label { margin-bottom: 10px; }
    .amount-card .amount-number { font-size: 36px; }
    .amount-card .amount-unit { font-size: 14px; }
    .address-card .address-text { font-size: 12.5px; margin-bottom: 10px; }
    .copy-btn-block { padding: 10px 14px; font-size: 13.5px; }
}

/* Shared header/menu and payment control normalization. */
.brand .brand-icon {
    display: grid !important;
    place-items: center !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    flex: 0 0 42px !important;
    aspect-ratio: 1 / 1 !important;
    line-height: 1 !important;
    font-size: 13px !important;
    color: #fff !important;
}

.brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.brand-title {
    font-size: 20px;
    line-height: 1.05;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
}

/* (display:block !important 兜底声明已删, 菜单显示走 HTML hidden 属性 + site_header.php JS) */

.pay-switch-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.pay-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pay-switch button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    line-height: 1;
    flex: 0 0 auto;
}

.pay-network-badge,
.network-badge {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

@media (max-width: 620px) {
    .brand .brand-icon {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        flex-basis: 38px !important;
    }

    .brand-subtitle {
        display: none;
    }

    .pay-switch-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .pay-network-badge {
        justify-self: start;
    }

    .pay-switch button {
        flex: 1 1 calc(33.333% - 10px);
        padding: 0 12px;
    }
}

/* ===== Responsive ===== */
@media (max-width: 1060px) {
    .pay-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .topbar { padding: 12px 16px; }
    .brand h1 { font-size: 18px; }
    .premium-shell { padding: 90px 16px 40px; }
    .plan-rail { grid-template-columns: 1fr; }
    .pay-card { padding: 24px; }
    .support-panel {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
    }
}

/* ===== Utility ===== */
::selection {
    background: rgba(217,74,111,.28);
    color: #fff;
}

a { color: var(--rose-light); text-decoration: none; }
a:hover { color: var(--rose); }

input, select, textarea {
    font-family: var(--font-ui);
}

input:focus, button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(217,74,111,.25);
}

/* Prevent horizontal overflow on payment/order grids only (NOT .plan-rail — 4-card layout must not be clipped) */
.pay-grid, .order-grid {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Final premium alignment with homepage header and mobile selection feedback */
:root {
    --font-body: "Poppins", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body,
.headline,
.headline p,
.plan,
.plan-name,
.plan-desc,
.plan-features li,
.per-day,
.pay-note,
.btn-primary,
.ghost,
.primary {
    font-family: var(--font-ui);
}

.brand {
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
}

.brand h1 {
    white-space: nowrap;
    font-size: 20px;
    line-height: 1.05;
}

.nav {
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.ghost,
.primary {
    min-height: 38px;
    white-space: nowrap;
}

.premium-shell {
    padding-top: 136px;
}

.headline {
    margin-bottom: 36px;
}

.headline h2 {
    margin-bottom: 12px;
}

.plan {
    cursor: pointer;
    outline: none;
}

.plan.active {
    transform: translateY(-4px);
    border-color: rgba(217,74,111,.5);
    background:
        linear-gradient(160deg, rgba(217,74,111,.18) 0%, rgba(13,14,28,.92) 58%),
        radial-gradient(ellipse at 20% 0%, rgba(217,74,111,.22) 0%, transparent 62%);
    box-shadow:
        0 18px 54px rgba(217,74,111,.28),
        0 4px 18px rgba(0,0,0,.42);
}

.plan.active::before {
    opacity: .3;
}

.plan.active::after {
    content: "已选择";
    position: absolute;
    top: 14px;
    right: 14px;
    min-height: 28px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(240,154,175,.18);
    border: 1px solid rgba(240,154,175,.36);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.plan.active[data-name^="SVIP"] {
    border-color: rgba(250,204,21,.4);
    background:
        linear-gradient(160deg, rgba(250,204,21,.14) 0%, rgba(13,14,28,.92) 58%),
        radial-gradient(ellipse at 20% 0%, rgba(217,74,111,.18) 0%, transparent 62%);
    box-shadow:
        0 18px 54px rgba(217,74,111,.24),
        0 4px 18px rgba(0,0,0,.42),
        inset 0 0 0 1px rgba(250,204,21,.2);
}

.plan.active[data-name^="SVIP"]::after {
    background: rgba(250,204,21,.14);
    border-color: rgba(250,204,21,.34);
    color: #ffe8a3;
}

@media (max-width: 620px) {
    .topbar {
        padding: 10px 14px 12px;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .brand {
        flex: 1 1 auto;
        gap: 8px;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
    }

    .brand h1 {
        font-size: 16px;
    }

    .nav {
        flex: 0 0 auto;
        gap: 8px;
    }

    .ghost,
    .primary {
        min-height: 36px;
        padding: 0 12px;
        font-size: 12px;
    }

    .premium-shell {
        padding: 112px 16px 40px;
    }

    .headline {
        margin-bottom: 28px;
    }

    .headline h2 {
        font-size: 30px;
        line-height: 1.12;
    }

    .headline p {
        font-size: 15px;
        line-height: 1.55;
    }

    .plan-rail {
        gap: 16px;
    }

    .plan {
        padding: 24px 20px;
    }
}

/* Final payment-page alignment and responsive cleanup */
.pay-page-shell {
    padding: 132px 16px 40px;
    max-width: 760px;
}

.pay-page-inner,
.pay-card,
.pay-grid,
.order-grid,
.amount-card,
.address-card,
.tips-card {
    width: 100%;
}

.pay-header {
    margin-bottom: 24px;
}

.pay-header h2 {
    line-height: 1.15;
}

.pay-switch-row {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.pay-switch {
    flex: 1 1 auto;
    margin-bottom: 0;
    padding: 4px;
    border: 1px solid rgba(217,74,111,.14);
    border-radius: 14px;
}

.pay-switch button {
    min-height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
    font-weight: 600;
}

.pay-network-badge {
    min-height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 620px) {
    .pay-page-shell {
        padding: 108px 12px 32px;
    }

    .pay-header {
        margin-bottom: 18px;
    }

    .pay-header h2 {
        font-size: 24px;
    }

    .pay-switch-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .pay-switch {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .pay-switch::-webkit-scrollbar {
        display: none;
    }

    .pay-switch button {
        flex: 0 0 auto;
        min-width: 72px;
    }

    .pay-network-badge {
        align-self: flex-start;
    }
}

/* Effective final shared-header and payment switch rules. Keep this at the end. */
.brand .brand-icon {
    display: grid !important;
    place-items: center !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    flex: 0 0 42px !important;
    aspect-ratio: 1 / 1 !important;
    line-height: 1 !important;
    font-size: 13px !important;
    color: #fff !important;
}

.brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.brand-title {
    font-size: 20px;
    line-height: 1.05;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
}

/* (display:block !important 兜底声明已删, 菜单显示走 HTML hidden 属性 + site_header.php JS) */

.pay-switch-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
}

.pay-switch {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    overflow: visible !important;
}

.pay-switch button {
    min-height: 42px !important;
    min-width: 72px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 14px !important;
    line-height: 1 !important;
    flex: 0 0 auto !important;
}

.pay-network-badge,
.network-badge {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

@media (max-width: 620px) {
    .brand .brand-icon {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        flex-basis: 38px !important;
    }

    .brand-subtitle {
        display: none;
    }

    .pay-switch-row {
        grid-template-columns: 1fr !important;
        align-items: stretch !important;
    }

    .pay-network-badge {
        justify-self: start;
    }

    .pay-switch button {
        flex: initial !important;
        padding: 0 12px !important;
    }

    .pay-page-shell,
    .pay-page-inner,
    .pay-card {
        max-width: 100%;
        overflow-x: hidden;
    }

    .pay-card {
        padding-left: 12px;
        padding-right: 12px;
    }

    .pay-switch {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
    }

    .pay-switch button {
        width: 100% !important;
        min-width: 0 !important;
    }

    .qr-wrap img {
        width: min(280px, 100%) !important;
        max-width: 100% !important;
        height: auto !important;
    }
}
