/* LVL V1.19.9G — persistent avatar commit/cancel + compact profile. Profile-only changes + notification icon centering; friendship controls preserved. */
#view-profile.lvl-profile-dashboard-1198g{--pd-purple:#913cff;--pd-purple2:#6b24df;--pd-line:#293144;--pd-card:#0b1019;--pd-muted:#8991a4}
#view-profile.lvl-profile-dashboard-1198g .profile-hero-v16{position:relative;overflow:hidden;display:grid;grid-template-columns:1.35fr .78fr 1fr;gap:14px;padding:27px 27px 22px;border:1px solid #2b3346;border-radius:22px;background:radial-gradient(circle at 84% 19%,rgba(132,48,255,.22),transparent 27%),linear-gradient(145deg,#111625,#090d15 76%);box-shadow:0 22px 68px rgba(0,0,0,.30),0 0 34px rgba(122,47,230,.09)}
#view-profile.lvl-profile-dashboard-1198g .profile-hero-v16:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 64% 20%,#8d35ff 0 2px,transparent 3px),radial-gradient(circle at 73% 35%,#6d28d8 0 2px,transparent 3px),radial-gradient(circle at 80% 16%,#bc72ff 0 1.5px,transparent 2.5px);pointer-events:none;opacity:.7}
#view-profile.lvl-profile-dashboard-1198g .profile-identity{position:relative;z-index:3;gap:20px;align-items:center;min-width:0}
#view-profile.lvl-profile-dashboard-1198g .account-avatar-large{width:126px;height:126px;border-radius:50%;font-size:58px;border:2px solid #9b4dff;background:radial-gradient(circle at 35% 30%,#6a35bd,#28114e 70%);box-shadow:0 0 34px rgba(139,63,244,.38)}
/* Smaller, functional avatar pencil. JS owns the click; CSS only sizes/positions it. */
#view-profile.lvl-profile-dashboard-1198g .profile-avatar-edit{width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;right:2px!important;bottom:5px!important;padding:0!important;display:grid!important;place-items:center!important;font-size:13px!important;line-height:1!important;border-radius:50%!important;background:linear-gradient(135deg,#a246ff,#6c25dc)!important;border:1px solid rgba(255,255,255,.12)!important;color:#fff!important;box-shadow:0 6px 18px rgba(109,35,218,.30)!important;z-index:8!important;cursor:pointer!important;pointer-events:auto!important}
#view-profile.lvl-profile-dashboard-1198g .profile-identity h2{font-size:34px;margin:4px 0 3px;letter-spacing:-.035em}#view-profile.lvl-profile-dashboard-1198g #accountRoleBadge{font-size:10px;letter-spacing:.14em;color:#b455ff}#view-profile.lvl-profile-dashboard-1198g #accountPublicHandle{font-size:15px;color:#b85cff;font-weight:850}#view-profile.lvl-profile-dashboard-1198g #accountCreated{font-size:10px;color:#8a91a1}
/* Level + plan are true equal-height grid items. Plan is intentionally minimal: label, plan name, CTA. */
#view-profile.lvl-profile-dashboard-1198g .profile-level-card,#view-profile.lvl-profile-dashboard-1198g .profile-plan-card{position:relative;z-index:3;align-self:stretch!important;min-height:146px;height:100%;border:1px solid #2b3345;background:rgba(10,15,24,.94);border-radius:16px;padding:17px 18px;display:flex;flex-direction:column;box-sizing:border-box}
#view-profile.lvl-profile-dashboard-1198g .profile-level-card>span,#view-profile.lvl-profile-dashboard-1198g .profile-plan-card>span{font-size:9px;color:#8991a4}#view-profile.lvl-profile-dashboard-1198g .profile-level-card strong,#view-profile.lvl-profile-dashboard-1198g .profile-plan-card strong{font-size:22px;line-height:1.08}
#view-profile.lvl-profile-dashboard-1198g .profile-level-card .progress{margin-top:auto}
#view-profile.lvl-profile-dashboard-1198g #profilePlanCaption,#view-profile.lvl-profile-dashboard-1198g .profile-plan-slots{display:none!important}
#view-profile.lvl-profile-dashboard-1198g .profile-plan-card .btn{width:auto!important;min-width:0!important;height:36px!important;min-height:36px!important;align-self:flex-start!important;margin-top:auto!important;padding:0 16px!important;border-radius:9px!important;font-size:11px!important;background:linear-gradient(135deg,#913cff,#6822da)!important;box-shadow:none!important}
.lvl-pd-xp-caption{display:block;margin-top:8px!important;color:#858da0!important;line-height:1.25}.lvl-pd-xp-caption b{display:block;color:#a75cff;font-size:11px}.lvl-pd-xp-caption span{font-size:9px}
.lvl-pd-mountain{position:absolute;right:-1%;top:13%;width:43%;height:56%;opacity:.76;pointer-events:none;z-index:1;clip-path:polygon(3% 87%,20% 62%,32% 73%,51% 31%,60% 49%,72% 14%,82% 49%,94% 36%,100% 100%,0 100%);background:linear-gradient(155deg,rgba(171,84,255,.78),rgba(81,20,190,.20) 48%,rgba(34,17,82,.12));filter:drop-shadow(0 0 19px rgba(132,55,245,.38))}.lvl-pd-mountain:after{content:"";position:absolute;inset:24% 0 0;background:repeating-linear-gradient(164deg,transparent 0 13px,rgba(181,108,255,.18) 14px 15px);clip-path:inherit}
.lvl-pd-hero-edit{position:absolute;right:20px;top:18px;z-index:5;border:1px solid #343b4d;background:rgba(11,16,25,.90);color:#f2f3f8;border-radius:11px;padding:10px 14px;font-size:11px;font-weight:800;cursor:pointer}.lvl-pd-hero-edit span{margin-right:6px}.lvl-pd-hero-edit.active{border-color:#6c39aa;color:#dfc3ff}
/* Existing account editor is moved, not cloned: IDs/listeners/username owner remain intact. */
#view-profile.lvl-profile-dashboard-1198g>.profile-tabs-v16,#view-profile.lvl-profile-dashboard-1198g>.profile-tab-panel{display:none!important}.lvl-pd-inline-account{margin:10px 0 0}.lvl-pd-inline-account[hidden]{display:none!important}.lvl-pd-inline-account .account-settings-card{width:100%;margin:0!important;box-sizing:border-box}.lvl-pd-inline-account .profile-snapshot{display:none!important}
#lvlSocialProfileSettings{display:none!important}.lvl-pd-public-card{margin:10px 0 0;border:1px solid #293144;background:linear-gradient(180deg,rgba(126,62,232,.055),rgba(8,12,19,.985));border-radius:18px;padding:17px 20px;box-shadow:0 16px 42px rgba(0,0,0,.15)}
/* Explicitly suppress old dashboard add-ons if a stale DOM survives a hot navigation. */
#lvlPdLearning,#lvlPdAchievements,#view-profile.lvl-profile-dashboard-1198g .profile-snapshot{display:none!important}
.lvl-pd-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.lvl-pd-section-head>div{display:grid;gap:3px}.lvl-pd-section-head>div>span{font-size:11px;letter-spacing:.105em;color:#bc51ff;font-weight:900}.lvl-pd-section-head>div>small{font-size:10px;color:#8991a4}.lvl-pd-section-head>button{border:1px solid #63399d;background:rgba(126,62,232,.09);color:#d8baff;border-radius:10px;padding:8px 14px;font-weight:850;font-size:10px;cursor:pointer}
.lvl-pd-summary{display:grid;gap:10px;margin-top:13px}.lvl-pd-summary-group{min-width:0}.lvl-pd-summary-group+.lvl-pd-summary-group{border-top:1px solid #242a38;padding-top:10px}.lvl-pd-summary-group small{display:block;color:#7d8493;font-size:8px;font-weight:900;letter-spacing:.08em;margin-bottom:6px}.lvl-pd-chips{display:flex;flex-wrap:wrap;gap:7px}.lvl-pd-chip{display:inline-flex;align-items:center;gap:3px;border:1px solid rgba(111,137,180,.31);background:rgba(31,47,72,.17);border-radius:999px;padding:6px 11px;color:#d8e8ff;font-size:9.5px;font-weight:760}.lvl-pd-chip b{color:#f0e8ff}.lvl-pd-chip.interest{border-color:rgba(147,68,245,.40);color:#dcbcff;background:rgba(112,39,213,.08)}.lvl-pd-chip.language{border-color:rgba(90,211,181,.22)}.lvl-pd-chip button{border:0;background:none;color:#a990cb}.lvl-pd-muted,.lvl-pd-loading{font-size:10px;color:#737b8c}.lvl-pd-loading.error{color:#ff9aa6}.lvl-pd-add-inline{border:1px dashed #454d60;background:transparent;color:#9aa2b4;border-radius:999px;padding:6px 10px;font-size:9px}
.lvl-pd-editor{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px;padding-top:14px;border-top:1px solid #283040}.lvl-pd-editor section{border:1px solid #272d3a;background:#0d1016;border-radius:13px;padding:12px;min-width:0}.lvl-pd-editor-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.lvl-pd-editor-head button,.lvl-pd-suggestions button{border:1px solid #4f396f;background:#12151d;color:#cdb4f5;border-radius:9px;padding:6px 8px;font-size:9px;font-weight:800}.lvl-pd-language-list{display:grid;gap:6px}.lvl-pd-language-row{display:grid;grid-template-columns:minmax(0,1fr) 108px 32px;gap:6px}.lvl-pd-language-row input,.lvl-pd-language-row select,.lvl-pd-interest-input input{width:100%;min-width:0;border:1px solid #2a3040;background:#10131a;color:#f2f3f7;border-radius:9px;padding:9px 10px;font:inherit;font-size:10px;outline:none}.lvl-pd-remove{border:1px solid #343946;background:#12151d;color:#a1a8b6;border-radius:9px}.lvl-pd-interest-input{display:flex;align-items:center;border:1px solid #2a3040;background:#10131a;border-radius:9px;padding-left:9px;color:#b471ff;margin:8px 0}.lvl-pd-interest-input input{border:0!important;background:transparent!important}.lvl-pd-suggestions,.lvl-pd-selected{display:flex;flex-wrap:wrap;gap:5px}.lvl-pd-selected{margin-top:7px}.lvl-pd-editor-actions{grid-column:1/-1;display:flex;justify-content:flex-end;align-items:center;gap:10px}.lvl-pd-editor-actions span{font-size:10px;color:#72d9b8}.lvl-pd-editor-actions span.error{color:#ff929f}.lvl-pd-editor-actions button{border:1px solid #823df2;background:linear-gradient(135deg,#8c34ff,#6c27dc);color:#fff;border-radius:10px;padding:10px 18px;font-weight:900}
/* Notification bell centered inside its own square; unread dot positioning remains absolute and untouched. */
.notification-wrap{display:grid!important;place-items:center!important}.notification-wrap .notification-btn{display:grid!important;place-items:center!important;padding:0!important;line-height:1!important}.notification-wrap .notification-bell{display:grid!important;place-items:center!important;margin:0!important;transform:none!important}.notification-wrap .notification-bell svg{display:block!important;margin:0!important}
/* Friendship styles preserved from 1198F. */
.lvl-pd-friend-controls{display:flex;flex-wrap:wrap;gap:8px;order:-5}.lvl-pd-friend-btn,.lvl-pd-friend-state{border:1px solid #343b4b;background:#111620;color:#e8ebf2;border-radius:10px;padding:9px 13px;font-size:10px;font-weight:850}.lvl-pd-friend-btn.primary{border-color:#7b39d9;background:linear-gradient(135deg,#8e36ff,#6824db);color:#fff}.lvl-pd-friend-btn.ghost{border-color:#47355f;color:#cdb5ef;background:#11151e}.lvl-pd-friend-state{border-color:#315947;color:#83dfbe;background:rgba(36,112,83,.10)}.lvl-pd-friend-state.sent{color:#c8a6ff;border-color:#5c3b86;background:rgba(116,57,184,.09)}.lvl-pd-friend-state.error{color:#ff9aa7;border-color:#6b3540;background:rgba(123,44,56,.09)}
.lvl-pd-friend-toast,.lvl-pd-profile-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:99999;background:#11151d;border:1px solid #315947;color:#8be7c4;border-radius:12px;padding:11px 15px;font-size:11px;font-weight:850;box-shadow:0 12px 35px rgba(0,0,0,.35)}.lvl-pd-friend-toast.error,.lvl-pd-profile-toast.error{border-color:#6b3540;color:#ff9aa7}
@media(max-width:760px){
  #view-profile.lvl-profile-dashboard-1198g .profile-hero-v16{grid-template-columns:1fr 1fr;padding:17px 15px 15px;gap:9px;border-radius:18px}
  #view-profile.lvl-profile-dashboard-1198g .profile-identity{grid-column:1/-1;padding-right:82px;gap:12px}
  #view-profile.lvl-profile-dashboard-1198g .account-avatar-large{width:84px;height:84px;font-size:39px}
  #view-profile.lvl-profile-dashboard-1198g .profile-avatar-edit{width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;right:1px!important;bottom:4px!important;font-size:10px!important}
  #view-profile.lvl-profile-dashboard-1198g .profile-identity h2{font-size:25px}
  #view-profile.lvl-profile-dashboard-1198g #accountPublicHandle{font-size:12px}
  #view-profile.lvl-profile-dashboard-1198g .profile-level-card,#view-profile.lvl-profile-dashboard-1198g .profile-plan-card{min-height:116px!important;padding:12px!important}
  #view-profile.lvl-profile-dashboard-1198g .profile-level-card strong,#view-profile.lvl-profile-dashboard-1198g .profile-plan-card strong{font-size:17px!important}
  #view-profile.lvl-profile-dashboard-1198g .profile-plan-card .btn{height:32px!important;min-height:32px!important;padding:0 13px!important;font-size:10px!important}
  .lvl-pd-hero-edit{right:11px;top:11px;padding:8px 9px;font-size:9px}.lvl-pd-mountain{width:59%;right:-19%;top:20%}
  .lvl-pd-inline-account{margin-top:9px}.lvl-pd-public-card{padding:13px;margin-top:9px;border-radius:15px}.lvl-pd-section-head{align-items:flex-start}.lvl-pd-chips{gap:5px}.lvl-pd-chip{font-size:8.5px;padding:5px 8px}
  .lvl-pd-editor{grid-template-columns:1fr}.lvl-pd-editor-actions{grid-column:auto}.lvl-pd-language-row{grid-template-columns:minmax(0,1fr) 100px 30px}
  .lvl-pd-friend-toast,.lvl-pd-profile-toast{bottom:18px;width:calc(100% - 32px);text-align:center}.lvl-pd-friend-controls{width:100%}.lvl-pd-friend-btn,.lvl-pd-friend-state{flex:1 1 auto;text-align:center}
}

/* Avatar preview is intentionally provisional until the user explicitly saves. */
.lvl-avatar-commit{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:100000;width:min(520px,calc(100% - 28px));display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;border:1px solid #513178;border-radius:14px;background:linear-gradient(145deg,rgba(18,20,30,.985),rgba(11,14,22,.995));box-shadow:0 20px 60px rgba(0,0,0,.48),0 0 26px rgba(139,57,241,.15);backdrop-filter:blur(16px)}
.lvl-avatar-commit[hidden]{display:none!important}.lvl-avatar-commit>div:first-child{display:grid;gap:2px}.lvl-avatar-commit strong{font-size:12px;color:#f5efff}.lvl-avatar-commit small{font-size:9px;color:#8991a4}.lvl-avatar-commit-actions{display:flex;gap:8px;flex-shrink:0}.lvl-avatar-commit button{height:36px;border-radius:10px;padding:0 14px;font-size:10px;font-weight:900;cursor:pointer}.lvl-avatar-commit button.ghost{border:1px solid #3b4253;background:#111620;color:#d6d9e2}.lvl-avatar-commit button.primary{border:1px solid #8742f1;background:linear-gradient(135deg,#963eff,#6b25dc);color:#fff}.lvl-avatar-commit button:disabled{opacity:.55;cursor:wait}
@media(max-width:560px){.lvl-avatar-commit{bottom:16px;align-items:stretch;flex-direction:column}.lvl-avatar-commit-actions{display:grid;grid-template-columns:1fr 1fr}.lvl-avatar-commit button{width:100%}}
