/* ── Profile page ────────────────────────────────────────────────────────────── */
.profile-auth-wall{
  display:flex;align-items:center;justify-content:center;
  min-height:calc(100vh - var(--nav-h));padding-top:var(--nav-h);
  text-align:center;
}
.profile-auth-msg{display:flex;flex-direction:column;align-items:center;gap:8px}

#profile-page{padding-top:var(--nav-h)}

/* Hero */
.profile-hero{
  background:linear-gradient(180deg,rgba(62,207,255,.06) 0%,transparent 100%);
  border-bottom:1px solid var(--border);padding:40px clamp(16px,5vw,80px) 32px;
}
.profile-hero-inner{
  max-width:860px;margin:0 auto;
  display:flex;align-items:center;gap:24px;flex-wrap:wrap;
}
.profile-avatar-wrap{position:relative;flex-shrink:0}
.profile-avatar-big{
  width:88px;height:88px;border-radius:50%;object-fit:cover;
  border:3px solid rgba(62,207,255,.3);background:var(--surface);
}
.profile-avatar-edit{
  position:absolute;bottom:0;right:0;
  width:26px;height:26px;border-radius:50%;
  background:var(--accent);color:#000;border:2px solid var(--bg);
  font-size:.7rem;cursor:pointer;display:flex;align-items:center;justify-content:center;
}
.profile-hero-info{flex:1;min-width:0}
.profile-username{font-family:'Bricolage Grotesque',sans-serif;font-size:1.7rem;font-weight:800;letter-spacing:-.5px}
.profile-level{font-size:.85rem;color:var(--accent);margin-top:4px;font-weight:500}

/* Sections */
.profile-section{
  max-width:860px;margin:0 auto;padding:32px clamp(16px,5vw,80px);
}
.profile-section h2{
  font-family:'Bricolage Grotesque',sans-serif;font-size:1.15rem;font-weight:700;
  margin-bottom:18px;letter-spacing:-.3px;
}

/* Stats grid */
.stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}
.stat-card{
  background:var(--surface);border:1px solid var(--border);border-radius:14px;
  padding:18px 20px;text-align:center;
}
.stat-val{
  font-family:'Bricolage Grotesque',sans-serif;font-size:1.8rem;font-weight:800;
  color:var(--accent);margin-bottom:4px;
}
.stat-label{font-size:.72rem;text-transform:uppercase;letter-spacing:1.5px;color:var(--dim)}

/* Best scores */
.best-scores-list{display:flex;flex-direction:column;gap:10px}
.best-score-row{
  display:flex;align-items:center;gap:14px;
  background:var(--surface);border:1px solid var(--border);border-radius:12px;
  padding:14px 18px;
}
.best-score-emoji{font-size:1.4rem;flex-shrink:0}
.best-score-info{flex:1;min-width:0}
.best-score-room{font-weight:600;font-size:.9rem}
.best-score-pts{font-family:'Bricolage Grotesque',sans-serif;font-weight:700;font-size:1.1rem;color:var(--accent);flex-shrink:0}
.profile-empty{color:var(--dim);font-size:.88rem}

/* Edit profile modal extras */
.avatar-preview-wrap{
  display:flex;align-items:center;gap:12px;
  margin:8px 0 12px;flex-wrap:wrap;
}
.avatar-preview-img{
  width:52px;height:52px;border-radius:50%;object-fit:cover;
  border:2px solid var(--border);background:var(--surface);
}

/* alert-err reuse */
.alert-err{
  background:rgba(248,113,113,.08);border:1px solid rgba(248,113,113,.2);
  color:#f87171;padding:8px 12px;border-radius:8px;font-size:.82rem;margin-top:6px;
}

/* Toast */
.toast{
  position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:999;
  background:var(--bg2);border:1px solid var(--border);border-radius:50px;
  padding:10px 20px;font-size:.85rem;white-space:nowrap;pointer-events:none;
}
.toast.success{border-color:var(--success);color:var(--success)}
.toast.error{border-color:var(--danger);color:var(--danger)}
