/* ============================================================================
   PROFILE — premium esports redesign (v2)
   Loaded after style.css. Owns EVERYTHING visual about the profile page:
   hero, tabs, stats, achievements, messages, settings.
   Markup + IDs + handlers live in main.js (openPlayerProfile) and are unchanged
   in behaviour. Icons are Lucide-style SVGs applied as CSS masks (see the
   generated --ic-* block below), so translated text nodes stay untouched.
   ========================================================================== */

.profile-modal, .profile-login-prompt{
  --ic-layout:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='9' rx='1'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1'/%3E%3C/svg%3E");
  --ic-trophy:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9H4.5a2.5 2.5 0 0 1 0-5H6'/%3E%3Cpath d='M18 9h1.5a2.5 2.5 0 0 0 0-5H18'/%3E%3Cpath d='M4 22h16'/%3E%3Cpath d='M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22'/%3E%3Cpath d='M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22'/%3E%3Cpath d='M18 2H6v7a6 6 0 0 0 12 0V2Z'/%3E%3C/svg%3E");
  --ic-message:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
  --ic-sliders:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 4h-7'/%3E%3Cpath d='M10 4H3'/%3E%3Cpath d='M21 12h-9'/%3E%3Cpath d='M8 12H3'/%3E%3Cpath d='M21 20h-5'/%3E%3Cpath d='M12 20H3'/%3E%3Cpath d='M14 2v4'/%3E%3Cpath d='M8 10v4'/%3E%3Cpath d='M16 18v4'/%3E%3C/svg%3E");
  --ic-link:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
  --ic-pencil:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z'/%3E%3Cpath d='m15 5 4 4'/%3E%3C/svg%3E");
  --ic-gamepad:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12h4'/%3E%3Cpath d='M8 10v4'/%3E%3Cpath d='M15 13h.01'/%3E%3Cpath d='M18 11h.01'/%3E%3Cpath d='M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z'/%3E%3C/svg%3E");
  --ic-check-circle:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  --ic-minus:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
  --ic-x:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E");
  --ic-target:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
  --ic-shield:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3C/svg%3E");
  --ic-bars:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20V10'/%3E%3Cpath d='M18 20V4'/%3E%3Cpath d='M6 20v-4'/%3E%3C/svg%3E");
  --ic-zap:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z'/%3E%3C/svg%3E");
  --ic-star:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E");
  --ic-lock:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  --ic-medal:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15'/%3E%3Cpath d='M11 12 5.12 2.2'/%3E%3Cpath d='m13 12 5.88-9.8'/%3E%3Cpath d='M8 7h8'/%3E%3Ccircle cx='12' cy='17' r='5'/%3E%3Cpath d='M12 18v-2h-.5'/%3E%3C/svg%3E");
  --ic-crown:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E");
  --ic-user-plus:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M19 8v6'/%3E%3Cpath d='M22 11h-6'/%3E%3C/svg%3E");
  --ic-user-check:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='m16 11 2 2 4-4'/%3E%3C/svg%3E");
  --ic-clock:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
  --ic-user:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  --ic-key:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z'/%3E%3Ccircle cx='16.5' cy='7.5' r='0.5'/%3E%3C/svg%3E");
  --ic-palette:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='13.5' cy='6.5' r='0.5'/%3E%3Ccircle cx='17.5' cy='10.5' r='0.5'/%3E%3Ccircle cx='8.5' cy='7.5' r='0.5'/%3E%3Ccircle cx='6.5' cy='12.5' r='0.5'/%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z'/%3E%3C/svg%3E");
  --ic-share:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='m8.59 13.51 6.83 3.98'/%3E%3Cpath d='m15.41 6.51-6.82 3.98'/%3E%3C/svg%3E");
  --ic-alert:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
  --ic-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
  --ic-swords:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 17.5 3 6V3h3l11.5 11.5'/%3E%3Cpath d='M13 19l6-6'/%3E%3Cpath d='M16 16l4 4'/%3E%3Cpath d='M19 21l2-2'/%3E%3Cpath d='M14.5 6.5 18 3h3v3l-3.5 3.5'/%3E%3Cpath d='M5 14l4 4'/%3E%3Cpath d='M7 17l-3 3'/%3E%3Cpath d='M3 19l2 2'/%3E%3C/svg%3E");
  --ic-trend:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 7h6v6'/%3E%3Cpath d='m22 7-8.5 8.5-5-5L2 17'/%3E%3C/svg%3E");
  --ic-users:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
  --ic-hash:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9h16'/%3E%3Cpath d='M4 15h16'/%3E%3Cpath d='M10 3 8 21'/%3E%3Cpath d='M16 3 14 21'/%3E%3C/svg%3E");
  --ic-check:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --ic-percent:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 5 5 19'/%3E%3Ccircle cx='6.5' cy='6.5' r='2.5'/%3E%3Ccircle cx='17.5' cy='17.5' r='2.5'/%3E%3C/svg%3E");
  --ic-calendar:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4'/%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
  --ic-history:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M12 7v5l4 2'/%3E%3C/svg%3E");
  --ic-gem:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12l4 6-10 13L2 9Z'/%3E%3Cpath d='M11 3 8 9l4 13 4-13-3-6'/%3E%3Cpath d='M2 9h20'/%3E%3C/svg%3E");
}
.ic-layout, [data-ic="layout"]{--i:var(--ic-layout);}
.ic-trophy, [data-ic="trophy"]{--i:var(--ic-trophy);}
.ic-message, [data-ic="message"]{--i:var(--ic-message);}
.ic-sliders, [data-ic="sliders"]{--i:var(--ic-sliders);}
.ic-link, [data-ic="link"]{--i:var(--ic-link);}
.ic-pencil, [data-ic="pencil"]{--i:var(--ic-pencil);}
.ic-gamepad, [data-ic="gamepad"]{--i:var(--ic-gamepad);}
.ic-check-circle, [data-ic="check-circle"]{--i:var(--ic-check-circle);}
.ic-minus, [data-ic="minus"]{--i:var(--ic-minus);}
.ic-x, [data-ic="x"]{--i:var(--ic-x);}
.ic-target, [data-ic="target"]{--i:var(--ic-target);}
.ic-shield, [data-ic="shield"]{--i:var(--ic-shield);}
.ic-bars, [data-ic="bars"]{--i:var(--ic-bars);}
.ic-zap, [data-ic="zap"]{--i:var(--ic-zap);}
.ic-star, [data-ic="star"]{--i:var(--ic-star);}
.ic-lock, [data-ic="lock"]{--i:var(--ic-lock);}
.ic-medal, [data-ic="medal"]{--i:var(--ic-medal);}
.ic-crown, [data-ic="crown"]{--i:var(--ic-crown);}
.ic-user-plus, [data-ic="user-plus"]{--i:var(--ic-user-plus);}
.ic-user-check, [data-ic="user-check"]{--i:var(--ic-user-check);}
.ic-clock, [data-ic="clock"]{--i:var(--ic-clock);}
.ic-user, [data-ic="user"]{--i:var(--ic-user);}
.ic-key, [data-ic="key"]{--i:var(--ic-key);}
.ic-palette, [data-ic="palette"]{--i:var(--ic-palette);}
.ic-share, [data-ic="share"]{--i:var(--ic-share);}
.ic-alert, [data-ic="alert"]{--i:var(--ic-alert);}
.ic-chevron, [data-ic="chevron"]{--i:var(--ic-chevron);}
.ic-swords, [data-ic="swords"]{--i:var(--ic-swords);}
.ic-trend, [data-ic="trend"]{--i:var(--ic-trend);}
.ic-users, [data-ic="users"]{--i:var(--ic-users);}
.ic-hash, [data-ic="hash"]{--i:var(--ic-hash);}
.ic-check, [data-ic="check"]{--i:var(--ic-check);}
.ic-percent, [data-ic="percent"]{--i:var(--ic-percent);}
.ic-calendar, [data-ic="calendar"]{--i:var(--ic-calendar);}
.ic-history, [data-ic="history"]{--i:var(--ic-history);}
.ic-gem, [data-ic="gem"]{--i:var(--ic-gem);}


