/* Shared profile viewer: banner, overlapping identity, actions, information. */
html body #profileOverlay:not(.hidden){padding:24px!important;align-items:center!important;justify-content:center!important;background:rgba(0,0,0,.64)!important;backdrop-filter:blur(12px)!important}
html body #profileOverlay #profileCard{position:relative!important;display:block!important;width:min(440px,100%)!important;max-width:440px!important;max-height:calc(100dvh - 48px)!important;overflow:auto!important;padding:0!important;border:1px solid rgba(255,255,255,.15)!important;border-radius:24px!important;background:var(--bg-2,#232428)!important;box-shadow:0 24px 90px #0007!important;color:var(--text,#f2f3f5)!important}
html body #profileOverlay #profileCard .profile-banner{height:156px!important;min-height:156px!important;margin:0!important;border-radius:0!important;background-size:cover!important;background-position:center!important}
html body #profileOverlay #profileCard .profile-gradient-body{display:flex!important;flex-direction:column!important;gap:14px!important;padding:0 20px 22px!important;background:var(--bg-2,#232428)!important}
html body #profileOverlay #profileCard .profile-head-row{position:relative!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:10px!important;margin:0!important;padding:0!important;order:0}
html body #profileOverlay #profileCard .profile-avatar{position:relative!important;inset:auto!important;flex:none!important;width:96px!important;height:96px!important;margin:-48px 0 0!important;border:6px solid var(--bg-2,#232428)!important;border-radius:50%!important;box-sizing:border-box!important;z-index:2!important}
html body #profileOverlay #profileCard .profile-title{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:6px 8px!important;width:100%!important;min-width:0!important;padding:0!important;margin:0!important}
html body #profileOverlay #profileCard .profile-title h2{flex:1 0 100%!important;margin:0!important;font-size:25px!important;line-height:1.2!important;letter-spacing:-.03em!important;overflow-wrap:anywhere!important}
html body #profileOverlay #profileCard .profile-title .tag{font-size:14px!important;color:var(--muted,#b5bac1)!important;overflow-wrap:anywhere!important}
html body #profileOverlay #profileCard .profile-badges{display:flex!important;position:static!important;flex-wrap:wrap!important;gap:5px!important;width:auto!important;max-width:100%!important;margin:4px 0!important;padding:5px 7px!important;border:1px solid var(--line,#ffffff18)!important;border-radius:9px!important;background:var(--bg-3,#1e1f22)!important}
html body #profileOverlay #profileCard .profile-badge{width:23px!important;height:23px!important;min-width:23px!important;border:0!important;border-radius:4px!important;background:transparent!important;padding:1px!important}
html body #profileOverlay #profileCard .profile-actions{order:1!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin:0!important;padding:0!important;border:0!important}
html body #profileOverlay #profileCard .profile-actions .btn{flex:1 1 auto!important;min-height:40px!important;border-radius:10px!important;padding:9px 12px!important;font-size:12px!important;white-space:normal!important}
html body #profileOverlay #profileCard .profile-section{order:2!important;display:block!important;margin:0!important;padding:16px!important;border:1px solid var(--line,#ffffff12)!important;border-radius:14px!important;background:var(--bg-3,#1e1f22)!important}
html body #profileOverlay #profileCard .profile-section h4{margin:0 0 9px!important;font-size:11px!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.04em!important}
html body #profileOverlay #profileCard .profile-section p{margin:0!important;font-size:14px!important;line-height:1.5!important;overflow-wrap:anywhere!important}
html body #profileOverlay #profileCard .profile-identity-warning{order:1!important}
@media(max-width:600px){html body #profileOverlay:not(.hidden){padding:12px 10px calc(12px + env(safe-area-inset-bottom))!important}html body #profileOverlay #profileCard{max-height:calc(100dvh - 40px - env(safe-area-inset-bottom))!important;border-radius:24px!important}html body #profileOverlay #profileCard .profile-banner{height:140px!important;min-height:140px!important}}
/* Visual order follows source order for keyboard and assistive navigation. */
html body #profileOverlay #profileCard :is(.profile-actions,.profile-section,.profile-identity-warning,.profile-head-row){order:0!important}
html body #profileOverlay #profileCard .profile-actions .btn{min-height:44px!important;font-size:14px!important}
html body #profileOverlay #profileCard .profile-section h4{font-size:12px!important}
html body #profileOverlay #profileCard .profile-section p{font-size:1rem!important}
html body #profileOverlay #profileCard :is(button,a):focus-visible{outline:3px solid #8dceff!important;outline-offset:3px!important}
@media(prefers-reduced-transparency:reduce){html body #profileOverlay:not(.hidden){backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:#101820ee!important}}
/* One continuous user gradient across the entire profile. */
html body #profileOverlay #profileCard{background:linear-gradient(#0006,#0006),var(--profile-full-gradient,linear-gradient(135deg,#4e65f6,#3b3f8f))!important;color:#fff!important;isolation:isolate}
html body #profileOverlay #profileCard .profile-banner:not([style*="background-image"]){background:transparent!important}
html body #profileOverlay #profileCard .profile-gradient-body{background:transparent!important;color:#fff!important}
html body #profileOverlay #profileCard .profile-gradient-body::before,html body #profileOverlay #profileCard .profile-gradient-body::after{display:none!important}
html body #profileOverlay #profileCard .profile-section,html body #profileOverlay #profileCard .profile-badges{background:rgba(0,0,0,.32)!important;border-color:rgba(255,255,255,.17)!important;color:#fff!important}
html body #profileOverlay #profileCard .profile-section :is(h4,p),html body #profileOverlay #profileCard .profile-title h2{color:#fff!important}
html body #profileOverlay #profileCard .profile-title .tag{color:#f0f2f8!important}
html body #profileOverlay #profileCard .profile-avatar{border-color:rgba(20,23,40,.72)!important}
html body #profileOverlay #profileCard .profile-actions .btn.secondary{background:rgba(0,0,0,.32)!important;border:1px solid #ffffff38!important;color:#fff!important}
@media(min-width:700px){
 html body #profileOverlay #profileCard{width:min(720px,calc(100vw - 64px))!important;max-width:720px!important;border-radius:20px!important}
 html body #profileOverlay #profileCard .profile-banner{height:190px!important;min-height:190px!important}
 html body #profileOverlay #profileCard .profile-gradient-body{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:16px!important;padding:0 28px 28px!important}
 html body #profileOverlay #profileCard .profile-head-row{grid-column:1/-1;flex-direction:row!important;align-items:flex-start!important;gap:20px!important}
 html body #profileOverlay #profileCard .profile-avatar{width:112px!important;height:112px!important;margin-top:-44px!important}
 html body #profileOverlay #profileCard .profile-title{padding-top:14px!important;flex:1!important;width:auto!important}
 html body #profileOverlay #profileCard .profile-title h2{font-size:30px!important}
 html body #profileOverlay #profileCard .profile-actions,html body #profileOverlay #profileCard .profile-identity-warning,html body #profileOverlay #profileCard .profile-section:first-of-type{grid-column:1/-1}
 html body #profileOverlay #profileCard .profile-actions .btn{flex:0 1 auto!important;min-width:110px!important}
}

/* Desktop profile refresh: keep the profile readable, balanced and theme-aware. */
@media(min-width:700px){
 html body #profileOverlay:not(.hidden){padding:28px!important}
 html body #profileOverlay #profileCard{width:min(760px,calc(100vw - 56px))!important;max-width:760px!important;max-height:min(820px,calc(100dvh - 56px))!important;border-radius:26px!important;overflow:auto!important}
 html body #profileOverlay #profileCard .profile-banner{height:210px!important;min-height:210px!important}
 html body #profileOverlay #profileCard .profile-gradient-body{display:flex!important;flex-direction:column!important;gap:18px!important;padding:0 28px 28px!important}
 html body #profileOverlay #profileCard .profile-head-row{display:grid!important;grid-template-columns:112px minmax(0,1fr) auto!important;align-items:center!important;gap:18px!important;margin-top:-48px!important}
 html body #profileOverlay #profileCard .profile-avatar{width:112px!important;height:112px!important;margin:0!important;border-width:6px!important;box-shadow:0 12px 30px #0005!important}
 html body #profileOverlay #profileCard .profile-title{align-content:center!important;gap:7px 10px!important;padding:0!important}
 html body #profileOverlay #profileCard .profile-title h2{flex:0 1 auto!important;font-size:30px!important}
 html body #profileOverlay #profileCard .profile-badges{grid-column:2/-1!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;gap:8px!important}
 html body #profileOverlay #profileCard .profile-badge{width:36px!important;height:36px!important;min-width:36px!important;border-radius:50%!important;background:var(--badge-color, #5865f2)!important}
 html body #profileOverlay #profileCard .profile-badge img{width:22px!important;height:22px!important;filter:none!important}
 html body #profileOverlay #profileCard .profile-actions{margin:2px 0 0!important;gap:10px!important}
 html body #profileOverlay #profileCard .profile-actions .btn{flex:0 0 auto!important;min-width:112px!important;padding:0 18px!important;border-radius:12px!important}
 html body #profileOverlay #profileCard .profile-section{padding:18px 20px!important;border-radius:16px!important}
}
@media(max-width:699px){
 html body #profileOverlay #profileCard .profile-badge{border-radius:50%!important;background:var(--badge-color,#5865f2)!important}
 html body #profileOverlay #profileCard .profile-badge img{filter:none!important}
}

/* Desktop profile viewer: keep the identity and its content in one balanced card. */
@media(min-width:901px){
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean{
  display:grid!important;grid-template-rows:176px minmax(0,1fr)!important;
  width:min(960px,calc(100vw - 56px))!important;max-width:min(960px,calc(100vw - 56px))!important;
  height:min(760px,calc(100dvh - 56px))!important;max-height:min(760px,calc(100dvh - 56px))!important;
  overflow:hidden!important;border-radius:24px!important;
 }
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean>.orbyte-r40-banner{grid-row:1!important;height:176px!important;min-height:176px!important;border-radius:23px 23px 0 0!important}
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean>.orbyte-r40-shell{
  grid-row:2!important;display:grid!important;grid-template-columns:minmax(260px,.78fr) minmax(0,1.22fr)!important;
  width:100%!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:hidden!important;
 }
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean .orbyte-r40-sidebar{
  display:block!important;width:auto!important;height:auto!important;max-height:none!important;min-height:0!important;
  padding:22px 20px!important;overflow:auto!important;border-right:1px solid color-mix(in srgb,var(--r50-c2,var(--line)) 24%,transparent)!important;
 }
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean .orbyte-r40-sidebar>:not(.orbyte-r40-hero){display:block!important}
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean .orbyte-r40-hero{
  min-height:0!important;margin:0 0 14px!important;padding:0 0 16px!important;border-bottom:1px solid color-mix(in srgb,var(--r50-c2,var(--line)) 24%,transparent)!important;
 }
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean .orbyte-r40-identity{
  display:grid!important;grid-template-columns:76px minmax(0,1fr)!important;gap:13px!important;min-height:0!important;align-items:center!important;
 }
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean .orbyte-r40-avatar{
  width:76px!important;height:76px!important;min-width:76px!important;flex-basis:76px!important;margin:0!important;border-width:4px!important;
 }
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean .orbyte-r40-name-row h2{font-size:24px!important;line-height:1.12!important}
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean .orbyte-r40-actions{position:static!important;display:flex!important;flex-wrap:wrap!important;margin:14px 0 0!important;gap:8px!important}
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean .orbyte-r40-content{
  display:flex!important;flex-direction:column!important;width:auto!important;height:auto!important;max-height:none!important;min-height:0!important;
  padding:22px 24px 26px!important;overflow:auto!important;scrollbar-gutter:stable!important;
 }
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean .orbyte-r40-tabs{
  position:sticky!important;top:-22px!important;display:flex!important;flex:none!important;gap:18px!important;
  margin:-22px -24px 18px!important;padding:13px 24px 0!important;min-height:48px!important;
 }
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean :is([data-profile-panel],.r1971-mutual-panel){width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean .r1971-mutual-panel>.orbyte-r40-section{width:100%!important;min-height:128px!important;padding:18px!important;border-radius:16px!important}
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean .orbyte-r40-badges .profile-badge{width:28px!important;height:28px!important;min-width:28px!important;background:var(--badge-color,#5865f2)!important;border-radius:50%!important}
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean .orbyte-r40-badges .profile-badge img{width:19px!important;height:19px!important;object-fit:contain!important}
}
@media(min-width:701px) and (max-width:900px){
 html[data-orbyte-client="desktop"] body #profileOverlay #profileCard.orbyte-r40-profile.r197-upgraded.r1971-clean{width:min(720px,calc(100vw - 32px))!important;max-width:min(720px,calc(100vw - 32px))!important;height:min(820px,calc(100dvh - 32px))!important;max-height:min(820px,calc(100dvh - 32px))!important;overflow:auto!important}
}
