/* Isolated design examples. All product positioning overrides are preview scoped. */
.referral-product-preview .pd-info{position:relative}
.rf-preview-caption{display:inline-block;margin-left:10px;color:#8b8985;font-size:10px;vertical-align:middle}
.rf-share-trigger{position:absolute;right:0;top:-3px;display:inline-flex;align-items:center;justify-content:center;gap:5px;height:36px;padding:0 13px;background:#fff;border:1px solid #dedad3;border-radius:999px;color:#4b4944;font-size:12px;font-weight:600;cursor:pointer;box-shadow:0 2px 5px #231b0b04}
.rf-share-trigger:hover{border-color:#c5533a;color:#b53327;background:#fff9f4}
.rf-share-trigger:focus-visible,.rf-button:focus-visible,.rf-close:focus-visible,.rf-wechat-button:focus-visible{outline:3px solid #d43327;outline-offset:3px}
.rf-dialog-open{overflow:hidden}
.rf-dialog{width:460px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 40px);padding:25px;border:0;border-radius:22px;background:#fff;color:#25231f;box-shadow:0 25px 100px #17100f45;overflow:auto}
.rf-dialog::backdrop{background:#17191480;backdrop-filter:blur(3px)}
.rf-dialog h2,.rf-dialog h3,.rf-dialog p{margin:0}
.rf-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:13px;margin-bottom:19px}
.rf-kicker{display:block;font-size:9px;letter-spacing:1.7px;color:#a55a3d;font-weight:800;line-height:1.6}
.rf-dialog-head h2{font-size:21px;line-height:1.4;letter-spacing:-.6px;margin-top:4px;font-weight:800}
.rf-close{display:grid;place-items:center;flex:none;width:31px;height:31px;padding:0;border:0;border-radius:50%;background:#f4f2ee;color:#66635d;cursor:pointer}
.rf-shared-product{display:flex;align-items:center;gap:13px;padding:0 0 19px}
.rf-shared-product>img{width:66px;height:76px;flex:none;object-fit:cover;border-radius:10px}
.rf-shared-product h3{font-size:13px;line-height:1.6;font-weight:700;max-width:300px}
.rf-shared-product span{display:block;margin-top:6px;font-size:12px;color:#91887b}
.rf-estimate{display:flex;align-items:center;justify-content:space-between;gap:18px;background:#fff3e0;border:1px solid #f0dfc3;border-radius:13px;padding:17px 19px}
.rf-estimate>div>span{font-size:11px;color:#8e7453}
.rf-estimate strong{display:flex;align-items:baseline;gap:7px;margin-top:6px;line-height:1.2;color:#b93829}
.rf-estimate strong small{font-size:11px;letter-spacing:.5px;font-weight:700}
.rf-estimate strong b{font-size:37px;font-variant-numeric:tabular-nums;letter-spacing:-1px}
.rf-tier-chip{border-left:1px solid #e7d5b6;padding-left:18px;text-align:right}
.rf-tier-chip>span{display:block;font-size:10px!important;color:#8b765a!important;white-space:nowrap}
.rf-tier-chip>b{display:block;font-size:24px;line-height:1.3;margin-top:4px;color:#3b3020}
.rf-tier-chip>b small{font-size:12px;margin-left:1px}
.rf-tier-chip.is-pro>b{color:#9e671b}
.rf-dialog .rf-estimate-note{font-size:10px;line-height:1.6;color:#a08c71;margin:8px 2px 15px}
.rf-link-row{display:flex;gap:13px;align-items:center;margin:0 0 15px;padding:12px 13px;border:1px solid #e8e5df;background:#fbfaf7;border-radius:11px}
.rf-link-row>div{flex:1;min-width:0}
.rf-link-row label{display:block;font-size:11px;color:#666056;font-weight:700}
.rf-link-row label>span{display:inline-block;font-size:8px;font-weight:500;background:#eae6df;color:#887e71;padding:2px 5px;border-radius:3px;margin-left:4px}
.rf-link-row input{display:block;width:100%;border:0;background:none;padding:0;outline:0;color:#a1988b;font-size:10px;line-height:1.6;margin-top:6px;text-overflow:ellipsis;min-width:0}
.rf-small-qr{padding:0;border:0;background:white;border-radius:4px;cursor:pointer;flex:none}
.rf-small-qr svg{display:block;width:58px;height:58px}
.rf-wechat-button{display:flex;width:100%;align-items:center;justify-content:center;gap:9px;height:46px;border:0;border-radius:999px;color:#fff;background:#23834f;font-size:14px;font-weight:700;cursor:pointer;transition:background .2s}
.rf-wechat-button:hover{background:#186c3e}
.rf-dialog .rf-copy-status{min-height:17px;margin:8px 0 16px;text-align:center;font-size:10px;color:#999188;line-height:1.6}
.rf-dialog .rf-copy-status.is-success{color:#23834f}
.rf-settlement-note{display:flex;align-items:center;gap:10px;padding:13px 0;border-top:1px solid #ede9e2;border-bottom:1px solid #ede9e2;color:#8a7d69}
.rf-settlement-note>svg{flex:none}
.rf-settlement-note>span{font-size:11px;color:#675d4e;line-height:1.6}
.rf-settlement-note b{color:#2c2922;font-weight:700}
.rf-settlement-note small{display:block;font-size:9px;color:#a09584;margin-top:2px}
.rf-share-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:15px}
.rf-share-footer>a{display:inline-flex;align-items:center;gap:4px;color:#bb3627;font-size:11px;font-weight:700}
.rf-share-footer>button{padding:0;border:0;background:none;color:#a68b62;font-size:10px;cursor:pointer}
.rf-rules{margin-top:15px;font-size:10px;color:#999084;line-height:1.7}
.rf-rules>summary{cursor:pointer}
.rf-rules p{margin-top:7px;color:#83796d}
.rf-dialog .rf-demo-disclaimer{margin:13px 0 0;text-align:center;font-size:9px;line-height:1.7;color:#aaa298}
.rf-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:0 18px;border:1px solid #ddcba8;border-radius:999px;background:white;color:#5c492b;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}
.rf-button-dark{display:flex;width:100%;background:#252522;border-color:#252522;color:white;height:44px}
.rf-button-red{color:white;background:#d43327;border-color:#d43327}
.rf-qr-dialog{text-align:center}
.rf-qr-dialog .rf-dialog-head{text-align:left}
.rf-qr-product{height:136px;width:136px;object-fit:cover;border-radius:13px;margin:0 auto 14px}
.rf-qr-dialog>h3{font-size:13px;line-height:1.7;max-width:320px;margin:0 auto}
.rf-qr-price{display:block;margin:7px 0;color:#bb3627;font-size:20px;font-weight:800}
.rf-large-qr{margin:10px auto 8px;width:190px;height:190px}
.rf-large-qr svg{display:block;width:100%;height:100%}
.rf-qr-dialog>p{font-size:12px;color:#655b4d;margin:0 0 7px}
.rf-qr-dialog>small{display:block;font-size:9px;color:#a2998a;margin:0 0 18px;line-height:1.7}
.rf-benefit-compare{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.rf-benefit-compare>div{border:1px solid #eee9e1;background:#f8f6f2;border-radius:12px;padding:17px}
.rf-benefit-compare>div>span{font-size:11px;color:#8a7f6f}
.rf-benefit-compare strong{display:block;font-size:40px;font-weight:800;line-height:1.3;margin:7px 0;color:#403a2f}
.rf-benefit-compare strong>small{font-size:18px;margin-left:2px}
.rf-benefit-compare p{font-size:10px;color:#9b8b70;line-height:1.8}
.rf-benefit-compare .is-pro{background:#fff2d9;border-color:#e8d3a9}
.rf-benefit-compare .is-pro strong{color:#a87125}
.rf-benefit-list{padding:20px 0}
.rf-benefit-list p{display:flex;align-items:center;gap:9px;font-size:12px;color:#766a5b;line-height:1.8;margin:6px 0}
.rf-benefit-list svg{color:#a88b51;flex:none}
.rf-payment-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:18px}
.rf-payment-options>label{display:flex;align-items:center;gap:7px;padding:12px 10px;border:1px solid #e5ded1;border-radius:10px;font-size:11px;cursor:pointer}
.rf-payment-options input{accent-color:#a57d35}
.rf-payment-options svg{flex:none;color:#8f7853}
.rf-payout-fields>label{display:block;font-size:11px;color:#877b69;margin-bottom:12px}
.rf-payout-fields input{display:block;width:100%;padding:10px 12px;border:1px solid #e8e4dc;background:#f8f6f2;border-radius:8px;margin-top:6px;font-size:12px}
.rf-upload-placeholder{display:flex;gap:14px;align-items:center;justify-content:center;border:1px dashed #d6c9b5;border-radius:12px;min-height:100px;background:#faf8f3;color:#928166}
.rf-upload-placeholder span{font-size:12px}.rf-upload-placeholder small{display:block;font-size:9px;margin-top:5px;color:#aca08d}
.rf-dialog .rf-payout-hint{font-size:10px;color:#998e7c;line-height:1.8;margin:6px 0 17px}

/* Personal center: three clear money states and readable order rows. */
.referral-center-preview{background:#f7f6f2}
.rf-center{max-width:1030px;padding-top:28px;padding-bottom:50px}
.rf-center-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}
.rf-back{display:inline-block;font-size:11px;color:#9a9388;margin-bottom:13px}
.rf-center-header h1{font-size:28px;line-height:1.4;letter-spacing:-.6px;margin:0}
.rf-center-header h1>span{vertical-align:middle;display:inline-block;color:#9b8762;background:#eee8d9;border:1px solid #e4dbc5;border-radius:5px;padding:2px 7px;font-size:9px;font-weight:500;letter-spacing:0;margin-left:12px}
.rf-center-header p{margin:6px 0 0;font-size:12px;color:#9b9385}
.rf-preview-switch{display:flex;align-items:center;gap:3px;background:#eae7df;padding:4px;border-radius:8px;font-size:10px;flex:none}
.rf-preview-switch>span{padding:0 7px;color:#9c927f;font-size:9px}
.rf-preview-switch>a{padding:7px 10px;border-radius:6px;color:#857b68}
.rf-preview-switch>a[aria-current]{background:white;color:#473c29;box-shadow:0 1px 3px #49392110}
.rf-dashboard-top{display:grid;grid-template-columns:1.55fr 1fr;gap:18px}
.rf-balance-card{padding:24px 27px;border-radius:17px;background:#242721;color:white;position:relative;overflow:hidden}
.rf-balance-card:before{content:"";position:absolute;pointer-events:none;right:-90px;top:-100px;width:290px;height:290px;border:38px solid #ffffff03;border-radius:50%}
.rf-balance-top{display:flex;align-items:center;justify-content:space-between;gap:10px;position:relative}
.rf-balance-top>span{display:flex;align-items:center;gap:7px;font-size:11px;color:#c6c9bd}
.rf-balance-top>b{display:inline-block;font-size:9px;font-weight:600;background:#ffffff12;color:#d9dfca;border:1px solid #ffffff13;border-radius:999px;padding:5px 9px;white-space:nowrap}
.rf-balance-amount{font-size:51px;line-height:1.3;letter-spacing:-1px;font-weight:800;font-variant-numeric:tabular-nums;margin:14px 0 13px}
.rf-balance-amount>small{font-size:25px;vertical-align:baseline;margin-right:5px}
.rf-next-payout{border-left:2px solid #b2bf9a;padding-left:12px;margin-bottom:20px}
.rf-next-payout>span{display:flex;align-items:center;gap:5px;font-size:9px;color:#bcc3ab}
.rf-next-payout strong{display:block;font-size:15px;letter-spacing:.3px;font-weight:600;margin-top:4px}
.rf-next-payout small{display:block;font-size:9px;color:#9da58c;margin-top:5px}
.rf-balance-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:14px;border-top:1px solid #ffffff13;position:relative}
.rf-balance-foot>span{display:flex;align-items:center;gap:5px;color:#b1b7a5;font-size:9px}
.rf-balance-foot button{display:flex;align-items:center;gap:3px;border:0;background:none;color:#d9dfcb;font-size:10px;padding:0;cursor:pointer}
.rf-agent-card{padding:25px;border:1px solid #e9dfcb;border-radius:17px;background:#f6eddb;display:flex;flex-direction:column;align-items:flex-start}
.rf-agent-tag{display:flex;align-items:center;gap:6px;font-size:10px;color:#a17d37;font-weight:700}
.rf-agent-card h2{margin:14px 0 9px;font-size:23px;line-height:1.45;color:#52432a;letter-spacing:-.6px}
.rf-agent-card p{font-size:11px;line-height:1.9;color:#a19277;margin:0 0 18px}
.rf-agent-card .rf-button{margin-top:auto;font-size:11px;min-height:36px}
.rf-agent-card>small{margin-top:9px;font-size:8px;color:#b2a487;line-height:1.7}
.rf-center-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:white;border:1px solid #e8e4dc;border-radius:13px;margin:18px 0 23px;overflow:hidden}
.rf-center-metrics>div{padding:18px 25px}
.rf-center-metrics>div+div{border-left:1px solid #f0ece5}
.rf-center-metrics span{display:block;font-size:10px;color:#a29683}
.rf-center-metrics strong{display:block;margin-top:7px;font-size:25px;line-height:1.4;color:#514632;font-weight:800;font-variant-numeric:tabular-nums}
.rf-center-metrics small{font-size:10px;margin-left:5px;font-weight:500;color:#a69880}
.rf-featured-product{display:flex;align-items:center;gap:16px;padding:18px;background:#fff;border:1px solid #e8e4dc;border-radius:13px;margin-bottom:23px}
.rf-featured-image{flex:none;width:73px;height:88px;border-radius:9px;overflow:hidden;background:#f3f0e9}
.rf-featured-image img{width:100%;height:100%;object-fit:cover}
.rf-featured-product>div:nth-child(2){flex:1;min-width:0}
.rf-featured-product h2{font-size:14px;line-height:1.6;margin:6px 0 8px;max-width:500px;color:#3f372c}
.rf-featured-product p{font-size:14px;font-weight:700;color:#b73d2b;margin:0}
.rf-featured-product p>span{font-size:10px;font-weight:500;color:#a29177;margin-left:15px;display:inline-block}
.rf-sales-card{background:white;border:1px solid #e8e4dc;border-radius:13px;padding:20px 23px}
.rf-sales-header{display:flex;align-items:center;justify-content:space-between;gap:15px}
.rf-sales-header h2{font-size:17px;margin:0;color:#40372b}
.rf-sales-header>span{font-size:10px;color:#aea18c}
.rf-sales-tabs{display:flex;gap:6px;margin:17px 0 7px}
.rf-sales-tabs>button{border:0;border-radius:999px;padding:6px 13px;background:none;color:#a69780;font-size:10px;cursor:pointer}
.rf-sales-tabs>button[aria-pressed="true"]{background:#f2eee4;color:#6d5c40;font-weight:700}
.rf-sale-row{display:flex;align-items:center;gap:14px;border-top:1px solid #f0ece4;padding:17px 0}
.rf-sale-row>img{width:49px;height:59px;object-fit:cover;border-radius:7px;flex:none}
.rf-sale-product{flex:1;min-width:0}
.rf-sale-product>small{display:block;font-size:9px;color:#b3a68f}
.rf-sale-product h3{font-size:12px;line-height:1.6;margin:5px 0;color:#544937;font-weight:600}
.rf-sale-product>span{display:block;font-size:9px;color:#a8977a;line-height:1.8}
.rf-sale-product i{font-style:normal;margin:0 5px;color:#c6bba7}
.rf-sale-amount{text-align:right;flex:none;min-width:95px}
.rf-sale-amount strong{display:block;font-size:16px;font-weight:700;color:#665437;font-variant-numeric:tabular-nums}
.rf-status{display:inline-block;border-radius:4px;padding:3px 6px;font-size:9px;margin-top:6px}
.rf-status-pending{color:#a77623;background:#fff2d5}
.rf-status-paid{color:#3b7c56;background:#edf4eb}
.rf-status-unpaid{color:#a19581;background:#f2efe9}
.rf-ledger-note{font-size:9px;color:#b5a78e;margin:8px 0 0;line-height:1.8}
.rf-center-disclaimer{display:flex;align-items:center;justify-content:center;gap:6px;font-size:10px;line-height:1.7;color:#ac9e85;margin-top:19px}
.rf-center-disclaimer>svg{flex:none}
.rf-dialog [hidden],.rf-center [hidden]{display:none!important}
@media(max-width:700px){
  .rf-share-trigger{top:0;right:0;height:34px;padding:0 12px;font-size:11px}
  .rf-dialog{margin:auto 0 0;max-width:100%;width:100%;padding:23px 20px calc(20px + env(safe-area-inset-bottom));max-height:calc(100dvh - 22px);border-radius:23px 23px 0 0}
  .rf-dialog-head h2{font-size:20px}.rf-dialog-head{margin-bottom:16px}.rf-shared-product{padding-bottom:16px}
  .rf-estimate{padding:15px 17px}.rf-estimate strong b{font-size:34px}.rf-tier-chip>b{font-size:23px}
  .rf-share-footer>a{font-size:11px}.rf-benefit-compare>div{padding:14px}.rf-benefit-compare p{font-size:9px}
  .rf-payment-options{gap:8px}.rf-payment-options>label{font-size:10px;gap:5px;padding:12px 8px}
  .rf-center{padding-top:18px;padding-bottom:35px}.rf-center-header{display:block;margin-bottom:18px}.rf-center-header h1{font-size:25px}.rf-back{margin-bottom:11px}.rf-center-header p{font-size:11px}
  .rf-preview-switch{margin-top:16px;width:max-content;max-width:100%}.rf-dashboard-top{grid-template-columns:1fr;gap:13px}
  .rf-balance-card{padding:21px 22px}.rf-balance-amount{font-size:47px;margin:13px 0}.rf-next-payout{margin-bottom:17px}
  .rf-agent-card{padding:19px;display:grid;grid-template-columns:1fr auto;column-gap:12px;align-items:center}.rf-agent-tag{grid-column:1/-1}.rf-agent-card h2{font-size:19px;grid-column:1/-1;margin:9px 0 5px}.rf-agent-card p{margin:0;font-size:10px}.rf-agent-card .rf-button{margin:0;font-size:10px;padding:0 12px}.rf-agent-card>small{grid-column:1/-1}
  .rf-center-metrics{margin:14px 0 18px}.rf-center-metrics>div{padding:14px 13px}.rf-center-metrics span{font-size:9px}.rf-center-metrics strong{font-size:21px}.rf-center-metrics small{font-size:9px;margin-left:3px}
  .rf-featured-product{gap:12px;padding:15px;flex-wrap:wrap;margin-bottom:18px}.rf-featured-image{width:60px;height:76px}.rf-featured-product h2{font-size:12px;margin:4px 0 5px}.rf-featured-product .rf-kicker{font-size:8px;letter-spacing:1px}.rf-featured-product p{font-size:12px}.rf-featured-product p>span{display:block;margin:4px 0 0;font-size:9px}.rf-featured-product>button{width:100%;height:38px;min-height:38px;font-size:11px}
  .rf-sales-card{padding:18px 16px}.rf-sales-header h2{font-size:16px}.rf-sales-header>span{display:none}.rf-sale-row{gap:10px;flex-wrap:wrap}.rf-sale-row>img{width:43px;height:54px}.rf-sale-product h3{font-size:11px}.rf-sale-amount{flex-basis:100%;display:flex;align-items:center;justify-content:space-between;padding-left:53px}.rf-sale-amount strong{font-size:16px}.rf-sale-amount .rf-status{margin:0}.rf-sale-product>span{font-size:8px}.rf-center-disclaimer{font-size:9px;align-items:flex-start}
}
@media(prefers-reduced-motion:reduce){.rf-wechat-button{transition:none}}