/* ---- icon primitive: <i class="ic ic-trophy"></i> or any [data-ic] ::before ---- */
.ic{
  display:inline-block; flex-shrink:0; width:1.1em; height:1.1em;
  background:currentColor; vertical-align:-0.18em;
  -webkit-mask:var(--i) center/contain no-repeat; mask:var(--i) center/contain no-repeat;
}

/* ---------- page shell ---------- */
#profile .modal-overlay{position:static; inset:auto; z-index:auto; background:none; padding:0; display:flex;}
#profileOverlay.profile-hidden{display:none;}
#profile .profile-modal{max-width:980px; margin:0 auto; width:100%; max-height:none; border-radius:20px;}
#profile .profile-close{display:none;}

.profile-modal{
  --p-radius:14px;
  --p-card:linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 92%, #fff 3%), var(--panel-2));
  --p-hair:color-mix(in srgb, var(--gold) 16%, var(--line));
  position:relative; overflow:hidden; isolation:isolate; text-align:left;
  max-width:980px; padding:0; border-radius:20px;
  background:var(--panel);
  border:1px solid color-mix(in srgb, var(--gold) 24%, var(--line));
  box-shadow:0 34px 80px -30px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.02) inset;
}
.profile-modal::before{
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background-image:url('assets/efootball-pattern.webp'); background-size:420px; background-repeat:repeat;
  opacity:.05; mix-blend-mode:screen;
}
.profile-close{
  position:absolute; top:14px; right:14px; z-index:5; width:32px; height:32px; border-radius:50%;
  background:rgba(0,0,0,.4); backdrop-filter:blur(6px); border:1px solid var(--line); color:var(--text);
  font-size:18px; line-height:1; cursor:pointer; padding:0; display:flex; align-items:center; justify-content:center;
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.profile-close:hover{background:var(--red); border-color:var(--red); color:#fff;}

/* ============================ HERO ============================ */
.profile-head{
  position:relative; overflow:hidden;
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:28px;
  padding:36px 32px 32px;
  background:
    linear-gradient(115deg, transparent 0 63%, color-mix(in srgb, var(--accent, var(--gold)) 12%, transparent) 63% 75%, transparent 75% 81%, color-mix(in srgb, var(--accent, var(--gold)) 7%, transparent) 81% 100%),
    linear-gradient(115deg, color-mix(in srgb, var(--accent, var(--gold)) 24%, #070a08) 0%, color-mix(in srgb, var(--accent, var(--gold)) 8%, var(--panel)) 58%, var(--panel) 100%);
  border-bottom:1px solid var(--p-hair);
}
/* faint site pattern, kept very low so it reads as texture */
.profile-head::before{
  content:""; position:absolute; inset:0; pointer-events:none; z-index:0;
  background:url('assets/efootball-pattern.webp') 0 0/380px repeat;
  opacity:.05; mix-blend-mode:screen;
}
.profile-head::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:2px; pointer-events:none;
  background:linear-gradient(90deg, var(--accent, var(--gold)), color-mix(in srgb, var(--accent, var(--gold)) 0%, transparent) 70%);
}
.profile-head > *{position:relative; z-index:1;}

/* avatar */
.profile-badge-wrap{position:relative; flex-shrink:0; width:116px; height:116px;}
.profile-badge-wrap::before{
  content:""; position:absolute; inset:-5px; border-radius:30px;
  background:linear-gradient(145deg, var(--accent, var(--gold)), color-mix(in srgb, var(--accent, var(--gold)) 10%, transparent) 55%, var(--accent, var(--gold)));
  opacity:.9;
}
.profile-badge{
  position:relative; z-index:1; width:116px; height:116px; border-radius:26px;
  background:var(--accent, var(--panel-2)); overflow:hidden; flex-shrink:0; cursor:default;
  display:flex; align-items:center; justify-content:center;
  font-family:'Teko', sans-serif; font-size:40px; font-weight:600;
  border:3px solid var(--panel);
  box-shadow:0 14px 30px -12px rgba(0,0,0,.8);
}
.profile-badge img{width:100%; height:100%; object-fit:cover;}
.profile-badge-edit{
  position:absolute; right:-9px; bottom:-9px; z-index:3; width:34px; height:34px; border-radius:11px;
  background:var(--panel); color:var(--text); padding:0; cursor:pointer;
  border:1px solid color-mix(in srgb, var(--accent, var(--gold)) 60%, var(--line));
  display:flex; align-items:center; justify-content:center; font-size:15px;
  box-shadow:0 8px 16px -6px rgba(0,0,0,.8);
  transition:background .16s ease, color .16s ease, transform .16s ease;
}
.profile-badge-edit:hover{background:var(--accent, var(--gold)); color:var(--on-gold, #0a0e0b); transform:translateY(-2px);}

/* identity */
.profile-head-info{min-width:0;}
.profile-name-row{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.profile-name{
  font-family:'Teko', sans-serif; font-size:46px; line-height:1; font-weight:600;
  letter-spacing:.025em; text-transform:uppercase; color:var(--text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%;
  text-shadow:0 2px 18px color-mix(in srgb, var(--accent, var(--gold)) 35%, transparent);
}
.profile-level-chip{
  display:inline-flex; align-items:center; gap:5px; flex-shrink:0;
  font-family:'Teko', sans-serif; font-size:15px; letter-spacing:.06em; font-weight:700; line-height:1;
  padding:6px 11px 5px 9px; border-radius:8px;
  color:var(--on-gold, #0a0e0b);
  background:linear-gradient(135deg, var(--accent, var(--gold)), color-mix(in srgb, var(--accent, var(--gold)) 70%, #fff));
  clip-path:polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%);
  padding-right:16px;
}
.profile-level-chip::before{content:none;}
.profile-level-chip .ic{width:13px; height:13px; vertical-align:0;}
#profilePremiumBadgeSlot .premium-badge{
  border-radius:8px; padding:5px 10px 5px 7px; font-size:11.5px; letter-spacing:.03em;
  box-shadow:none; text-transform:uppercase; font-weight:800;
}

.profile-meta-row{display:flex; flex-wrap:wrap; gap:8px; margin-top:12px;}
.profile-meta-chip{
  display:inline-flex; align-items:center; gap:7px;
  font-size:12px; font-weight:600; letter-spacing:.01em; padding:6px 12px; border-radius:8px;
  background:rgba(0,0,0,.32); border:1px solid color-mix(in srgb, var(--line) 80%, var(--accent, var(--gold)));
  color:color-mix(in srgb, var(--text) 78%, var(--muted));
}
.profile-meta-chip .ic{color:var(--accent, var(--gold)); width:14px; height:14px; vertical-align:0;}
.profile-titles-chip{
  color:var(--gold); border-color:color-mix(in srgb, var(--gold) 40%, var(--line));
  background:linear-gradient(135deg, color-mix(in srgb, var(--gold) 14%, transparent), rgba(0,0,0,.32));
}
.profile-titles-chip .ic{color:var(--gold);}

/* actions */
.profile-head-actions{display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:14px;}
.profile-share-btn{
  display:inline-flex; align-items:center; gap:8px; margin:0; cursor:pointer;
  padding:8px 14px; border-radius:9px; font-size:12px; font-weight:700; letter-spacing:.02em; font-family:inherit;
  background:rgba(0,0,0,.34); border:1px solid color-mix(in srgb, var(--line) 70%, var(--text));
  color:var(--text);
  transition:background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.profile-share-btn .ic{width:15px; height:15px; vertical-align:0;}
.profile-share-btn:hover{background:color-mix(in srgb, var(--gold) 14%, rgba(0,0,0,.4)); border-color:var(--gold); color:var(--gold); transform:translateY(-1px);}
.profile-head-actions .profile-share-btn{margin-top:0;}
.profile-friend-btn.is-none{color:var(--on-gold, #0a0e0b); background:var(--gold); border-color:var(--gold);}
.profile-friend-btn.is-none:hover{background:var(--gold-hover); border-color:var(--gold-hover); color:var(--on-gold, #0a0e0b);}
.profile-friend-btn.is-friends{color:var(--pitch); border-color:color-mix(in srgb, var(--pitch) 50%, var(--line));}
.profile-friend-btn.is-friends:hover{background:var(--red); color:#fff; border-color:var(--red);}
.profile-friend-btn.is-incoming{color:var(--on-gold, #0a0e0b); background:var(--gold); border-color:var(--gold);}
.profile-friend-btn.is-incoming:hover{background:var(--gold-hover); border-color:var(--gold-hover); color:var(--on-gold, #0a0e0b);}
.profile-friend-btn.is-outgoing{opacity:.8;}
.profile-friend-btn:disabled{opacity:.5; cursor:default; transform:none !important;}

/* socials */
.profile-social-links{display:flex; flex-wrap:wrap; gap:8px; margin-top:14px;}
.profile-social-link{
  width:34px; height:34px; border-radius:10px; overflow:hidden; display:block;
  border:1px solid color-mix(in srgb, var(--line) 60%, var(--text));
  background:rgba(0,0,0,.3);
  transition:transform .16s ease, border-color .16s ease;
}
.profile-social-link img{width:100%; height:100%; display:block; object-fit:cover;}
.profile-social-link:hover{transform:translateY(-2px); border-color:var(--accent, var(--gold));}

/* hero key stats (rank / points / win rate) */
.profile-hero-stats{display:grid; grid-template-columns:repeat(3, minmax(92px, 1fr)); gap:8px;}
.profile-hero-stat{
  position:relative; padding:13px 14px 11px; border-radius:12px; min-width:92px;
  background:rgba(0,0,0,.34); border:1px solid color-mix(in srgb, var(--line) 75%, var(--accent, var(--gold)));
  backdrop-filter:blur(6px);
}
.profile-hero-stat .ic{position:absolute; top:11px; right:11px; width:15px; height:15px; color:var(--accent, var(--gold)); opacity:.85;}
.profile-hero-stat b{display:block; font-family:'Teko', sans-serif; font-size:32px; line-height:1; font-weight:600; color:var(--text); letter-spacing:.01em;}
.profile-hero-stat small{display:block; margin-top:5px; font-size:10px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:var(--muted);}
.profile-hero-stat.is-primary{border-color:color-mix(in srgb, var(--gold) 45%, var(--line)); background:linear-gradient(160deg, color-mix(in srgb, var(--gold) 16%, rgba(0,0,0,.34)), rgba(0,0,0,.34));}
.profile-hero-stat.is-primary b{color:var(--gold);}

/* ============================ BODY / NAV ============================ */
.profile-body{
  position:relative; padding:26px 32px 32px;
  display:grid; grid-template-columns:208px minmax(0,1fr); gap:28px; align-items:start;
}
.profile-tabs{
  grid-column:1; grid-row:1; position:sticky; top:12px;
  display:flex; flex-direction:column; gap:3px; margin:0; padding:8px;
  background:var(--p-card); border:1px solid var(--p-hair); border-radius:var(--p-radius);
  box-shadow:0 14px 28px -20px rgba(0,0,0,.9);
}
.profile-tab-btn{
  position:relative; width:100%; min-width:0; background:none; border:none; cursor:pointer;
  display:flex; align-items:center; gap:11px; padding:11px 12px; border-radius:9px;
  font-family:'Teko', sans-serif; font-size:16px; font-weight:500; letter-spacing:.06em; text-transform:uppercase; line-height:1;
  color:var(--muted); text-align:left; white-space:nowrap;
  transition:color .16s ease, background .16s ease;
}
.profile-tab-btn::before{
  content:""; width:18px; height:18px; flex-shrink:0; background:currentColor;
  -webkit-mask:var(--i) center/contain no-repeat; mask:var(--i) center/contain no-repeat;
  border-radius:0; opacity:1;
}
.profile-tab-btn[data-tab="overview"]{--i:var(--ic-layout);}
.profile-tab-btn[data-tab="achievements"]{--i:var(--ic-trophy);}
.profile-tab-btn[data-tab="messages"]{--i:var(--ic-message);}
.profile-tab-btn[data-tab="settings"]{--i:var(--ic-sliders);}
.profile-tab-btn:hover{color:var(--text); background:rgba(255,255,255,.035);}
.profile-tab-btn.active{
  color:var(--text); font-weight:700;
  background:linear-gradient(90deg, color-mix(in srgb, var(--gold) 18%, transparent), color-mix(in srgb, var(--gold) 3%, transparent));
}
.profile-tab-btn.active::before{color:var(--gold);}
.profile-tab-btn.active::after{
  content:""; position:absolute; left:0; top:20%; bottom:20%; width:3px; border-radius:0 3px 3px 0; background:var(--gold);
}
.profile-tab-badge{
  margin-left:auto; min-width:19px; height:19px; padding:0 6px; border-radius:6px;
  background:var(--red, #c0392b); color:#fff; font-family:'Manrope', sans-serif; font-size:10.5px; font-weight:800; line-height:1;
  display:inline-flex; align-items:center; justify-content:center;
}
.profile-tab-btn.active .profile-tab-badge{background:var(--gold); color:var(--on-gold, #0a0e0b);}

.profile-tab-panel{grid-column:2; grid-row:1; min-width:0; animation:profilePanelIn .28s ease both;}
@keyframes profilePanelIn{from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:none;}}

/* ============================ SECTION TITLES ============================ */
.profile-section-title{
  display:flex; align-items:center; gap:10px; margin:28px 0 14px;
  font-family:'Teko', sans-serif; font-size:19px; font-weight:600; letter-spacing:.09em; text-transform:uppercase; color:var(--text);
}
.profile-section-title::after{content:""; flex:1; height:1px; background:linear-gradient(90deg, var(--p-hair), transparent);}
.pst-glyph{
  width:28px; height:28px; flex-shrink:0; border-radius:8px; color:var(--gold);
  display:inline-flex; align-items:center; justify-content:center;
  background:color-mix(in srgb, var(--gold) 13%, transparent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--gold) 28%, transparent);
}
.pst-glyph .ic{width:15px; height:15px; vertical-align:0;}
.profile-section-title:first-child{margin-top:0;}
.profile-tab-panel > .profile-section-title:first-child{margin-top:0;}

/* ============================ OVERVIEW ============================ */
.xp-bar-wrap{
  margin:0 0 6px; padding:16px 18px 18px; border-radius:var(--p-radius);
  background:var(--p-card); border:1px solid var(--p-hair);
}
.xp-bar-label{display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:12px;}
.xp-bar-label span:first-child{
  display:inline-flex; align-items:center; gap:9px;
  font-family:'Teko', sans-serif; font-size:24px; font-weight:600; letter-spacing:.05em; text-transform:uppercase; color:var(--text);
}
.xp-bar-label span:first-child::before{
  content:""; width:22px; height:22px; background:var(--gold);
  -webkit-mask:var(--ic-trend) center/contain no-repeat; mask:var(--ic-trend) center/contain no-repeat;
}
.xp-bar-label span:last-child{font-size:12px; color:var(--muted); font-weight:600; font-variant-numeric:tabular-nums;}
.xp-bar-track{
  position:relative; height:10px; border-radius:999px; overflow:hidden;
  background:rgba(0,0,0,.45); border:1px solid color-mix(in srgb, var(--line) 80%, #000); box-shadow:inset 0 1px 3px rgba(0,0,0,.5);
}
.xp-bar-track::before{
  content:""; position:absolute; inset:0; z-index:2; pointer-events:none;
  background-image:repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(0,0,0,.4) calc(10% - 1px), rgba(0,0,0,.4) 10%);
}
.xp-bar-fill{
  height:100%; border-radius:999px; position:relative; animation:none;
  background:linear-gradient(90deg, color-mix(in srgb, var(--gold) 55%, var(--pitch)), var(--gold));
  box-shadow:0 0 10px color-mix(in srgb, var(--gold) 40%, transparent);
  transition:width .6s cubic-bezier(.25,.8,.3,1);
}

/* stat tiles */
.profile-stat-grid{display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px;}
.profile-stat-grid div{
  --sc:var(--muted);
  position:relative; overflow:hidden; text-align:left; padding:14px 14px 13px; border-radius:12px;
  background:var(--p-card); border:1px solid var(--p-hair); box-shadow:none;
  transition:border-color .18s ease, transform .18s ease;
}
.profile-stat-grid div::before{
  content:""; position:absolute; top:13px; right:13px; left:auto; width:17px; height:17px; height:17px;
  background:var(--sc);
  -webkit-mask:var(--i) center/contain no-repeat; mask:var(--i) center/contain no-repeat; opacity:.9;
}
.profile-stat-grid div::after{
  content:""; position:absolute; left:0; bottom:0; height:2px; width:100%;
  background:linear-gradient(90deg, var(--sc), transparent 75%); opacity:.55; transform:none; transition:none; top:auto;
}
.profile-stat-grid div:hover{transform:translateY(-2px); border-color:color-mix(in srgb, var(--sc) 55%, var(--line)); box-shadow:none;}
.profile-stat-grid b{
  display:block; font-family:'Teko', sans-serif; font-size:36px; line-height:1; font-weight:600; letter-spacing:.01em; color:var(--text);
  font-variant-numeric:tabular-nums;
}
.profile-stat-grid span{
  display:block; margin-top:8px; font-size:10.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--muted);
}
.profile-stat-grid div span::before{content:none;}
.profile-stat-grid div:nth-child(1){--i:var(--ic-gamepad); --sc:color-mix(in srgb, var(--text) 62%, var(--muted));}
.profile-stat-grid div:nth-child(2){--i:var(--ic-check-circle); --sc:var(--pitch);}
.profile-stat-grid div:nth-child(3){--i:var(--ic-minus); --sc:var(--muted);}
.profile-stat-grid div:nth-child(4){--i:var(--ic-x); --sc:var(--red);}
.profile-stat-grid div:nth-child(5){--i:var(--ic-target); --sc:var(--gold-soft, var(--gold));}
.profile-stat-grid div:nth-child(6){--i:var(--ic-shield); --sc:color-mix(in srgb, var(--red) 55%, var(--muted));}
.profile-stat-grid div:nth-child(7){--i:var(--ic-bars); --sc:color-mix(in srgb, var(--pitch) 60%, var(--text));}
.profile-stat-grid div:nth-child(8){
  --i:var(--ic-zap); --sc:var(--gold);
  background:linear-gradient(160deg, color-mix(in srgb, var(--gold) 17%, var(--panel-2)), var(--panel-2));
  border-color:color-mix(in srgb, var(--gold) 42%, var(--line));
}
.profile-stat-grid div:nth-child(8) b{color:var(--gold);}

/* head-to-head */
.profile-h2h-table{width:100%; border-collapse:separate; border-spacing:0 6px; font-size:13.5px; margin-top:-4px;}
.profile-h2h-table thead tr{background:none;}
.profile-h2h-table th{
  text-align:left; padding:0 14px 4px; font-size:10.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--muted);
}
.profile-h2h-table tbody tr{background:var(--p-card); box-shadow:none; transition:background .15s ease;}
.profile-h2h-table td{padding:12px 14px; border-top:1px solid var(--p-hair); border-bottom:1px solid var(--p-hair);}
.profile-h2h-table td:first-child{border-left:1px solid var(--p-hair); border-radius:10px 0 0 10px; font-weight:700; letter-spacing:.01em;}
.profile-h2h-table td:last-child{border-right:1px solid var(--p-hair); border-radius:0 10px 10px 0; color:var(--muted); font-variant-numeric:tabular-nums;}
.profile-h2h-table td:nth-child(2){font-variant-numeric:tabular-nums; letter-spacing:.04em; font-weight:600;}
.profile-h2h-table tr:hover{transform:none;}
.profile-h2h-table tr:hover td{background:color-mix(in srgb, var(--gold) 6%, var(--panel-2)); box-shadow:none; border-color:color-mix(in srgb, var(--gold) 28%, var(--line));}
.profile-h2h-table td.pname{cursor:pointer;}
.profile-h2h-table td.pname:hover{color:var(--gold);}

.profile-empty{
  display:flex; align-items:center; gap:12px; padding:18px; border-radius:12px;
  border:1px dashed color-mix(in srgb, var(--line) 85%, var(--text)); background:rgba(0,0,0,.18);
  color:var(--muted); font-size:13.5px;
}
.profile-empty .ic{width:20px; height:20px; vertical-align:0; opacity:.7;}

/* ============================ ACHIEVEMENTS ============================ */
.profile-badge-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(128px, 1fr)); gap:10px; margin-bottom:4px;}
.profile-badge-item{
  --tier:var(--gold);
  position:relative; overflow:hidden; display:flex; flex-direction:column; align-items:flex-start; text-align:left; gap:3px;
  padding:16px 16px 15px; border-radius:var(--p-radius);
  background:var(--p-card); border:1px solid var(--p-hair); box-shadow:none;
  transition:transform .18s ease, border-color .18s ease;
}
.profile-badge-item.tier-bronze{--tier:#c98a4b;}
.profile-badge-item.tier-silver{--tier:#b9c2cc;}
.profile-badge-item.tier-gold{--tier:#e6c453;}
.profile-badge-icon{
  width:44px; height:44px; margin-bottom:10px; border-radius:12px;
  display:flex; align-items:center; justify-content:center; font-size:22px; filter:none;
  color:var(--muted); background:rgba(0,0,0,.28); border:1px solid var(--p-hair);
}
.profile-badge-icon .ic{width:22px; height:22px; vertical-align:0;}
.profile-badge-label{font-size:13.5px; font-weight:800; letter-spacing:.01em; color:var(--text);}
.profile-badge-sub{font-size:11.5px; color:var(--muted); line-height:1.35;}
.profile-badge-item.earned{
  border-color:color-mix(in srgb, var(--tier) 50%, var(--line));
  background:linear-gradient(160deg, color-mix(in srgb, var(--tier) 13%, var(--panel-2)), var(--panel-2) 70%);
}
.profile-badge-item.earned::before,
.profile-badge-item.earned::after{content:none;}
.profile-badge-item.earned .profile-badge-icon{
  color:var(--tier); border-color:color-mix(in srgb, var(--tier) 55%, transparent);
  background:color-mix(in srgb, var(--tier) 14%, rgba(0,0,0,.3));
}
.profile-badge-item.earned .profile-badge-sub{color:color-mix(in srgb, var(--tier) 75%, var(--text));}
.profile-badge-item.earned:hover{transform:translateY(-2px); box-shadow:none;}
.profile-badge-item.locked{opacity:.62; filter:none;}
.profile-badge-item.locked .profile-badge-label{color:color-mix(in srgb, var(--text) 70%, var(--muted));}
.profile-badge-item.locked::after{content:none;}

/* ============================ MESSAGES ============================ */
.profile-messages-empty{
  display:flex; align-items:center; gap:12px; padding:18px; border-radius:12px; color:var(--muted); font-size:13.5px;
  border:1px dashed color-mix(in srgb, var(--line) 85%, var(--text)); background:rgba(0,0,0,.18);
}
.profile-msg-row{
  position:relative; display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer;
  padding:13px 14px 13px 16px; border-radius:12px;
  background:var(--p-card); border:1px solid var(--p-hair);
  transition:border-color .16s ease, background .16s ease, transform .16s ease;
}
.profile-msg-row::before{
  content:""; position:absolute; left:0; top:22%; bottom:22%; width:3px; border-radius:0 3px 3px 0; background:var(--gold); opacity:0; transition:opacity .16s ease;
}
.profile-msg-row::after{
  content:""; width:16px; height:16px; flex-shrink:0; background:var(--muted);
  -webkit-mask:var(--ic-chevron) center/contain no-repeat; mask:var(--ic-chevron) center/contain no-repeat; transition:transform .16s ease, background .16s ease;
}
.profile-msg-row:hover{border-color:color-mix(in srgb, var(--gold) 40%, var(--line)); background:color-mix(in srgb, var(--gold) 5%, var(--panel-2)); transform:none; box-shadow:none;}
.profile-msg-row:hover::before{opacity:1;}
.profile-msg-row:hover::after{background:var(--gold); transform:translateX(2px);}
.profile-msg-row + .profile-msg-row{margin-top:8px;}
.profile-msg-who{display:flex; flex-direction:column; gap:3px; min-width:0; margin-right:auto;}
.profile-msg-who b{font-size:14px; font-weight:700; display:flex; align-items:center; gap:7px;}
.profile-msg-who span{font-size:12.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%;}
.profile-modal .friend-unread-badge{flex-shrink:0;}

/* ============================ SETTINGS ============================ */
.profile-settings-grid{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; align-items:start;}
.profile-card{
  min-width:0; padding:18px 18px 20px; border-radius:var(--p-radius);
  background:var(--p-card); border:1px solid var(--p-hair);
}
.profile-card.is-wide{grid-column:1 / -1;}
.profile-card .profile-section-title{margin:0 0 6px; font-size:18px;}
.profile-hint{color:var(--muted); font-size:12.5px; line-height:1.55; margin:0 0 14px;}
.profile-card .friends-add-row{display:flex; align-items:center; gap:8px; margin:0 0 6px;}
.profile-card .friends-add-row input, .social-input-row input{margin:0 !important; width:auto;}
.profile-card .friends-add-row input{flex:1; min-width:0;}
.profile-card input[type="password"]{width:100%; margin-bottom:8px;}
.profile-card .error{margin-bottom:10px;}
.profile-card .save-status{min-height:0;}
.profile-modal .admin-btn{
  border-radius:9px; font-weight:700; letter-spacing:.03em;
  transition:transform .15s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.profile-modal .admin-btn:hover{transform:translateY(-1px);}
.profile-modal .admin-btn.primary{
  background:var(--gold); border-color:var(--gold); color:var(--on-gold, #0a0e0b); box-shadow:none;
}
.profile-modal .admin-btn.primary:hover{background:var(--gold-hover); border-color:var(--gold-hover); box-shadow:none;}
.profile-modal .admin-btn:disabled{opacity:.5; cursor:not-allowed; transform:none;}
.profile-modal input[type="text"], .profile-modal input[type="password"]{
  border-radius:9px; background:rgba(0,0,0,.32); border:1px solid color-mix(in srgb, var(--line) 85%, var(--text)); padding:10px 12px;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.profile-modal input[type="text"]:focus, .profile-modal input[type="password"]:focus{
  outline:none; border-color:var(--gold); box-shadow:0 0 0 3px color-mix(in srgb, var(--gold) 20%, transparent);
}
.color-swatch-grid{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px;}
.color-swatch-btn{
  width:32px; height:32px; border-radius:9px; border:2px solid transparent; padding:0; cursor:pointer; position:relative;
  box-shadow:0 3px 8px -3px rgba(0,0,0,.7); transition:transform .15s ease, border-color .15s ease;
}
.color-swatch-btn:hover{transform:translateY(-2px);}
.color-swatch-btn.selected{border-color:var(--text); box-shadow:0 0 0 3px color-mix(in srgb, var(--text) 16%, transparent);}
.color-swatch-btn.selected::after{
  content:""; position:absolute; inset:0; margin:auto; width:15px; height:15px; background:#fff;
  -webkit-mask:var(--ic-check) center/contain no-repeat; mask:var(--ic-check) center/contain no-repeat;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.6));
}
.color-custom-row{display:flex; align-items:center; gap:10px;}
.color-custom-row label{font-size:12.5px; color:var(--muted);}
.color-custom-row input[type="color"]{width:42px; height:32px; border-radius:9px; border:1px solid var(--line); background:none; cursor:pointer; padding:2px;}
.social-input-row{display:flex; align-items:center; gap:10px; margin-bottom:8px;}
.social-input-row img{width:26px; height:26px; border-radius:8px; flex-shrink:0; object-fit:cover;}
.social-input-row input{flex:1; min-width:0;}

.profile-card.is-danger{
  border-color:color-mix(in srgb, var(--red) 38%, var(--line));
  background:linear-gradient(160deg, color-mix(in srgb, var(--red) 8%, var(--panel-2)), var(--panel-2));
}
.profile-card.is-danger .profile-section-title{color:var(--red);}
.profile-card.is-danger .pst-glyph{color:var(--red); background:color-mix(in srgb, var(--red) 14%, transparent); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--red) 35%, transparent);}
.profile-modal .admin-btn.danger{background:color-mix(in srgb, var(--red) 12%, transparent); border-color:color-mix(in srgb, var(--red) 55%, var(--line)); color:var(--red);}
.profile-modal .admin-btn.danger:hover{background:var(--red); color:#fff; border-color:var(--red);}
.profile-delete-actions{display:flex; gap:8px; flex-wrap:wrap;}

/* login prompt shown to logged-out visitors (markup lives in router.js) */
.profile-login-prompt{
  position:relative; overflow:hidden; max-width:440px; margin:0 auto; padding:44px 28px; text-align:center; color:var(--muted);
  background:radial-gradient(120% 160% at 15% -20%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 60%), var(--panel);
  border:1px solid color-mix(in srgb, var(--gold) 24%, var(--line)); border-radius:20px; box-shadow:var(--shadow-panel);
}
.profile-login-prompt::before{
  content:""; display:block; width:54px; height:54px; margin:0 auto 16px; border-radius:15px;
  background:color-mix(in srgb, var(--gold) 14%, transparent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--gold) 32%, transparent);
}
.profile-login-prompt::after{
  content:""; position:absolute; top:56px; left:50%; width:24px; height:24px; margin-left:-12px; background:var(--gold);
  -webkit-mask:var(--ic-lock) center/contain no-repeat; mask:var(--ic-lock) center/contain no-repeat;
}
.profile-login-prompt p{margin-bottom:18px; font-size:14.5px; line-height:1.6;}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 960px){
  .profile-head{grid-template-columns:auto minmax(0,1fr); gap:22px;}
  .profile-hero-stats{grid-column:1 / -1; grid-template-columns:repeat(3, minmax(0,1fr));}
  .profile-body{grid-template-columns:184px minmax(0,1fr); gap:22px; padding:24px 24px 28px;}
}
@media (max-width: 760px){
  .profile-body{grid-template-columns:minmax(0,1fr); gap:20px; padding:18px 16px 24px;}
  .profile-tabs{
    grid-column:1; grid-row:auto; position:sticky; top:8px; z-index:4; flex-direction:row; gap:4px; padding:5px;
    overflow-x:auto; scrollbar-width:none; backdrop-filter:blur(10px);
    background:color-mix(in srgb, var(--panel-2) 90%, transparent);
  }
  .profile-tabs::-webkit-scrollbar{display:none;}
  .profile-tab-btn{flex:1 1 0; min-width:0; width:auto; flex-direction:column; justify-content:center; gap:5px; padding:9px 2px 8px; font-size:11.5px; letter-spacing:.03em; text-align:center; overflow:hidden; text-overflow:ellipsis;}
  .profile-tab-btn::before{width:19px; height:19px;}
  .profile-tab-btn.active::after{left:22%; right:22%; top:auto; bottom:0; width:auto; height:2px; border-radius:2px 2px 0 0;}
  .profile-tab-badge{position:absolute; top:4px; right:6px; margin:0;}
  .profile-tab-panel{grid-column:1; grid-row:auto;}
  .profile-settings-grid{grid-template-columns:minmax(0,1fr);}
}
@media (max-width: 560px){
  .profile-head{grid-template-columns:minmax(0,1fr); justify-items:center; text-align:center; padding:28px 18px 22px; gap:18px;}
  .profile-badge-wrap, .profile-badge{width:104px; height:104px;}
  .profile-name-row{justify-content:center;}
  .profile-name{font-size:38px;}
  .profile-meta-row, .profile-head-actions, .profile-social-links{justify-content:center;}
  .profile-head-info{width:100%;}
  .profile-hero-stats{width:100%; gap:6px;}
  .profile-hero-stat{padding:11px 10px 9px; min-width:0; text-align:left;}
  .profile-hero-stat b{font-size:27px;}
  .profile-hero-stat .ic{top:9px; right:8px;}
  .profile-stat-grid{grid-template-columns:repeat(2, minmax(0,1fr));}
  .profile-badge-grid{grid-template-columns:repeat(2, minmax(0,1fr));}
  .xp-bar-label{flex-direction:column; align-items:flex-start; gap:4px;}
}
@media (prefers-reduced-motion: reduce){
  .profile-tab-panel{animation:none;}
  .profile-modal *{transition:none !important;}
}
@media (max-width: 420px){
  .profile-tab-btn{font-size:10.5px; letter-spacing:.01em;}
}
