/* ---------- profile tab ---------- */
.pf-card {
  padding: 14px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
}
.pf-head { margin-top: 4px; }
.pf-user { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pf-user b { font-size: 20px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-level { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13px; }
.pf-level span { font-weight: 700; }
.pf-level span b { color: var(--muted); font-weight: 600; }
.pf-level small { color: var(--muted); font-size: 12px; }
.pf-bar { height: 6px; border-radius: 3px; background: #26242f; overflow: hidden; }
.pf-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #7c3aed, #a78bfa); transition: width .4s; }

.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.pf-stats .pf-card { text-align: center; padding: 16px 6px; }
.pf-stats b { display: block; font-size: 22px; }
.pf-stats span { font-size: 12px; color: var(--muted); }

.pf-form { margin-bottom: 10px; }
.pf-form > b { display: block; font-size: 15px; }
.pf-form > small { display: block; margin: 3px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.pf-gold { border-color: #8a6d1a; background: linear-gradient(180deg, #1f1a12, var(--card)); }
.pf-row { display: flex; gap: 8px; }
.pf-row input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; outline: 0;
  background: #121118; border: 1px solid var(--line); color: var(--text); font: 600 14px Inter, sans-serif;
}
.pf-row input:focus { border-color: #6d4fc2; }
.pf-btn {
  flex: none; height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 700; font-size: 14px;
  background: linear-gradient(180deg, #a07bff, #7c4ff0);
}
.pf-btn:active { transform: scale(.97); }

.pf-toggle + .pf-toggle { margin-top: 8px; }
.pf-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.pf-toggle b { display: block; font-size: 15px; }
.pf-toggle small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

/* ---------- avatars ---------- */
.avatar { position: relative; flex: none; display: inline-block; overflow: hidden; }
.avatar > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.avatar img { object-fit: cover; }
.avatar-letter { display: grid; place-items: center; color: #fff; font-weight: 700; }
.avatar-lg { width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 0 0 2px rgba(167, 139, 250, .5); }
.avatar-lg .avatar-letter { font-size: 24px; }
.avatar-sm { width: 34px; height: 34px; border-radius: 10px; }
.avatar-sm .avatar-letter { font-size: 15px; }

/* ---------- top ---------- */
.top { display: flex; flex-direction: column; gap: 6px; }
.top-row {
  display: grid; grid-template-columns: 34px 34px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 12px; background: var(--card); border: 1px solid transparent;
}
.top-row.me { border-color: #6d4fc2; background: #1c1729; }
.top-place { font-weight: 700; font-size: 15px; color: var(--muted); text-align: center; }
.top-place.gold { color: #fbbf24; }
.top-place.silver { color: #cbd5e1; }
.top-place.bronze { color: #f59e0b; opacity: .8; }
.top-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-name .you {
  font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 6px; margin-left: 4px;
  border-radius: 6px; background: #3b2f63; color: #c4b5fd; vertical-align: middle;
}
.top-bal { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 14px; }
.top-bal .coin { width: 16px; height: 16px; }
.top-gap { text-align: center; color: var(--muted); letter-spacing: .2em; padding: 2px 0; }
