/* PROFILE tab (js/profile.js). Reuses .panel, .stat, .progress and .rarity-row. */
.view-profile { display: grid; gap: 1rem; max-width: 900px; margin: 0 auto; }
.view-profile #profile-root { display: grid; gap: 1rem; }
.profile-head { display: flex; gap: 1.1rem; align-items: flex-start; }
.profile-avatar { flex: none; width: 5.5rem; height: 5.5rem; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font: 400 2.4rem var(--font-display); background: var(--accent); color: var(--accent-ink, #1a1205); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.profile-name { margin: 0; font: 400 1.7rem var(--font-display); }
.profile-about { width: 100%; resize: vertical; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.2); color: var(--ink); font: inherit; }
.profile-stats .stat { min-width: 8rem; }
.profile-stats .stat b { overflow-wrap: anywhere; }
.profile-row { grid-template-columns: 7rem 1fr 9rem; }
@media (max-width: 560px) { .profile-head { flex-direction: column; align-items: center; } .profile-info { width: 100%; } .profile-row { grid-template-columns: 5.5rem 1fr 7.5rem; } }

/* Achievements (js/profile.js + js/achievements.js) */
.ach-filters { margin: 0.9rem 0 0.4rem; }
.ach-cat { margin-top: 1rem; }
.ach-cat-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 0.5rem; font: 400 1.05rem var(--font-display); }
.ach-cat-title small { font: 800 0.8rem var(--font-body); color: var(--muted); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 0.6rem; }
.ach { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.65rem 0.8rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.22); }
.ach-num { flex: none; min-width: 2.6rem; padding: 0.2rem 0; text-align: center; border-radius: 8px; font: 400 0.95rem var(--font-display); background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.ach-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.ach-name { font: 800 0.95rem var(--font-body); }
.ach-desc { font-size: 0.82rem; color: var(--muted); }
.ach-state { font-weight: 800; font-size: 0.75rem; color: var(--muted); }
.ach .progress { margin-top: 0.2rem; }
.ach.locked { opacity: 0.7; }
.ach.locked .ach-name { color: var(--muted); }
.ach.done { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: linear-gradient(135deg, rgba(255, 181, 52, 0.16), rgba(0, 0, 0, 0.2)); }
.ach.done .ach-num { background: var(--accent); color: var(--accent-ink); }
.ach.done .ach-state { color: var(--accent); }
.ach-toast { z-index: 55; }

/* star = achievement with a special reward */
.ach-reward { display: block; margin-top: 0.15rem; font-weight: 800; color: #ffd24a; }
.ach .ach-num { white-space: nowrap; }
