/* Referral workspace: preserve reward rules and soften presentation. */
html body.app-mode.app-mode.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) .panel-header{background:#cbe5eb!important;border:1px solid #b6a9c3!important;box-shadow:2px 2px 0 #cfc4d8!important;border-radius:14px!important;}
html body.app-mode.app-mode.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) .panel-header>div{background:#cbe5eb!important;padding:24px!important;}
html body.app-mode.app-mode.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) .panel-header h2{font-size:32px!important;line-height:1.15!important;color:#302b39!important;}
html body.app-mode.app-mode.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) .polxy-header-boundary{background:#e1d6ec!important;color:#302b39!important;}
html body.app-mode.app-mode.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) .polxy-header-boundary *{color:#302b39!important;}
html body.app-mode.app-mode.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3):has(#user-referral-console:not([hidden])) .affiliate-hero-strip{display:none!important;}
html body.app-mode.app-mode.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3):has(#user-referral-console:not([hidden])) #affiliate-proof-strip{display:none!important;}
html body.app-mode.app-mode.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) :is(.user-referral-share-card,.user-referral-invite-form,.affiliate-review-card,.user-referral-rules-disclosure,.affiliate-program-console){background:#f1eaf7!important;border:1px solid #c0b4cb!important;box-shadow:1px 2px 0 #d5cadf!important;border-radius:12px!important;}
html body.app-mode.app-mode.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) :is(.user-referral-share-card,.user-referral-invite-form,.affiliate-review-card,.user-referral-rules-disclosure) :is(span,strong,p,small,h3,label){color:#352e40!important;}
html body.app-mode.app-mode.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) :is(button,input,select,textarea){border-width:1px!important;box-shadow:1px 1px 0 #c9bdd3!important;}
html body.app-mode.app-mode.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) button{background:#d4e8ed!important;color:#302b39!important;}
html body.app-mode.app-mode.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) :is(p,small){font-weight:400!important;}
html body.app-mode.app-mode.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) .user-referral-rules-header{background:#dfd3eb!important;color:#302b39!important;}
#referral-action-dialog{border:1px solid #b8aac5;box-shadow:2px 3px 0 #cbbfd5;border-radius:14px;}
#referral-action-dialog header{background:#dfd4ec!important;color:#302b39!important;}
#referral-action-dialog article{box-shadow:none!important;border-width:1px!important;}

html body.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) :is(.module-work-item.empty,.user-affiliate-v2-card a){background:#ded3ea!important;color:#352e40!important;}
html body.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) .module-work-item.empty span{color:#352e40!important;}

html body.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) .user-affiliate-v2-card{background:#d9e9ed!important;border:1px solid #b6a9c3!important;box-shadow:2px 2px 0 #c9c0d1!important;border-radius:14px!important;}
html body.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) :is(.user-affiliate-v2-levels>span,.user-referral-benefit-row,.user-referral-benefit-row>article,.user-referral-form-contract,.affiliate-output){border:1px solid #c4b8ce!important;box-shadow:none!important;background:#f3edf7!important;}
html body.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) :is(.affiliate-module,.affiliate-module article:has(>#affiliate-program-list),.affiliate-module article:has(>#affiliate-program-panel)){box-shadow:1px 2px 0 #cfc5d7!important;border:1px solid #bfb2cb!important;}
html body.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) .section-title{background:#ddd2e9!important;border:0!important;box-shadow:none!important;}
html body.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) .section-title :is(h3,span){color:#352e40!important;}
html body.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) .user-referral-share-card a{background:#ded3ec!important;color:#352e40!important;box-shadow:1px 1px 0 #c2b4cf!important;border:1px solid #b9abc5!important;}
html body.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) .module-work-item b{color:#63536f!important;}
html body.app-mode [data-view-section="affiliate"]:not(#referral-soft-1):not(#referral-soft-2):not(#referral-soft-3) .user-affiliate-v2-card::before{display:none!important;}
/* Referral refinement: keep rewards, qualification and both program options visible. */
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d){padding:22px 22px 180px!important;--ref-ink:#352e40;--ref-paper:#faf6ee;--ref-lime:#e9eedf;--ref-cyan:#dcebef;--ref-violet:#e7dff0;--ref-orange:#f3e5d6;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) :is(div,section,aside,article,header,form,label,details,button,input,select,textarea,span,b,p,a){box-shadow:none!important;border-width:1px!important;border-color:var(--sr-line)!important;min-width:0;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) :is(span,li,td,a){font-weight:400!important;line-height:1.55!important;color:var(--sr-ink)!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) :is(.eyebrow,.polxy-boundary-label){font-weight:500!important;text-transform:none!important;letter-spacing:.02em!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) > .panel-header{display:grid!important;grid-template-columns:minmax(0,1.4fr) minmax(260px,.8fr)!important;padding:0!important;border-radius:12px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) > .panel-header > div{padding:26px!important;background:var(--sr-cyan)!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) > .panel-header h2{font-size:30px!important;line-height:1.25!important;letter-spacing:-.02em!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .polxy-header-boundary{padding:26px!important;gap:14px!important;background:var(--sr-violet)!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #affiliate-module-status{font-size:23px!important;line-height:1.4!important;letter-spacing:normal!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) :is(button,a):not(.ploxy-help-trigger){min-height:44px!important;padding:11px 16px!important;border-radius:8px!important;white-space:normal!important;word-break:normal!important;font-weight:500!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){width:100%!important;max-width:100%!important;padding:12px!important;min-height:46px!important;border-radius:8px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #affiliate-kpi-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #affiliate-kpi-grid > article{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:10px!important;padding:20px!important;background:var(--sr-green)!important;border-radius:12px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #affiliate-kpi-grid > article:nth-child(2){background:var(--sr-cyan)!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #affiliate-kpi-grid > article:nth-child(3){background:var(--sr-violet)!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #affiliate-kpi-grid > article:nth-child(4){background:var(--sr-peach)!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #affiliate-kpi-grid strong{font-size:25px!important;line-height:1.35!important;overflow-wrap:anywhere!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #affiliate-kpi-grid > article:is(:first-child,:last-child) strong{font-size:18px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #affiliate-output{padding:18px!important;background:var(--sr-surface)!important;border-radius:10px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #user-referral-console{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:22px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #user-referral-console[hidden]{display:none!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) :is(.user-referral-share-card,.user-referral-invite-form){padding:24px!important;gap:18px!important;border-radius:12px!important;align-content:start!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-share-card{background:var(--sr-green)!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-share-card > strong{display:block!important;padding:18px!important;background:var(--sr-surface)!important;border:1px solid var(--sr-line)!important;border-radius:10px!important;font-size:19px!important;line-height:1.5!important;overflow-wrap:anywhere!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-invite-form{background:var(--sr-peach)!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-invite-form label{display:grid!important;gap:9px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-form-heading{display:grid!important;gap:10px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-form-heading > strong{font-size:23px!important;line-height:1.35!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-form-contract{display:grid!important;gap:8px!important;padding:16px!important;background:var(--sr-surface)!important;border-radius:8px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .admin-affiliate-action-row{display:flex!important;gap:12px!important;flex-wrap:wrap!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-share-card a{background:var(--sr-violet)!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-benefit-row{grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:20px!important;padding:0!important;background:transparent!important;border:0!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-benefit-row > article{display:grid!important;gap:12px!important;padding:24px!important;background:var(--sr-cyan)!important;border-radius:12px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-benefit-row > article:nth-child(2){background:var(--sr-violet)!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-benefit-row strong{font-size:23px!important;line-height:1.35!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-affiliate-v2-card{grid-column:1/-1!important;display:grid!important;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)!important;gap:22px!important;padding:26px!important;background:var(--sr-cyan)!important;border-radius:12px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-affiliate-v2-card h3{font-size:25px!important;line-height:1.35!important;letter-spacing:-.02em!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-affiliate-v2-card > small{grid-column:1/-1!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-affiliate-v2-levels{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-affiliate-v2-levels > span{display:flex!important;flex-direction:column!important;justify-content:center!important;gap:12px!important;padding:18px!important;background:var(--sr-surface)!important;border-radius:10px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-affiliate-v2-levels b{font-size:27px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-affiliate-v2-card > a{width:fit-content!important;background:var(--sr-violet)!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .affiliate-work-grid{display:grid!important;grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr)!important;gap:22px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .affiliate-work-grid > article{padding:22px!important;background:var(--sr-surface)!important;border-radius:12px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .section-title{padding:18px!important;gap:10px!important;background:var(--sr-violet)!important;border-radius:10px!important;margin-bottom:18px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) :is(.section-title h3,.user-referral-summary h3,.user-referral-share-card h3){font-size:23px!important;line-height:1.35!important;letter-spacing:-.02em!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) :is(.user-referral-event,.module-work-item.empty){padding:18px!important;gap:14px!important;background:var(--sr-paper)!important;border-radius:10px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .module-work-item.empty{display:grid!important;grid-template-columns:1fr!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) :is(.affiliate-review-card,.user-referral-rules-disclosure){padding:20px!important;background:var(--sr-paper)!important;border-radius:10px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .referral-qualification-path{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;margin:20px 0!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .referral-qualification-path::before{content:none!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .referral-qualification-path > article{padding:18px!important;display:grid!important;gap:10px!important;min-height:0!important;background:var(--sr-green)!important;border-radius:10px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .referral-qualification-path > article:nth-child(even){background:var(--sr-cyan)!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .referral-qualification-path > article > span{width:28px!important;height:28px!important;min-height:28px!important;min-width:28px!important;border:0!important;background:var(--sr-violet)!important;border-radius:50%!important;font-size:13px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-rules-header{padding:18px!important;background:var(--sr-violet)!important;border-radius:10px!important;gap:16px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-rules-header h3{font-size:21px!important;line-height:1.4!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-rules-header > strong{display:none!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-rules{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:auto!important;align-items:start!important;gap:14px!important;margin:0!important;width:auto!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-rules > article{display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:12px!important;grid-template-columns:none!important;grid-template-rows:none!important;height:auto!important;min-height:0!important;max-height:none!important;padding:18px!important;background:var(--sr-surface)!important;border-radius:10px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-rules strong{font-size:20px!important;line-height:1.4!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-rules-disclosure .module-rule-item{padding:18px!important;background:var(--sr-surface)!important;border-radius:10px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #referral-action-dialog{width:min(740px,calc(100vw - 32px))!important;max-height:calc(100dvh - 32px)!important;padding:24px!important;border:1px solid var(--sr-line)!important;border-radius:14px!important;background:var(--sr-paper)!important;box-shadow:0 18px 60px #352e4026!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #referral-action-dialog .outreach-action-dialog-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:20px!important;padding:20px!important;background:var(--sr-violet)!important;border-radius:10px!important;align-items:start!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #referral-action-dialog .outreach-action-dialog-header::after{content:none!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #referral-action-dialog [aria-label="Close referral action preview"]{width:auto!important;min-width:70px!important;white-space:nowrap!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #referral-action-dialog [aria-label="Close referral action preview"]::after{content:none!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #referral-action-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;margin:20px 0!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #referral-action-metrics > article{padding:16px!important;background:var(--sr-cyan)!important;border-radius:8px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #referral-action-results > article{padding:16px!important;gap:12px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #referral-action-results strong{font-weight:400!important;line-height:1.6!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #referral-action-results > article > span{background:var(--sr-green)!important;border:0!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #referral-action-boundary{padding:18px!important;background:var(--sr-green)!important;color:var(--sr-ink)!important;border-radius:8px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .outreach-action-dialog-buttons{display:flex!important;gap:12px!important;flex-wrap:wrap!important;}
@media(max-width:1050px){html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) :is(.affiliate-work-grid,.user-affiliate-v2-card){grid-template-columns:1fr!important;}html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #affiliate-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
@media(max-width:700px){html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d){padding:14px 14px 150px!important;}html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) :is(.panel-header,#user-referral-console,.user-referral-benefit-row,.referral-qualification-path,.user-referral-rules){grid-template-columns:1fr!important;}html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) :is(.user-referral-share-card,.user-referral-invite-form,.user-affiliate-v2-card,.affiliate-work-grid > article,.affiliate-review-card,.user-referral-rules-disclosure){padding:18px!important;}html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #referral-action-dialog{padding:18px!important;}html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-affiliate-v2-levels > span{padding:12px!important;}html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-share-card > strong{font-size:17px!important;}html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #affiliate-kpi-grid strong{font-size:22px!important;}html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #affiliate-kpi-grid > article:is(:first-child,:last-child) strong{font-size:16px!important;}}

/* Keep the optional reminder readable and avoid stretching an empty history panel. */
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-invite-form{grid-template-columns:1fr!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-invite-form > *{grid-column:1!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-form-contract{grid-template-columns:1fr!important;text-align:left!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-form-contract > *{grid-column:1!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .affiliate-work-grid{align-items:start!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-affiliate-v2-levels > span{font-size:14px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-share-card > strong{font-weight:500!important;}

/* Reward cards must never inherit the legacy fixed three-column table rows. */
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-rules > article > :is(span,strong,p){position:static!important;width:auto!important;min-width:0!important;max-width:100%!important;margin:0!important;grid-area:auto!important;white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-rules > article > :is(span,p){font-size:13px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-rules-disclosure{gap:18px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-rules-disclosure > :not(summary){margin:0!important;}

/* History and reward guidance have unequal lengths; give each its own full-width row. */
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d):has(#user-referral-console:not([hidden])) .affiliate-work-grid{grid-template-columns:minmax(0,1fr)!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d):has(#user-referral-console:not([hidden])) .referral-qualification-path{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d):has(#user-referral-console:not([hidden])) .user-referral-rules-disclosure .module-rule-item{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important;}
@media(max-width:1000px){html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d):has(#user-referral-console:not([hidden])) .referral-qualification-path{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
@media(max-width:700px){html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d):has(#user-referral-console:not([hidden])) .referral-qualification-path{grid-template-columns:minmax(0,1fr)!important;}}
/* Searchable workspace history and readable phone fields. */
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .referral-history-controls{display:grid!important;grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto!important;gap:12px!important;align-items:end!important;margin:0 0 20px!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .referral-history-controls[hidden]{display:none!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .referral-history-controls :is(p,.referral-history-pages){grid-column:1/-1!important;margin:0!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .referral-history-pages{display:flex!important;gap:12px!important;flex-wrap:wrap!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .referral-history-controls label{display:grid!important;gap:8px!important;min-width:0!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .user-referral-event :is(strong,p,small){overflow-wrap:anywhere!important;}
html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) #affiliate-output[data-referral-error="true"]{color:#742e3d!important;background:#f9e8e8!important;}
@media(max-width:700px){
  html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) .referral-history-controls{grid-template-columns:minmax(0,1fr)!important;}
  html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d) :is(input,select,textarea){font-size:16px!important;}
  html body.app-mode #referral-control-room:not(#ref-a):not(#ref-b):not(#ref-c):not(#ref-d):has(#user-referral-console:not([hidden])) .referral-qualification-path{grid-template-columns:minmax(0,1fr)!important;}
}
