/* Referral overview: original Figma 4433:58535, with live MVP figures. */
.friends-page,
.friends-detail,
.friends-entry-detail{--dx-font:Nunito,Arial,sans-serif;--friends-ink:#1e1e1e;--friends-muted:#929292;--friends-card:#f7f7f7;--friends-line:#e7e7e7;--friends-green:#51b13d;color:var(--friends-ink)}
.friends-heading{position:relative;flex:none;max-width:620px;width:100%;margin:0 auto 20px;padding-inline:16px;text-align:center}
body[data-mode][data-screen=friends]>.app-header{background:#fff}
.friends-heading .friends-title{margin:0;font-size:28px;font-weight:800;line-height:1.05;letter-spacing:-.56px;text-wrap:balance}
.friends-view-tabs{display:flex;flex:none;gap:4px;height:50px;margin:0 0 20px;padding:4px;border-radius:16px;background:rgba(0,0,0,.05)}
.friends-view-tabs>button{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;padding:10px 12px;border-radius:12px;background:transparent;color:#848484;font-size:16px;font-weight:700;line-height:1.25}
.friends-view-tabs>button[aria-selected=true]{background:#fff;color:var(--friends-ink)}
.friends-view-tabs>button:focus-visible,
.friends-summary-stat:focus-visible,
.friends-invite-dock button:focus-visible,
.friends-accrual-row:focus-visible{outline:2px solid #1aaeeb;outline-offset:3px}
.friends-tab-panels{min-height:0;min-width:0}
.friends-tab-panels>[hidden]{display:none!important}
.friends-overview-panel{display:flex;flex-direction:column;gap:10px;min-width:0;min-height:0}
.friends-summary{display:grid;flex:none;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.friends-summary-stat{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:0;padding:10px 8px;border-radius:12px;background:#f6f6f6;color:var(--friends-ink);text-align:center}
.friends-summary-stat>span{font-size:10px;font-weight:700;line-height:12px;color:#999}
.friends-summary-stat>strong{font-size:13px;font-weight:700;line-height:18px;overflow-wrap:anywhere}
.friends-summary-stat strong small{font-size:inherit;font-weight:inherit}
.friends-summary-stat[data-friends-network]:hover{background:#ededed}
.friends-summary-income>strong{color:var(--friends-green)}
.friends-rules-grid{display:grid;gap:10px;min-width:0;min-height:0}
.friends-rule-card{display:flex;flex-direction:column;align-items:stretch;gap:12px;min-width:0;padding:16px;border-radius:24px;background:var(--friends-card)}
.friends-rule-card>header{min-width:0}
.friends-rule-card h2{margin:0;font-size:20px;font-weight:800;line-height:1.25;letter-spacing:0}
.friends-rule-card header p{margin:4px 0 0;color:#909090;font-size:14px;font-weight:600;line-height:1.4;letter-spacing:-.28px}
.friends-current-rate{display:flex;align-items:baseline;gap:4px;margin:0;color:#929292;font-size:11px;line-height:1.3;font-weight:600}
.friends-current-rate>span{margin-left:auto;text-align:right}
.friends-current-rate strong{color:#5c6267;font-weight:800}
.friends-rate-block{height:192px;flex:none;min-width:0}
.friends-rate-ladder{--friends-step-row-height:22px;position:relative;display:flex;flex-direction:column;justify-content:space-between;gap:12px;height:100%;margin:0;padding:0;list-style:none;min-width:0}
.friends-rate-ladder::before{content:"";position:absolute;top:calc(var(--friends-step-row-height)/2);bottom:calc(var(--friends-step-row-height)/2);left:10px;width:2px;background:#d1d2d4}
.friends-rate-ladder>li{position:relative;display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:var(--friends-step-row-height);padding:0 0 0 32px;font-size:16px;line-height:22px;font-weight:700}
.friends-rate-ladder>li::before{content:"";position:absolute;left:3px;top:50%;width:16px;height:16px;box-sizing:border-box;border:2px solid #d1d2d4;border-radius:50%;background:var(--friends-card);transform:translateY(-50%)}
/* Crop the original blue-and-white check badge for every reached tier. */
.friends-rate-ladder>li:is(.is-current,.is-complete)::before{border:0;background:var(--friends-card) url('assets/baa2da8a-02f2-46a0-af56-b968fac07064.svg') top left no-repeat}
.friends-rate-ladder>li.is-current{color:#1e1e1e;font-weight:800}
.friends-rate-ladder>li.is-current>strong{color:#159edb}
.friends-rate-ladder>li>span{min-width:0}
.friends-rate-ladder>li>strong{flex:none;font:inherit}
.friends-rate-progress{margin:0;color:#929292;font-size:10px;font-weight:600;line-height:1.4}
.friends-level-income{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-top:auto;padding-top:12px;background:url('assets/9e55f041-a5f0-4c32-8d87-a4eaa513a031.svg') top left/100% 1px no-repeat;font-size:16px;font-weight:700;line-height:1.3}
.friends-level-income>strong{color:var(--friends-green);font-weight:700;text-align:right;overflow-wrap:anywhere}
.friends-level-income small{font-size:inherit;font-weight:inherit}
.friends-level-two-rules{display:flex;flex-direction:column;gap:12px}
.friends-level-two-rules>p{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0;font-size:16px;font-weight:700;line-height:1.35}
.friends-level-two-rules strong{flex:none;font:inherit}
.friends-invite-dock{flex:none;margin-top:20px}
.friends-invite-buttons{display:flex;align-items:center;gap:12px}
.friends-invite-dock button{display:flex;align-items:center;justify-content:center;min-width:0;height:56px;padding:14px;border-radius:12px;background:linear-gradient(#000,#323232);color:white;font-size:20px;font-weight:700;letter-spacing:-.4px;line-height:1.2}
.friends-invite-button{flex:1}
.friends-copy-button{width:56px;flex:0 0 56px}
.friends-copy-button>img{display:block;width:24px;height:24px;flex:none}
.friends-invite-dock button:hover{filter:brightness(1.25)}
.friends-invite-dock button:active{transform:translateY(1px)}

/* Accruals are individual, confirmed referral payouts. */
.friends-accruals-panel{display:flex;flex-direction:column;min-width:0;min-height:0}
.friends-accruals-heading{display:flex;align-items:center;justify-content:space-between;flex:none;gap:12px;padding:16px;border-radius:18px;background:#f7f7f7}
.friends-accruals-heading>div{min-width:0}
.friends-accruals-heading>div>span{display:block;color:#929292;font-size:11px;font-weight:700;line-height:1.35}
.friends-accruals-heading>div>strong{display:block;margin-top:3px;color:var(--friends-green);font-size:24px;font-weight:800;line-height:1.15;overflow-wrap:anywhere}
.friends-accruals-heading strong small{font-size:13px;font-weight:700}
.friends-accruals-heading>small{max-width:120px;color:#929292;font-size:10px;font-weight:600;line-height:1.4;text-align:right}
.friends-accruals-list{--friends-accrual-row-height:76px;display:flex;flex-direction:column;min-width:0;min-height:0;margin-top:10px}
.friends-accrual-row{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:12px;flex:none;width:100%;min-height:var(--friends-accrual-row-height);padding:10px 0;border:0;border-bottom:1px solid #f0f0f0;background:transparent;text-align:left}
.friends-accrual-row:last-child{border-bottom:0}
.friends-accrual-row:hover{background:#fafafa}
.friends-accrual-avatar{display:grid;place-items:center;width:48px;height:48px;flex:none;border:1px solid #e6e6e6;border-radius:50%;color:#1e1e1e;font-size:13px;font-weight:700}
.friends-accrual-main{display:block;min-width:0}
.friends-accrual-main>strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:700;line-height:1.25}
.friends-accrual-main>small{display:block;margin-top:3px;color:#a1a1a1;font-size:11px;font-weight:600;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.friends-accrual-amount{min-width:0;max-width:150px;color:var(--friends-green);font-size:14px;font-weight:700;line-height:1.3;text-align:right;overflow-wrap:anywhere}
.friends-accrual-amount>small{font-size:10px;font-weight:700;white-space:nowrap}
.friends-detail-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:none;min-height:36px;padding-top:8px;color:#96969b;font-size:10px;font-weight:600}
.friends-pagination{display:flex;align-items:center;gap:10px;white-space:nowrap}
.friends-pagination button{display:grid;place-items:center;min-width:30px;min-height:30px;border-radius:9px;background:#f0f0f2;color:#46525e;font-size:14px;font-weight:800}
.friends-pagination button:disabled{opacity:.35;cursor:default}
.friends-empty{display:grid;place-content:center;flex:1;min-height:100px;padding:20px 12px;color:#929292;font-size:12px;font-weight:600;line-height:1.5;text-align:center}

/* The complete network remains available in the existing modal. */
.friends-roster{display:flex;flex-direction:column;min-height:0;min-width:0}
.friends-level-tabs{display:flex;gap:4px;margin-top:14px;padding:4px;border-radius:12px;background:#f0f0f2}
.friends-level-tabs button{flex:1;min-width:0;padding:8px 4px;border-radius:9px;color:#8b8b90;font-size:12px;font-weight:800;line-height:1.2}
.friends-level-tabs button[aria-pressed=true]{background:white;color:#1e1e1e}
.friends-level-tabs button>span{margin-left:4px;color:#929292;font-size:10px}
.friends-income-note{flex:none;margin:8px 0 0;color:#929292;font-size:10px;line-height:1.35}
.friends-roster-labels,
.friends-row{display:grid;grid-template-columns:minmax(0,1fr) 78px 94px;gap:9px}
.friends-roster-labels{flex:none;padding:11px 0 6px;color:#929292;font-size:9px}
.friends-roster-labels>span:not(:first-child){text-align:right}
.friends-list{--friends-row-height:70px;min-width:0}
.friends-row{align-items:center;min-height:var(--friends-row-height);padding:9px 0;border-bottom:1px solid #ededed}
.friends-row:last-child{border-bottom:0}
.friends-person{display:flex;align-items:center;gap:9px;min-width:0}
.friends-avatar{display:grid;place-items:center;flex:none;width:32px;height:32px;border:1px solid #e6e6e6;border-radius:50%;color:#46525e;background:white;font-size:13px;font-weight:800}
.friends-person>div{min-width:0}
.friends-person strong,
.friends-person small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.friends-person strong{font-size:12px;font-weight:800}
.friends-person small{margin-top:2px;color:#96969b;font-size:9px;line-height:1.35}
.friends-contribution,
.friends-player-state{min-width:0;text-align:right}
.friends-contribution>strong{display:block;font-size:12px;font-weight:700;overflow-wrap:anywhere}
.friends-contribution strong>span{font-size:9px;color:#929292}
.friends-contribution>small,
.friends-player-state>small{display:block;margin-top:4px;color:#96969b;font-size:9px;line-height:1.3}
.friends-income>strong{display:block;color:#51b13d;font-size:12px;font-weight:700;line-height:1.3;overflow-wrap:anywhere}
.friends-income>strong>span{display:block;color:#929292;font-size:8px}
.friends-income>small{font-size:8px;overflow-wrap:anywhere}
.friends-list-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:none;min-height:37px;padding-top:10px;color:#96969b;font-size:10px}
.friends-more,
.friends-detail .text-link{color:#46525e;font-size:11px}
.friends-detail-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 12px}
.friends-detail-summary>strong{color:#51b13d;font-size:22px;font-weight:800;overflow-wrap:anywhere}
.friends-detail-summary>small{max-width:150px;color:#929292;font-size:10px;line-height:1.35;text-align:right}
.friends-detail-tabs{display:flex;gap:4px;margin-bottom:12px;padding:4px;border-radius:11px;background:#f0f0f2}
.friends-detail-tabs>button{flex:1;min-width:0;padding:8px 3px;border-radius:8px;color:#929292;font-size:11px;font-weight:800}
.friends-detail-tabs>button[aria-pressed=true]{background:white;color:#1e1e1e}
.friends-detail [data-friends-section]>p,
.friends-detail>p{margin:10px 0 0;color:#929292;font-size:12px;line-height:1.45}
.friends-detail [data-friends-section]>p:first-child{margin-top:0}
.friends-detail p strong{color:#46525e}
.friends-history-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,1fr);align-items:center;gap:10px;min-height:56px;padding:8px 0;border-bottom:1px solid #ededed}
.friends-history-row:last-child{border-bottom:0}
.friends-history-row>div{min-width:0}
.friends-history-row>div:last-child{text-align:right}
.friends-history-row strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:800}
.friends-history-row>div:last-child>strong{color:#51b13d}
.friends-history-row small{display:block;margin-top:4px;color:#96969b;font-size:9px;line-height:1.4}
.friends-rate-table{width:100%;margin-top:10px;border-collapse:collapse;font-size:12px}
.friends-rate-table th,
.friends-rate-table td{padding:7px 9px;border-bottom:1px solid #ededed;text-align:left}
.friends-rate-table th{color:#929292;font-size:10px;font-weight:700}
.friends-rate-table th:last-child,
.friends-rate-table td:last-child{text-align:right}
.friends-rate-table tr.is-current{background:#eef6fa;color:#46525e;font-weight:900}
.friends-detail-rates{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.friends-detail-rates>span{padding:11px;border-radius:10px;background:#f7f7f7;color:#929292;font-size:10px;line-height:1.4}
.friends-detail-rates strong{display:block;margin-top:4px;color:#46525e;font-size:21px}
.friends-entry-detail>p{margin:10px 0 0;color:#929292;font-size:13px;font-weight:600;line-height:1.45}
.friends-entry-detail>p:first-child{margin-top:0;color:#46525e}
.friends-entry-amount{display:block;margin-top:14px;color:#51b13d;font-size:32px;font-weight:800;line-height:1.15;overflow-wrap:anywhere}

body[data-mode=mobile][data-screen=friends] .friends-page{padding:18px 16px calc(var(--mobile-game-nav-height,calc(55px + env(safe-area-inset-bottom))) + 105px)}
body[data-mode=mobile] .friends-invite-dock{position:fixed;z-index:99;left:50%;right:auto;bottom:var(--mobile-game-nav-height,calc(55px + env(safe-area-inset-bottom)));width:min(100%,var(--mobile-frame-width,430px));margin:0;padding:10px 16px 8px;background:#fff;transform:translateX(-50%);box-shadow:0 -8px 16px #ffffffeb}
body[data-mode=mobile][data-screen=friends] .toast{bottom:calc(var(--mobile-game-nav-height,calc(55px + env(safe-area-inset-bottom))) + 100px)}
body[data-mode=mobile] .friends-accruals-heading{padding:14px}
body[data-mode=mobile] .friends-list{height:auto;overflow:visible}
@media(max-width:360px){
  body[data-mode=mobile][data-screen=friends] .friends-page{padding-inline:12px}
  body[data-mode=mobile] .friends-heading{padding-inline:8px}
  body[data-mode=mobile] .friends-title{font-size:26px}
  body[data-mode=mobile] .friends-summary{gap:6px}
  body[data-mode=mobile] .friends-summary-stat{padding-inline:4px}
  body[data-mode=mobile] .friends-summary-stat>strong{font-size:12px}
  body[data-mode=mobile] .friends-rule-card{padding:14px}
  body[data-mode=mobile] .friends-rule-card h2{font-size:18px}
  body[data-mode=mobile] .friends-rule-card header p{font-size:13px}
  body[data-mode=mobile] .friends-rate-ladder>li{font-size:14px}
  body[data-mode=mobile] .friends-level-two-rules>p,
body[data-mode=mobile] .friends-level-income{font-size:14px}
  body[data-mode=mobile] .friends-invite-dock{padding-inline:12px}
  body[data-mode=mobile] .friends-accrual-row{grid-template-columns:40px minmax(0,1fr) auto;gap:8px}
  body[data-mode=mobile] .friends-accrual-avatar{width:40px;height:40px}
  body[data-mode=mobile] .friends-accrual-main>strong{font-size:12px}
  body[data-mode=mobile] .friends-accrual-main>small{font-size:9px}
  body[data-mode=mobile] .friends-accrual-amount{max-width:105px;font-size:12px}
  .friends-roster-labels,
.friends-row{grid-template-columns:minmax(0,1fr) 64px 76px;gap:5px}
  .friends-avatar{display:none}
  .friends-person strong,
.friends-contribution>strong,
.friends-income>strong{font-size:11px}
}
