.team-tree-dialog{width:min(1500px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:0;overflow:hidden;overscroll-behavior:contain}
.team-tree-dialog[open]{display:flex;flex-direction:column}
.team-tree-dialog .dialog-head{flex-shrink:0;margin:0;padding:18px 24px;background:var(--panel,#10241c);align-items:flex-start}
.team-tree-dialog .dialog-head p{font-size:12px;color:var(--muted);margin:7px 0 0}
.team-tree-dialog .dialog-head .actions{flex-shrink:0}
.team-tree-viewport{overflow:auto;overscroll-behavior:contain;min-height:320px;max-height:calc(100dvh - 144px);flex:1;background:#0c1d19;scrollbar-color:#456456 #0c1d19}
.team-tree-viewport:focus-visible{outline:2px solid var(--teal);outline-offset:-3px}
.team-tree-canvas{display:table;min-width:100%;padding:24px 24px 30px}
.team-tree-level{display:flex;justify-content:center;align-items:flex-start;position:relative;padding:16px 0 0;margin:0;list-style:none}
.team-tree-branch{position:relative;flex-shrink:0;padding:16px 12px 0;text-align:center;list-style:none}
.team-tree-branch::before,.team-tree-branch::after{content:"";position:absolute;top:0;right:50%;width:50%;height:16px;border-top:1px solid #4e6b5e}
.team-tree-branch::after{left:50%;right:auto;border-left:1px solid #4e6b5e}
.team-tree-branch:first-child::before,.team-tree-branch:last-child::after{display:none}
.team-tree-branch:first-child::after{border-radius:5px 0 0 0}
.team-tree-branch:last-child::before{border-right:1px solid #4e6b5e;border-radius:0 5px 0 0}
.team-tree-branch:only-child{padding-top:0}
.team-tree-branch:only-child::before,.team-tree-branch:only-child::after{display:none}
.team-tree-level .team-tree-level::before{content:"";position:absolute;top:0;left:50%;height:16px;border-left:1px solid #4e6b5e}
.team-tree-root{padding-top:0}
.team-tree-root>.team-tree-branch{padding-top:0}
.team-tree-card{position:relative;width:280px;margin:0 auto;padding:12px 14px;border:1px solid #365348;border-top:3px solid #629b92;border-radius:9px;background:#172e28;color:var(--text);text-align:left;box-shadow:0 5px 18px #00000015}
.team-tree-card>header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px;color:var(--muted);font-size:10px;line-height:1.4}
.team-tree-depth{padding:2px 6px;border:1px solid #35564b;border-radius:4px;background:#0d231d;color:#a8c6bb;white-space:nowrap}
.team-tree-number{font-variant-numeric:tabular-nums}
.team-tree-wallet{display:flex;align-items:center;gap:9px;min-width:0}
.team-tree-wallet code{min-width:0;color:var(--text);font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.team-tree-wallet .button{flex-shrink:0;padding:3px 7px;min-height:26px;line-height:1.4}
.team-tree-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.team-tree-badges .badge{padding:2px 6px;line-height:1.4}
.team-tree-money{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:10px 0 0;padding:10px 0;border-block:1px solid #2c493e}
.team-tree-money span,.team-tree-counts span{display:block;color:var(--muted);font-size:10px;line-height:1.5}
.team-tree-money strong{display:block;margin-top:4px;font-size:18px;font-weight:500;line-height:1.3;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.team-tree-counts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:10px 0}
.team-tree-counts>div{display:flex;align-items:center;gap:7px;min-width:0}
.team-tree-counts strong{font-weight:500;font-size:13px;line-height:1.4;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.team-tree-card .team-tree-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:32px;padding:5px 10px;background:#10271f;color:#bbd7ca;border-color:#36594a;font-size:12px;line-height:1.5;text-align:left}
.team-tree-toggle[disabled]{opacity:1;color:#789586;background:#142a23;cursor:default}
.team-tree-status{display:flex;justify-content:center;min-width:280px}
.team-tree-status>.loading,.team-tree-load-error,.team-tree-more{width:250px;min-height:90px;padding:20px;border:1px dashed #466656;border-radius:8px;background:#12271f}
.team-tree-status>.loading{font-size:12px}
.team-tree-load-error p{max-width:220px;overflow-wrap:anywhere;font-size:12px;color:var(--danger,#efa79f)}
.team-tree-more{line-height:1.8;white-space:normal;color:var(--teal)}
.team-tree-more small{font-size:11px;color:var(--muted)}
.team-tree-initial-error{width:min(480px,calc(100vw - 100px));margin:24px auto}
.team-tree-initial-error .notice{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:600px){.team-tree-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.team-tree-dialog .dialog-head{padding:14px 16px;gap:12px;flex-wrap:wrap}.team-tree-dialog .dialog-head h2{font-size:17px}.team-tree-dialog .dialog-head .actions{width:100%;justify-content:flex-end}.team-tree-viewport{max-height:calc(100dvh - 180px)}.team-tree-canvas{padding:20px 10px 24px}.team-tree-card{width:260px;padding:12px}.team-tree-branch{padding-inline:9px}.team-tree-status{min-width:260px}}
@media(max-height:500px){.team-tree-viewport{min-height:0}.team-tree-dialog .dialog-head{padding-block:10px}}
