/* Friends menu, party invites and unrated results. Uses the same surfaces, borders and accent as the rest of the game. */
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Toolbar: tabs on the left, add-by-ID on the right. */
.friends-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:6px 0 16px}
.friends-tabs{display:inline-flex;gap:4px;padding:4px;border:1px solid #ffffff14;border-radius:10px;background:#0d0d0d}
.friends-tab{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:36px;padding:0 14px;border:0;border-radius:7px;background:transparent;color:#9a9a9a;font-size:12px;font-weight:600;white-space:nowrap}
.friends-tab:hover:not(:disabled){background:#ffffff0a;border:0;color:#e2e2e2}
.friends-tab.is-active{background:#202020;color:#f0f0f0;box-shadow:inset 0 0 0 1px #ffffff1c}
.friends-count{font-size:11px;font-weight:500;color:#6f6f6f;font-variant-numeric:tabular-nums}
.friends-tab.is-active .friends-count{color:#9a9a9a}
.friends-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--accent);color:#111;font-size:10px;font-weight:700;font-variant-numeric:tabular-nums}
.friends-add{display:flex;align-items:center;gap:8px;flex:0 1 280px;height:44px;padding:0 4px 0 14px;border:1px solid #ffffff16;border-radius:10px;background:#0b0b0b;transition:border-color .18s ease}
.friends-add:focus-within{border-color:#ffffff45}
.friends-add>span{color:#6c6c6c;font-weight:600}
.friends-add input{flex:1;min-width:0;height:36px;padding:0;border:0;background:transparent;color:#eee;font-size:13px;outline:none}
.friends-add button{height:36px;padding:0 14px;font-size:12px}

/* Rows: avatar with a presence dot, name and status, actions on the right. */
.friend-row{display:flex;align-items:center;gap:12px;padding:6px 0;border-bottom:1px solid #ffffff0d}
.friend-row:last-child{border-bottom:0}
.friend-identity{display:flex;align-items:center;gap:12px;flex:1 1 auto;min-width:0;padding:6px;margin-left:-6px;border:0;border-radius:9px;background:transparent;color:#dedede;text-align:left}
.friend-identity:hover:not(:disabled){background:#ffffff06;border:0}
.friend-avatar{position:relative;display:inline-flex;flex:0 0 auto}
.friend-avatar .account-avatar{width:40px;height:40px}
.presence-dot{position:absolute;right:-2px;bottom:-2px;width:12px;height:12px;border-radius:50%;background:#4d4d4d;box-shadow:0 0 0 3px #121212}
.friend-row.is-online .presence-dot,.invite-friend:not(.is-offline) .presence-dot{background:#7fcf98}
.friend-copy{min-width:0}
.friend-copy strong{display:block;overflow:hidden;font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.friend-copy small{display:block;margin-top:3px;font-size:11px;color:#858585}
.friend-row:not(.is-online) .friend-copy strong{color:#a8a8a8}
.friend-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.friend-action{height:36px;padding:0 14px;font-size:12px}
.friend-icon-action{display:inline-flex;align-items:center;justify-content:center;width:36px;padding:0;color:#8a8a8a;opacity:0;transition:opacity .18s ease,color .18s ease,border-color .18s ease,background-color .18s ease,transform .16s cubic-bezier(.23,1,.32,1)}
.friend-icon-action svg{width:16px;height:16px}
.friend-row:hover .friend-icon-action,.friend-icon-action:focus-visible{opacity:1}
.friend-icon-action:hover:not(:disabled){color:#e6a3a3;border-color:#e6a3a355;background:#e6a3a30d}
@media (hover:none){.friend-icon-action{opacity:1}}
.friend-pending{font-size:11px;color:#8a8a8a}
.friends-group{margin:16px 0 4px;font-size:10px;font-weight:600;letter-spacing:1.3px;text-transform:uppercase;color:#8d8d8d}
.friends-group:first-child{margin-top:0}
.friends-group small{margin-left:6px;color:#666;letter-spacing:0}
.friends-empty{padding:36px 12px;text-align:center}
.friends-empty strong{display:block;font-size:14px;color:#d8d8d8}
.friends-empty p{margin:8px auto 0;max-width:320px;font-size:12px;line-height:1.7;color:#858585}
@media(max-width:600px){
 .friends-tabs{width:100%}
 .friends-tab{flex:1;padding:0 6px}
 .friends-add{flex:1 1 100%}
 .friend-row{flex-wrap:wrap}
 .friend-row .friend-actions{margin-left:52px}
 .friend-row .friend-actions:has(.friend-icon-action:only-child){margin-left:auto}
}

/* Create form: the arena toggle matches the victory-condition toggle. */
.arena-settings .ending-toggle{display:flex;flex-direction:row;align-items:flex-start;gap:12px;margin:0;padding:16px;border:1px solid #ffffff18;border-radius:9px;background:#ffffff02;cursor:pointer}

/* Create form: friends to invite. */
.invite-friend-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.invite-friend{position:relative;display:flex;flex-direction:row;align-items:center;gap:12px;text-align:left;color:inherit;font-size:inherit;min-width:0;padding:10px 12px;border:1px solid #ffffff12;border-radius:10px;background:#ffffff03;cursor:pointer;transition:border-color .18s ease,background-color .18s ease}
.invite-friend input{position:absolute;opacity:0;pointer-events:none}
.invite-friend:hover{border-color:#ffffff2e}
.invite-friend:has(input:checked){border-color:#ffffff99;background:#ffffff0a}
.invite-friend:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:3px}
.invite-friend.is-offline{cursor:not-allowed;opacity:.55}
.invite-friend .account-avatar{width:36px;height:36px}
.invite-friend .presence-dot{box-shadow:0 0 0 3px #151515}
.invite-check{display:grid;place-items:center;flex:0 0 auto;width:18px;height:18px;margin-left:auto;border:1px solid #ffffff40;border-radius:5px;transition:background-color .16s ease,border-color .16s ease}
.invite-friend:has(input:checked) .invite-check{background:var(--accent);border-color:var(--accent)}
.invite-friend:has(input:checked) .invite-check::after{content:'';width:9px;height:5px;border-bottom:2px solid #111;border-left:2px solid #111;transform:translateY(-1px) rotate(-45deg)}
@media(max-width:600px){.invite-friend-list{grid-template-columns:1fr}}

.join-invited-note{margin:0;font-size:12px;line-height:1.7;color:#acd5b9}
dialog.invite-dialog{max-width:420px}
dialog.invite-dialog h2{margin:8px 0 10px}

/* Results of a game that ended within an hour of the lobby being created. */
.results-unrated{display:flex;flex-direction:column;align-items:flex-end;gap:6px;text-align:right}
.results-unrated b{font-size:15px;color:#e2e2e2}
.results-unrated small{max-width:340px;font-size:11px;line-height:1.7;color:#8d8d8d}
@media(max-width:800px){.results-unrated{align-items:flex-start;text-align:left}}
