.profile-referrals,.referral-checkout{color:var(--ink,#faf6ff);background:linear-gradient(135deg,#74618733,#a3d8c51c);border:1px solid #cbb5e16b;border-radius:20px;padding:24px;min-width:0}
.profile-referrals{display:grid;gap:16px;margin:10px 0 20px}
.referral-kicker{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--mint,#b0e3cb)}
.profile-referrals h3,.referral-checkout h2{margin:0;font-size:clamp(23px,3vw,30px);font-weight:600;line-height:1.22;letter-spacing:-.025em}
.profile-referrals p,.referral-checkout p{margin:0;font-size:15px;line-height:1.55;color:var(--muted,#c6b7d9)}
.profile-referrals small,.referral-checkout small{display:block;font-size:12px;line-height:1.5;color:var(--muted,#c6b7d9)}
.referral-code-row{display:flex;align-items:stretch;gap:10px;min-width:0}
.referral-code-row strong{flex:1;min-width:0;display:flex;align-items:center;padding:13px 16px;letter-spacing:.12em;font-size:22px;color:var(--ink,#faf6ff);border:1px dashed #cbb5e177;border-radius:12px;user-select:all}
.referral-code-row button{flex:none;padding:12px 16px;min-height:46px;font:inherit;font-size:14px;color:var(--ink,#faf6ff);border:1px solid var(--line,#f3e5ff30);border-radius:12px;background:#ffffff0d;cursor:pointer}
.referral-primary{display:flex;align-items:center;justify-content:center;width:100%;min-height:51px;padding:14px 22px;background:linear-gradient(135deg,#7c6a94,#705b88);border:1px solid #b6a4ce8c;border-radius:14px;color:#fff;font:inherit;font-size:15px;font-weight:600;line-height:1.3;cursor:pointer;box-shadow:0 6px 16px #170d2830}
.referral-primary:hover{background:linear-gradient(135deg,#75618d,#655079)}
.profile-referrals button:disabled,.referral-checkout button:disabled{opacity:.55;cursor:default}
.profile-referrals .referral-earned{font-size:13px;color:var(--mint,#b0e3cb)}
.profile-referrals .referral-status:empty,.referral-checkout .referral-status:empty{display:none}
.referral-checkout[open]{display:grid;gap:20px;width:min(480px,calc(100% - 28px));max-height:calc(100dvh - 28px);overflow:auto;padding:30px;background:linear-gradient(135deg,#574769,#34233f);box-shadow:0 20px 80px #10091b77;position:fixed}
.referral-checkout::backdrop{background:#140d2377;backdrop-filter:blur(5px)}
.referral-close{justify-self:end;width:36px;height:36px;display:grid;place-items:center;font:inherit;font-size:24px;color:var(--ink,#faf6ff);border:1px solid var(--line,#f3e5ff30);border-radius:12px;background:#ffffff0b;cursor:pointer;margin:-12px -12px -10px 0}
.referral-price{display:flex;gap:12px;align-items:baseline}.referral-price strong{font-size:42px;letter-spacing:-.04em}.referral-price span{color:var(--muted,#c6b7d9);font-size:14px}
.referral-checkout form{display:grid;gap:10px}.referral-checkout label{font-size:14px;color:var(--ink,#faf6ff)}
.referral-code-row input{width:100%;min-width:0;padding:13px;font:inherit;font-size:17px;letter-spacing:.06em;text-transform:uppercase;border:1px solid var(--line,#f3e5ff30);border-radius:12px;color:var(--ink,#faf6ff);background:#1b102a66;box-sizing:border-box}
.referral-code-row input::placeholder{letter-spacing:0;text-transform:none;color:var(--muted,#c6b7d9)}
.referral-checkout .is-error{color:#f4b5c2}.referral-checkout .referral-test-note{padding-top:12px;border-top:1px solid var(--line,#f3e5ff30)}
body.light .profile-referrals{background:linear-gradient(135deg,#f0e8f7,#eaf4f0);border-color:#b6a4ce8c}body.light .referral-checkout{background:linear-gradient(135deg,#fcf9ff,#eee8f3)}
body.light .referral-code-row input{background:#fff}body.light .referral-checkout .is-error{color:#ab3453}
@media(max-width:480px){.profile-referrals{padding:18px;gap:14px}.referral-code-row strong{font-size:18px;letter-spacing:.06em;padding:12px}.referral-code-row button{padding:10px 12px;font-size:13px}.referral-checkout[open]{padding:24px;gap:18px}}
.referral-card-binding{display:grid;gap:12px;padding:16px;border:1px solid var(--line,#f3e5ff30);border-radius:14px}.referral-card-binding>strong{font-size:15px}.referral-card-binding button,.referral-secondary{min-height:42px;padding:10px 14px;border:1px solid var(--line,#f3e5ff30);border-radius:12px;background:#ffffff0d;color:var(--ink,#faf6ff);font:inherit;font-size:14px;cursor:pointer}
.referral-checkout .referral-renewal-consent{display:flex;align-items:flex-start;gap:12px;font-size:13px;line-height:1.5;color:var(--muted,#c6b7d9)}.referral-renewal-consent input{width:18px;height:18px;flex:none;margin:2px 0 0;accent-color:#8d76a6}

/* Keep the code and both sharing actions together, including narrow profiles. */
.profile-referrals .referral-code-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:stretch}
.profile-referrals .referral-code-row strong{justify-content:center}
.profile-referrals .referral-code-row .referral-primary{width:auto;min-height:46px;background:linear-gradient(135deg,#7c6a94,#705b88);color:#fff;border-color:#b6a4ce8c;white-space:normal;text-align:center}
@media(max-width:480px){
 .profile-referrals .referral-code-row{grid-template-columns:minmax(0,1fr) minmax(0,.85fr) minmax(0,1fr);gap:6px}
 .profile-referrals .referral-code-row strong{padding:10px 4px;font-size:clamp(10px,3.1vw,15px);letter-spacing:0}
 .profile-referrals .referral-code-row button{padding:9px 5px;font-size:11px;line-height:1.3;min-width:0}
}
.referral-checkout .referral-danger{color:#f1b2c5;border-color:#da9eb26b;background:#ae5e7a14}
body.light .referral-checkout .referral-danger{color:#a13c60;border-color:#b568866b;background:#b568860d}
.referral-remove-confirm{display:grid;gap:16px;padding:16px;border:1px solid #da9eb26b;border-radius:14px}
.referral-remove-confirm[hidden],.referral-checkout button[hidden]{display:none!important}
.referral-remove-confirm>div{display:flex;gap:10px}.referral-remove-confirm>div button{flex:1;min-width:0}
/* Payment consent stays distinct from the marketing and registration consents. */
.referral-renewal-consent a{color:var(--mint,#b0e3cb);text-decoration:underline;text-underline-offset:3px}
.referral-renewal-consent input{accent-color:#9274aa;flex:0 0 18px;width:18px;height:18px;margin:2px 0 0}

/* A compact referral option beside every subscription renewal prompt. */
.subscription-referral{display:grid;gap:10px;box-sizing:border-box;margin-top:22px;padding-top:18px;border-top:1px solid #d1bcdf55;color:inherit;font-size:14px;line-height:1.5;text-align:left}
.subscription-referral>strong{font-size:16px;line-height:1.3}.subscription-referral>p{font-size:14px!important;line-height:1.5!important;margin:0!important;color:inherit!important;opacity:.9}
.subscription-referral-share{display:inline-flex;justify-content:center;align-items:center;min-height:44px;box-sizing:border-box;padding:10px 16px;border:1px solid #bde7dc88;border-radius:14px;background:#a8dcc71a;color:inherit!important;font:inherit;font-weight:600;text-decoration:none;cursor:pointer}
.subscription-referral-share[aria-disabled=true]{opacity:.55;cursor:wait}.subscription-referral>small:empty{display:none}.subscription-referral>small{font-size:12px;line-height:1.4}
.profile-plan{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:18px!important}.profile-plan>div{min-width:0;width:100%}.profile-plan [data-profile-plan-label]{display:block;margin:0 0 12px}.profile-plan [data-profile-access-end]{display:grid;gap:5px;margin:0}.profile-plan [data-profile-access-end][hidden]{display:none}.profile-plan [data-profile-access-end]>strong{font-size:15px;white-space:nowrap;font-weight:500}.profile-plan [data-profile-access-end]>span{display:block;font-size:16px;line-height:1.5}
.profile-plan>.profile-subscription-pay{align-self:flex-start}@media(max-width:700px){.profile-plan>.profile-subscription-pay{width:100%}}.profile-plan>.subscription-referral{width:100%;margin-top:0}
.subscription-offer .subscription-referral>p,.subscription-renew-dialog .subscription-referral>p,.referral-checkout .subscription-referral>p{font-size:14px!important;line-height:1.5!important;margin:0!important}

/* Show the missing required consent only after an attempted payment. */
.referral-renewal-consent.is-invalid{outline:2px solid #e888a2;outline-offset:5px;border-radius:8px;background:#e888a214}
.referral-renewal-consent.is-invalid input{outline:2px solid #e888a2;outline-offset:3px}
