/* ============================================================================
   PROFILE - the rebuilt self / member page, juicewrld.io-style
   ========================================================================== */

:root{
  --pv-glass:linear-gradient(180deg,rgba(22,22,36,.72),rgba(15,16,28,.78));
  --pv-border:rgba(255,255,255,.1);
  --pv-border-soft:rgba(255,255,255,.07);
  --pv-text:#f4f2ff;
  --pv-mute:rgba(244,242,255,.62);
  --pv-faint:rgba(244,242,255,.4);
  --pv-gold:#fcd34d;
  --pv-gold-2:#d4a574;
}

/* ---------- shell ---------- */
#profile-page .ac-main{max-width:1180px !important;margin:0 auto !important;padding:0 !important;width:100%}
.pv2-page{
  display:block !important;
  grid-template-columns:none !important;
  gap:0 !important;
  align-items:stretch !important;
  width:100%;
  max-width:1180px;
  margin:0 auto;
  padding:96px 18px 72px;
  color:var(--pv-text);
  font-family:"Sora",ui-sans-serif,system-ui,sans-serif;
  box-sizing:border-box;
}
#profilePageBody,
.profile-v2-mount{display:block !important;grid-template-columns:none !important;gap:0 !important;align-items:stretch !important;width:100%}
.pv2-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
@media (min-width:1100px){.pv2-grid{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr)}}
@media (max-width:640px){.pv2-page{padding:80px 10px 48px}}

.pv2-card{
  background:var(--pv-glass);
  border:1px solid var(--pv-border);
  border-radius:20px;
  padding:20px;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:0 18px 48px rgba(0,0,0,.38);
  min-width:0;
}

