.friends-page [hidden] { display: none !important; }
.friends-main { max-width: 1090px; }
.friends-header { display: flex; gap: clamp(12px, 6vw, 38px); }
.friends-header nav { justify-content: end; gap: clamp(7px, 3vw, 24px); }
.friends-header nav a { white-space: normal; text-align: center; line-height: 1.17; }
.friends-intro { padding-block: clamp(20px, 5vw, 48px) 17px; }
.friends-intro h1 { margin: 3px 0 0; font-size: clamp(38px, 8vw, 66px); letter-spacing: -.06em; line-height: 1; font-weight: 920; }
.friends-intro h1 span { color: var(--accent); }
.friends-intro p { margin: 7px 0 0; color: var(--muted); }
.friends-settings {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 15px;
  background: linear-gradient(115deg, #281d1d, var(--panel) 55%); border: 1px solid #503b39;
  border-radius: 7px; padding: clamp(10px, 2vw, 16px);
}
.friends-settings label { display: block; margin-bottom: 4px; font-weight: 750; font-size: 14px; }
.friends-field { display: flex; gap: 6px; }
.friends-field select { flex: 1; min-width: 0; border: 1px solid #55454b; border-radius: 5px; color: var(--ink); background: #131316; padding: 4px 6px; font: inherit; }
.friends-field button {
  min-height: 44px; padding: 5px 9px; border: 1px solid var(--accent); border-radius: 5px;
  color: #211215; background: var(--accent); cursor: pointer; font: 760 14px system-ui, sans-serif;
}
.friends-field button:hover { background: #ffb198; }
.friends-settings small, .friends-note, .friends-empty { color: var(--muted); font-size: 14px; }
.friends-status { grid-column: 1 / -1; color: #ffd2bd; font-size: 14px; margin: 0; }
.friends-status:empty { display: none; }
.friends-empty { padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.friends-results { margin-block-start: 18px; }
.friends-results h2 { margin: 0 0 8px; font-size: 23px; }
.friends-table {
  width: 100%; border: 1px solid var(--line); border-radius: 7px; border-spacing: 0; background: var(--panel);
  font-variant-numeric: tabular-nums;
}
.friends-table :is(td, th) { padding: 7px 8px; text-align: center; }
.friends-table thead th { font-size: 13px; color: var(--muted); line-height: 1.15; background: #1e1d23; }
.friends-table tbody :is(td, th) { border-top: 1px solid var(--line); font-size: 15px; }
.friends-table tr > :nth-child(2) { text-align: left; }
.friends-table .friends-position { color: #ffc5a8; font-weight: 800; }
.friends-table .friends-self-row { background: #292124; }
.friends-name a { display: flex; align-items: center; gap: 7px; text-decoration: none; }
.friends-avatar {
  display: grid; place-items: center; flex: 0 0 36px; height: 36px; border: 1px solid #795445; border-radius: 5px;
  color: #ffd7c6; background: #3a2825; overflow: hidden; font-size: 15px; font-weight: 850;
}
.friends-avatar img { width: 100%; height: 100%; object-fit: contain; }
.friends-person { min-width: 0; overflow-wrap: anywhere; line-height: 1.15; }
.friends-you { display: inline-block; margin-inline-start: 4px; padding: 1px 3px; border-radius: 3px; background: #664235; color: #ffe6d7; font-size: 11px; }
.friends-level { display: inline-block; padding: 2px 4px; color: var(--rank-tone); background: #2a2227; border: 1px solid #644a4c; border-radius: 4px; font-size: .83em; font-weight: 750; }
.friends-rating { font-weight: 850; }
.friends-win { color: #35e77b; }
.friends-loss { color: #ff6578; }
.friends-remove { width: 48px; }
.friends-remove button {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 5px;
  background: transparent; color: #ff9a78; cursor: pointer;
}
.friends-remove button:hover { color: #ffc2ae; background: #392620; }
.friends-remove svg { fill: currentColor; }
@media (max-width: 590px) {
  .friends-settings { grid-template-columns: minmax(0, 1fr); }
  .friends-table :is(td, th) { padding-inline: 2px; }
  .friends-table tbody :is(td, th) { font-size: 13px; }
  .friends-table thead th { font-size: 11px; overflow-wrap: anywhere; }
  .friends-table thead th:nth-child(2) { min-width: 58px; }
  .friends-name a { gap: 3px; }
  .friends-avatar { flex-basis: 22px; height: 22px; font-size: 10px; }
  .friends-remove { width: 30px; }
  .friends-remove button { width: 30px; }
  .friends-remove svg { width: 16px; height: 16px; }
}
.friends-settings { grid-template-columns: minmax(0,1fr); }
.friends-field input { width:100%; max-width:500px; min-height:44px; border:1px solid #55454b; border-radius:5px; color:var(--ink); background:#131316; padding:8px 11px; font:inherit; font-size:16px; }
.friends-guest { padding:clamp(14px,4vw,24px); background:var(--panel); }
.friends-guest h2 { color:var(--ink); margin:0 0 6px; font-size:clamp(19px,5vw,25px); }
.friends-guest p { margin:0 0 12px; }
.friends-search-results { max-width:500px; margin:6px 0 8px; padding:0; list-style:none; border:1px solid var(--line); border-radius:6px; background:#17161b; overflow:hidden; }
.friends-search-results li+li { border-top:1px solid var(--line); }
.friends-search-results button { display:flex; width:100%; min-height:44px; gap:14px; align-items:center; justify-content:space-between; padding:6px 10px; border:0; background:transparent; color:var(--ink); text-align:left; font:inherit; cursor:pointer; }
.friends-search-results button:is(:hover,:focus-visible) { background:#33221d; outline-offset:-3px; }
.friends-search-results button span { color:var(--muted); white-space:nowrap; }
.friends-name .friends-identity { display:flex; align-items:center; gap:7px; }
@media(max-width:650px){
 .friends-header { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 8px; padding-top:6px; }
 .friends-header .brand { grid-area:1/1; }
 .friends-header .klaq-header-account { grid-area:1/2; }
 .friends-header nav { grid-area:2/1/2/-1; justify-content:flex-start; min-height:34px; }
}
