/* Shared in-world friends panel. The game API remains the source of statistics. */
#friends-hud{--friends-glass:rgba(22,45,35,.76);position:absolute;z-index:8;pointer-events:auto;color:#fff7df;font:12px/1.4 system-ui,Tahoma,sans-serif;text-shadow:0 1px 1px #123224;max-width:calc(100% - 16px);margin:0;}
#friends-hud[hidden],#friends-hud [hidden]{display:none!important}
#friends-hud .friends-panel,#friends-hud .friends-restore{background:var(--friends-glass);border:1px solid #f5e6b84d;border-radius:15px;box-shadow:0 5px 18px #173b2b40;backdrop-filter:blur(7px);overflow:hidden}
#friends-hud .friends-panel{display:flex;flex-direction:column;max-height:var(--friends-max-height,360px)}
#friends-hud button{touch-action:manipulation;min-width:44px;min-height:44px;padding:0;border:0;border-radius:10px;background:#f1eec314;color:#fff3cc;font:inherit;cursor:pointer;box-shadow:none;transform:none}
#friends-hud button:hover{background:#f1eec331}
#friends-hud button:focus-visible{outline:2px solid #ffe394;outline-offset:-3px}
#friends-hud .friends-header{display:flex;align-items:center;justify-content:space-between;gap:2px;padding:3px 4px 3px 8px;min-height:50px;flex-shrink:0;border-bottom:1px solid #f5e6b820}
#friends-hud .friends-title{display:flex;align-items:center;gap:7px;min-width:0}
#friends-hud .friends-title strong{font-size:13px;color:#fff3ca;display:block;white-space:nowrap}
#friends-hud .friends-title small{font-size:10px;white-space:nowrap;color:#d7e8c6;display:block}
#friends-hud .friends-team-icon{font-size:14px;letter-spacing:-3px;position:relative;color:#e4c788;line-height:1;transform:translateY(-4px);margin-right:2px}
#friends-hud .friends-team-icon::after{content:'⌒⌒';position:absolute;top:9px;left:0;letter-spacing:-4px}
#friends-hud .friends-actions{display:flex;gap:2px;flex-shrink:0}
#friends-hud .friends-actions button{font-size:24px;line-height:1}
#friends-hud .friends-body{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a7bf88 transparent;padding:8px;min-height:0;}
#friends-hud .friends-totals{display:grid;grid-template-columns:1fr 1fr;gap:5px}
#friends-hud .friends-totals>div{padding:5px 7px;background:#f3efc90d;border:1px solid #f4eec317;border-radius:8px;min-width:0}
#friends-hud .friends-totals small{display:block;font-size:10px;color:#d9e7c9}
#friends-hud .friends-totals strong{font-size:17px;color:#ffe09d;font-variant-numeric:tabular-nums;line-height:1.2}
#friends-hud .friends-note{font-size:10px;color:#d1dfbe;margin:7px 0;line-height:1.35}
#friends-hud #friends-list{display:grid;gap:6px}
#friends-hud .friends-member{background:#ffffff09;border:1px solid #ffffff19;padding:6px;border-radius:10px;min-width:0;}
#friends-hud .friends-member[data-self=true]{border-color:#e9d59266;background:#e9d5920c}
#friends-hud .friends-member[data-online=false]{opacity:.68}
#friends-hud .friends-member-head{display:flex;align-items:center;gap:6px;min-width:0}
#friends-hud .friends-member-head img{width:27px;height:32px;object-fit:contain;image-rendering:pixelated;flex:none}
#friends-hud .friends-member-head strong{font-size:12px;min-width:0;flex:1;overflow-wrap:anywhere;color:#fff8df}
#friends-hud .friends-presence{font-size:9px;white-space:nowrap;color:#c6e2b1;flex-shrink:0}
#friends-hud .friends-member[data-online=false] .friends-presence{color:#d6d7cf}
#friends-hud .friends-member-stats{display:grid;grid-template-columns:1fr 1fr;gap:3px 4px;font-size:10px;color:#d8e5ca;margin-top:3px}
#friends-hud b{font-variant-numeric:tabular-nums;color:#ffe09d}
#friends-hud .friends-health{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:10px;color:#d9e6d0;margin-top:5px}
#friends-hud .friends-health-track{height:4px;flex:1;max-width:90px;min-width:26px;overflow:hidden;background:#ffffff25;border-radius:4px}
#friends-hud .friends-health-track i{display:block;height:100%;background:#b7d684;border-radius:4px}
#friends-hud .friends-connection{font-size:9px;color:#bdd0ad;margin:8px 0 0}
#friends-hud[data-connected=false] .friends-connection{color:#ffe29e}
#friends-hud .friends-compact-stats{display:flex;justify-content:space-between;gap:6px;padding:5px 8px;font-size:10px;color:#dce7ca}
#friends-hud .friends-restore{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;width:100%;padding:8px 12px}
#friends-hud[data-state=compact] .friends-team-icon{display:none}
/* Short canvas views lead with a real teammate; totals follow in the same scroll. */
#friends-hud[data-short=true] .friends-body{display:flex;flex-direction:column;gap:7px}
#friends-hud[data-short=true] #friends-list{order:0;flex-shrink:0}
#friends-hud[data-short=true] .friends-totals{order:1;flex-shrink:0}
#friends-hud[data-short=true] .friends-note{order:2;margin:0;flex-shrink:0}
#friends-hud[data-short=true] .friends-connection{order:3;margin:0;flex-shrink:0}
#friends-hud[data-short=true] .friends-member{padding:4px}
#friends-hud[data-short=true] .friends-member-head img{height:25px;width:22px}
#friends-hud[data-short=true] .friends-member-stats{font-size:9px;gap:1px 4px;margin-top:2px}
#friends-hud[data-short=true] .friends-health{font-size:9px;margin-top:3px}
#friends-hud[data-state=hidden]{width:145px!important}
.hud-menu-open #friends-hud{visibility:hidden}
.friends-legacy{display:none!important}
@media(max-width:700px) and (orientation:portrait){#friends-hud .friends-team-icon{display:none}#friends-hud .friends-header{padding-left:6px}#friends-hud .friends-title strong{font-size:11px}#friends-hud .friends-title small{font-size:9px}#friends-hud .friends-member-head strong{font-size:11px}#friends-hud .friends-presence{font-size:8px}#friends-hud .friends-member-stats{font-size:9px}#friends-hud .friends-totals small{font-size:9px}}
@media(max-width:360px) and (orientation:portrait){#friends-hud .friends-title small{font-size:8px}}
@media(prefers-reduced-motion:reduce){#friends-hud *{scroll-behavior:auto}}