/* ---------- page head ---------- */
.pv2-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:16px}
.pv2-title{margin:0;font-size:clamp(30px,6vw,44px);font-weight:900;letter-spacing:-.02em;color:#fff}
.pv2-sub{margin:2px 0 0;font-size:13px;color:var(--pv-mute)}
.pv2-link{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:10px;border:1px solid var(--pv-border);background:rgba(255,255,255,.05);color:var(--pv-text);font-size:12px;font-weight:700;cursor:pointer;text-decoration:none;font-family:inherit;white-space:nowrap;transition:background .15s,border-color .15s}
.pv2-link:hover{background:rgba(255,255,255,.09)}
@media (max-width:640px){.pv2-head{flex-wrap:wrap;align-items:flex-start}}

/* ---------- hero (span all) ---------- */
.pv2-hero{position:relative;overflow:hidden;border-radius:20px;border:1px solid var(--pv-border);min-height:230px;box-shadow:0 26px 60px rgba(0,0,0,.4)}
.pv2-hero-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.55}
.pv2-hero-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(6,8,16,.15) 0%,rgba(6,8,16,.42) 40%,rgba(6,8,16,.93) 100%)}
.pv2-hero-inner{position:relative;display:flex;flex-direction:column;height:100%;padding:22px}
.pv2-hero-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.pv2-era-label{font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:rgba(244,242,255,.55);font-weight:800}
.pv2-era-name{font-size:15px;font-weight:800;color:#fff;letter-spacing:-.01em;margin-top:2px}
.pv2-hero-mid{display:flex;align-items:flex-end;gap:18px;margin-top:auto;padding-top:26px}
.pv2-avatar-wrap{position:relative;flex:0 0 auto}
.pv2-avatar{width:104px;height:104px;border-radius:50%;object-fit:cover;border:3px solid rgba(255,255,255,.22);box-shadow:0 12px 40px rgba(0,0,0,.55);background:#0f0f1e}
.pv2-avatar-fallback{width:104px;height:104px;border-radius:50%;display:grid;place-items:center;font-size:38px;font-weight:800;color:#0f0f1e;background:linear-gradient(135deg,#fcd34d,#d4a574);border:3px solid rgba(255,255,255,.3)}
.pv2-dot{position:absolute;right:8px;bottom:8px;width:16px;height:16px;border-radius:50%;border:3px solid #06070f;background:#10b981}
.pv2-meta{min-width:0;flex:1;position:relative;z-index:1}
.pv2-name{margin:0;font-size:clamp(20px,4.6vw,28px);font-weight:900;letter-spacing:-.02em;text-shadow:0 4px 22px rgba(0,0,0,.6)}
.pv2-handle{color:rgba(244,242,255,.72);font-size:13px;font-weight:600;margin-top:3px}
.pv2-joined{color:var(--pv-mute);font-size:12px;margin-top:6px}
.pv2-era-chip{display:inline-flex;align-items:center;gap:6px;margin-top:10px;padding:5px 11px;border-radius:999px;background:rgba(6,7,15,.5);border:1px solid rgba(255,255,255,.18);font-size:11px;font-weight:700;color:#fff;backdrop-filter:blur(4px)}
.pv2-era-chip i{color:var(--pv-gold)}
.pv2-hero-actions{display:flex;gap:8px;margin-top:12px}
.pv2-mini-btn{display:inline-flex;align-items:center;gap:7px;padding:9px 13px;border-radius:9px;background:rgba(6,7,15,.55);border:1px solid rgba(255,255,255,.16);color:var(--pv-text);font-size:12px;font-weight:700;cursor:pointer;backdrop-filter:blur(6px);font-family:inherit}
.pv2-mini-btn:hover{background:rgba(6,7,15,.75)}
@media (max-width:720px){.pv2-hero-mid{flex-direction:column;align-items:flex-start;gap:12px}.pv2-avatar{width:88px;height:88px}.pv2-avatar-fallback{width:88px;height:88px;font-size:30px}}

/* ---------- banner stats strip ---------- */
.pv2-strip{display:flex;flex-wrap:wrap;gap:0;border-top:1px solid var(--pv-border-soft);margin-top:16px}
.pv2-strip>div{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:110px;padding:12px 14px;flex:1}
.pv2-strip>div+div{border-left:1px solid var(--pv-border-soft)}
.pv2-strip b{font-size:20px;font-weight:800;color:#fff;letter-spacing:-.01em}
.pv2-strip span{font-size:11px;color:var(--pv-mute);text-transform:uppercase;letter-spacing:.12em;font-weight:700}
@media (max-width:560px){.pv2-strip>div{min-width:33%}.pv2-strip>div+div{border-left:none}}

/* ---------- cards / common ---------- */
.pv2-card-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.pv2-card-title{margin:0;font-size:13px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--pv-mute);display:flex;align-items:center;gap:8px}
.pv2-card-title i{color:var(--pv-gold)}
.pv2-card-note{margin:0;font-size:11px;color:var(--pv-faint)}
.pv2-none{font-size:12.5px;color:var(--pv-faint);padding:18px 8px;text-align:center}

/* ---------- level ---------- */
.pv2-levelrow{display:flex;align-items:center;gap:16px}
.pv2-level-badge{display:flex;flex-direction:column;align-items:center;justify-content:center;width:84px;height:84px;border-radius:20px;background:radial-gradient(100% 100% at 30% 0%,#4bb0e5 0%,#2563eb 100%);border:1px solid rgba(255,255,255,.35);box-shadow:0 10px 28px rgba(59,130,246,.4),inset 0 2px 0 rgba(255,255,255,.4)}
.pv2-level-badge b{font-size:34px;line-height:1;color:#04101c;font-weight:900;letter-spacing:-.03em}
.pv2-level-badge span{font-size:9px;letter-spacing:.18em;text-transform:uppercase;color:#031c2e;font-weight:800}
.pv2-level-meta{flex:1;min-width:0}
.pv2-level-top{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:6px}
.pv2-level-fan{font-size:12px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:var(--pv-gold)}
.pv2-level-xp{font-size:11px;color:var(--pv-mute)}
.pv2-level-bar{height:9px;border-radius:99px;background:rgba(255,255,255,.09);overflow:hidden}
.pv2-level-fill{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#fcd34d,#f59e0b);width:0;transition:width .9s ease}
.pv2-level-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}
.pv2-level-next{font-size:11px;color:var(--pv-mute)}
.pv2-xp-link{font-size:11px;color:var(--pv-gold-2);text-decoration:none;font-weight:700}
.pv2-xp-link:hover{text-decoration:underline}
@media (max-width:560px){.pv2-levelrow{gap:12px}.pv2-level-badge{width:72px;height:72px}.pv2-level-badge b{font-size:28px}}

/* ---------- achievements grid ---------- */
.pv2-ach-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:12px;margin-top:14px}
.pv2-ach{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 8px;border-radius:14px;border:1px solid var(--pv-border-soft);background:rgba(255,255,255,.03);text-align:center;transition:border-color .18s,background .18s;cursor:pointer;font-family:inherit}
.pv2-ach:hover{border-color:rgba(252,211,77,.35);background:rgba(252,211,77,.05)}
.pv2-ach:focus-visible{outline:2px solid var(--pv-gold);outline-offset:2px}
.pv2-ach i{font-size:22px;width:46px;height:46px;display:grid;place-items:center;border-radius:50%;border:1px solid var(--pv-border-soft);color:rgba(244,242,255,.3);background:rgba(255,255,255,.03)}
.pv2-ach small{font-size:9.5px;line-height:1.25;color:rgba(244,242,255,.55);font-weight:600;max-width:88px}
.pv2-ach.unlocked i{color:#0b0b1a;background:linear-gradient(135deg,#fcd34d,#f59e0b);border-color:rgba(252,211,77,.5);box-shadow:0 0 18px rgba(252,211,77,.3)}
.pv2-ach.unlocked small{color:#ffeaa3}
.pv2-ach.unlocked{border-color:rgba(252,211,77,.35);background:rgba(252,211,77,.06)}

/* ---------- top songs ---------- */
.pv2-top-list{display:flex;flex-direction:column;gap:6px}
.pv2-song{display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:12px;border:1px solid transparent;background:rgba(255,255,255,.03);transition:background .15s,border-color .15s;text-decoration:none;color:inherit;min-width:0}
a.pv2-song:hover{background:rgba(255,255,255,.06);border-color:var(--pv-border-soft)}
.pv2-rank{flex:0 0 18px;text-align:center;font-size:11px;font-weight:800;color:var(--pv-faint);font-variant-numeric:tabular-nums}
.pv2-song-cover{flex:0 0 46px;width:46px;height:46px;border-radius:8px;object-fit:cover;background:#0f0f1e}
.pv2-song-t{min-width:0;flex:1}
.pv2-song-title{font-size:13px;font-weight:800;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pv2-song-meta{display:flex;align-items:center;gap:8px;margin-top:2px;min-width:0}
.pv2-song-era{font-size:9px;letter-spacing:.13em;text-transform:uppercase;font-weight:800;color:var(--pv-faint);white-space:nowrap}
.pv2-song-prod{font-size:10.5px;color:var(--pv-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pv2-plays{flex:0 0 auto;font-size:12px;font-weight:800;color:rgba(244,242,255,.72);font-variant-numeric:tabular-nums}
.pv2-plays span{display:block;text-align:right;font-size:9px;color:var(--pv-faint);letter-spacing:.1em;text-transform:uppercase;font-weight:700}
@media (max-width:560px){.pv2-song-cover{flex-basis:40px;width:40px;height:40px}.pv2-song-prod{display:none}}

/* ---------- top eras ---------- */
.pv2-eras{display:flex;flex-direction:column;gap:10px}
.pv2-era-row{display:flex;align-items:center;gap:10px}
.pv2-era-num{flex:0 0 14px;font-size:10px;font-weight:800;color:var(--pv-faint)}
.pv2-era-art{flex:0 0 34px;width:34px;height:34px;border-radius:6px;object-fit:cover;background:#0f0f1e}
.pv2-era-body{flex:1;min-width:0}
.pv2-era-name-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.pv2-era-name-sm{font-size:11.5px;font-weight:800;color:var(--pv-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pv2-era-n{font-size:10px;color:var(--pv-faint)}
.pv2-era-bar{height:6px;border-radius:99px;background:rgba(255,255,255,.08);overflow:hidden;margin-top:4px}
.pv2-era-fill{display:block;height:100%;border-radius:99px;width:0;transition:width .9s ease}

/* ---------- recently played ---------- */
.pv2-recent{display:flex;gap:12px;overflow-x:auto;padding:4px 2px 12px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
.pv2-recent::-webkit-scrollbar{height:6px}
.pv2-recent::-webkit-scrollbar-thumb{background:rgba(255,255,255,.18);border-radius:99px}
.pv2-recent-item{flex:0 0 118px;scroll-snap-align:start;text-align:center;color:var(--pv-text);text-decoration:none}
.pv2-recent-art{width:118px;height:118px;border-radius:14px;object-fit:cover;border:1px solid var(--pv-border-soft);background:#0f0f1e}
.pv2-recent-t{margin-top:7px;font-size:11px;font-weight:700;line-height:1.3;color:rgba(244,242,255,.8);height:2.6em;overflow:hidden}

/* ---------- when they listen ---------- */
.pv2-hours{display:flex;align-items:flex-end;gap:3px;height:110px;padding:12px 0 6px}
.pv2-hr{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;height:100%}
.pv2-hr-bar{width:100%;border-radius:3px;background:rgba(252,211,77,.16);align-self:flex-end;transition:height .5s ease,background .3s}
.pv2-hr-bar.hot{background:linear-gradient(180deg,#fcd34d,#f59e0b)}
.pv2-hr-lb{font-size:9px;color:var(--pv-faint);font-variant-numeric:tabular-nums}
.pv2-hours-note{margin:4px 0 0;font-size:12px;color:var(--pv-mute)}
.pv2-hours-note b{color:#fff}

/* ---------- favourites collage ---------- */
.pv2-collage{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.pv2-collage img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px;border:1px solid var(--pv-border-soft);background:#0f0f1e}
@media (max-width:560px){.pv2-collage{grid-template-columns:repeat(3,1fr)}}

/* ---------- misc / responsive ---------- */
@media (max-width:1099px){.pv2-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
@media (max-width:720px){.pv2-grid{grid-template-columns:minmax(0,1fr)}}
.pv2-signin{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:40px 20px;min-height:62vh;text-align:center;width:100%;box-sizing:border-box}
.pv2-signin i{font-size:44px;color:var(--pv-gold);opacity:.85}
.pv2-signin h2{margin:0;font-size:22px;color:#fff;font-weight:800}
.pv2-signin p{margin:0;font-size:13px;color:var(--pv-mute);max-width:340px}
.pv2-copy-btn{position:absolute;top:14px;right:14px;z-index:2;width:38px;height:38px;display:grid;place-items:center;border-radius:10px;border:1px solid rgba(255,255,255,.22);background:rgba(6,7,15,.5);color:#fff;cursor:pointer;backdrop-filter:blur(6px)}
.pv2-copy-btn:hover{background:rgba(6,7,15,.72)}

/* ==========================================================================
   EDIT PROFILE - centred card (~880px), like the reference: preview rail + form
   ========================================================================== */
#editProfileModal.editpf-overlay{position:fixed;inset:0;z-index:420;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(5,3,12,.74);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
#editProfileModal.editpf-overlay.open{display:flex}
.editpf-shell{display:flex;flex-direction:column;width:min(880px,100%);max-height:min(88vh,860px);background:#1d1d21;border:1px solid rgba(255,255,255,.09);border-radius:18px;overflow:hidden;box-shadow:0 30px 80px rgba(0,0,0,.55);animation:editpf-in .18s ease}
@keyframes editpf-in{from{opacity:0;transform:translateY(14px) scale(.985)}to{opacity:1;transform:none}}
.editpf-topbar{display:flex;align-items:center;justify-content:space-between;padding:15px 20px;flex:0 0 auto}
.editpf-title{font-size:14.5px;font-weight:700;color:#fff;letter-spacing:.01em}
.editpf-close,.rank-close{width:32px;height:32px;border-radius:9px;border:0;background:transparent;color:rgba(255,255,255,.75);font-size:16px;cursor:pointer;transition:background .15s,color .15s}
.editpf-close:hover,.rank-close:hover{background:rgba(255,255,255,.08);color:#fff}
.editpf-panes{display:grid;grid-template-columns:245px minmax(0,1fr);flex:1 1 auto;min-height:0;gap:0;padding:0 20px 16px;overflow:hidden}

/* ---------- left rail: the preview card ---------- */
.editpf-rail{display:flex;min-height:0;padding-right:14px}
.editpf-preview-card{display:flex;flex-direction:column;width:100%;background:#242428;border:1px solid rgba(255,255,255,.09);border-radius:14px;overflow:hidden}
.editpf-banner{position:relative;flex:0 0 auto;height:112px;overflow:hidden}
.editpf-banner img{width:100%;height:100%;object-fit:cover;object-position:center 28%}
.editpf-banner-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(20,20,24,0) 34%,rgba(20,20,24,.68) 78%,#242428 100%)}
.editpf-banner-chip{position:absolute;top:10px;right:10px;display:flex;flex-direction:column;align-items:flex-end;text-align:right}
.editpf-banner-chip small{font-size:8.5px;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.82);text-shadow:0 1px 3px rgba(0,0,0,.8)}
.editpf-banner-chip b{font-size:11.5px;color:#fff;text-shadow:0 1px 4px rgba(0,0,0,.9)}
.editpf-preview-body{display:flex;flex-direction:column;align-items:flex-start;gap:0;padding:0 14px 12px;margin-top:-38px;flex:1 1 auto;min-height:0}
.editpf-avatar{position:relative;width:74px;height:74px;border-radius:50%;overflow:hidden;display:grid;place-items:center;font-size:26px;font-weight:800;color:#0b0b14;background:linear-gradient(135deg,#fcd34d,#d97706);border:2px solid #242428;box-shadow:0 6px 18px rgba(0,0,0,.45)}
.editpf-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.editpf-name{margin-top:9px;font-size:14.5px;color:#fff;font-weight:800;letter-spacing:.04em;font-family:"Unbounded","Sora",ui-sans-serif,sans-serif}
.editpf-handle-row{display:flex;gap:6px;align-items:baseline;margin-top:2px;flex-wrap:wrap}
.editpf-handle{font-size:10.5px;color:rgba(255,255,255,.55)}
.editpf-joined{font-size:10.5px;color:rgba(255,255,255,.55)}
.editpf-joined::before{content:"· Joined "}
.editpf-fav{display:inline-flex;align-items:center;gap:7px;margin-top:10px;padding:4px 9px 4px 4px;border-radius:8px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);color:#f4f2ff;font-size:10.5px;font-weight:600;max-width:100%}
.editpf-fav-art{width:22px;height:22px;border-radius:5px;object-fit:cover}
.editpf-fav span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.editpf-bio{margin:12px 0 0;font-size:11.5px;line-height:1.5;color:rgba(244,242,255,.72);white-space:pre-wrap;word-break:break-word}
.editpf-public-note{margin:0;border-top:1px solid rgba(255,255,255,.09);padding:11px 14px;font-size:10px;line-height:1.5;color:rgba(255,255,255,.55)}

/* ---------- right form (borderless, like the reference) ---------- */
.editpf-form{overflow-y:auto;min-height:0;padding:2px 2px 8px 0;display:flex;flex-direction:column;gap:16px;scrollbar-width:thin}
.editpf-field{display:flex;flex-direction:column;gap:7px}
.editpf-field-flat{gap:7px}
.editpf-label{font-size:11px;font-weight:600;color:#e8e8ec;letter-spacing:0;text-transform:none}
.editpf-label-plain{font-size:11px;font-weight:600;color:#e8e8ec}
.editpf-label-row{display:flex;align-items:center;justify-content:space-between}
.editpf-counter{font-size:11px;color:rgba(255,255,255,.5);font-variant-numeric:tabular-nums}
.editpf-caption{margin:0;font-size:10.5px;line-height:1.5;color:rgba(255,255,255,.5)}
.editpf-input{width:100%;box-sizing:border-box;background:#26262c;border:1px solid rgba(255,255,255,.08);border-radius:9px;padding:10px 12px;color:#f4f4f6;font-size:12.5px;font-family:inherit;outline:none;transition:border-color .15s, box-shadow .15s}
.editpf-input::placeholder{color:rgba(255,255,255,.32)}
.editpf-input:focus{border-color:rgba(255,255,255,.24);box-shadow:0 0 0 3px rgba(255,255,255,.05)}
.editpf-textarea{resize:vertical;min-height:78px;line-height:1.5}
.editpf-prefix{display:flex;align-items:stretch;border:1px solid rgba(255,255,255,.08);border-radius:9px;overflow:hidden;background:#26262c}
.editpf-prefix:focus-within{border-color:rgba(255,255,255,.24)}
.editpf-prefix-tag{display:flex;align-items:center;padding:0 12px;font-size:11px;color:rgba(255,255,255,.5);background:transparent;border-right:1px solid rgba(255,255,255,.1);white-space:nowrap;font-family:inherit;flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
.editpf-input-prefix{border:0;border-radius:0;background:transparent}
.editpf-input-prefix:focus{box-shadow:none}
.editpf-pic-row{display:flex;align-items:center;gap:16px}
.editpf-pic-preview{width:56px;height:56px;border-radius:50%;overflow:hidden;display:grid;place-items:center;font-size:22px;color:#0b0b14;background:linear-gradient(135deg,#fcd34d,#d97706);flex:0 0 auto}
.editpf-pic-preview img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.editpf-pic-actions{display:flex;gap:8px;align-items:center}
.editpf-upload{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:12px;font-weight:600;color:#dbe9ff;padding:9px 13px;border:1px solid rgba(120,180,255,.4);border-radius:9px;background:transparent;transition:background .15s,border-color .15s}
.editpf-upload:hover{background:rgba(94,158,255,.12);border-color:rgba(120,180,255,.65)}
.editpf-inline-clear{border:0;background:transparent;color:#8ecbff;cursor:pointer;font-size:inherit;padding:0;text-decoration:underline}
.editpf-inline-clear:hover{color:#bcdcff}
.editpf-link-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.editpf-link-save{width:38px;border:1px solid rgba(255,255,255,.09);border-radius:9px;background:#2c2c33;color:rgba(255,255,255,.8);cursor:pointer;font-size:13px;transition:background .15s,color .15s}
.editpf-link-save:hover{background:#35353d;color:#fff}
.editpf-links{display:flex;flex-direction:column;gap:6px}
.editpf-link-chip{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border-radius:9px;border:1px solid rgba(255,255,255,.07);background:rgba(255,255,255,.03);font-size:11.5px}
.editpf-link-chip b{color:#a8ccff;font-size:10px;text-transform:uppercase;letter-spacing:.07em;margin-right:8px}
.editpf-link-chip a{color:#8ecbff;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.editpf-link-chip button{border:0;background:transparent;color:rgba(244,242,255,.55);cursor:pointer;padding:4px}
.editpf-link-chip button:hover{color:#f87171}
.editpf-duo{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}

/* favourite song */
.editpf-fav-field{position:relative}
.editpf-fav-wrap{position:relative;display:flex;align-items:center}
.editpf-fav-mag{position:absolute;left:11px;font-size:11px;color:rgba(255,255,255,.4);pointer-events:none}
.editpf-input-icon{padding-left:30px}
.editpf-fav-results{position:absolute;z-index:5;left:0;right:0;bottom:calc(100% + 6px);max-height:230px;overflow-y:auto;background:#26262c;border:1px solid rgba(255,255,255,.13);border-radius:11px;box-shadow:0 18px 46px rgba(0,0,0,.6)}
.editpf-fav-results[hidden]{display:none}
.editpf-fav-opt{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:8px 11px;background:transparent;border:0;color:#e9e7f8;cursor:pointer;font-size:12px}
.editpf-fav-opt:hover{background:rgba(255,255,255,.07)}
.editpf-fav-opt small{color:var(--pv-mute);margin-left:auto;font-size:10.5px}
.editpf-fav-current{display:inline-flex;align-items:center;gap:8px;padding:7px 10px;border-radius:9px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.09);color:#f4f4f6;font-size:11.5px;width:max-content;max-width:100%}
.editpf-fav-current span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.editpf-fav-clear{border:0;background:transparent;color:inherit;cursor:pointer;padding:2px;opacity:.7}
.editpf-fav-clear:hover{opacity:1}
/* Scoped: never fight the site-wide .hidden/.md:flex pattern (nav pill). */\n.pv2-favsong.hidden,.pv2-bio.hidden,.pv2-now.hidden,.editpf-fav.hidden,.editpf-fav-current.hidden,.editpf-fav-results[hidden]{display:none !important}

/* public toggles (inside the form) */
.editpf-toggles{display:flex;flex-direction:column;gap:0}
.editpf-toggles .editpf-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 2px;border-top:1px solid rgba(255,255,255,.07)}
.editpf-toggle-meta b{display:block;font-size:12.5px;color:#fff;font-weight:600}
.editpf-toggle-meta span{display:block;font-size:10.5px;color:rgba(255,255,255,.52);margin-top:3px;line-height:1.45}
.editpf-switch{position:relative;flex:0 0 auto;width:40px;height:23px;border-radius:99px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.09);cursor:pointer;transition:background .18s,border-color .18s}
.editpf-switch .editpf-knob{position:absolute;top:2px;left:2px;width:17px;height:17px;border-radius:50%;background:#e8e8ec;transition:transform .18s cubic-bezier(.2,.8,.2,1)}
.editpf-switch.on{background:#2f81f7;border-color:rgba(47,129,247,.6)}
.editpf-switch.on .editpf-knob{transform:translateX(17px);background:#fff}

/* banner radio cards */
.editpf-banners{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.editpf-banner-card{position:relative;display:flex;align-items:center;gap:11px;cursor:pointer;border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:10px;background:#26262c;transition:border-color .15s}
.editpf-banner-card input{position:absolute;opacity:0;pointer-events:none}
.editpf-banner-card:hover{border-color:rgba(255,255,255,.2)}
.editpf-banner-card:has(input:checked){border-color:#58a6ff;box-shadow:0 0 0 1px #58a6ff}
.editpf-banner-art{flex:0 0 64px;height:64px;border-radius:8px;overflow:hidden}
.editpf-banner-art img{width:100%;height:100%;object-fit:cover}
.editpf-banner-trophy{flex:0 0 64px;height:64px;border-radius:8px;display:grid;place-items:center;background:#2e2e36;color:rgba(255,255,255,.65);font-size:17px}
.editpf-banner-text{display:flex;flex-direction:column;gap:1px;min-width:0}
.editpf-banner-sub{font-size:10px;color:rgba(255,255,255,.52)}
.editpf-banner-era{font-size:11.5px;color:#fff;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.editpf-banner-text b{font-size:12px;color:#fff}
.editpf-banner-check{position:absolute;top:8px;right:8px;width:19px;height:19px;border-radius:50%;display:grid;place-items:center;font-size:9px;color:#0b1526;background:#58a6ff;opacity:0;transform:scale(.6);transition:opacity .15s,transform .15s}
.editpf-banner-card:has(input:checked) .editpf-banner-check{opacity:1;transform:scale(1)}
.editpf-actions{display:flex;justify-content:flex-end;gap:10px;padding:13px 20px;border-top:1px solid rgba(255,255,255,.08);flex:0 0 auto}
.editpf-cancel{border:0;background:transparent;color:#8ecbff;font-size:12.5px;font-weight:600;cursor:pointer;padding:9px 14px;border-radius:9px}
.editpf-cancel:hover{background:rgba(142,203,255,.08)}
.editpf-save{border:0;background:#e8e8ec;color:#1d1d21;font-size:12.5px;font-weight:700;cursor:pointer;padding:9px 22px;border-radius:9px;transition:background .15s}
.editpf-save:hover{background:#fff}

@media (max-width:900px){
  #editProfileModal.editpf-overlay{padding:0;align-items:stretch}
  .editpf-shell{width:100%;max-height:none;height:100%;border-radius:0;border:0}
  .editpf-panes{grid-template-columns:minmax(0,1fr);overflow-y:auto;padding:0 16px 14px}
  .editpf-rail{padding-right:0;padding-bottom:14px}
  .editpf-preview-card{max-width:100%}
  .editpf-form{overflow:visible}
  .editpf-link-row{grid-template-columns:minmax(0,1fr) auto}
  .editpf-duo{grid-template-columns:minmax(0,1fr)}
  .editpf-banners{grid-template-columns:minmax(0,1fr)}
}

/* ==========================================================================
   RANK - "Your rank" centred panel, like the reference
   ========================================================================== */
#xpPanelModal.rank-overlay{position:fixed;inset:0;z-index:420;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(5,3,12,.74);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
#xpPanelModal.rank-overlay.open{display:flex}
.rank-shell{display:flex;flex-direction:column;width:min(510px,100%);max-height:min(88vh,780px);background:#1d1d21;border:1px solid rgba(255,255,255,.09);border-radius:16px;overflow:hidden;box-shadow:0 30px 80px rgba(0,0,0,.55);animation:editpf-in .18s ease}
.rank-head{display:flex;align-items:center;justify-content:space-between;padding:15px 18px 13px;flex:0 0 auto}
.rank-title{font-size:14px;font-weight:700;color:#fff}
.rank-close{width:32px;height:32px;border-radius:9px;border:1px solid rgba(96,165,250,.55);background:rgba(59,130,246,.14);color:#93c5fd;font-size:14px;cursor:pointer;transition:background .15s,color .15s}
.rank-close:hover{background:rgba(59,130,246,.24);color:#bfdbfe}
.rank-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;padding:2px 18px 18px;scrollbar-width:thin}

/* progress block */
.rank-progress{flex:0 0 auto;border-bottom:1px solid rgba(255,255,255,.07);padding-bottom:13px;margin-bottom:13px}
.rank-pill{display:inline-flex;align-items:center;gap:8px;padding:5px 11px;border-radius:8px;background:#2a2a31;font-size:11px;font-weight:600;color:#e8e8ec}
.rank-pill i{width:8px;height:8px;border-radius:50%;background:#f4f4f6}
.rank-bigrow{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-top:11px}
.rank-bigxp b{font-size:30px;line-height:1;color:#fff;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.rank-bigxp span{display:block;margin-top:4px;font-size:10px;color:rgba(255,255,255,.5)}
.rank-nextlevel{font-size:10.5px;color:rgba(255,255,255,.55);white-space:nowrap;padding-bottom:3px;font-variant-numeric:tabular-nums}
.rank-bar{height:6px;border-radius:99px;background:rgba(255,255,255,.08);overflow:hidden;margin-top:9px}
.rank-bar-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,#a78bfa,#60a5fa);transition:width .6s ease}
.rank-nextrank{display:flex;align-items:center;gap:8px;margin-top:12px;font-size:11px;color:rgba(255,255,255,.62)}
.rank-nextrank-dot{width:7px;height:7px;border-radius:50%;flex:0 0 auto;background:#fcd34d}
.rank-nextrank b{color:#fff;font-weight:600}
.rank-week{display:flex;align-items:baseline;gap:8px;margin-top:9px;font-size:11px;color:rgba(255,255,255,.62);font-variant-numeric:tabular-nums}
.rank-week b{color:#fff;font-weight:600}
.rank-signin{font-size:12.5px;color:rgba(255,255,255,.6)}
.rank-signin a{color:#8ecbff;text-decoration:none}

/* sections */
.rank-section-title{margin:0 0 9px;font-size:11px;font-weight:700;color:#e8e8ec}
.rank-group{margin-bottom:13px}
.rank-group h5{margin:0 0 2px;font-size:10.5px;font-weight:600;color:rgba(255,255,255,.55)}
.rank-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:8px 0;border-top:1px solid rgba(255,255,255,.06)}
.rank-row:first-of-type{border-top:0}
.rank-row-text{min-width:0}
.rank-row-text b{display:block;font-size:11.5px;color:rgba(255,255,255,.92);font-weight:600}
.rank-row-text span{display:block;font-size:9.5px;color:rgba(255,255,255,.48);margin-top:2px;line-height:1.45}
.rank-row-value{flex:0 0 auto;font-size:11.5px;color:#fff;font-weight:600;font-variant-numeric:tabular-nums;padding-top:1px}
.rank-row-dim .rank-row-value{color:rgba(255,255,255,.35)}

.rank-fair{margin:2px 0 13px;font-size:10.5px;line-height:1.6;color:rgba(255,255,255,.55)}
.rank-ranks-cap{margin:0 0 9px;font-size:9.5px;color:rgba(255,255,255,.4)}
.rank-ladder{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:8px 14px}
.rank-rung{display:flex;align-items:center;gap:8px;font-size:11px;color:rgba(255,255,255,.7)}
.rank-dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto}
.rank-rung-name{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rank-rung-lvl{flex:1 1 auto;color:rgba(255,255,255,.4);font-size:9.5px;text-align:right;white-space:nowrap}
.rank-rung.current .rank-rung-name{color:#fff;font-weight:700}
.rank-rung-tag{flex:0 0 auto;font-size:8px;font-weight:800;letter-spacing:.08em;color:#0b1526;background:#58a6ff;border-radius:4px;padding:1px 4px}

@media (max-width:560px){
  #xpPanelModal.rank-overlay{padding:0;align-items:stretch}
  .rank-shell{width:100%;max-height:none;height:100%;border-radius:0;border:0}
}

/* ---------- favourite song chip (hero) ---------- */
.pv2-favsong{display:inline-flex;align-items:center;gap:8px;margin-top:10px;padding:6px 13px;border-radius:99px;border:1px solid rgba(252,211,77,.35);background:rgba(252,211,77,.1);color:#f5d67b;font-size:11.5px;font-weight:700;cursor:pointer;transition:background .15s,border-color .15s;max-width:100%}
.pv2-favsong:hover{background:rgba(252,211,77,.18);border-color:rgba(252,211,77,.55)}
.pv2-favsong span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv2-favsong:disabled{opacity:.7;cursor:default}
.pv2-favsong-play{font-size:9px;opacity:.8}

/* ---------- bio line (hero) ---------- */
.pv2-bio{margin:8px 0 0;font-size:13px;line-height:1.55;color:rgba(244,242,255,.82);max-width:520px;white-space:pre-wrap;word-break:break-word}

/* ---------- "listening now" - rich mini presence player ---------- */
.pv2-now{display:flex;align-items:stretch;gap:14px;margin:0 0 14px;padding:14px;border-radius:16px;border:1px solid rgba(52,211,153,.22);background:linear-gradient(90deg,rgba(16,185,129,.13),rgba(16,185,129,.04) 60%,transparent);overflow:hidden;position:relative}
.pv2-now-art-wrap{position:relative;flex:0 0 auto;display:flex;align-items:center}
.pv2-now-art{width:88px;height:88px;border-radius:12px;object-fit:cover;box-shadow:0 8px 22px rgba(0,0,0,.5)}
.pv2-eq{position:absolute;left:8px;bottom:8px;display:flex;align-items:flex-end;gap:2px;height:12px;padding:2px 5px;border-radius:6px;background:rgba(3,8,6,.66)}
.pv2-eq i{width:2.5px;border-radius:2px;background:#34d399;animation:pv2-eq-bounce 1.1s ease-in-out infinite}
.pv2-eq i:nth-child(1){animation-delay:0s;height:100%}
.pv2-eq i:nth-child(2){animation-delay:.28s;height:60%}
.pv2-eq i:nth-child(3){animation-delay:.56s;height:80%}
.pv2-eq i:nth-child(4){animation-delay:.14s;height:40%}
.pv2-eq.paused i{animation:none;transform:scaleY(.35)}
.pv2-now-body{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1 1 auto;justify-content:center}
.pv2-now-top{display:flex;align-items:center;gap:8px}
.pv2-now-live{display:inline-flex;align-items:center;gap:6px;font-size:9px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#34d399}
.pv2-eq-sm{display:inline-flex;align-items:flex-end;gap:2px;height:9px}
.pv2-eq-sm i{width:2px;border-radius:2px;background:#34d399;animation:pv2-eq-bounce 1.1s ease-in-out infinite}
.pv2-eq-sm i:nth-child(1){animation-delay:0s;height:100%}
.pv2-eq-sm i:nth-child(2){animation-delay:.3s;height:60%}
.pv2-eq-sm i:nth-child(3){animation-delay:.6s;height:80%}
.pv2-now-live.paused{color:rgba(244,242,255,.45)}
.pv2-now-live.paused .pv2-eq-sm i{animation:none;transform:scaleY(.4)}
.pv2-now-src{font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:var(--pv-faint)}
.pv2-now-title{font-size:13.5px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pv2-now-sub{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--pv-mute);white-space:nowrap;overflow:hidden}
.pv2-now-era{padding:1px 6px;border-radius:5px;background:rgba(252,211,77,.13);color:#fcd34d;font-size:9px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.pv2-now-bar{height:5px;border-radius:99px;background:rgba(255,255,255,.1);overflow:hidden;margin-top:2px}
.pv2-now-bar-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,#10b981,#34d399);transition:width .4s linear}
.pv2-now-time{display:flex;justify-content:space-between;font-size:9.5px;color:var(--pv-faint);font-variant-numeric:tabular-nums}
.pv2-now-play{flex:0 0 auto;align-self:center;display:inline-flex;align-items:center;gap:7px;padding:9px 14px;border-radius:11px;border:1px solid rgba(52,211,153,.4);background:rgba(16,185,129,.14);color:#34d399;font-size:11.5px;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .15s}
.pv2-now-play:hover{background:rgba(16,185,129,.24)}
.pv2-now-play:disabled{opacity:.45;cursor:default}
@media (max-width:560px){
  .pv2-now{flex-wrap:wrap}
  .pv2-now-art{width:64px;height:64px}
  .pv2-now-play{width:100%;justify-content:center;align-self:stretch}
}

/* ---------- DRP (Rich Presence) preview inside the Edit panel rail ---------- */
.editpf-drp{margin-top:12px;border-top:1px solid rgba(255,255,255,.09);padding-top:11px}
.editpf-drp-label{display:flex;align-items:center;gap:7px;font-size:9px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.5);margin-bottom:8px}
.editpf-drp-live{display:inline-flex;align-items:center;gap:4px;color:#f87171;font-size:8.5px}
.editpf-drp-live::before{content:"";width:5px;height:5px;border-radius:50%;background:#f87171;animation:pv2-eq-bounce 1s ease-in-out infinite}
.editpf-drp-card{display:flex;align-items:center;gap:10px;padding:9px;border-radius:11px;background:#1a1a1f;border:1px solid rgba(255,255,255,.08)}
.editpf-drp-art{width:52px;height:52px;border-radius:9px;object-fit:cover;flex:0 0 auto}
.editpf-drp-meta{display:flex;flex-direction:column;gap:2px;min-width:0}
.editpf-drp-meta b{font-size:11px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.editpf-drp-meta span{font-size:9.5px;color:rgba(255,255,255,.55);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.editpf-drp-site{color:rgba(255,255,255,.35) !important;letter-spacing:.06em;text-transform:uppercase;font-size:8px !important}
.editpf-drp-note{margin:8px 0 0;font-size:9.5px;line-height:1.5;color:rgba(255,255,255,.45)}

/* ---------- autosave state in the Edit panel footer ---------- */
.editpf-save-state{font-size:11px;color:var(--pv-mute);align-self:center;min-width:64px;text-align:right;transition:opacity .25s}
.editpf-save-state.ok{color:#34d399}
.editpf-save-state.busy{color:#fcd34d}

/* ---------- global scroll lock while any overlay owns the screen ---------- */
html.thw-scroll-locked,
html.thw-scroll-locked body{overflow:hidden !important;overscroll-behavior:none !important}

/* ---------- custom banner card art ---------- */
.editpf-banner-custom-art{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#2c2c33;color:rgba(255,255,255,.45);font-size:17px}
.editpf-banner-custom-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.editpf-banner-custom-art i{position:absolute}
.editpf-banner-custom-art img[hidden]{display:none}

/* ---------- achievements panel rows ---------- */
.ach-caption{margin:0 0 12px;font-size:10.5px;line-height:1.55;color:rgba(255,255,255,.55)}
.achievements-body{display:flex;flex-direction:column;gap:8px}
.ach-row{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:11px;border:1px solid rgba(255,255,255,.07);background:rgba(255,255,255,.03)}
.ach-row.unlocked{border-color:rgba(252,211,77,.28);background:rgba(252,211,77,.05)}
.ach-row-icon{flex:0 0 40px;height:40px;border-radius:11px;display:grid;place-items:center;font-size:17px;color:#cfcbe8;background:rgba(255,255,255,.06)}
.ach-row.unlocked .ach-row-icon{color:#0b0b1a;background:linear-gradient(135deg,#fcd34d,#f59e0b);box-shadow:0 0 16px rgba(252,211,77,.3)}
.ach-row-meta{flex:1 1 auto;min-width:0}
.ach-row-meta b{display:block;font-size:12px;color:#fff;font-weight:700}
.ach-row-meta span{display:block;font-size:10.5px;color:rgba(255,255,255,.55);margin-top:2px}
.ach-row-state{flex:0 0 auto;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:rgba(255,255,255,.35);display:inline-flex;align-items:center;gap:5px}
.ach-row-state i{font-size:11px}
.ach-row.unlocked .ach-row-state{color:#fcd34d}
