.friends-intro{padding:26px;margin-bottom:16px;background:linear-gradient(130deg,#fff 30%,#eaf3ff)}
.friends-intro h1{display:flex;align-items:center;gap:10px;font-size:28px;margin:10px 0}
.friends-intro h1 .ui-icon{width:30px;height:30px;color:#2166c2}
.friends-intro p{margin:10px 0 0;line-height:1.7}
.friends-filters{position:sticky;top:calc(var(--friend-header-height,68px) + 8px);z-index:10;padding:10px 12px;margin-bottom:12px;background:#fafbfe;border-color:#dce3ec;max-height:min(55dvh,calc(100dvh - var(--friend-header-height,68px) - 24px));overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;box-shadow:0 4px 14px #26385212}
.friend-filter-heading{display:flex;align-items:center;gap:6px}
.friend-filter-heading strong{font-size:12px}
.friend-filter-total,.friend-group-count{font-size:10px;font-weight:400;color:#2166c2}
.friend-filter-help{font-size:10px;line-height:1.5;margin:4px 0 6px}
.friend-filter-group{margin:0;padding:0;border:0;min-width:0}
.friend-filter-group + .friend-filter-group{border-top:1px solid #dce3ec70}
.friend-filter-group summary{display:flex;align-items:center;gap:6px;list-style:none;font-size:11px;font-weight:600;padding:5px 0;cursor:pointer;color:#43536a}
.friend-filter-group summary::-webkit-details-marker{display:none}
.friend-filter-group summary::before{content:'›';font-size:14px;line-height:1;width:9px;flex:none;text-align:center}
.friend-filter-group[open] summary::before{transform:rotate(90deg)}
.friends-tags{display:flex;flex-wrap:wrap;gap:4px;padding:1px 0 7px}
.friend-filter-pill,.friend-filter-clear{display:inline-flex;align-items:center;gap:3px;border:1px solid #dce3ec;border-radius:999px;background:#f6f8fc;color:#43536a;padding:2px 6px;min-height:22px;cursor:pointer;font:inherit;font-size:10px;line-height:1.4;max-width:100%;overflow-wrap:anywhere}
.friend-filter-clear{margin-left:auto;flex:none}
.friend-filter-pill.is-selected{color:#174b91;background:#e8f1ff;border-color:#2166c2;font-weight:700;box-shadow:inset 0 0 0 1px #2166c2}
.friend-filter-pill:focus-visible,.friend-filter-clear:focus-visible,.friend-filter-group summary:focus-visible{outline:2px solid #2166c2;outline-offset:2px}
.friend-filter-pill:disabled,.friend-filter-clear:disabled{opacity:.5;cursor:default}
.friend-filter-pill.is-empty{color:#9aa7b8;background:#eef1f5;border-color:#e3e8ef;box-shadow:none}
.friend-filter-check{width:9px;flex:none;text-align:center}
.friend-filter-count{margin:4px 0 0;font-size:10px;line-height:1.5}
.friends-filters > p:last-child{font-size:10px;line-height:1.5;margin:4px 0 0}
.friends-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.friend-card{padding:14px 8px 12px;display:flex;align-items:center;flex-direction:column;min-width:0;text-align:center}
.friend-profile{width:100%;display:flex;align-items:center;flex-direction:column;max-width:100%;text-decoration:none;color:inherit}
.friend-avatar{width:52px;height:52px;border-radius:14px;image-rendering:pixelated;background:#edf3fa;border:1px solid #dce3ec;box-shadow:0 6px 16px #244a7610}
.friend-profile h2{width:100%;font-size:13px;line-height:1.5;margin:8px 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.friend-labels{display:flex;justify-content:center;flex-wrap:wrap;gap:4px;margin:8px 0;max-height:22px;overflow:hidden;max-width:100%}
.friend-labels .chip{font-size:10px;padding:2px 5px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#f4f7fb}
.friend-actions{display:flex;justify-content:center;gap:8px;margin-top:auto;flex-wrap:wrap;width:100%}
.friend-card .friend-actions{gap:4px}
.friend-card .friend-actions .btn{font-size:11px;padding:6px 3px;min-height:30px;line-height:1.3}
.friend-actions .btn{flex:1;min-width:0;white-space:normal}
.friend-card p{margin:10px 0 0;line-height:1.5}
.friends-more{text-align:center;margin:22px 0}
.friend-dialog{width:min(480px,calc(100% - 32px));max-height:calc(100dvh - 40px);overflow:auto;padding:24px;border:1px solid #dce3ec;color:#243247}
.friend-dialog:not([open]){display:none}
.friend-dialog::backdrop{background:#172b4b70}
.friend-dialog h2{font-size:18px;overflow-wrap:anywhere}
.friend-dialog textarea{display:block;width:100%;margin:12px 0 18px;resize:vertical}
@media(min-width:721px){.friends-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:1200px){.friends-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:420px){.friends-grid{gap:10px}.friends-intro{padding:20px}.friends-intro h1{font-size:24px}}
.friend-card .member-level{font-size:9px;max-width:100%;white-space:normal;line-height:1.3}
.friend-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:4px;margin:0 0 10px;padding-top:8px;border-top:1px solid #dce3ec}
.friend-stats div{min-width:0}.friend-stats dt{font-size:10px;color:#697589}.friend-stats dd{margin:2px 0 0;font-size:14px;font-weight:700;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
@media(prefers-reduced-transparency:reduce){.friends-intro{background:#fff}}
