.account-referrals-view{display:grid;gap:22px;align-content:start}
.account-referrals-view[hidden]{display:none!important}
.account-referral-hero{position:relative;overflow:hidden;min-height:230px;padding:34px 38px;border-radius:23px;background:radial-gradient(circle at 85% 18%,rgba(255,177,139,.32),transparent 28%),linear-gradient(115deg,#172f4d 5%,#293b5d 57%,#8d1243 100%);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:24px}
.account-referral-hero:before{content:"";position:absolute;width:330px;height:330px;right:-85px;top:-120px;border:1px solid rgba(255,255,255,.2);border-radius:50%;box-shadow:0 0 0 48px rgba(255,255,255,.035),0 0 0 105px rgba(255,255,255,.025)}
.account-referral-hero>div{position:relative;z-index:1;max-width:650px}
.account-referral-hero .account-premium-eyebrow{color:#ffb294}
.account-referral-hero h2{color:#fff;font-size:clamp(28px,3vw,42px);line-height:1.12;margin:12px 0}
.account-referral-hero p{color:#e5ebf5;max-width:620px;line-height:1.6;margin:0}
.account-referral-hero-icon{position:relative;z-index:1;flex:none;display:grid;place-items:center;width:120px;height:120px;border-radius:30px;border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.1);box-shadow:0 20px 45px rgba(0,0,0,.15),inset 0 1px rgba(255,255,255,.25);font-size:38px;font-weight:900;color:#ffd0a8;transform:rotate(8deg)}
.account-referral-link-card{padding:27px 30px}
.account-referral-link-row{display:flex;gap:12px;margin-top:22px}
.account-referral-link-row input{min-width:0;flex:1;padding:0 16px;border:1px solid #d3e0ed;border-radius:12px;background:#f7faff;color:#193653;font-size:15px;font-weight:700}
.account-referral-link-row button{min-height:52px;padding:0 22px;border:0;border-radius:12px;background:#c70c38;color:#fff;font-weight:800;cursor:pointer;box-shadow:0 12px 25px rgba(199,12,56,.15);transition:transform .2s,box-shadow .2s,background .2s}
.account-referral-link-row button:hover{background:#ae0a33;transform:translateY(-2px);box-shadow:0 16px 30px rgba(199,12,56,.22)}
.account-referral-available{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:22px;padding:18px 20px;border:1px solid #f0c6d2;border-radius:14px;background:linear-gradient(110deg,#fff7f9,#f5f9ff);color:#314b69;font-size:13px;font-weight:800}
.account-referral-available strong{color:#c20d39;font-size:clamp(21px,2vw,29px);white-space:nowrap}
.account-referral-transfer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end;gap:12px;margin-top:17px}
.account-referral-transfer label{display:grid;gap:7px;color:#243f60;font-size:12px;font-weight:800}
.account-referral-transfer input{box-sizing:border-box;width:100%;min-height:48px;padding:10px 13px;border:1px solid #d4e0ed;border-radius:11px;background:#fff;color:#172d4b;font:inherit}
.account-referral-transfer button{min-height:48px;white-space:nowrap}
.account-referral-transfer-notice{padding:11px 13px;border-radius:9px;background:#e9f8f0;color:#14643d!important}
.account-referral-transfer-notice.is-error{background:#fff0f2;color:#a51435!important}
.account-referral-transfer-notice[hidden]{display:none}
.account-referral-link-card p{font-size:13px;color:#6d829b;margin:13px 0 0}
.account-referral-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.account-referral-stat{display:flex;flex-direction:column;gap:9px;min-width:0;min-height:130px;padding:20px 22px;border:1px solid #d8e3ef;border-radius:17px;background:#fff;box-shadow:0 8px 24px rgba(24,51,81,.04)}
.account-referral-stat:first-child{border-color:#efc9d3;background:linear-gradient(145deg,#fff,#fff7f9)}
.account-referral-stat small{font-size:10px;letter-spacing:.09em;font-weight:900;color:#c20d39}
.account-referral-stat strong{font-size:clamp(21px,2vw,30px);font-weight:900;line-height:1.1;color:#183450;white-space:nowrap}
.account-referral-stat span{margin-top:auto;font-size:12px;line-height:1.4;color:#7890a8}
.account-referral-history{padding:26px 30px}
.account-referral-people-intro{margin:12px 0 0;color:#6d829b;font-size:13px;line-height:1.55}
.account-referral-person{justify-content:flex-start;gap:13px}
.account-referral-person-avatar{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:12px;background:#fcebf0;color:#b90d37;font-size:16px;font-weight:900}
.account-referral-person div{min-width:0}
.account-referral-person strong{overflow-wrap:anywhere}
.account-referral-history .account-list{margin-top:18px}
.account-referral-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 3px;border-top:1px solid #e5edf5}
.account-referral-row div{display:grid;gap:5px}.account-referral-row strong{color:#193653}.account-referral-row span{color:#7890a8;font-size:13px}.account-referral-row b{color:#07815a;white-space:nowrap}
.account-referral-empty{padding:22px 0;margin:0;color:#7990a8;line-height:1.5}
.account-referral-terms{font-size:13px;line-height:1.6;color:#6f849b;margin:0 2px 12px}
/* Keep the whole referral page in the document flow instead of the old fixed-height workspace. */
body.storefront.account-page.account-is-authenticated .account-dashboard:has(.account-referrals-view:not([hidden])){height:auto;min-height:0;animation:none}
body.storefront.account-page.account-is-authenticated .account-referrals-view{width:100%;min-width:0;animation:none;view-transition-name:none}
body.storefront.account-page.account-view-referrals .account-view[hidden]{animation:none}
body.storefront.account-page.account-view-referrals > *{transition:none}
.account-referral-row.account-referral-person{justify-content:flex-start;gap:13px}
.account-referral-row.account-referral-person>div{min-width:0;flex:1}
.account-referral-row.account-referral-person strong{display:block;overflow-wrap:anywhere}
.account-referral-link-row input{width:100%;min-height:52px}
@media(max-width:600px){body.storefront.account-page.account-is-authenticated .account-dashboard:has(.account-referrals-view:not([hidden])) .account-mobile-section-copy strong{overflow:visible;text-overflow:clip;white-space:normal}}
@media(max-width:1250px){.account-referral-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.account-referrals-view{gap:14px}.account-referral-hero{min-height:0;padding:26px 22px;text-align:center;justify-content:center}.account-referral-hero-icon{display:none}.account-referral-hero p{font-size:14px}.account-referral-link-card,.account-referral-history{padding:22px 18px}.account-referral-link-row{flex-direction:column}.account-referral-link-row input{height:50px;flex:none;font-size:13px}.account-referral-stats{gap:10px}.account-referral-stat{min-height:118px;padding:16px;gap:7px}.account-referral-stat strong{font-size:24px}.account-referral-row{align-items:flex-start}.account-referral-row span{line-height:1.4}}
@media(max-width:800px){.account-referral-transfer{grid-template-columns:1fr}.account-referral-transfer button{width:100%}.account-referral-available{align-items:flex-start;flex-direction:column}}
@media(max-width:430px){.account-referral-stat{min-height:126px;padding:15px 13px}.account-referral-stat small{font-size:9px}.account-referral-stat strong{font-size:21px}.account-referral-stat span{font-size:11px}}
@media(max-width:350px){.account-referral-stats{grid-template-columns:1fr}.account-referral-stat{min-height:0}}

/* The shared account heading styles must not flatten the referral banner. */
body.storefront.account-page.account-is-authenticated .account-referrals-view .account-view-lead.account-referral-hero {
  box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;
  min-height:228px;margin:0;padding:36px 46px;gap:32px;text-align:left;
  border:1px solid rgba(255,255,255,.12);border-radius:24px;
  background:radial-gradient(circle at 88% 9%,rgba(255,172,140,.26),transparent 30%),linear-gradient(112deg,#142d4b 0%,#263a5c 60%,#911642 100%);
  box-shadow:0 18px 42px rgba(22,43,75,.13);color:#fff;
}
body.storefront.account-page.account-is-authenticated .account-referrals-view .account-referral-hero>div {width:auto;max-width:720px}
body.storefront.account-page.account-is-authenticated .account-referrals-view .account-referral-hero .account-premium-eyebrow {margin:0 0 15px;color:#ffb79a;font-size:11px;letter-spacing:.16em}
body.storefront.account-page.account-is-authenticated .account-referrals-view .account-referral-hero h2 {margin:0;color:#fff;font-size:clamp(32px,3.3vw,48px);line-height:1.07;letter-spacing:-.055em;text-wrap:balance}
body.storefront.account-page.account-is-authenticated .account-referrals-view .account-referral-hero h2::after {display:none}
body.storefront.account-page.account-is-authenticated .account-referrals-view .account-referral-hero p {max-width:570px;margin:16px 0 0;color:#e2e9f5;font-size:15px;line-height:1.6}
body.storefront.account-page.account-is-authenticated .account-referrals-view .account-referral-hero-icon {width:112px;height:112px;border-radius:27px;font-size:39px}
@media(max-width:700px) {
  body.storefront.account-page.account-is-authenticated .account-referrals-view .account-view-lead.account-referral-hero {min-height:0;padding:28px 22px;margin:0;justify-content:center;gap:0;text-align:center;border-radius:20px}
  body.storefront.account-page.account-is-authenticated .account-referrals-view .account-referral-hero>div {width:100%;max-width:none}
  body.storefront.account-page.account-is-authenticated .account-referrals-view .account-referral-hero .account-premium-eyebrow {margin-bottom:12px}
  body.storefront.account-page.account-is-authenticated .account-referrals-view .account-referral-hero h2 {font-size:clamp(27px,7vw,35px);line-height:1.12}
  body.storefront.account-page.account-is-authenticated .account-referrals-view .account-referral-hero p {max-width:34ch;margin:13px auto 0;font-size:13px;line-height:1.55}
  body.storefront.account-page.account-is-authenticated .account-referrals-view .account-referral-hero-icon {display:none}
}
