.friends-launch{position:fixed;left:20px;bottom:20px;z-index:95;display:flex;align-items:center;gap:8px;padding:11px 16px;border:1px solid #87b5df44;border-radius:16px;background:#101c30ed;backdrop-filter:blur(12px);color:#c6e2ff;box-shadow:0 6px 24px #0005;cursor:pointer;font:inherit;font-size:13px}
.friends-launch svg,.friend-avatar-placeholder svg{width:20px;height:20px}.friends-launch [data-friend-dot]{width:8px;height:8px;background:#65b8ff;border-radius:50%}.friends-launch [hidden]{display:none!important}
.friends-launch[hidden]{display:none!important}
/* Mobile uses the Friends page in the profile menu instead of a floating launcher. */
@media(max-width:760px),(hover:none) and (pointer:coarse){.friends-launch{display:none!important}}
.friends-dialog{width:min(540px,calc(100vw - 28px));max-height:80dvh;padding:22px;border:1px solid #87b5df33;border-radius:22px;background:var(--theme-panel,#101b2d);color:#dce9f8;box-shadow:0 24px 90px #0008;overflow:auto;scrollbar-width:thin;scrollbar-color:#416180 transparent}
.friends-dialog::backdrop{background:#010610ac;backdrop-filter:blur(5px)}.friends-dialog[open]{animation:friends-enter .18s ease-out}
.friends-dialog header{display:flex;align-items:center;justify-content:space-between;gap:16px}.friends-dialog header small{font-size:9px;letter-spacing:2px;color:#83b6dc}.friends-dialog h2{font-size:22px;margin:4px 0 18px}
.friends-dialog button,.member-friend-bar button{border:1px solid #91b7d52f;border-radius:10px;background:var(--theme-control,#1b304a);color:#cae6ff;padding:8px 12px;font:inherit;font-size:12px;cursor:pointer;transition:background .15s}
.friends-dialog button:hover,.member-friend-bar button:hover{background:#305174}.friends-dialog button:disabled,.member-friend-bar button:disabled{opacity:.5;cursor:wait}
.friends-dialog [data-close]{width:36px;height:36px;font-size:22px;line-height:1;padding:0}.friends-dialog nav{display:flex;gap:6px;flex-wrap:wrap}.friends-dialog [aria-pressed=true]{background:#254e77;border-color:#77b6ed88}
.friends-privacy,.friends-dialog [role=status]{font-size:11px;line-height:1.8;color:#96adc6}.friends-dialog [data-friend-list]{display:grid;gap:10px;margin:16px 0}
.friend-person,.friend-activity{padding:12px;border:1px solid #819fbb20;border-radius:14px;background:#7ca3c008}.friend-person{display:flex;align-items:center;gap:12px;justify-content:space-between}.friend-person>a{display:flex;align-items:center;gap:10px;min-width:0;color:inherit}.friend-person img,.friend-avatar-placeholder{width:40px;height:40px;border-radius:50%;object-fit:cover;flex-shrink:0}.friend-avatar-placeholder{display:grid;place-items:center;background:#1a3550}.friend-person strong,.friend-person small{display:block;overflow-wrap:anywhere}.friend-person strong,.friend-activity strong{font-size:13px}.friend-person small,.friend-activity small,.friend-activity time{font-size:10px;color:#8fa8c1}.friend-person>div{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}.friend-activity p{margin:6px 0;font-size:12px}
.friend-online,.friend-offline{display:inline-flex;align-items:center;gap:5px;font-size:11px}.friend-online{color:#72e8b3}.friend-offline{color:#8d9cac}.friend-online i,.friend-offline i{display:inline-block;width:7px;height:7px;border-radius:50%;background:currentColor}
.member-friend-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 16px;font-size:12px;color:var(--text-secondary,#a5bad2)}.member-friend-bar>div{display:flex;gap:8px}.member-friend-bar small{flex-basis:100%;color:#97b2cd}.member-friend-bar small:empty{display:none}
@keyframes friends-enter{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
@media(max-width:600px){.friends-launch{left:12px;bottom:12px;padding:9px 12px}.friends-dialog{padding:16px}.friend-person{align-items:flex-start;flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.friends-dialog[open]{animation:none}.friends-dialog button,.member-friend-bar button{transition:none}}

/* Shared friends page and movable desktop window. */
.friends-launch{border-radius:18px;padding:7px 15px 7px 7px;gap:10px;box-shadow:0 8px 32px #0006,inset 0 1px #ffffff0d;transition:transform .18s,background .18s}
.friends-launch:hover{transform:translateY(-2px);background:#192e48}.friends-launch-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:12px;background:linear-gradient(140deg,#3c6c99,#1e344d);color:#dcefff}
.friends-dialog{box-sizing:border-box;padding:0;overflow:hidden;width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 24px);background:var(--theme-panel,#101b2d);border-color:var(--theme-edge,#87b5df33);color:var(--text,#dce9f8)}
.friends-dialog.is-floating{position:fixed;inset:auto;margin:0;z-index:110;box-shadow:0 20px 64px #0009,0 1px 0 #ffffff0c inset}
.friends-dialog[open]{display:flex;flex-direction:column;height:min(660px,calc(100dvh - 24px))}.friends-dialog.is-floating[open]{height:min(660px,calc(100dvh - 108px))}
.friends-dialog>header{flex:none}.friends-dialog [data-friends-content]{flex:1;min-height:0}
.friends-dialog>header{padding:18px 20px 14px;border-bottom:1px solid var(--theme-edge,#87b5df22);background:linear-gradient(115deg,#70adff0c,transparent);user-select:none}
.friends-dialog h2{margin:4px 0;font-size:20px}.friends-dialog.is-floating>header{cursor:grab;touch-action:none}.friends-dialog.is-dragging>header{cursor:grabbing}.friends-dialog.is-dragging{animation:none}
.friends-drag-hint{display:none;font-size:10px;color:var(--text-secondary,#8fa8c1)}.friends-dialog.is-floating .friends-drag-hint{display:block}
.friends-dialog [data-close]{display:grid;place-items:center;flex:none;border-radius:12px;background:#7f9dbe12;border:1px solid #91b7d52f;color:var(--text,#cae6ff)}
.friends-dialog [data-friends-content]{padding:18px 20px;overflow:auto;max-height:calc(100dvh - 155px);scrollbar-width:thin;scrollbar-color:#416180 transparent}
.member-friends-page{padding:24px;border:1px solid var(--theme-edge,#87b5df33);border-radius:22px;background:var(--theme-panel,#101b2d);color:var(--text,#dce9f8);animation:friends-enter .18s ease-out}
.member-friends-page[hidden],.friends-search[hidden],#profile-overview-root[hidden],.friends-surface [hidden]{display:none!important}
.friends-toolbar{display:flex;gap:14px;align-items:center;justify-content:space-between;margin-bottom:18px}.friends-toolbar h3{margin:0;font-size:17px}.friends-toolbar p{margin:5px 0 0;font-size:11px;color:var(--text-secondary,#96adc6)}
.friends-surface button,.friend-confirm button{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--theme-edge,#91b7d52f);border-radius:11px;background:var(--theme-control,#1b304a);color:var(--theme-accent,#cae6ff);padding:9px 12px;font:inherit;font-size:12px;cursor:pointer;transition:background .18s,border-color .18s}
.friends-surface button:hover,.friend-confirm button:hover{background:color-mix(in srgb,var(--theme-control,#1b304a),#7cbcff 16%);border-color:#77b6ed66}
.friends-surface button:disabled{opacity:.5;cursor:wait}.friends-surface button svg,.member-friend-bar button svg{width:17px;height:17px;flex:none}
.friends-surface [data-add-friend]{flex:none;background:linear-gradient(115deg,#315c81,#24445f);color:#e1f2ff;border-color:#9ecaff44;box-shadow:0 3px 14px #0002}
.friends-surface nav{display:flex;gap:6px;flex-wrap:wrap}.friends-surface [aria-pressed=true]{background:var(--theme-control,#254e77);border-color:var(--theme-accent,#77b6ed88)}
.friends-surface [data-friend-list]{display:grid;gap:10px;margin:16px 0}.friends-surface [role=status]{font-size:12px;color:var(--text-secondary,#96adc6);line-height:1.8}
.friends-search{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;padding:16px;margin-bottom:18px;background:#85abca09;border:1px solid var(--theme-edge,#87b5df22);border-radius:16px;animation:friends-enter .18s ease-out}
.friends-search label{display:grid;gap:8px;flex:1;min-width:130px;font-size:11px;color:var(--text-secondary,#96adc6)}
.friends-search input{box-sizing:border-box;width:100%;min-width:0;padding:10px 12px;border:1px solid var(--theme-edge,#91b7d52f);border-radius:10px;background:var(--theme-panel,#0d1727);color:var(--text,#dce9f8);font:inherit;font-size:13px;outline:none}
.friends-search input:focus{border-color:var(--theme-accent,#7cbcff);box-shadow:0 0 0 3px #7cbcff12}
.friends-search-results{flex:0 0 100%;display:grid;gap:8px;min-width:0;font-size:12px}.friends-search-results:empty{display:none}.friends-search-results p{font-size:11px;color:var(--text-secondary,#96adc6);margin:4px 0}
.friends-surface a{text-decoration:none;color:inherit}.friend-person>a{flex:1}.friend-person>a>span:last-child{min-width:0}.friend-person>div:empty{display:none}
.friend-person{border-color:var(--theme-edge,#819fbb20)}.friend-person strong{color:var(--text,#dce9f8)}
.friends-surface button:focus-visible,.friends-launch:focus-visible,.friend-confirm button:focus-visible,.member-friend-bar button:focus-visible{outline:2px solid #8fcaff;outline-offset:3px}
.member-friend-bar{margin:0;padding:16px 24px;border-bottom:1px solid var(--theme-edge,#819fbb20);justify-content:space-between}.member-friend-bar>span{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.member-friend-bar button{display:inline-flex;align-items:center;justify-content:center;gap:7px}
.friend-confirm{box-sizing:border-box;width:min(420px,calc(100vw - 32px));padding:26px;border:1px solid var(--theme-edge,#87b5df33);border-radius:22px;background:var(--theme-panel,#101b2d);color:var(--text,#dce9f8);box-shadow:0 24px 90px #0009}
.friend-confirm::backdrop{background:#020711a8;backdrop-filter:blur(5px)}.friend-confirm[open]{animation:friends-enter .18s ease-out}.friend-confirm h2{font-size:21px;margin:14px 0 10px}.friend-confirm p{font-size:13px;line-height:1.9;color:var(--text-secondary,#a5bad2);overflow-wrap:anywhere}
.friend-confirm-icon{width:44px;height:44px;display:grid;place-items:center;background:#d98c8817;border:1px solid #da99992b;border-radius:14px;color:#edb0aa}.friend-confirm-icon svg{width:24px;height:24px}
.friend-confirm-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:24px;flex-wrap:wrap}.friend-confirm [data-confirm-remove]{background:#59323a;color:#ffd9d7;border-color:#cf777844}.friend-confirm [data-confirm-remove]:hover{background:#70404a}
@media(min-width:1000px){.member-friends-page [data-friend-list]{grid-template-columns:repeat(2,minmax(0,1fr))}.member-friends-page .friend-person{flex-wrap:wrap}.member-friends-page .friend-person>div{margin-left:auto}}
@media(max-width:760px){.friends-dialog{width:min(520px,calc(100vw - 24px));margin:auto}.friends-dialog>header{padding:16px}.friends-dialog [data-friends-content]{padding:16px;max-height:calc(100dvh - 135px)}.friends-toolbar{align-items:flex-start}.friends-toolbar h3{font-size:15px}.friends-toolbar p{max-width:180px}.member-friends-page{padding:16px}.member-friend-bar{padding:14px 16px}.friends-drag-hint{display:none!important}.friends-surface nav button{font-size:11px;padding:8px 10px}}
@media(prefers-reduced-motion:reduce){.member-friends-page,.friends-search,.friend-confirm[open]{animation:none}.friends-surface button,.friends-launch,.friend-confirm button{transition:none}}

/* Compact desktop companion, inspired by a game-platform friends list. */
.friends-dialog{width:min(350px,calc(100vw - 24px));border-radius:12px;background:linear-gradient(155deg,#111d2b,#060b12);}
.friends-dialog.is-expanded{width:min(490px,calc(100vw - 24px));}
.friends-dialog>header{padding:7px 9px 7px 13px;gap:5px;border-bottom:0;min-height:32px;}
.friends-window-title{display:flex;gap:8px;align-items:center;font-size:10px;letter-spacing:.4px;color:var(--theme-muted,#91a6bb)}
.friends-window-title .friends-drag-hint{font-size:8px;opacity:.65}.friends-window-actions{display:flex;gap:2px;flex:none}
.friends-dialog .friends-window-actions button{width:25px;height:25px;padding:0;border:0;border-radius:5px;background:transparent;font-size:20px;color:var(--theme-muted,#91a6bb)}
.friends-dialog .friends-window-actions [data-close]:hover{background:#993f4a55!important;color:#ffdbe0}
.friends-dialog [data-friends-self]{flex:none;position:relative;z-index:4;padding:8px 13px 13px;background:linear-gradient(130deg,#18324955,transparent)}
.friends-self{display:flex;gap:11px;align-items:center;position:relative}.friends-self-avatar{display:block;flex:none}.friends-self img,.friends-self-monogram{width:46px;height:46px;object-fit:cover;border:1px solid var(--theme-accent,#6f9fbe);box-shadow:0 4px 14px #0006;border-radius:5px;display:grid;place-items:center;background:var(--theme-control,#132339);font-size:20px;color:var(--theme-accent,#9bc7ea)}
.friends-self>div:nth-child(2){min-width:0;flex:1}.friends-self strong{display:block;color:var(--theme-accent,#9bc7ea);font-size:14px;overflow-wrap:anywhere}.friends-self [data-self-online]{display:block;font-size:11px;color:var(--theme-muted,#8296ab);margin-top:2px}.friends-self [data-self-online].is-online{color:#6fd6b6}
.friends-self-options{position:relative}.friends-self-options summary{list-style:none;cursor:pointer;color:var(--theme-accent,#9bc7ea);padding:8px}.friends-self-options summary::-webkit-details-marker{display:none}
.friends-self-menu{position:absolute;right:0;top:100%;width:220px;padding:8px;border:1px solid var(--theme-edge,#779abb33);border-radius:10px;background:#0d1726;box-shadow:0 14px 30px #0009;z-index:6}
.friends-self-menu a{display:block;padding:10px;color:var(--text,#dce9f8);font-size:12px;text-decoration:none;border-radius:6px}.friends-self-menu a:hover{background:#8eb9de12}.friends-self-menu p{font-size:10px;line-height:1.6;color:var(--theme-muted,#91a6bb);margin:8px}
.friends-self-preview{display:none;position:absolute;top:100%;left:0;right:0;align-items:center;gap:14px;padding:18px;border:1px solid var(--theme-edge,#779abb33);border-radius:10px;background:linear-gradient(130deg,#142438,#05090f);box-shadow:0 14px 30px #000a;z-index:5;pointer-events:auto}
.friends-self-preview img,.friends-self-preview .friends-self-monogram{width:64px;height:64px}.friends-self-preview small{display:block;font-size:8px;letter-spacing:1px;margin:5px 0;color:var(--theme-muted,#91a6bb)}.friends-self-preview a{font-size:11px;text-decoration:none;color:var(--theme-accent,#9bc7ea)}
@media(hover:hover) and (pointer:fine){.friends-self:has(.friends-self-avatar:hover) .friends-self-preview,.friends-self-preview:hover{display:flex}.friends-self:has(.friends-self-options[open]) .friends-self-preview{display:none}}
.friends-self-avatar:focus-visible~.friends-self-preview{display:flex}
.friends-recent{display:flex;gap:9px;padding:0 13px 10px;flex:none;overflow:hidden}.friends-recent:empty{display:none}.friends-recent a{display:grid;justify-items:center;width:48px;min-width:0;text-decoration:none;color:var(--theme-muted,#91a6bb)}.friends-recent img,.friends-recent a>span{width:38px;height:38px;object-fit:cover;border-radius:4px;background:var(--theme-control,#172536);display:grid;place-items:center}.friends-recent svg{width:20px;height:20px}.friends-recent small{font-size:9px;width:100%;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px}
.friends-dialog [data-friends-content]{padding:0 12px 12px;max-height:none;}
.friends-compact .friends-toolbar{padding:8px 0;margin:0;gap:8px}.friends-compact .friends-toolbar h3{font-size:12px}.friends-compact .friends-toolbar p{display:none}.friends-compact [data-add-friend]{padding:5px 8px;font-size:10px;border-radius:6px}.friends-compact nav{gap:4px;border-top:1px solid var(--theme-edge,#779abb22);padding-top:8px}.friends-compact nav button{padding:5px 7px;font-size:9px;border-radius:6px}
.friends-compact .friends-privacy{display:none}.friends-compact [data-friend-list]{margin:10px 0;gap:5px}.friends-compact .friend-person{padding:8px 2px;border:0;border-radius:5px;background:transparent!important;gap:7px;flex-wrap:nowrap}.friends-compact .friend-person:hover{background:#7198ba0c!important}.friends-compact .friend-person img,.friends-compact .friend-avatar-placeholder{width:32px;height:32px;border-radius:4px}.friends-compact .friend-person strong{font-size:12px}.friends-compact .friend-person small{font-size:9px}.friends-compact .friend-person button{padding:4px 6px;font-size:9px;border-radius:5px}.friends-compact .friend-person>div{flex:none}.friends-compact .friend-person>a{gap:8px;min-width:0}
.friends-presence-group{min-width:0}.friends-presence-group h4{margin:8px 0 4px;padding:8px 0;border-bottom:1px solid var(--theme-edge,#779abb22);font-size:11px;color:var(--theme-accent,#9bc7ea);font-weight:500}.friends-presence-group h4 small{color:var(--theme-muted,#91a6bb)}
.friends-request-alert{display:flex!important;width:100%;align-items:center;text-align:left;margin:6px 0 10px;padding:10px!important;font-size:11px!important;line-height:1.6;border:1px solid #72b7e777!important;background:linear-gradient(110deg,#17344c,#111c2d)!important;color:#b4e0ff!important;border-radius:8px!important;animation:friends-enter .2s ease-out}.friends-request-alert[hidden]{display:none!important}
.friends-dialog footer{flex:none;padding:9px 12px;border-top:1px solid var(--theme-edge,#779abb22);color:var(--theme-muted,#91a6bb);font-size:8px;letter-spacing:1px;display:flex;justify-content:space-between;gap:12px}.friends-dialog footer span{letter-spacing:0}
.friends-compact .friends-search{padding:10px;margin:4px 0 10px;gap:7px;border-radius:8px}.friends-compact .friends-search input{font-size:12px;padding:8px}.friends-compact .friends-search button[type=submit]{padding:8px;font-size:10px}.friends-compact [role=status]{font-size:10px}
@media(max-width:760px){.friends-dialog{width:min(390px,calc(100vw - 24px))}.friends-dialog .friends-window-actions [data-expand]{display:none}.friends-self-preview{display:none!important}.friends-dialog>header{padding:8px 12px}.friends-compact .friend-person button{min-height:32px}.friends-compact nav button{min-height:32px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.friends-request-alert{animation:none}}
